Skip to content

Commit

Permalink
Stage work before changing laptop...
Browse files Browse the repository at this point in the history
  • Loading branch information
binghe committed Oct 3, 2024
1 parent 8aa964f commit e994112
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/lambda/barendregt/boehmScript.sml
Original file line number Diff line number Diff line change
Expand Up @@ -4708,17 +4708,18 @@ QED

(* NOTE: ‘ltree_paths (BT' X M r) SUBSET ltree_paths (BT' X (M ISUB ss) r)’ doesn't
hold. Instead, we need to consider certain p and ‘d <= subterm_width M p’.
This theorem holds even when M is not solvable.
*)
Theorem BT_subst_cong :
!X p M r P d y. FINITE X /\ FV M SUBSET X UNION RANK r /\ y IN X UNION RANK r /\
!X P d y p M r. FINITE X /\ FV M SUBSET X UNION RANK r /\ y IN X UNION RANK r /\
P = permutator d /\ subterm_width M p <= d /\
ltree_lookup (BT' X M r) p <> NONE ==>
ltree_lookup (BT' X ([P/y] M) r) p <> NONE
Proof
Q.X_GEN_TAC ‘X’
NTAC 4 GEN_TAC
>> Induct_on ‘p’ >- rw [ltree_lookup]
>> rw []
>> POP_ASSUM MP_TAC
>> Q.PAT_X_ASSUM ‘ltree_lookup (BT' X M r) (h::p) <> NONE MP_TAC
>> qabbrev_tac ‘P = permutator d’
>> reverse (Cases_on ‘solvable M’)
>- simp [BT_def, BT_generator_def, Once ltree_unfold, ltree_lookup_def]
Expand All @@ -4730,6 +4731,9 @@ Proof
MP_TAC (Q.SPECL [‘X’, ‘M’, ‘h::p’, ‘r’] subterm_width_first) \\
simp [ltree_paths_def])
>> DISCH_TAC
>> simp [BT_def, BT_generator_def, Once ltree_unfold, ltree_lookup_def,
LNTH_fromList]
(* NOTE: The rest of this proof is mostly taken from subterm_subst_cong_lemma *)
>> cheat
QED

Expand Down

0 comments on commit e994112

Please sign in to comment.