Skip to content

Commit 1a1f92b

Browse files
committed
Define tail-recursive, guard-less unify function; show it correct
1 parent 33c555b commit 1a1f92b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

examples/algorithms/unification/triangular/first-order/compilation/tcallUnifScript.sml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,4 +768,18 @@ Theorem tunifywl_thm =
768768
sum_CASE_COND, sum_CASE_pair_CASE]
769769
|> SRULE[GSYM tunifywl_def]
770770

771+
Theorem tunify_correct =
772+
kunify_cleaned
773+
|> SRULE [GSYM tunifywl_def, FORALL_PROD, kunifywl_def]
774+
|> Q.SPECL [‘s’, ‘[(t1,t2)]’]
775+
|> SRULE[GSYM abs_EQ_apply_unifkont, dfkunify_def, kunify_def,
776+
cwc_def]
777+
|> SRULE[apply_unifkont_thm, sunify_def]
778+
|> Q.INST [‘s’ |-> ‘fm2sp σ’]
779+
|> SRULE[swfs_def]
780+
|> UNDISCH
781+
|> Q.AP_TERM ‘OPTION_MAP sp2fm’
782+
|> SRULE[OPTION_MAP_COMPOSE, combinTheory.o_DEF]
783+
|> DISCH_ALL
784+
771785
val _ = export_theory();

src/parallel_builds/core/Holmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ INCLUDES += ../../tfl/examples $(patsubst %,../../quotient/%,$(QUOTDIRS)) \
6767
ifneq($(HOLSELFTESTLEVEL),1)
6868
EX2DIRS = AKS algebra algorithms/boyer_moore \
6969
algorithms/unification/triangular/nominal \
70-
algorithms/unification/triangular/first-order \
70+
algorithms/unification/triangular/first-order/compilation \
7171
arm/arm6-verification/correctness \
7272
arm/v4 arm/v7 \
7373
balanced_bst \

0 commit comments

Comments
 (0)