160 val xtra_dest_local: Proof.context attribute |
160 val xtra_dest_local: Proof.context attribute |
161 val xtra_elim_local: Proof.context attribute |
161 val xtra_elim_local: Proof.context attribute |
162 val xtra_intro_local: Proof.context attribute |
162 val xtra_intro_local: Proof.context attribute |
163 val delrule_local: Proof.context attribute |
163 val delrule_local: Proof.context attribute |
164 val cla_modifiers: (Args.T list -> (Method.modifier * Args.T list)) list |
164 val cla_modifiers: (Args.T list -> (Method.modifier * Args.T list)) list |
165 val cla_meth: (claset -> tactic) -> Proof.context -> Proof.method |
165 val cla_meth: (claset -> tactic) -> thm list -> Proof.context -> Proof.method |
166 val cla_meth': (claset -> int -> tactic) -> Proof.context -> Proof.method |
166 val cla_meth': (claset -> int -> tactic) -> thm list -> Proof.context -> Proof.method |
167 val cla_method: (claset -> tactic) -> Args.src -> Proof.context -> Proof.method |
167 val cla_method: (claset -> tactic) -> Args.src -> Proof.context -> Proof.method |
168 val cla_method': (claset -> int -> tactic) -> Args.src -> Proof.context -> Proof.method |
168 val cla_method': (claset -> int -> tactic) -> Args.src -> Proof.context -> Proof.method |
169 val setup: (theory -> theory) list |
169 val setup: (theory -> theory) list |
170 end; |
170 end; |
171 |
171 |
345 if mem_thm (th, safeIs) then |
345 if mem_thm (th, safeIs) then |
346 (warning ("Ignoring duplicate Safe Intr\n" ^ string_of_thm th); |
346 (warning ("Ignoring duplicate Safe Intr\n" ^ string_of_thm th); |
347 cs) |
347 cs) |
348 else |
348 else |
349 let val (safe0_rls, safep_rls) = (*0 subgoals vs 1 or more*) |
349 let val (safe0_rls, safep_rls) = (*0 subgoals vs 1 or more*) |
350 partition (fn rl => nprems_of rl=0) [th] |
350 partition Thm.no_prems [th] |
351 val nI = length safeIs + 1 |
351 val nI = length safeIs + 1 |
352 and nE = length safeEs |
352 and nE = length safeEs |
353 in warn_dup th cs; |
353 in warn_dup th cs; |
354 CS{safeIs = th::safeIs, |
354 CS{safeIs = th::safeIs, |
355 safe0_netpair = insert (nI,nE) (safe0_rls, []) safe0_netpair, |
355 safe0_netpair = insert (nI,nE) (safe0_rls, []) safe0_netpair, |
528 |
528 |
529 fun delSI th |
529 fun delSI th |
530 (cs as CS{safeIs, safeEs, hazIs, hazEs, xtraIs, xtraEs, swrappers, uwrappers, |
530 (cs as CS{safeIs, safeEs, hazIs, hazEs, xtraIs, xtraEs, swrappers, uwrappers, |
531 safe0_netpair, safep_netpair, haz_netpair, dup_netpair, xtra_netpair}) = |
531 safe0_netpair, safep_netpair, haz_netpair, dup_netpair, xtra_netpair}) = |
532 if mem_thm (th, safeIs) then |
532 if mem_thm (th, safeIs) then |
533 let val (safe0_rls, safep_rls) = partition (fn rl => nprems_of rl=0) [th] |
533 let val (safe0_rls, safep_rls) = partition Thm.no_prems [th] |
534 in CS{safe0_netpair = delete (safe0_rls, []) safe0_netpair, |
534 in CS{safe0_netpair = delete (safe0_rls, []) safe0_netpair, |
535 safep_netpair = delete (safep_rls, []) safep_netpair, |
535 safep_netpair = delete (safep_rls, []) safep_netpair, |
536 safeIs = rem_thm (safeIs,th), |
536 safeIs = rem_thm (safeIs,th), |
537 safeEs = safeEs, |
537 safeEs = safeEs, |
538 hazIs = hazIs, |
538 hazIs = hazIs, |
1143 Args.$$$ introN -- bbang >> K (I, xtra_intro_local), |
1143 Args.$$$ introN -- bbang >> K (I, xtra_intro_local), |
1144 Args.$$$ introN -- bang >> K (I, haz_intro_local), |
1144 Args.$$$ introN -- bang >> K (I, haz_intro_local), |
1145 Args.$$$ introN >> K (I, safe_intro_local), |
1145 Args.$$$ introN >> K (I, safe_intro_local), |
1146 Args.$$$ delN >> K (I, delrule_local)]; |
1146 Args.$$$ delN >> K (I, delrule_local)]; |
1147 |
1147 |
1148 val cla_args = Method.only_sectioned_args cla_modifiers; |
1148 fun cla_meth tac prems ctxt = Method.METHOD (fn facts => |
1149 |
1149 ALLGOALS (Method.insert_tac (prems @ facts)) THEN tac (get_local_claset ctxt)); |
1150 fun cla_meth tac ctxt = Method.METHOD (fn facts => |
1150 |
1151 ALLGOALS (Method.insert_tac facts) THEN tac (get_local_claset ctxt)); |
1151 fun cla_meth' tac prems ctxt = Method.METHOD (fn facts => |
1152 |
1152 FIRSTGOAL (Method.insert_tac (prems @ facts) THEN' tac (get_local_claset ctxt))); |
1153 fun cla_meth' tac ctxt = Method.METHOD (fn facts => |
1153 |
1154 FIRSTGOAL (Method.insert_tac facts THEN' tac (get_local_claset ctxt))); |
1154 val cla_method = Method.bang_sectioned_args cla_modifiers o cla_meth; |
1155 |
1155 val cla_method' = Method.bang_sectioned_args cla_modifiers o cla_meth'; |
1156 val cla_method = cla_args o cla_meth; |
|
1157 val cla_method' = cla_args o cla_meth'; |
|
1158 |
1156 |
1159 |
1157 |
1160 |
1158 |
1161 (** setup_methods **) |
1159 (** setup_methods **) |
1162 |
1160 |