Skip to content

Commit 73ed587

Browse files
committed
Fix leaking assumptions in hol-base (IMP_DISJ_THM)
1 parent a3145d5 commit 73ed587

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/boss/Holmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ hol4-base.art: hol4-base.thy hol4-base-unint.art ../opentheory/hol4.int \
7777
bool_defs.ot.art prove_base_assums.ot.art
7878
opentheory info --article -o $@ $<
7979

80-
install: hol4-base.thy hol4-base.art
80+
install: hol4-base.thy hol4-base.art
8181
opentheory install --reinstall $<
8282

8383
all: hol4-base.art

src/boss/hol4-base.thy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: hol-base
2-
version: 1.3
2+
version: 1.4
33
description: HOL basic theories
44
author: HOL OpenTheory Packager <opentheory-packager@hol-theorem-prover.org>
55
license: MIT

src/boss/prove_base_assumsScript.sml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -629,13 +629,23 @@ val th20 = store_thm
629629
\\ PURE_REWRITE_TAC[T_iff,or_T,F_iff,or_F,imp_T,imp_F]
630630
\\ REFL_TAC);
631631

632+
val not_T = hd(amatch``~T``);
633+
634+
(* |- !A B. A ==> B <=> ~A \/ B *)
635+
val imp_disj_thm = store_thm
636+
("imp_disj_thm", concl boolTheory.IMP_DISJ_THM,
637+
rpt gen_tac
638+
>> qspec_then ‘A’ FULL_STRUCT_CASES_TAC bool_cases
639+
>> PURE_REWRITE_TAC[T_imp,not_T,F_imp,not_F,F_or,T_or]
640+
>> REFL_TAC);
641+
632642
(* |- !A B. A \/ B <=> ~A ==> B (DISJ_EQ_IMP) *)
633643
val th21 = save_thm
634644
("th21", (* this forward proof comes from boolScript.sml *)
635645
let
636646
val lemma = not_not |> SPEC ``A:bool``
637647
in
638-
IMP_DISJ_THM
648+
imp_disj_thm
639649
|> SPECL [``~A:bool``,``B:bool``]
640650
|> SYM
641651
|> CONV_RULE
@@ -1567,16 +1577,6 @@ val th97 = store_thm
15671577
\\ TRY (disj1_tac >> first_assum ACCEPT_TAC)
15681578
\\ TRY (disj2_tac >> first_assum ACCEPT_TAC));
15691579

1570-
val not_T = hd(amatch``~T``);
1571-
1572-
(* |- !A B. A ==> B <=> ~A \/ B *)
1573-
val IMP_DISJ_THM = store_thm
1574-
("IMP_DISJ_THM", concl boolTheory.IMP_DISJ_THM,
1575-
rpt gen_tac
1576-
\\ qspec_then`A`FULL_STRUCT_CASES_TAC bool_cases
1577-
\\ PURE_REWRITE_TAC[T_imp,not_T,F_imp,not_F,F_or,T_or]
1578-
\\ REFL_TAC);
1579-
15801580
(* This is no more needed
15811581
val some_neq_none = hd(amatch``_ <> Data_Option_none``);
15821582
*)
@@ -1661,8 +1661,8 @@ val COND_EXPAND_IMP = save_thm
16611661
val t2 = “t2:bool”
16621662
val nb = mk_neg b;
16631663
val nnb = mk_neg nb;
1664-
val imp_th1 = SPECL [b, t1] IMP_DISJ_THM;
1665-
val imp_th2a = SPECL [nb, t2] IMP_DISJ_THM
1664+
val imp_th1 = SPECL [b, t1] imp_disj_thm;
1665+
val imp_th2a = SPECL [nb, t2] imp_disj_thm
16661666
val imp_th2b = SUBST_CONV [nnb |-> (SPEC b (CONJUNCT1 NOT_CLAUSES))]
16671667
(mk_disj (nnb, t2)) (mk_disj (nnb, t2))
16681668
val imp_th2 = TRANS imp_th2a imp_th2b
@@ -1703,9 +1703,9 @@ val OR_CONG = save_thm
17031703
val th4 = ASSUME ctm1
17041704
val th5 = ASSUME ctm2
17051705
val th6 = SUBS [SPEC Q (CONJUNCT1 NOT_CLAUSES)]
1706-
(SUBS [SPECL[notQ, PeqP'] IMP_DISJ_THM] th4)
1706+
(SUBS [SPECL[notQ, PeqP'] imp_disj_thm] th4)
17071707
val th7 = SUBS [SPEC P' (CONJUNCT1 NOT_CLAUSES)]
1708-
(SUBS [SPECL[notP', QeqQ'] IMP_DISJ_THM] th5)
1708+
(SUBS [SPECL[notP', QeqQ'] imp_disj_thm] th5)
17091709
val th8 = ASSUME P'
17101710
val th9 = DISJ1 th8 Q'
17111711
val th10 = ASSUME QeqQ'

0 commit comments

Comments
 (0)