(**************************************************************************)
include "delayed_updating/substitution/fsubst.ma".
-include "delayed_updating/substitution/lift_prototerm.ma".
-include "delayed_updating/substitution/lift_structure.ma".
-include "delayed_updating/syntax/preterm.ma".
-include "delayed_updating/syntax/prototerm_proper.ma".
+include "delayed_updating/substitution/lift_prototerm_eq.ma".
(* FOCALIZED SUBSTITUTION ***************************************************)
-lemma lift_fsubst_sn (f) (t) (u) (p): Ꝕu →
- (↑[f]t)[⋔(⊗p)←↑[↑[p]f]u] ⊆ ↑[f](t[⋔p←u]).
-#f #t #u #p #Hu #ql * *
+(* Constructions with lift for preterm **************************************)
+
+lemma lift_term_fsubst_sn (f) (t) (u) (p):
+ (↑[f]t)[⋔(↑[f]p)←↑[↑[p]f]u] ⊆ ↑[f](t[⋔p←u]).
+#f #t #u #p #ql * *
[ #rl * #r #Hr #H1 #H2 destruct
- >lift_append_proper_dx
- /4 width=1 by subset_in_ext_f1_dx, or_introl/
+ >lift_path_append
+ /4 width=3 by in_comp_lift_path_term, or_introl, ex2_intro/
| * #q #Hq #H1 #H0
- @(ex2_intro … H1) @or_intror @conj // *
- [ <list_append_empty_dx #H2 destruct
- elim (lift_root f q) #r #_ #Hr /2 width=2 by/
- | #l #r #H2 destruct
- @H0 -H0 [| <lift_append_proper_dx /2 width=3 by ppc_lcons/ ]
- ]
+ @(ex2_intro … H1) @or_intror @conj // -Hq #r #H2 destruct
+ /2 width=2 by/
]
qed-.
-lemma lift_fsubst_dx (f) (t) (u) (p): Ꝕu → p ϵ ▵t → t ϵ 𝐓 →
- â\86\91[f](t[â\8b\94pâ\86\90u]) â\8a\86 (â\86\91[f]t)[â\8b\94(â\8a\97p)←↑[↑[p]f]u].
-#f #t #u #p #Hu #H1p #H2p #ql * #q * *
+lemma lift_term_fsubst_dx (f) (t) (u) (p):
+ â\86\91[f](t[â\8b\94pâ\86\90u]) â\8a\86 (â\86\91[f]t)[â\8b\94(â\86\91[f]p)←↑[↑[p]f]u].
+#f #t #u #p #ql * #q * *
[ #r #Hu #H1 #H2 destruct
@or_introl @ex2_intro
- [|| <lift_append_proper_dx /2 width=1 by/ ]
+ [|| <lift_path_append // ]
/2 width=3 by ex2_intro/
| #Hq #H0 #H1 destruct
- @or_intror @conj [ /2 width=1 by subset_in_ext_f1_dx/ ] *
- [ <list_append_empty_dx #Hr @(H0 … (𝐞)) -H0
- <list_append_empty_dx @H2p -H2p /2 width=1 by prototerm_in_comp_root/
- | #l #r #Hr
- elim (lift_inv_append_proper_dx … Hr) -Hr // #s1 #s2 #Hs1 #_ #H1 destruct
- lapply (H2p … Hs1) -H2p -Hs1 /2 width=2 by ex_intro/
- ]
+ @or_intror @conj [ /2 width=1 by in_comp_lift_path_term/ ] -Hq #r #Hr
+ elim (lift_path_inv_append_sn … Hr) -Hr #s1 #s2 #Hs1 #_ #H1 destruct
+ lapply (lift_path_inj … Hs1) -Hs1 #H1 destruct
+ /2 width=2 by/
]
qed-.
-lemma lift_fsubst (f) (t) (u) (p): Ꝕu → p ϵ ▵t → t ϵ 𝐓 →
- (â\86\91[f]t)[â\8b\94(â\8a\97p)←↑[↑[p]f]u] ⇔ ↑[f](t[⋔p←u]).
-/4 width=3 by lift_fsubst_sn, conj, lift_fsubst_dx/ qed.
+lemma lift_term_fsubst (f) (t) (u) (p):
+ (â\86\91[f]t)[â\8b\94(â\86\91[f]p)←↑[↑[p]f]u] ⇔ ↑[f](t[⋔p←u]).
+/3 width=1 by lift_term_fsubst_sn, conj, lift_term_fsubst_dx/ qed.