Skip to content

Commit e23ab44

Browse files
committed
reorganisation
reflection and holDerivation don't need to depend on ordinalTheory. move lca-related stuff into a subdirectory that depends on ordinalTheory. add some explicit removal of type abbreviations to avoid conflicts during merge_grammars.
1 parent 9eab94a commit e23ab44

23 files changed

+56
-4
lines changed

Holmakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VMLDIR = ../vml
33
endif
44

55
HOLHOL = $(VMLDIR)/hol-light
6-
INCLUDES = $(VMLDIR) $(HOLHOL)/syntax-lib $(HOLHOL)/set-theory $(HOLHOL)/standard/syntax $(HOLHOL)/standard/semantics $(HOLDIR)/examples/countable $(HOLDIR)/examples/set-theory/hol_sets
6+
INCLUDES = $(VMLDIR) $(HOLHOL)/syntax-lib $(HOLHOL)/set-theory $(HOLHOL)/standard/syntax $(HOLHOL)/standard/semantics $(HOLDIR)/examples/countable
77
OPTIONS = QUIT_ON_FAILURE
88

99
ifdef POLY
@@ -16,7 +16,7 @@ TARGETS = $(patsubst %.sml,%.uo,$(THYFILES))
1616
all: $(TARGETS) $(HOLHEAP)
1717
.PHONY: all
1818

19-
BARE_THYS = $(HOLHOL)/syntax-lib/holSyntaxLibTheory $(HOLHOL)/set-theory/setSpecTheory $(HOLHOL)/standard/syntax/holAxiomsSyntaxTheory $(HOLDIR)/examples/set-theory/hol_sets/ordinalTheory
19+
BARE_THYS = $(HOLHOL)/syntax-lib/holSyntaxLibTheory $(HOLHOL)/set-theory/setSpecTheory $(HOLHOL)/standard/syntax/holAxiomsSyntaxTheory
2020

2121
DEPS = $(patsubst %,%.uo,$(BARE_THYS))
2222

holDerivationScript.sml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ open HolKernel boolLib boolSimps bossLib lcsymtacs listTheory alistTheory pred_s
22
open miscLib holSyntaxLibTheory holSyntaxTheory holSyntaxExtraTheory
33
val _ = new_theory"holDerivation"
44

5+
val _ = temp_tight_equality()
6+
57
(* TODO: move? *)
68
val type1_size_append = prove(
79
``∀l1 l2. type1_size (l1 ++ l2) = type1_size l1 + type1_size l2``,

lca/Holmakefile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ifndef VMLDIR
2+
VMLDIR = ../vml
3+
endif
4+
5+
HOLHOL = $(VMLDIR)/hol-light
6+
INCLUDES = .. $(HOLDIR)/examples/set-theory/hol_sets
7+
OPTIONS = QUIT_ON_FAILURE
8+
9+
ifdef POLY
10+
HOLHEAP = heap
11+
PARENT_HOLHEAP = ../heap
12+
EXTRA_CLEANS = $(HOLHEAP) $(HOLHEAP).o
13+
14+
THYFILES = $(patsubst %Script.sml,%Theory.uo,$(wildcard *.sml))
15+
TARGETS = $(patsubst %.sml,%.uo,$(THYFILES))
16+
all: $(TARGETS) $(HOLHEAP)
17+
.PHONY: all
18+
19+
BARE_THYS = ../reflectionTheory $(HOLDIR)/examples/set-theory/hol_sets/ordinalTheory
20+
21+
DEPS = $(patsubst %,%.uo,$(BARE_THYS))
22+
23+
$(HOLHEAP): $(DEPS)
24+
$(protect $(HOLDIR)/bin/buildheap) -b $(PARENT_HOLHEAP) -o $(HOLHEAP) $(BARE_THYS)
25+
endif
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lcaScript.sml renamed to lca/lcaScript.sml

+15-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ open ordinalTheory wellorderTheory
44
open setSpecTheory miscLib
55
val _ = new_theory"lca"
66

7+
(* TODO: this functionality should be implemented by Parse *)
8+
local val ct = current_theory () in
9+
fun remove_tyabbrev s =
10+
let
11+
val _ = Parse.temp_set_grammars(type_grammar.remove_abbreviation(Parse.type_grammar())s,Parse.term_grammar())
12+
val q = String.concat["val ",ct,"_grammars = (type_grammar.remove_abbreviation(#1 ",ct,"_grammars)\"",s,"\",#2 ",ct,"_grammars);"]
13+
val _ = adjoin_to_theory{sig_ps=NONE, struct_ps=SOME(fn pp => PP.add_string pp q)}
14+
in () end
15+
end
16+
val _ = remove_tyabbrev"reln"
17+
val _ = remove_tyabbrev"inf"
18+
(* -- *)
19+
720
(* TODO: move *)
821
val MULT_LE_EXP = store_thm("MULT_LE_EXP",
922
``∀a:num b. a ≠ 1 ⇒ a * b ≤ a ** b``,
@@ -510,7 +523,7 @@ val implies_set_theory = store_thm("implies_set_theory",
510523
``strong_limit_cardinal (UNIV:'U set) ∧
511524
regular_cardinal (UNIV:'U set)
512525
513-
∃(mem:'U reln). is_set_theory mem ∧
526+
∃(mem:'U->'U->bool). is_set_theory mem ∧
514527
(∀s. s ≺ (UNIV:'U set) ⇒ ∃x. s = { a | a <: x }) ∧
515528
(¬countable (UNIV:'U set) ⇒ ∃inf. is_infinite mem inf)``,
516529
strip_tac >>
@@ -657,7 +670,7 @@ val strongly_inaccessible_def = Define`
657670

658671
val strongly_inaccessible_imp = store_thm("strongly_inaccessible_imp",
659672
``strongly_inaccessible (UNIV:'U set) ⇒
660-
∃(mem:'U reln). is_set_theory mem ∧
673+
∃(mem:'U->'U->bool). is_set_theory mem ∧
661674
(∀s. s ≺ (UNIV:'U set) ⇒ ∃x. s = { a | a <: x }) ∧
662675
(∃inf. is_infinite mem inf)``,
663676
rw[strongly_inaccessible_def] >> metis_tac[implies_set_theory])
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

reflectionScript.sml

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ open holConstrainedExtensionTheory
77
val _ = temp_tight_equality()
88
val _ = new_theory"reflection"
99

10+
(* TODO: this functionality should be implemented by Parse *)
11+
local val ct = current_theory () in
12+
fun remove_tyabbrev s =
13+
let
14+
val _ = Parse.temp_set_grammars(type_grammar.remove_abbreviation(Parse.type_grammar())s,Parse.term_grammar())
15+
val q = String.concat["val ",ct,"_grammars = (type_grammar.remove_abbreviation(#1 ",ct,"_grammars)\"",s,"\",#2 ",ct,"_grammars);"]
16+
val _ = adjoin_to_theory{sig_ps=NONE, struct_ps=SOME(fn pp => PP.add_string pp q)}
17+
in () end
18+
end
19+
val _ = remove_tyabbrev"reln"
20+
(* -- *)
21+
1022
(* TODO: move *)
1123
val termsem_typesem_matchable = store_thm("termsem_typesem_matchable",
1224
``is_set_theory ^mem ⇒

0 commit comments

Comments
 (0)