equal
deleted
inserted
replaced
66 fold_rev Logic.all vars (Logic.list_implies (prems, concl)) |
66 fold_rev Logic.all vars (Logic.list_implies (prems, concl)) |
67 end |
67 end |
68 |
68 |
69 fun mk_cell ctxt solve_tac (vars, prems, lhs, rhs) mfun = Lazy.lazy (fn _ => |
69 fun mk_cell ctxt solve_tac (vars, prems, lhs, rhs) mfun = Lazy.lazy (fn _ => |
70 let |
70 let |
71 val goals = Proof_Context.cterm_of ctxt o mk_goal (vars, prems, mfun $ lhs, mfun $ rhs) |
71 val goals = Thm.cterm_of ctxt o mk_goal (vars, prems, mfun $ lhs, mfun $ rhs) |
72 in |
72 in |
73 case try_proof (goals @{const_name Orderings.less}) solve_tac of |
73 case try_proof (goals @{const_name Orderings.less}) solve_tac of |
74 Solved thm => Less thm |
74 Solved thm => Less thm |
75 | Stuck thm => |
75 | Stuck thm => |
76 (case try_proof (goals @{const_name Orderings.less_eq}) solve_tac of |
76 (case try_proof (goals @{const_name Orderings.less_eq}) solve_tac of |
199 Pretty.quote (Syntax.pretty_term ctxt relation)]) |
199 Pretty.quote (Syntax.pretty_term ctxt relation)]) |
200 else () |
200 else () |
201 |
201 |
202 in (* 4: proof reconstruction *) |
202 in (* 4: proof reconstruction *) |
203 st |> |
203 st |> |
204 (PRIMITIVE (cterm_instantiate [apply2 (Proof_Context.cterm_of ctxt) (rel, relation)]) |
204 (PRIMITIVE (cterm_instantiate [apply2 (Thm.cterm_of ctxt) (rel, relation)]) |
205 THEN (REPEAT (rtac @{thm "wf_mlex"} 1)) |
205 THEN (REPEAT (rtac @{thm "wf_mlex"} 1)) |
206 THEN (rtac @{thm "wf_empty"} 1) |
206 THEN (rtac @{thm "wf_empty"} 1) |
207 THEN EVERY (map prove_row clean_table)) |
207 THEN EVERY (map prove_row clean_table)) |
208 end |
208 end |
209 end) 1 st; |
209 end) 1 st; |