-lemma cpm_inv_flat1: ∀n,h,I,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓕ{I}V1.U1 ➡[n, h] U2 →
- ∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ U1 ➡[n, h] T2 &
- U2 = ⓕ{I}V2.T2
- | (⦃G, L⦄ ⊢ U1 ➡[n, h] U2 ∧ I = Cast)
- | ∃∃m. ⦃G, L⦄ ⊢ V1 ➡[m, h] U2 & I = Cast & n = ⫯m
- | ∃∃p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V2 & ⦃G, L⦄ ⊢ W1 ➡[h] W2 &
- ⦃G, L.ⓛW1⦄ ⊢ T1 ➡[n, h] T2 &
- U1 = ⓛ{p}W1.T1 &
- U2 = ⓓ{p}ⓝW2.V2.T2 & I = Appl
- | ∃∃p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h] V & ⬆*[1] V ≡ V2 &
- ⦃G, L⦄ ⊢ W1 ➡[h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[n, h] T2 &
- U1 = ⓓ{p}W1.T1 &
- U2 = ⓓ{p}W2.ⓐV2.T2 & I = Appl.
-#n #h #I #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_flat1 … H) -H *
-[ #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct
- elim (isrt_inv_max … Hc) -Hc #nV #nT #HcV #HcT #H destruct
- elim (isrt_inv_shift … HcV) -HcV #HcV #H destruct
- /4 width=5 by or5_intro0, ex3_2_intro, ex2_intro/
-| #cU #U12 #H1 #H2 destruct
- /5 width=3 by isrt_inv_plus_O_dx, or5_intro1, conj, ex2_intro/
-| #cU #H12 #H1 #H2 destruct
- elim (isrt_inv_plus_SO_dx … Hc) -Hc // #m #Hc #H destruct
- /4 width=3 by or5_intro2, ex3_intro, ex2_intro/
-| #cV #cW #cT #p #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12 #H1 #H2 #H3 #H4 destruct
- lapply (isrt_inv_plus_O_dx … Hc ?) -Hc // #Hc
- elim (isrt_inv_max … Hc) -Hc #n0 #nT #Hc #HcT #H destruct
- elim (isrt_inv_max … Hc) -Hc #nV #nW #HcV #HcW #H destruct
- elim (isrt_inv_shift … HcV) -HcV #HcV #H destruct
- elim (isrt_inv_shift … HcW) -HcW #HcW #H destruct
- /4 width=11 by or5_intro3, ex6_6_intro, ex2_intro/
-| #cV #cW #cT #p #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HW12 #HT12 #H1 #H2 #H3 #H4 destruct
- lapply (isrt_inv_plus_O_dx … Hc ?) -Hc // #Hc
- elim (isrt_inv_max … Hc) -Hc #n0 #nT #Hc #HcT #H destruct
- elim (isrt_inv_max … Hc) -Hc #nV #nW #HcV #HcW #H destruct
- elim (isrt_inv_shift … HcV) -HcV #HcV #H destruct
- elim (isrt_inv_shift … HcW) -HcW #HcW #H destruct
- /4 width=13 by or5_intro4, ex7_7_intro, ex2_intro/
-]
-qed-.
-