include "delayed_updating/substitution/fsubst.ma".
include "delayed_updating/substitution/lift_prototerm_eq.ma".
-include "delayed_updating/substitution/lift_structure.ma".
-include "delayed_updating/syntax/preterm.ma".
-include "delayed_updating/syntax/prototerm_proper.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)āš ”[š ¢[f]p]u] ā š ”[f](t[āpāu]).
+#f #t #u #p #ql * *
[ #rl * #r #Hr #H1 #H2 destruct
- >lift_append_proper_dx
- /4 width=5 by in_comp_lift_bi, in_ppc_comp_trans, or_introl, ex2_intro/
+ >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_path_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 Ļµ š ā
- ā[f](t[āpāu]) ā (ā[f]t)[ā(āp)āā[ā[p]f]u].
-#f #t #u #p #Hu #H1p #H2p #ql * #q * *
+lemma lift_term_fsubst_dx (f) (t) (u) (p):
+ š ”[f](t[āpāu]) ā (š ”[f]t)[ā(š ”[f]p)āš ”[š ¢[f]p]u].
+#f #t #u #p #ql * #q * *
[ #r #Hu #H1 #H2 destruct
@or_introl @ex2_intro
- [|| <lift_append_proper_dx /2 width=5 by in_ppc_comp_trans/ ]
+ [|| <lift_path_append // ]
/2 width=3 by ex2_intro/
| #Hq #H0 #H1 destruct
- @or_intror @conj [ /2 width=1 by in_comp_lift_bi/ ] *
- [ <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 Ļµ š ā
- (ā[f]t)[ā(āp)āā[ā[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):
+ (š ”[f]t)[ā(š ”[f]p)āš ”[š ¢[f]p]u] ā š ”[f](t[āpāu]).
+/3 width=1 by lift_term_fsubst_sn, conj, lift_term_fsubst_dx/ qed.