equal
deleted
inserted
replaced
15 |
15 |
16 |
16 |
17 (* Conversion into rewrite rules *) |
17 (* Conversion into rewrite rules *) |
18 |
18 |
19 fun mk_eq th = case Thm.concl_of th of |
19 fun mk_eq th = case Thm.concl_of th of |
20 _ $ (Const (\<^const_name>\<open>iff\<close>, _) $ _ $ _) $ _ => th |
20 _ $ \<^Const_>\<open>iff for _ _\<close> $ _ => th |
21 | _ $ (Const (\<^const_name>\<open>eq\<close>, _) $ _ $ _) $ _ => th |
21 | _ $ \<^Const_>\<open>eq _ for _ _\<close> $ _ => th |
22 | _ $ (Const (\<^const_name>\<open>Not\<close>, _) $ _) $ _ => th RS @{thm not_P_imp_P_iff_F} |
22 | _ $ \<^Const_>\<open>Not for _\<close> $ _ => th RS @{thm not_P_imp_P_iff_F} |
23 | _ => make_iff_T th; |
23 | _ => make_iff_T th; |
24 |
24 |
25 |
25 |
26 val mksimps_pairs = |
26 val mksimps_pairs = |
27 [(\<^const_name>\<open>imp\<close>, [@{thm mp}]), |
27 [(\<^const_name>\<open>imp\<close>, [@{thm mp}]), |
31 (\<^const_name>\<open>False\<close>, [])]; |
31 (\<^const_name>\<open>False\<close>, [])]; |
32 |
32 |
33 fun mk_atomize pairs = |
33 fun mk_atomize pairs = |
34 let fun atoms th = |
34 let fun atoms th = |
35 (case Thm.concl_of th of |
35 (case Thm.concl_of th of |
36 Const ("Trueprop", _) $ p => |
36 Const ("Trueprop", _) $ p => (* FIXME formal const name!? *) |
37 (case head_of p of |
37 (case head_of p of |
38 Const(a,_) => |
38 Const(a,_) => |
39 (case AList.lookup (op =) pairs a of |
39 (case AList.lookup (op =) pairs a of |
40 SOME(rls) => maps atoms ([th] RL rls) |
40 SOME(rls) => maps atoms ([th] RL rls) |
41 | NONE => [th]) |
41 | NONE => [th]) |