equal
deleted
inserted
replaced
49 val tracing: bool Unsynchronized.ref |
49 val tracing: bool Unsynchronized.ref |
50 val CONTEXT_REWRITE_RULE: term * term list * thm * thm list |
50 val CONTEXT_REWRITE_RULE: term * term list * thm * thm list |
51 -> thm -> thm * term list |
51 -> thm -> thm * term list |
52 val RIGHT_ASSOC: Proof.context -> thm -> thm |
52 val RIGHT_ASSOC: Proof.context -> thm -> thm |
53 |
53 |
54 val prove: bool -> cterm * tactic -> thm |
54 val prove: Proof.context -> bool -> term * tactic -> thm |
55 end; |
55 end; |
56 |
56 |
57 structure Rules: RULES = |
57 structure Rules: RULES = |
58 struct |
58 struct |
59 |
59 |
790 in |
790 in |
791 (th2, filter_out restricted (!tc_list)) |
791 (th2, filter_out restricted (!tc_list)) |
792 end; |
792 end; |
793 |
793 |
794 |
794 |
795 fun prove strict (ptm, tac) = |
795 fun prove ctxt strict (t, tac) = |
796 let |
796 let |
797 val thy = Thm.theory_of_cterm ptm; |
797 val ctxt' = Variable.auto_fixes t ctxt; |
798 val t = Thm.term_of ptm; |
|
799 val ctxt = Proof_Context.init_global thy |> Variable.auto_fixes t; |
|
800 in |
798 in |
801 if strict then Goal.prove ctxt [] [] t (K tac) |
799 if strict |
802 else Goal.prove ctxt [] [] t (K tac) |
800 then Goal.prove ctxt' [] [] t (K tac) |
|
801 else Goal.prove ctxt' [] [] t (K tac) |
803 handle ERROR msg => (warning msg; raise RULES_ERR "prove" msg) |
802 handle ERROR msg => (warning msg; raise RULES_ERR "prove" msg) |
804 end; |
803 end; |
805 |
804 |
806 end; |
805 end; |