src/Pure/Isar/method.ML
changeset 6532 9d79a304aecc
parent 6500 68ba555ac59a
child 6546 995a66249a9b
equal deleted inserted replaced
6531:8064ed198068 6532:9d79a304aecc
    58   val local_qed: text option -> Proof.state -> Proof.state Seq.seq
    58   val local_qed: text option -> Proof.state -> Proof.state Seq.seq
    59   val local_terminal_proof: text -> Proof.state -> Proof.state Seq.seq
    59   val local_terminal_proof: text -> Proof.state -> Proof.state Seq.seq
    60   val local_immediate_proof: Proof.state -> Proof.state Seq.seq
    60   val local_immediate_proof: Proof.state -> Proof.state Seq.seq
    61   val local_default_proof: Proof.state -> Proof.state Seq.seq
    61   val local_default_proof: Proof.state -> Proof.state Seq.seq
    62   val global_qed: bstring option -> theory attribute list option -> text option
    62   val global_qed: bstring option -> theory attribute list option -> text option
    63     -> Proof.state -> theory * (string * string * thm)
    63     -> Proof.state -> theory * {kind: string, name: string, thm: thm}
    64   val global_terminal_proof: text -> Proof.state -> theory * (string * string * thm)
    64   val global_terminal_proof: text -> Proof.state -> theory * {kind: string, name: string, thm: thm}
    65   val global_immediate_proof: Proof.state -> theory * (string * string * thm)
    65   val global_immediate_proof: Proof.state -> theory * {kind: string, name: string, thm: thm}
    66   val global_default_proof: Proof.state -> theory * (string * string * thm)
    66   val global_default_proof: Proof.state -> theory * {kind: string, name: string, thm: thm}
    67   val setup: (theory -> theory) list
    67   val setup: (theory -> theory) list
    68 end;
    68 end;
    69 
    69 
    70 structure Method: METHOD =
    70 structure Method: METHOD =
    71 struct
    71 struct
   101 
   101 
   102 val same = METHOD (ALLGOALS o same_tac);
   102 val same = METHOD (ALLGOALS o same_tac);
   103 val assumption = METHOD (fn facts => FIRSTGOAL (same_tac facts THEN' assume_tac));
   103 val assumption = METHOD (fn facts => FIRSTGOAL (same_tac facts THEN' assume_tac));
   104 
   104 
   105 val asm_finish = METHOD (K (FINISHED (ALLGOALS assume_tac)));
   105 val asm_finish = METHOD (K (FINISHED (ALLGOALS assume_tac)));
       
   106 
       
   107 
       
   108 (* fold / unfold definitions *)
       
   109 
       
   110 val fold = METHOD0 o fold_goals_tac;
       
   111 val unfold = METHOD0 o rewrite_goals_tac;
   106 
   112 
   107 
   113 
   108 (* rule *)
   114 (* rule *)
   109 
   115 
   110 fun res th i rule = Thm.biresolution false [(false, th)] i rule handle THM _ => Seq.empty;
   116 fun res th i rule = Thm.biresolution false [(false, th)] i rule handle THM _ => Seq.empty;
   315  [("fail", no_args fail, "force failure"),
   321  [("fail", no_args fail, "force failure"),
   316   ("succeed", no_args succeed, "succeed"),
   322   ("succeed", no_args succeed, "succeed"),
   317   ("same", no_args same, "insert facts, nothing else"),
   323   ("same", no_args same, "insert facts, nothing else"),
   318   ("assumption", no_args assumption, "proof by assumption"),
   324   ("assumption", no_args assumption, "proof by assumption"),
   319   ("finish", no_args asm_finish, "finish proof by assumption"),
   325   ("finish", no_args asm_finish, "finish proof by assumption"),
       
   326   ("fold", thms_args fold, "fold definitions"),
       
   327   ("unfold", thms_args unfold, "unfold definitions"),
   320   ("rule", thms_args rule, "apply primitive rule")];
   328   ("rule", thms_args rule, "apply primitive rule")];
   321 
   329 
   322 
   330 
   323 (* setup *)
   331 (* setup *)
   324 
   332