975 SOME _ => raise ERR "uniq_compose" "Not unique!" |
975 SOME _ => raise ERR "uniq_compose" "Not unique!" |
976 | NONE => th) |
976 | NONE => th) |
977 | NONE => raise ERR "uniq_compose" "No result" |
977 | NONE => raise ERR "uniq_compose" "No result" |
978 end |
978 end |
979 |
979 |
980 val reflexivity_thm = thm "refl" |
980 val reflexivity_thm = @{thm refl} |
981 val substitution_thm = thm "subst" |
981 val substitution_thm = @{thm subst} |
982 val mp_thm = thm "mp" |
982 val mp_thm = @{thm mp} |
983 val imp_antisym_thm = thm "light_imp_as" |
983 val imp_antisym_thm = @{thm light_imp_as} |
984 val disch_thm = thm "impI" |
984 val disch_thm = @{thm impI} |
985 val ccontr_thm = thm "ccontr" |
985 val ccontr_thm = @{thm ccontr} |
986 |
986 |
987 val meta_eq_to_obj_eq_thm = thm "meta_eq_to_obj_eq" |
987 val meta_eq_to_obj_eq_thm = @{thm meta_eq_to_obj_eq} |
988 |
988 |
989 val gen_thm = thm "HOLallI" |
989 val gen_thm = @{thm HOLallI} |
990 val choose_thm = thm "exE" |
990 val choose_thm = @{thm exE} |
991 val exists_thm = thm "exI" |
991 val exists_thm = @{thm exI} |
992 val conj_thm = thm "conjI" |
992 val conj_thm = @{thm conjI} |
993 val conjunct1_thm = thm "conjunct1" |
993 val conjunct1_thm = @{thm conjunct1} |
994 val conjunct2_thm = thm "conjunct2" |
994 val conjunct2_thm = @{thm conjunct2} |
995 val spec_thm = thm "spec" |
995 val spec_thm = @{thm spec} |
996 val disj_cases_thm = thm "disjE" |
996 val disj_cases_thm = @{thm disjE} |
997 val disj1_thm = thm "disjI1" |
997 val disj1_thm = @{thm disjI1} |
998 val disj2_thm = thm "disjI2" |
998 val disj2_thm = @{thm disjI2} |
999 |
999 |
1000 local |
1000 local |
1001 val th = thm "not_def" |
1001 val th = @{thm not_def} |
1002 val thy = theory_of_thm th |
1002 val thy = theory_of_thm th |
1003 val pp = Thm.reflexive (cterm_of thy (Const(@{const_name Trueprop},HOLogic.boolT-->propT))) |
1003 val pp = Thm.reflexive (cterm_of thy (Const(@{const_name Trueprop},HOLogic.boolT-->propT))) |
1004 in |
1004 in |
1005 val not_elim_thm = Thm.combination pp th |
1005 val not_elim_thm = Thm.combination pp th |
1006 end |
1006 end |
1007 |
1007 |
1008 val not_intro_thm = Thm.symmetric not_elim_thm |
1008 val not_intro_thm = Thm.symmetric not_elim_thm |
1009 val abs_thm = thm "ext" |
1009 val abs_thm = @{thm ext} |
1010 val trans_thm = thm "trans" |
1010 val trans_thm = @{thm trans} |
1011 val symmetry_thm = thm "sym" |
1011 val symmetry_thm = @{thm sym} |
1012 val transitivity_thm = thm "trans" |
1012 val transitivity_thm = @{thm trans} |
1013 val eqmp_thm = thm "iffD1" |
1013 val eqmp_thm = @{thm iffD1} |
1014 val eqimp_thm = thm "HOL4Setup.eq_imp" |
1014 val eqimp_thm = @{thm HOL4Setup.eq_imp} |
1015 val comb_thm = thm "cong" |
1015 val comb_thm = @{thm cong} |
1016 |
1016 |
1017 (* Beta-eta normalizes a theorem (only the conclusion, not the * |
1017 (* Beta-eta normalizes a theorem (only the conclusion, not the * |
1018 hypotheses!) *) |
1018 hypotheses!) *) |
1019 |
1019 |
1020 fun beta_eta_thm th = |
1020 fun beta_eta_thm th = |
2066 end |
2061 end |
2067 |
2062 |
2068 fun to_isa_term tm = tm |
2063 fun to_isa_term tm = tm |
2069 |
2064 |
2070 local |
2065 local |
2071 val light_nonempty = thm "light_ex_imp_nonempty" |
2066 val light_nonempty = @{thm light_ex_imp_nonempty} |
2072 val ex_imp_nonempty = thm "ex_imp_nonempty" |
2067 val ex_imp_nonempty = @{thm ex_imp_nonempty} |
2073 val typedef_hol2hol4 = thm "typedef_hol2hol4" |
2068 val typedef_hol2hol4 = @{thm typedef_hol2hol4} |
2074 val typedef_hol2hollight = thm "typedef_hol2hollight" |
2069 val typedef_hol2hollight = @{thm typedef_hol2hollight} |
2075 in |
2070 in |
2076 fun new_type_definition thyname thmname tycname hth thy = |
2071 fun new_type_definition thyname thmname tycname hth thy = |
2077 case HOL4DefThy.get thy of |
2072 case HOL4DefThy.get thy of |
2078 Replaying _ => (thy,hth) |
2073 Replaying _ => (thy,hth) |
2079 | _ => |
2074 | _ => |