equal
deleted
inserted
replaced
20 local |
20 local |
21 val iff_const = HOLogic.eq_const HOLogic.boolT; |
21 val iff_const = HOLogic.eq_const HOLogic.boolT; |
22 |
22 |
23 fun addIff th = |
23 fun addIff th = |
24 (case HOLogic.dest_Trueprop (#prop(rep_thm th)) of |
24 (case HOLogic.dest_Trueprop (#prop(rep_thm th)) of |
25 (Const("not",_) $ A) => |
25 (Const("Not",_) $ A) => |
26 AddSEs [zero_var_indexes (th RS notE)] |
26 AddSEs [zero_var_indexes (th RS notE)] |
27 | (con $ _ $ _) => |
27 | (con $ _ $ _) => |
28 if con=iff_const |
28 if con=iff_const |
29 then (AddSIs [zero_var_indexes (th RS iffD2)]; |
29 then (AddSIs [zero_var_indexes (th RS iffD2)]; |
30 AddSDs [zero_var_indexes (th RS iffD1)]) |
30 AddSDs [zero_var_indexes (th RS iffD1)]) |
34 handle _ => error ("AddIffs: theorem must be unconditional\n" ^ |
34 handle _ => error ("AddIffs: theorem must be unconditional\n" ^ |
35 string_of_thm th) |
35 string_of_thm th) |
36 |
36 |
37 fun delIff th = |
37 fun delIff th = |
38 (case HOLogic.dest_Trueprop (#prop(rep_thm th)) of |
38 (case HOLogic.dest_Trueprop (#prop(rep_thm th)) of |
39 (Const("not",_) $ A) => |
39 (Const("Not",_) $ A) => |
40 Delrules [zero_var_indexes (th RS notE)] |
40 Delrules [zero_var_indexes (th RS notE)] |
41 | (con $ _ $ _) => |
41 | (con $ _ $ _) => |
42 if con=iff_const |
42 if con=iff_const |
43 then Delrules [zero_var_indexes (th RS iffD2), |
43 then Delrules [zero_var_indexes (th RS iffD2), |
44 zero_var_indexes (th RS iffD1)] |
44 zero_var_indexes (th RS iffD1)] |
81 in |
81 in |
82 |
82 |
83 fun mk_meta_eq r = case concl_of r of |
83 fun mk_meta_eq r = case concl_of r of |
84 Const("==",_)$_$_ => r |
84 Const("==",_)$_$_ => r |
85 | _$(Const("op =",_)$_$_) => r RS eq_reflection |
85 | _$(Const("op =",_)$_$_) => r RS eq_reflection |
86 | _$(Const("not",_)$_) => r RS not_P_imp_P_eq_False |
86 | _$(Const("Not",_)$_) => r RS not_P_imp_P_eq_False |
87 | _ => r RS P_imp_P_eq_True; |
87 | _ => r RS P_imp_P_eq_True; |
88 (* last 2 lines requires all formulae to be of the from Trueprop(.) *) |
88 (* last 2 lines requires all formulae to be of the from Trueprop(.) *) |
89 |
89 |
90 val simp_thms = map prover |
90 val simp_thms = map prover |
91 [ "(x=x) = True", |
91 [ "(x=x) = True", |