equal
deleted
inserted
replaced
36 (***********************************************************************************) |
36 (***********************************************************************************) |
37 |
37 |
38 val anyt = Free ("t", TFree ("'t", [])); |
38 val anyt = Free ("t", TFree ("'t", [])); |
39 |
39 |
40 fun strong_ind_simproc tab = |
40 fun strong_ind_simproc tab = |
41 Simplifier.make_simproc @{context} "strong_ind" |
41 Simplifier.make_simproc \<^context> "strong_ind" |
42 {lhss = [\<^term>\<open>x::'a::{}\<close>], |
42 {lhss = [\<^term>\<open>x::'a::{}\<close>], |
43 proc = fn _ => fn ctxt => fn ct => |
43 proc = fn _ => fn ctxt => fn ct => |
44 let |
44 let |
45 fun close p t f = |
45 fun close p t f = |
46 let val vs = Term.add_vars t [] |
46 let val vs = Term.add_vars t [] |
317 SOME (SOME _) => true | _ => false; |
317 SOME (SOME _) => true | _ => false; |
318 |
318 |
319 fun to_pred_simproc rules = |
319 fun to_pred_simproc rules = |
320 let val rules' = map mk_meta_eq rules |
320 let val rules' = map mk_meta_eq rules |
321 in |
321 in |
322 Simplifier.make_simproc @{context} "to_pred" |
322 Simplifier.make_simproc \<^context> "to_pred" |
323 {lhss = [anyt], |
323 {lhss = [anyt], |
324 proc = fn _ => fn ctxt => fn ct => |
324 proc = fn _ => fn ctxt => fn ct => |
325 lookup_rule (Proof_Context.theory_of ctxt) |
325 lookup_rule (Proof_Context.theory_of ctxt) |
326 (Thm.prop_of #> Logic.dest_equals) rules' (Thm.term_of ct)} |
326 (Thm.prop_of #> Logic.dest_equals) rules' (Thm.term_of ct)} |
327 end; |
327 end; |