equal
deleted
inserted
replaced
208 fun dup_intr th = zero_var_indexes (th RS classical); |
208 fun dup_intr th = zero_var_indexes (th RS classical); |
209 |
209 |
210 fun dup_elim th = |
210 fun dup_elim th = |
211 let |
211 let |
212 val rl = (th RSN (2, revcut_rl)) |> Thm.assumption 2 |> Seq.hd; |
212 val rl = (th RSN (2, revcut_rl)) |> Thm.assumption 2 |> Seq.hd; |
213 val ctxt = ProofContext.init_global (Thm.theory_of_thm rl); |
213 val ctxt = Proof_Context.init_global (Thm.theory_of_thm rl); |
214 in rule_by_tactic ctxt (TRYALL (etac revcut_rl)) rl end; |
214 in rule_by_tactic ctxt (TRYALL (etac revcut_rl)) rl end; |
215 |
215 |
216 |
216 |
217 (**** Classical rule sets ****) |
217 (**** Classical rule sets ****) |
218 |
218 |
848 ); |
848 ); |
849 |
849 |
850 val get_global_claset = #1 o GlobalClaset.get; |
850 val get_global_claset = #1 o GlobalClaset.get; |
851 val map_global_claset = GlobalClaset.map o apfst; |
851 val map_global_claset = GlobalClaset.map o apfst; |
852 |
852 |
853 val get_context_cs = #2 o GlobalClaset.get o ProofContext.theory_of; |
853 val get_context_cs = #2 o GlobalClaset.get o Proof_Context.theory_of; |
854 fun map_context_cs f = GlobalClaset.map (apsnd |
854 fun map_context_cs f = GlobalClaset.map (apsnd |
855 (fn ContextCS {swrappers, uwrappers} => make_context_cs (f (swrappers, uwrappers)))); |
855 (fn ContextCS {swrappers, uwrappers} => make_context_cs (f (swrappers, uwrappers)))); |
856 |
856 |
857 fun global_claset_of thy = |
857 fun global_claset_of thy = |
858 let val (cs, ctxt_cs) = GlobalClaset.get thy |
858 let val (cs, ctxt_cs) = GlobalClaset.get thy |
859 in context_cs (ProofContext.init_global thy) cs (ctxt_cs) end; |
859 in context_cs (Proof_Context.init_global thy) cs (ctxt_cs) end; |
860 |
860 |
861 |
861 |
862 (* context dependent components *) |
862 (* context dependent components *) |
863 |
863 |
864 fun add_context_safe_wrapper wrapper = map_context_cs (apfst ((AList.update (op =) wrapper))); |
864 fun add_context_safe_wrapper wrapper = map_context_cs (apfst ((AList.update (op =) wrapper))); |