qed.
lemma cpg_ell_drops: ∀c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≡ K.ⓛV → ⦃G, K⦄ ⊢ V ⬈[c, h] V2 →
- ⬆*[⫯i] V2 ≡ T2 → ⦃G, L⦄ ⊢ #i ⬈[(↓c)+𝟘𝟙, h] T2.
+ ⬆*[⫯i] V2 ≡ T2 → ⦃G, L⦄ ⊢ #i ⬈[c+𝟘𝟙, h] T2.
#c #h #G #K #V #V2 #i elim i -i
[ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_ell/
| #i #IH #L0 #T0 #H0 #HV2 #HVT2
| ∃∃cV,K,V,V2. ⬇*[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ⬈[cV, h] V2 &
⬆*[⫯i] V2 ≡ T2 & c = cV
| ∃∃cV,K,V,V2. ⬇*[i] L ≡ K.ⓛV & ⦃G, K⦄ ⊢ V ⬈[cV, h] V2 &
- ⬆*[⫯i] V2 ≡ T2 & c = (↓cV) + 𝟘𝟙.
+ ⬆*[⫯i] V2 ≡ T2 & c = cV + 𝟘𝟙.
#c #h #G #i elim i -i
[ #L #T2 #H elim (cpg_inv_zero1 … H) -H * /3 width=1 by or3_intro0, conj/
/4 width=8 by drops_refl, ex4_4_intro, or3_intro2, or3_intro1/
| ∃∃cV,i,K,V,V2. ⬇*[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ⬈[cV, h] V2 &
⬆*[⫯i] V2 ≡ T2 & I = LRef i & c = cV
| ∃∃cV,i,K,V,V2. ⬇*[i] L ≡ K.ⓛV & ⦃G, K⦄ ⊢ V ⬈[cV, h] V2 &
- ⬆*[⫯i] V2 ≡ T2 & I = LRef i & c = (↓cV) + 𝟘𝟙.
+ ⬆*[⫯i] V2 ≡ T2 & I = LRef i & c = cV + 𝟘𝟙.
#c #h * #n #G #L #T2 #H
[ elim (cpg_inv_sort1 … H) -H *
/3 width=3 by or4_intro0, or4_intro1, ex3_intro, conj/
(* Properties with generic slicing for local environments *******************)
+(* Note: it should use drops_split_trans_pair2 *)
lemma cpg_lifts: ∀c,h,G. d_liftable2 (cpg h c G).
#c #h #G #K #T generalize in match c; -c
@(fqup_wf_ind_eq … G K T) -G -K -T #G0 #K0 #T0 #IH #G #K * *
elim (lifts_inv_lref1 … H1) -H1 #i2 #Hf #H destruct
lapply (drops_trans … HLK … HK0 ??) -HLK [3,6: |*: // ] #H
elim (drops_split_trans … H) -H [1,6: |*: /2 width=6 by after_uni_dx/ ] #Y #HL0 #HY
- lapply (drops_inv_tls_at … Hf … HY) -HY #HY
+ lapply (drops_tls_at … Hf … HY) -HY #HY
elim (drops_inv_skip2 … HY) -HY #L0 #W #HLK0 #HVW #H destruct
elim (IH … HV2 … HLK0 … HVW) -IH /2 width=2 by fqup_lref/ -K -K0 -V #W2 #HVW2 #HW2
elim (lifts_total W2 (𝐔❴⫯i2❵)) #U2 #HWU2
elim (lifts_inv_lref2 … H1) -H1 #i1 #Hf #H destruct
lapply (drops_split_div … HLK (𝐔❴i1❵) ???) -HLK [4,8: * |*: // ] #Y0 #HK0 #HLY0
lapply (drops_conf … HL0 … HLY0 ??) -HLY0 [3,6: |*: /2 width=6 by after_uni_dx/ ] #HLY0
- lapply (drops_inv_tls_at … Hf … HLY0) -HLY0 #HLY0
+ lapply (drops_tls_at … Hf … HLY0) -HLY0 #HLY0
elim (drops_inv_skip1 … HLY0) -HLY0 #K0 #V #HLK0 #HVW #H destruct
elim (IH … HW2 … HLK0 … HVW) -IH /2 width=2 by fqup_lref/ -L -L0 -W #V2 #HVW2 #HV2
lapply (lifts_trans … HVW2 … HWU2 ??) -W2 [3,6: |*: // ] #HVU2