]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/delayed_updating/substitution/fsubst_lift.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / substitution / fsubst_lift.ma
index 08ff3ebb3af1d19d8a5e47511a1aead4143fec2e..ad0de7230e87c803d0aade06d7b13f53738f9ab3 100644 (file)
 (**************************************************************************)
 
 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)←🠡[🠢[f]p]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 ϵ 𝐓 →
-      ↑[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=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 ϵ 𝐓 →
-      (↑[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.