equal
deleted
inserted
replaced
20 |
20 |
21 fun mk_measures domT mfuns = |
21 fun mk_measures domT mfuns = |
22 let |
22 let |
23 val relT = HOLogic.mk_setT (HOLogic.mk_prodT (domT, domT)) |
23 val relT = HOLogic.mk_setT (HOLogic.mk_prodT (domT, domT)) |
24 val mlexT = (domT --> HOLogic.natT) --> relT --> relT |
24 val mlexT = (domT --> HOLogic.natT) --> relT --> relT |
25 fun mk_ms [] = Const (@{const_abbrev Set.empty}, relT) |
25 fun mk_ms [] = Const (\<^const_abbrev>\<open>Set.empty\<close>, relT) |
26 | mk_ms (f::fs) = |
26 | mk_ms (f::fs) = |
27 Const (@{const_name mlex_prod}, mlexT) $ f $ mk_ms fs |
27 Const (\<^const_name>\<open>mlex_prod\<close>, mlexT) $ f $ mk_ms fs |
28 in |
28 in |
29 mk_ms mfuns |
29 mk_ms mfuns |
30 end |
30 end |
31 |
31 |
32 fun del_index n [] = [] |
32 fun del_index n [] = [] |
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 = Thm.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 ctxt (goals @{const_name Orderings.less}) solve_tac of |
73 (case try_proof ctxt (goals \<^const_name>\<open>Orderings.less\<close>) solve_tac of |
74 Solved thm => Less thm |
74 Solved thm => Less thm |
75 | Stuck thm => |
75 | Stuck thm => |
76 (case try_proof ctxt (goals @{const_name Orderings.less_eq}) solve_tac of |
76 (case try_proof ctxt (goals \<^const_name>\<open>Orderings.less_eq\<close>) solve_tac of |
77 Solved thm2 => LessEq (thm2, thm) |
77 Solved thm2 => LessEq (thm2, thm) |
78 | Stuck thm2 => |
78 | Stuck thm2 => |
79 if Thm.prems_of thm2 = [HOLogic.Trueprop $ @{term False}] then False thm2 |
79 if Thm.prems_of thm2 = [HOLogic.Trueprop $ \<^term>\<open>False\<close>] then False thm2 |
80 else None (thm2, thm) |
80 else None (thm2, thm) |
81 | _ => raise Match) (* FIXME *) |
81 | _ => raise Match) (* FIXME *) |
82 | _ => raise Match) |
82 | _ => raise Match) |
83 end); |
83 end); |
84 |
84 |