@@ -701,15 +701,15 @@ End
701701
702702val _ = Parse.add_infix(" subtype" ,401 ,Parse.NONASSOC)
703703Overload subtype =``RTC subtype1``
704- val subtype_Tyvar = save_thm( " subtype_Tyvar " ,
704+ Theorem subtype_Tyvar =
705705 ``ty subtype (Tyvar x)``
706706 |> SIMP_CONV(srw_ss()++boolSimps.DNF_ss)
707- [Once relationTheory.RTC_CASES2,subtype1_cases])
707+ [Once relationTheory.RTC_CASES2,subtype1_cases]
708708val _ = export_rewrites[" subtype_Tyvar" ]
709- val subtype_Tyapp = save_thm( " subtype_Tyapp " ,
709+ Theorem subtype_Tyapp =
710710 ``ty subtype (Tyapp name args)``
711711 |> SIMP_CONV(srw_ss()++boolSimps.DNF_ss)
712- [Once relationTheory.RTC_CASES2,subtype1_cases])
712+ [Once relationTheory.RTC_CASES2,subtype1_cases]
713713
714714Theorem subtype_trans:
715715 !x y z. x subtype y /\ y subtype z ==> x subtype z
@@ -869,33 +869,33 @@ End
869869
870870val _ = Parse.add_infix(" subterm" ,401 ,Parse.NONASSOC)
871871Overload subterm = ``RTC subterm1``
872- val subterm_Var = save_thm( " subterm_Var " ,
872+ Theorem subterm_Var =
873873 ``tm subterm (Var x ty)``
874874 |> SIMP_CONV(srw_ss()++boolSimps.DNF_ss)
875- [Once relationTheory.RTC_CASES2,subterm1_cases])
876- val subterm_Const = save_thm( " subterm_Const " ,
875+ [Once relationTheory.RTC_CASES2,subterm1_cases]
876+ Theorem subterm_Const =
877877 ``tm subterm (Const x ty)``
878878 |> SIMP_CONV(srw_ss()++boolSimps.DNF_ss)
879- [Once relationTheory.RTC_CASES2,subterm1_cases])
879+ [Once relationTheory.RTC_CASES2,subterm1_cases]
880880val _ = export_rewrites[" subterm_Var" ," subterm_Const" ]
881- val subterm_Comb = save_thm( " subterm_Comb " ,
881+ Theorem subterm_Comb =
882882 ``tm subterm (Comb t1 t2)``
883883 |> SIMP_CONV(srw_ss()++boolSimps.DNF_ss)
884- [Once relationTheory.RTC_CASES2,subterm1_cases])
885- val subterm_Abs = save_thm( " subterm_Abs " ,
884+ [Once relationTheory.RTC_CASES2,subterm1_cases]
885+ Theorem subterm_Abs =
886886 ``tm subterm (Abs v t)``
887887 |> SIMP_CONV(srw_ss()++boolSimps.DNF_ss)
888- [Once relationTheory.RTC_CASES2,subterm1_cases])
888+ [Once relationTheory.RTC_CASES2,subterm1_cases]
889889
890- val subterm_welltyped = save_thm( " subterm_welltyped " ,
890+ Theorem subterm_welltyped =
891891 let val th =
892892 Q.prove(`∀tm ty. tm has_type ty ⇒ ∀t. t subterm tm ⇒ welltyped t`,
893893 ho_match_mp_tac has_type_strongind >>
894894 simp[subterm_Comb,subterm_Abs] >> rw[] >>
895895 rw[] >> imp_res_tac WELLTYPED_LEMMA >> simp[])
896896 in METIS_PROVE[th,welltyped_def]
897897 ``∀t tm. welltyped tm ∧ t subterm tm ⇒ welltyped t``
898- end )
898+ end
899899
900900(* term ordering *)
901901
@@ -1598,13 +1598,13 @@ Proof
15981598 transitive_alpha_lt, antisymmetric_alpha_lt]
15991599QED
16001600
1601- val hypset_ok_append = save_thm( " hypset_ok_append " ,
1601+ Theorem hypset_ok_append =
16021602 Q.ISPEC`alpha_lt` sortingTheory.SORTED_APPEND_GEN
1603- |> REWRITE_RULE[GSYM hypset_ok_def])
1603+ |> REWRITE_RULE[GSYM hypset_ok_def]
16041604
1605- val hypset_ok_el_less = save_thm( " hypset_ok_el_less " ,
1605+ Theorem hypset_ok_el_less =
16061606 MATCH_MP sortingTheory.SORTED_EL_LESS transitive_alpha_lt
1607- |> REWRITE_RULE[GSYM hypset_ok_def])
1607+ |> REWRITE_RULE[GSYM hypset_ok_def]
16081608
16091609(* term_union lemmas *)
16101610
@@ -3484,7 +3484,8 @@ End
34843484
34853485val variant_ind = fetch "-" "variant_ind"
34863486
3487- val variant_vsubst_thm = save_thm("variant_vsubst_thm",prove(
3487+ Theorem variant_vsubst_thm =
3488+ prove(
34883489 ``!xs v x name.
34893490 (xs = [x]) /\ (v = (Var name ty)) ==>
34903491 (variant xs (Var name ty) =
@@ -3518,10 +3519,10 @@ val variant_vsubst_thm = save_thm("variant_vsubst_thm",prove(
35183519 \\ `VARIANT_PRIMES x (STRCAT (explode name) "'") ty < n \/
35193520 n < VARIANT_PRIMES x (STRCAT (explode name) "'") ty` by DECIDE_TAC
35203521 \\ RES_TAC \\ FULL_SIMP_TAC std_ss [])
3521- |> SIMP_RULE std_ss [] |> SPEC_ALL);
3522+ |> SIMP_RULE std_ss [] |> SPEC_ALL
35223523
3523- val VSUBST_thm = save_thm("VSUBST_thm",
3524- REWRITE_RULE[SYM variant_vsubst_thm] VSUBST_def)
3524+ Theorem VSUBST_thm =
3525+ REWRITE_RULE[SYM variant_vsubst_thm] VSUBST_def
35253526
35263527Definition subtract_def:
35273528 subtract l1 l2 = FILTER (\t. ~(MEM t l2)) l1
@@ -3577,7 +3578,8 @@ Proof
35773578 \\ REPEAT STRIP_TAC \\ EQ_TAC \\ REPEAT STRIP_TAC \\ METIS_TAC []
35783579QED
35793580
3580- val variant_inst_thm = save_thm("variant_inst_thm",prove(
3581+ Theorem variant_inst_thm =
3582+ prove(
35813583 ``!xs v x name a.
35823584 welltyped a ∧
35833585 (xs = frees a) /\
@@ -3624,7 +3626,7 @@ val variant_inst_thm = save_thm("variant_inst_thm",prove(
36243626 \\ REPEAT STRIP_TAC
36253627 \\ `k < n \/ n < k` by DECIDE_TAC
36263628 \\ RES_TAC \\ FULL_SIMP_TAC std_ss [])
3627- |> SIMP_RULE std_ss [] |> SPEC_ALL);
3629+ |> SIMP_RULE std_ss [] |> SPEC_ALL
36283630
36293631Theorem INST_CORE_Abs_thm:
36303632 ∀v t env tyin. welltyped (Abs v t) ⇒
@@ -3734,16 +3736,16 @@ QED
37343736(* some derived rules *)
37353737
37363738val assume = proves_rules |> CONJUNCTS |> el 2
3737- val deductAntisym_equation = save_thm("deductAntisym_equation",
3738- proves_rules |> CONJUNCTS |> el 4)
3739- val eqMp_equation = save_thm("eqMp_equation",
3739+ Theorem deductAntisym_equation =
3740+ proves_rules |> CONJUNCTS |> el 4
3741+ Theorem eqMp_equation =
37403742 proves_rules |> CONJUNCTS |> el 5
3741- |> REWRITE_RULE[GSYM AND_IMP_INTRO])
3742- val refl_equation = save_thm("refl_equation",
3743- proves_rules |> CONJUNCTS |> el 9)
3744- val appThm_equation = save_thm("appThm_equation",
3743+ |> REWRITE_RULE[GSYM AND_IMP_INTRO]
3744+ Theorem refl_equation =
3745+ proves_rules |> CONJUNCTS |> el 9
3746+ Theorem appThm_equation =
37453747 proves_rules |> CONJUNCTS |> el 8
3746- |> REWRITE_RULE[GSYM AND_IMP_INTRO])
3748+ |> REWRITE_RULE[GSYM AND_IMP_INTRO]
37473749
37483750Theorem addAssum:
37493751 ∀thy h c a. (thy,h) |- c ∧ term_ok (sigof thy) a ∧ (a has_type Bool) ⇒
0 commit comments