lemma fsupq_cpxs_trans: ∀h,g,L1,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 ➡*[g] U2 →
∀T1. ⦃L1, T1⦄ ⊃⸮ ⦃L2, T2⦄ →
∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡*[g] U1 & ⦃L1, U1⦄ ⊃* ⦃L2, U2⦄.
-#h #g #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 [ (* /3 width=3/ *) |
+#h #g #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 [ /3 width=3/ ]
#T #T2 #HT2 #_ #IHTU2 #T1 #HT1
elim (fsupq_cpx_trans … HT1 … HT2) -T #T #HT1 #HT2
elim (IHTU2 … HT2) -T2 /3 width=3/
-
-
-(*
- elim H -L1 -L2 -T1 -T2 [2,3,4,5: /3 width=5/ ]
-[ #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
- elim (IHT12 … HTU2) -IHT12 -HTU2 #T #HT1 #HT2
- elim (lift_total T d e) #U #HTU
- lapply (cpx_lift … HT1 … HLK1 … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
-| #I #L1 #V2 #U2 #HVU2
- elim (lift_total U2 0 1) /4 width=9/
-]
qed-.
-
+
lemma fsup_ssta_trans: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ →
∀U2,l. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l+1, U2⦄ →
∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡[g] U1 & ⦃L1, U1⦄ ⊃⸮ ⦃L2, U2⦄.
/3 width=4 by fsup_cpx_trans, ssta_cpx/ qed-.
-*)
\ No newline at end of file
lemma lsubc_ldrop_O1_trans: ∀RP,L1,L2. L1 ⊑[RP] L2 → ∀K2,e. ⇩[0, e] L2 ≡ K2 →
∃∃K1. ⇩[0, e] L1 ≡ K1 & K1 ⊑[RP] K2.
#RP #L1 #L2 #H elim H -L1 -L2
-[ #X #e #H
- >(ldrop_inv_atom1 … H) -H /2 width=3/
+[ #X #e #H elim (ldrop_inv_atom1 … H) -H /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #X #e #H
- elim (ldrop_inv_O1 … H) -H * #He #H destruct
- [ elim (IHL12 L2 0 ?) -IHL12 // #X #H <(ldrop_inv_refl … H) -H /3 width=3/
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #H destruct
+ [ elim (IHL12 L2 0) -IHL12 // #X #H <(ldrop_inv_O2 … H) -H /3 width=3/
| elim (IHL12 … H) -L2 /3 width=3/
]
| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #X #e #H
- elim (ldrop_inv_O1 … H) -H * #He #H destruct
- [ elim (IHL12 L2 0 ?) -IHL12 // #X #H <(ldrop_inv_refl … H) -H /3 width=7/
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #H destruct
+ [ elim (IHL12 L2 0) -IHL12 // #X #H <(ldrop_inv_O2 … H) -H /3 width=7/
| elim (IHL12 … H) -L2 /3 width=3/
]
qed-.
∀L1,K1,d,e. ⇩[d, e] L1 ≡ K1 → ∀K2. K1 ⊑[RP] K2 →
∃∃L2. L1 ⊑[RP] L2 & ⇩[d, e] L2 ≡ K2.
#RR #RS #RP #Hacp #Hacr #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #X #H
- >(lsubc_inv_atom1 … H) -H /2 width=3/
+[ #d #X #H elim (lsubc_inv_atom1 … H) -H /2 width=3/
| #L1 #I #V1 #X #H
elim (lsubc_inv_pair1 … H) -H *
[ #K1 #HLK1 #H destruct /3 width=3/
#h #g #L1 #L2 #H elim H -L1 -L2
[ /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK1
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HVW1 #HW12 #HW2 #HWV2 #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK1
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
]
#h #g #L1 #L2 #H elim H -L1 -L2
[ /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK2
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
| #L1 #L2 #V1 #V2 #W1 #W2 #l #HV1 #HVW1 #HW12 #HW2 #HWV2 #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK2
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
]
#h #g #L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2
[ #I1 #L1 #V1 #H
elim (snv_inv_lref … H) -H #I2 #L2 #V2 #H #HV2
- lapply (ldrop_inv_refl … H) -H #H destruct //
+ lapply (ldrop_inv_O2 … H) -H #H destruct //
|2: *
-|5: /3 width=7 by snv_inv_lift/
+|5,6: /3 width=7 by snv_inv_lift/
]
[1,3: #a #I #L1 #V1 #T1 #H elim (snv_inv_bind … H) -H //
|2,4: * #L1 #V1 #T1 #H
#h #g #L1 #L2 #H elim H -L1 -L2
[ /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK1
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK1
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
]
#h #g #L1 #L2 #H elim H -L1 -L2
[ /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK2
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
| #L1 #L2 #V1 #V2 #W1 #W2 #l #HW12 #HVW1 #HWV2 #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK2
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=6/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=6/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
]
lemma cpr_append: l_appendable_sn … cpr.
#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/ /2 width=3/
#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
-lapply (ldrop_fwd_ldrop2_length … HK0) #H
+lapply (ldrop_fwd_length_lt2 … HK0) #H
@(cpr_delta … (L@@K0) V1 … HVW2) //
@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
qed.
lemma cpx_append: ∀h,g. l_appendable_sn … (cpx h g).
#h #g #K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/ /2 width=3/
#I #K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
-lapply (ldrop_fwd_ldrop2_length … HK0) #H
+lapply (ldrop_fwd_length_lt2 … HK0) #H
@(cpx_delta … I … (L@@K0) V1 … HVW2) //
@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
qed.
fact trf_inv_atom_aux: ∀I,L,T. L ⊢ 𝐑⦃T⦄ → L = ⋆ → T = ⓪{I} → ⊥.
#I #L #T * -L -T
[ #L #K #V #i #HLK #H1 #H2 destruct
- lapply (ldrop_inv_atom1 … HLK) -HLK #H destruct
+ elim (ldrop_inv_atom1 … HLK) -HLK #H destruct
| #L #V #T #_ #_ #H destruct
| #L #V #T #_ #_ #H destruct
| #J #L #V #T #_ #_ #H destruct
lemma crf_labst_last: ∀L,T,W. L ⊢ 𝐑⦃T⦄ → ⋆.ⓛW @@ L ⊢ 𝐑⦃T⦄.
#L #T #W #H elim H -L -T /2 width=1/
#L #K #V #i #HLK
-lapply (ldrop_fwd_ldrop2_length … HLK) #Hi
+lapply (ldrop_fwd_length_lt2 … HLK) #Hi
lapply (ldrop_O1_append_sn_le … HLK … (⋆.ⓛW)) -HLK /2 width=2/ -Hi /2 width=3/
qed.
∀L2. L1 = ⋆.ⓛW @@ L2 → L2 ⊢ 𝐑⦃T⦄.
#L1 #T #W #H elim H -L1 -T /2 width=1/ /3 width=1/
[ #L1 #K1 #V1 #i #HLK1 #L2 #H destruct
- lapply (ldrop_fwd_ldrop2_length … HLK1)
+ lapply (ldrop_fwd_length_lt2 … HLK1)
>append_length >commutative_plus normalize in ⊢ (??% → ?); #H
elim (le_to_or_lt_eq i (|L2|) ?) /2 width=1/ -H #Hi destruct
[ elim (ldrop_O1_lt … Hi) #I2 #K2 #V2 #HLK2
lapply (ldrop_O1_inv_append1_le … HLK1 … HLK2) -HLK1 /2 width=2/ -Hi
normalize #H destruct /2 width=3/
| lapply (ldrop_O1_inv_append1_ge … HLK1 ?) -HLK1 // <minus_n_n #H
- lapply (ldrop_inv_refl … H) -H #H destruct
+ lapply (ldrop_inv_O2 … H) -H #H destruct
]
| #a #I #L1 #V #T #HI #_ #IHT #L2 #H destruct /3 width=1/
]
lemma fsup_cpr_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➡ U2 →
∃∃L,U1. L1 ⊢ ➡ L & L ⊢ T1 ➡ U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
-#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
-elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-elim (ldrop_lpr_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
-lapply (cpr_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
+ elim (lift_total U2 d e) #T2 #HUT2
+ lapply (cpr_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
+| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+ elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+ elim (lift_total T d e) #U #HTU
+ elim (ldrop_lpr_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+ lapply (cpr_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+]
qed-.
| fsup_bind_dx : ∀a,I,L,V,T. fsup L (ⓑ{a,I}V.T) (L.ⓑ{I}V) T
| fsup_flat_dx : ∀I,L,V,T. fsup L (ⓕ{I}V.T) L T
| fsup_ldrop_lt: ∀L,K,T,U,d,e.
- ⇩[d, e] L ≡ K → ⇧[d, e] T ≡ U → |K| < |L| → fsup L U K T
+ ⇩[d, e] L ≡ K → ⇧[d, e] T ≡ U → 0 < e → fsup L U K T
| fsup_ldrop : ∀L1,K1,K2,T1,T2,U1,d,e.
⇩[d, e] L1 ≡ K1 → ⇧[d, e] T1 ≡ U1 →
fsup K1 T1 K2 T2 → fsup L1 U1 K2 T2
(* Basic properties *********************************************************)
lemma fsup_lref_S_lt: ∀I,L,K,V,T,i. 0 < i → ⦃L, #(i-1)⦄ ⊃ ⦃K, T⦄ → ⦃L.ⓑ{I}V, #i⦄ ⊃ ⦃K, T⦄.
-/3 width=7/ qed.
+#I #L #K #V #T #i #Hi #H /3 width=7 by fsup_ldrop, ldrop_ldrop, lift_lref_ge_minus/ (**) (* auto too slow without trace *)
+qed.
lemma fsup_lref: ∀I,K,V,i,L. ⇩[0, i] L ≡ K.ⓑ{I}V → ⦃L, #i⦄ ⊃ ⦃K, V⦄.
#I #K #V #i @(nat_elim1 i) -i #i #IH #L #H
fact fsup_fwd_length_lref1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ →
∀i. T1 = #i → |L2| < |L1|.
#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2
-[1,5: normalize //
+[1: normalize //
|3: #a
+|5: /2 width=4 by ldrop_fwd_length_lt4/
|6: #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #i #H destruct
- lapply (ldrop_fwd_length … HLK1) -HLK1 #HLK1
+ lapply (ldrop_fwd_length_le4 … HLK1) -HLK1 #HLK1
elim (lift_inv_lref2 … HTU1) -HTU1 * #Hdei #H destruct
@(lt_to_le_to_lt … HLK1) /2 width=2/
] #I #L #V #T #j #H destruct
#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 //
[ #a #I #L #V #T #j #H destruct
| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #i #H destruct
- lapply (ldrop_fwd_length … HLK1) -HLK1 #HLK1
+ lapply (ldrop_fwd_length_le4 … HLK1) -HLK1 #HLK1
elim (lift_inv_lref2 … HTU1) -HTU1 * #Hdei #H destruct
@(transitive_le … HLK1) /2 width=2/
]
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/relocation/fsupq.ma".
+
+(* OPTIONAL SUPCLOSURE ******************************************************)
+
+(* alternative definition of fsupq *)
+definition fsupqa: bi_relation lenv term ≝ bi_RC … fsup.
+
+interpretation
+ "optional structural successor (closure) alternative"
+ 'SupTermOptAlt L1 T1 L2 T2 = (fsupqa L1 T1 L2 T2).
+
+(* Basic properties *********************************************************)
+
+lemma fsupqa_refl: bi_reflexive … fsupqa.
+// qed.
+
+lemma fsupqa_ldrop: ∀K1,K2,T1,T2. ⦃K1, T1⦄ ⊃⊃⸮ ⦃K2, T2⦄ →
+ ∀L1,d,e. ⇩[d, e] L1 ≡ K1 →
+ ∀U1. ⇧[d, e] T1 ≡ U1 → ⦃L1, U1⦄ ⊃⊃⸮ ⦃K2, T2⦄.
+#K1 #K2 #T1 #T2 * [ /3 width=7/ ] * #H1 #H2 destruct
+#L1 #d #e #HLK #U1 #HTU elim (eq_or_gt e) [2: /3 width=5/ ] #H destruct
+>(ldrop_inv_O2 … HLK) -L1 >(lift_inv_O2 … HTU) -T2 -d //
+qed.
+
+(* Main properties **********************************************************)
+
+theorem fsupq_fsupqa: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃⸮ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃⊃⸮ ⦃L2, T2⦄.
+#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 // /2 width=1/ /2 width=7/
+qed.
+
+(* Main inversion properties ************************************************)
+
+theorem fsupqa_inv_fsupq: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃⊃⸮ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃⸮ ⦃L2, T2⦄.
+#L1 #L2 #T1 #T2 #H elim H -H /2 width=1/
+* #H1 #H2 destruct //
+qed-.
(* Basic_1: includes: drop_skip_bind *)
inductive ldrop: nat → nat → relation lenv ≝
-| ldrop_atom : ∀d,e. ldrop d e (⋆) (⋆)
+| ldrop_atom : ∀d. ldrop d 0 (⋆) (⋆)
| ldrop_pair : ∀L,I,V. ldrop 0 0 (L. ⓑ{I} V) (L. ⓑ{I} V)
| ldrop_ldrop: ∀L1,L2,I,V,e. ldrop 0 e L1 L2 → ldrop 0 (e + 1) (L1. ⓑ{I} V) L2
| ldrop_skip : ∀L1,L2,I,V1,V2,d,e.
(* Basic inversion lemmas ***************************************************)
-fact ldrop_inv_refl_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 → e = 0 → L1 = L2.
-#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
-| //
-| #L1 #L2 #I #V #e #_ #_ >commutative_plus normalize #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
-]
-qed.
-
-(* Basic_1: was: drop_gen_refl *)
-lemma ldrop_inv_refl: ∀L1,L2. ⇩[0, 0] L1 ≡ L2 → L1 = L2.
-/2 width=5/ qed-.
-
fact ldrop_inv_atom1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → L1 = ⋆ →
- L2 = ⋆.
+ L2 = ⋆ ∧ e = 0.
#d #e #L1 #L2 * -d -e -L1 -L2
-[ //
+[ /2 width=1/
| #L #I #V #H destruct
| #L1 #L2 #I #V #e #_ #H destruct
| #L1 #L2 #I #V1 #V2 #d #e #_ #_ #H destruct
]
-qed.
+qed-.
(* Basic_1: was: drop_gen_sort *)
-lemma ldrop_inv_atom1: ∀d,e,L2. ⇩[d, e] ⋆ ≡ L2 → L2 = ⋆.
-/2 width=5/ qed-.
+lemma ldrop_inv_atom1: ∀d,e,L2. ⇩[d, e] ⋆ ≡ L2 → L2 = ⋆ ∧ e = 0.
+/2 width=4 by ldrop_inv_atom1_aux/ qed-.
-fact ldrop_inv_O1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 →
- ∀K,I,V. L1 = K. ⓑ{I} V →
- (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
- (0 < e ∧ ⇩[d, e - 1] K ≡ L2).
+fact ldrop_inv_O1_pair1_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → d = 0 →
+ ∀K,I,V. L1 = K. ⓑ{I} V →
+ (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
+ (0 < e ∧ ⇩[d, e - 1] K ≡ L2).
#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #K #I #V #H destruct
+[ #d #_ #K #I #V #H destruct
| #L #I #V #_ #K #J #W #HX destruct /3 width=1/
| #L1 #L2 #I #V #e #HL12 #_ #K #J #W #H destruct /3 width=1/
| #L1 #L2 #I #V1 #V2 #d #e #_ #_ >commutative_plus normalize #H destruct
]
-qed.
+qed-.
-lemma ldrop_inv_O1: ∀e,K,I,V,L2. ⇩[0, e] K. ⓑ{I} V ≡ L2 →
- (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
- (0 < e ∧ ⇩[0, e - 1] K ≡ L2).
-/2 width=3/ qed-.
+lemma ldrop_inv_O1_pair1: ∀e,K,I,V,L2. ⇩[0, e] K. ⓑ{I} V ≡ L2 →
+ (e = 0 ∧ L2 = K. ⓑ{I} V) ∨
+ (0 < e ∧ ⇩[0, e - 1] K ≡ L2).
+/2 width=3 by ldrop_inv_O1_pair1_aux/ qed-.
lemma ldrop_inv_pair1: ∀K,I,V,L2. ⇩[0, 0] K. ⓑ{I} V ≡ L2 → L2 = K. ⓑ{I} V.
#K #I #V #L2 #H
-elim (ldrop_inv_O1 … H) -H * // #H destruct
+elim (ldrop_inv_O1_pair1 … H) -H * // #H destruct
elim (lt_refl_false … H)
qed-.
lemma ldrop_inv_ldrop1: ∀e,K,I,V,L2.
⇩[0, e] K. ⓑ{I} V ≡ L2 → 0 < e → ⇩[0, e - 1] K ≡ L2.
#e #K #I #V #L2 #H #He
-elim (ldrop_inv_O1 … H) -H * // #H destruct
+elim (ldrop_inv_O1_pair1 … H) -H * // #H destruct
elim (lt_refl_false … He)
qed-.
⇧[d - 1, e] V2 ≡ V1 &
L2 = K2. ⓑ{I} V2.
#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K #V #H destruct
+[ #d #_ #I #K #V #H destruct
| #L #I #V #H elim (lt_refl_false … H)
| #L1 #L2 #I #V #e #_ #H elim (lt_refl_false … H)
| #X #L2 #Y #Z #V2 #d #e #HL12 #HV12 #_ #I #L1 #V1 #H destruct /2 width=5/
]
-qed.
+qed-.
(* Basic_1: was: drop_gen_skip_l *)
lemma ldrop_inv_skip1: ∀d,e,I,K1,V1,L2. ⇩[d, e] K1. ⓑ{I} V1 ≡ L2 → 0 < d →
∃∃K2,V2. ⇩[d - 1, e] K1 ≡ K2 &
⇧[d - 1, e] V2 ≡ V1 &
L2 = K2. ⓑ{I} V2.
-/2 width=3/ qed-.
+/2 width=3 by ldrop_inv_skip1_aux/ qed-.
lemma ldrop_inv_O1_pair2: ∀I,K,V,e,L1. ⇩[0, e] L1 ≡ K. ⓑ{I} V →
(e = 0 ∧ L1 = K. ⓑ{I} V) ∨
∃∃I1,K1,V1. ⇩[0, e - 1] K1 ≡ K. ⓑ{I} V & L1 = K1.ⓑ{I1}V1 & 0 < e.
#I #K #V #e *
-[ #H lapply (ldrop_inv_atom1 … H) -H #H destruct
+[ #H elim (ldrop_inv_atom1 … H) -H #H destruct
| #L1 #I1 #V1 #H
- elim (ldrop_inv_O1 … H) -H *
+ elim (ldrop_inv_O1_pair1 … H) -H *
[ #H1 #H2 destruct /3 width=1/
| /3 width=5/
]
⇧[d - 1, e] V2 ≡ V1 &
L1 = K1. ⓑ{I} V1.
#d #e #L1 #L2 * -d -e -L1 -L2
-[ #d #e #_ #I #K #V #H destruct
+[ #d #_ #I #K #V #H destruct
| #L #I #V #H elim (lt_refl_false … H)
| #L1 #L2 #I #V #e #_ #H elim (lt_refl_false … H)
| #L1 #X #Y #V1 #Z #d #e #HL12 #HV12 #_ #I #L2 #V2 #H destruct /2 width=5/
]
-qed.
+qed-.
(* Basic_1: was: drop_gen_skip_r *)
lemma ldrop_inv_skip2: ∀d,e,I,L1,K2,V2. ⇩[d, e] L1 ≡ K2. ⓑ{I} V2 → 0 < d →
∃∃K1,V1. ⇩[d - 1, e] K1 ≡ K2 & ⇧[d - 1, e] V2 ≡ V1 &
L1 = K1. ⓑ{I} V1.
-/2 width=3/ qed-.
+/2 width=3 by ldrop_inv_skip2_aux/ qed-.
(* Basic properties *********************************************************)
(* Basic_1: was by definition: drop_refl *)
-lemma ldrop_refl: ∀L. ⇩[0, 0] L ≡ L.
+lemma ldrop_refl: ∀L,d. ⇩[d, 0] L ≡ L.
#L elim L -L //
+#L #I #V #IHL #d @(nat_ind_plus … d) -d // /2 width=1/
qed.
lemma ldrop_ldrop_lt: ∀L1,L2,I,V,e.
#L1 #L2 #I #V1 #V2 #d #e #HL12 #HV21 #Hd >(plus_minus_m_m d 1) // /2 width=1/
qed.
-lemma ldrop_O1_le: ∀i,L. i ≤ |L| → ∃K. ⇩[0, i] L ≡ K.
-#i @(nat_ind_plus … i) -i /2 width=2/
-#i #IHi *
+lemma ldrop_O1_le: ∀e,L. e ≤ |L| → ∃K. ⇩[0, e] L ≡ K.
+#e @(nat_ind_plus … e) -e /2 width=2/
+#e #IHe *
[ #H lapply (le_n_O_to_eq … H) -H >commutative_plus normalize #H destruct
| #L #I #V normalize #H
- elim (IHi L ?) -IHi /2 width=1/ -H /3 width=2/
+ elim (IHe L) -IHe /2 width=1/ -H /3 width=2/
]
qed.
-lemma ldrop_O1_lt: ∀L,i. i < |L| → ∃∃I,K,V. ⇩[0, i] L ≡ K.ⓑ{I}V.
+lemma ldrop_O1_lt: ∀L,e. e < |L| → ∃∃I,K,V. ⇩[0, e] L ≡ K.ⓑ{I}V.
#L elim L -L
-[ #i #H elim (lt_zero_false … H)
-| #L #I #V #IHL #i @(nat_ind_plus … i) -i /2 width=4/
- #i #_ normalize #H
- elim (IHL i ? ) -IHL /2 width=1/ -H /3 width=4/
+[ #e #H elim (lt_zero_false … H)
+| #L #I #V #IHL #e @(nat_ind_plus … e) -e /2 width=4/
+ #e #_ normalize #H
+ elim (IHL e) -IHL /2 width=1/ -H /3 width=4/
]
qed.
(* Basic forvard lemmas *****************************************************)
-lemma ldrop_fwd_lw: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ♯{L2} ≤ ♯{L1}.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // normalize
-[ /2 width=3/
-| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12
- >(lift_fwd_tw … HV21) -HV21 /2 width=1/
-]
-qed-.
-
(* Basic_1: was: drop_S *)
lemma ldrop_fwd_ldrop2: ∀L1,I2,K2,V2,e. ⇩[O, e] L1 ≡ K2. ⓑ{I2} V2 →
⇩[O, e + 1] L1 ≡ K2.
#L1 elim L1 -L1
-[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H #H destruct
+[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H * #H destruct
| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #H
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #H
[ -IHL1 destruct /2 width=1/
| @ldrop_ldrop >(plus_minus_m_m e 1) // /2 width=3/
]
]
qed-.
-lemma ldrop_fwd_length: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → |L2| ≤ |L1|.
+lemma ldrop_fwd_length: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → |L1| = |L2| + e.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // normalize /2 width=1/
qed-.
-lemma ldrop_fwd_ldrop2_length: ∀L1,I2,K2,V2,e.
- ⇩[0, e] L1 ≡ K2. ⓑ{I2} V2 → e < |L1|.
-#L1 elim L1 -L1
-[ #I2 #K2 #V2 #e #H lapply (ldrop_inv_atom1 … H) -H #H destruct
-| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #H
- [ -IHL1 destruct //
- | lapply (IHL1 … H) -IHL1 -H #HeK1 whd in ⊢ (? ? %); /2 width=1/
- ]
-]
+lemma ldrop_fwd_length_minus2: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → |L2| = |L1| - e.
+#L1 #L2 #d #e #H lapply (ldrop_fwd_length … H) -H /2 width=1/
qed-.
-lemma ldrop_fwd_O1_length: ∀L1,L2,e. ⇩[0, e] L1 ≡ L2 → |L2| = |L1| - e.
-#L1 elim L1 -L1
-[ #L2 #e #H >(ldrop_inv_atom1 … H) -H //
-| #K1 #I1 #V1 #IHL1 #L2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #H
- [ -IHL1 destruct //
- | lapply (IHL1 … H) -IHL1 -H #H >H -H normalize
- >minus_le_minus_minus_comm //
- ]
-]
+lemma ldrop_fwd_length_minus4: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → e = |L1| - |L2|.
+#L1 #L2 #d #e #H lapply (ldrop_fwd_length … H) -H //
qed-.
-lemma ldrop_fwd_lw_eq: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 →
- |L1| = |L2| → ♯{L2} = ♯{L1}.
-#L1 #L2 #d #e #H elim H -L1 -L2 -d -e //
-[ #L1 #L2 #I #V #e #HL12 #_
- lapply (ldrop_fwd_O1_length … HL12) -HL12 #HL21 >HL21 -HL21 normalize #H -I
- lapply (discr_plus_xy_minus_xz … H) -e #H destruct
-| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #HL12 normalize in ⊢ (??%%→??%%); #H -I
- >(lift_fwd_tw … HV21) -V2 /3 width=1 by eq_f2/ (**) (* auto is a bit slow without trace *)
+lemma ldrop_fwd_length_le2: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → e ≤ |L1|.
+#L1 #L2 #d #e #H lapply (ldrop_fwd_length … H) -H //
+qed-.
+
+lemma ldrop_fwd_length_le4: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → |L2| ≤ |L1|.
+#L1 #L2 #d #e #H lapply (ldrop_fwd_length … H) -H //
+qed-.
+
+lemma ldrop_fwd_length_lt2: ∀L1,I2,K2,V2,d,e.
+ ⇩[d, e] L1 ≡ K2. ⓑ{I2} V2 → e < |L1|.
+#L1 #I2 #K2 #V2 #d #e #H
+lapply (ldrop_fwd_length … H) normalize in ⊢ (%→?); -I2 -V2 //
+qed-.
+
+lemma ldrop_fwd_length_lt4: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → 0 < e → |L2| < |L1|.
+#L1 #L2 #d #e #H lapply (ldrop_fwd_length … H) -H /2 width=1/
+qed-.
+
+lemma ldrop_fwd_lw: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → ♯{L2} ≤ ♯{L1}.
+#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // normalize
+[ /2 width=3/
+| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12
+ >(lift_fwd_tw … HV21) -HV21 /2 width=1/
]
qed-.
-lemma ldrop_fwd_lw_lt: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 →
- |L2| < |L1| → ♯{L2} < ♯{L1}.
+lemma ldrop_fwd_lw_lt: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → 0 < e → ♯{L2} < ♯{L1}.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e //
[ #L #I #V #H elim (lt_refl_false … H)
| #L1 #L2 #I #V #e #HL12 #_ #_
lapply (ldrop_fwd_lw … HL12) -HL12 #HL12
@(le_to_lt_to_lt … HL12) -HL12 //
-| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12 normalize in ⊢ (?%%→?%%); #H -I
- >(lift_fwd_tw … HV21) -V2 /4 width=2 by lt_minus_to_plus, lt_plus_to_lt_l/ (**) (* auto too slow without trace *)
+| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12 #H normalize in ⊢ (?%%); -I
+ >(lift_fwd_tw … HV21) -V2 /3 by lt_minus_to_plus/ (**) (* auto too slow without trace *)
]
qed-.
+(* Advanced inversion lemmas ************************************************)
+
+fact ldrop_inv_O2_aux: ∀d,e,L1,L2. ⇩[d, e] L1 ≡ L2 → e = 0 → L1 = L2.
+#d #e #L1 #L2 #H elim H -d -e -L1 -L2
+[ //
+| //
+| #L1 #L2 #I #V #e #_ #_ >commutative_plus normalize #H destruct
+| #L1 #L2 #I #V1 #V2 #d #e #_ #HV21 #IHL12 #H
+ >(IHL12 H) -L1 >(lift_inv_O2_aux … HV21 … H) -V2 -d -e //
+]
+qed-.
+
+(* Basic_1: was: drop_gen_refl *)
+lemma ldrop_inv_O2: ∀L1,L2,d. ⇩[d, 0] L1 ≡ L2 → L1 = L2.
+/2 width=4 by ldrop_inv_O2_aux/ qed-.
+
+lemma ldrop_inv_length_eq: ∀L1,L2,d,e. ⇩[d, e] L1 ≡ L2 → |L1| = |L2| → e = 0.
+#L1 #L2 #d #e #H #HL12 lapply (ldrop_fwd_length_minus4 … H) //
+qed-.
+
+lemma ldrop_inv_refl: ∀L,d,e. ⇩[d, e] L ≡ L → e = 0.
+/2 width=5 by ldrop_inv_length_eq/ qed-.
+
(* Basic_1: removed theorems 50:
drop_ctail drop_skip_flat
cimp_flat_sx cimp_flat_dx cimp_bind cimp_getl_conf
d = 0 → e ≤ |L1| →
∀L. ⇩[0, e] L @@ L1 ≡ L @@ L2.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e normalize // /4 width=1/
-#d #e #_ #H #L -d
-lapply (le_n_O_to_eq … H) -H //
qed-.
lemma ldrop_O1_append_sn_le: ∀L1,L2,e. ⇩[0, e] L1 ≡ L2 → e ≤ |L1| →
|L2| ≤ e → ⇩[0, e - |L2|] L1 ≡ K.
#K #L1 #L2 elim L2 -L2 normalize //
#L2 #I #V #IHL2 #e #H #H1e
-elim (ldrop_inv_O1 … H) -H * #H2e #HL12 destruct
+elim (ldrop_inv_O1_pair1 … H) -H * #H2e #HL12 destruct
[ lapply (le_n_O_to_eq … H1e) -H1e -IHL2
>commutative_plus normalize #H destruct
| <minus_plus >minus_minus_comm /3 width=1/
#K #L1 #L2 elim L2 -L2 normalize
[ #e #H1 #H2 #K2 #H3
lapply (le_n_O_to_eq … H2) -H2 #H2
- lapply (ldrop_inv_atom1 … H3) -H3 #H3 destruct
- >(ldrop_inv_refl … H1) -H1 //
+ elim (ldrop_inv_atom1 … H3) -H3 #H3 #_ destruct
+ >(ldrop_inv_O2 … H1) -H1 //
| #L2 #I #V #IHL2 #e @(nat_ind_plus … e) -e [ -IHL2 ]
[ #H1 #_ #K2 #H2
- lapply (ldrop_inv_refl … H1) -H1 #H1
- lapply (ldrop_inv_refl … H2) -H2 #H2 destruct //
+ lapply (ldrop_inv_O2 … H1) -H1 #H1
+ lapply (ldrop_inv_O2 … H2) -H2 #H2 destruct //
| #e #_ #H1 #H #K2 #H2
lapply (le_plus_to_le_r … H) -H
lapply (ldrop_inv_ldrop1 … H1 ?) -H1 //
theorem ldrop_mono: ∀d,e,L,L1. ⇩[d, e] L ≡ L1 →
∀L2. ⇩[d, e] L ≡ L2 → L1 = L2.
#d #e #L #L1 #H elim H -d -e -L -L1
-[ #d #e #L2 #H
- >(ldrop_inv_atom1 … H) -L2 //
-| #K #I #V #L2 #HL12
- <(ldrop_inv_refl … HL12) -L2 //
+[ #d #L2 #H elim (ldrop_inv_atom1 … H) -H //
+| #K #I #V #L2 #HL12 <(ldrop_inv_O2 … HL12) -L2 //
| #L #K #I #V #e #_ #IHLK #L2 #H
lapply (ldrop_inv_ldrop1 … H ?) -H // /2 width=1/
| #L #K1 #I #T #V1 #d #e #_ #HVT1 #IHLK1 #X #H
theorem ldrop_conf_ge: ∀d1,e1,L,L1. ⇩[d1, e1] L ≡ L1 →
∀e2,L2. ⇩[0, e2] L ≡ L2 → d1 + e1 ≤ e2 →
⇩[0, e2 - e1] L1 ≡ L2.
-#d1 #e1 #L #L1 #H elim H -d1 -e1 -L -L1
-[ #d #e #e2 #L2 #H
- >(ldrop_inv_atom1 … H) -L2 //
-| //
-| #L #K #I #V #e #_ #IHLK #e2 #L2 #H #He2
+#d1 #e1 #L #L1 #H elim H -d1 -e1 -L -L1 //
+[ #L #K #I #V #e #_ #IHLK #e2 #L2 #H #He2
lapply (ldrop_inv_ldrop1 … H ?) -H /2 width=2/ #HL2
<minus_plus >minus_minus_comm /3 width=1/
| #L #K #I #V1 #V2 #d #e #_ #_ #IHLK #e2 #L2 #H #Hdee2
∀L2,e2. ⇩[0, e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
∃∃L. ⇩[0, d1 + e1 - e2] L2 ≡ L & ⇩[0, d1] L1 ≡ L.
#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H >(ldrop_inv_atom1 … H) -H /2 width=3/
+[ #d1 #L2 #e2 #H #Hd1 #_ elim (ldrop_inv_atom1 … H) -H #H1 #H2 destruct
+ <(le_n_O_to_eq … Hd1) -d1 /2 width=3/
| normalize #L #I #V #L2 #e2 #HL2 #_ #He2
lapply (le_n_O_to_eq … He2) -He2 #H destruct
- lapply (ldrop_inv_refl … HL2) -HL2 #H destruct /2 width=3/
+ lapply (ldrop_inv_O2 … HL2) -HL2 #H destruct /2 width=3/
| normalize #L0 #K0 #I #V1 #e1 #HLK0 #IHLK0 #L2 #e2 #H #_ #He21
- lapply (ldrop_inv_O1 … H) -H * * #He2 #HL20
+ lapply (ldrop_inv_O1_pair1 … H) -H * * #He2 #HL20
[ -IHLK0 -He21 destruct <minus_n_O /3 width=3/
| -HLK0 <minus_le_minus_minus_comm //
elim (IHLK0 … HL20 ? ?) -L0 // /2 width=1/ /2 width=3/
elim (le_inv_plus_l … Hd1e2) #_ #He2
<minus_le_minus_minus_comm //
lapply (ldrop_inv_ldrop1 … H ?) -H // #HL02
- elim (IHLK0 … HL02 ? ?) -L0 /2 width=1/ /3 width=3/
+ elim (IHLK0 … HL02) -L0 /2 width=1/ /3 width=3/
]
qed.
∀L2,e2. ⇩[0, e2] L0 ≡ L2 → e2 ≤ d1 →
∃∃L. ⇩[0, e2] L1 ≡ L & ⇩[d1 - e2, e1] L2 ≡ L.
#L0 #L1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
-[ #d1 #e1 #L2 #e2 #H
- lapply (ldrop_inv_atom1 … H) -H #H destruct /2 width=3/
+[ #d1 #L2 #e2 #H
+ elim (ldrop_inv_atom1 … H) -H #H destruct /2 width=3/
| #K0 #I #V0 #L2 #e2 #H1 #H2
lapply (le_n_O_to_eq … H2) -H2 #H destruct
lapply (ldrop_inv_pair1 … H1) -H1 #H destruct /2 width=3/
lapply (le_n_O_to_eq … H2) -H2 #H destruct
lapply (ldrop_inv_pair1 … H1) -H1 #H destruct /3 width=3/
| #K0 #K1 #I #V0 #V1 #d1 #e1 #HK01 #HV10 #IHK01 #L2 #e2 #H #He2d1
- elim (ldrop_inv_O1 … H) -H *
+ elim (ldrop_inv_O1_pair1 … H) -H *
[ -IHK01 -He2d1 #H1 #H2 destruct /3 width=5/
| -HK01 -HV10 #He2 #HK0L2
- elim (IHK01 … HK0L2 ?) -IHK01 -HK0L2 /2 width=1/ >minus_le_minus_minus_comm // /3 width=3/
+ elim (IHK01 … HK0L2) -IHK01 -HK0L2 /2 width=1/ >minus_le_minus_minus_comm // /3 width=3/
]
]
qed.
(* Basic_1: was: drop_trans_ge *)
theorem ldrop_trans_ge: ∀d1,e1,L1,L. ⇩[d1, e1] L1 ≡ L →
∀e2,L2. ⇩[0, e2] L ≡ L2 → d1 ≤ e2 → ⇩[0, e1 + e2] L1 ≡ L2.
-#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L
-[ #d #e #e2 #L2 #H
- >(ldrop_inv_atom1 … H) -H -L2 //
-| //
-| /3 width=1/
+#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L //
+[ /3 width=1/
| #L1 #L2 #I #V1 #V2 #d #e #H_ #_ #IHL12 #e2 #L #H #Hde2
lapply (lt_to_le_to_lt 0 … Hde2) // #He2
lapply (lt_to_le_to_lt … (e + e2) He2 ?) // #Hee2
∀e2,L2. ⇩[0, e2] L ≡ L2 → e2 ≤ d1 →
∃∃L0. ⇩[0, e2] L1 ≡ L0 & ⇩[d1 - e2, e1] L0 ≡ L2.
#d1 #e1 #L1 #L #H elim H -d1 -e1 -L1 -L
-[ #d #e #e2 #L2 #H
- >(ldrop_inv_atom1 … H) -L2 /2 width=3/
+[ #d #e2 #L2 #H
+ elim (ldrop_inv_atom1 … H) -H /2 width=3/
| #K #I #V #e2 #L2 #HL2 #H
lapply (le_n_O_to_eq … H) -H #H destruct /2 width=3/
| #L1 #L2 #I #V #e #_ #IHL12 #e2 #L #HL2 #H
lapply (le_n_O_to_eq … H) -H #H destruct
elim (IHL12 … HL2 ?) -IHL12 -HL2 // #L0 #H #HL0
- lapply (ldrop_inv_refl … H) -H #H destruct /3 width=5/
+ lapply (ldrop_inv_O2 … H) -H #H destruct /3 width=5/
| #L1 #L2 #I #V1 #V2 #d #e #HL12 #HV12 #IHL12 #e2 #L #H #He2d
- elim (ldrop_inv_O1 … H) -H *
+ elim (ldrop_inv_O1_pair1 … H) -H *
[ -He2d -IHL12 #H1 #H2 destruct /3 width=5/
| -HL12 -HV12 #He2 #HL2
- elim (IHL12 … HL2 ?) -L2 [ >minus_le_minus_minus_comm // /3 width=3/ | /2 width=1/ ]
+ elim (IHL12 … HL2) -L2 [ >minus_le_minus_minus_comm // /3 width=3/ | /2 width=1/ ]
]
]
qed.
∃∃K1,V1. ⇩[0, e2] L1 ≡ K1. ⓑ{I} V1 &
⇩[d, e1] K2 ≡ K1 & ⇧[d, e1] V1 ≡ V2.
#d1 #e1 #L #L1 #H1 #e2 #K2 #I #V2 #H2 #He2d1
-elim (ldrop_conf_le … H1 … H2 ?) -L [2: /2 width=2/] #K #HL1K #HK2
-elim (ldrop_inv_skip1 … HK2 ?) -HK2 [2: /2 width=1/] #K1 #V1 #HK21 #HV12 #H destruct /2 width=5/
+elim (ldrop_conf_le … H1 … H2) -L [2: /2 width=2/] #K #HL1K #HK2
+elim (ldrop_inv_skip1 … HK2) -HK2 [2: /2 width=1/] #K1 #V1 #HK21 #HV12 #H destruct /2 width=5/
qed.
lemma ldrop_trans_ge_comm: ∀d1,e1,e2,L1,L2,L.
[ lapply (ldrop_conf_ge … HLK1 … HLK2 ?)
| lapply (ldrop_conf_ge … HLK2 … HLK1 ?)
] -HLK1 -HLK2 // #HK
-lapply (ldrop_fwd_O1_length … HK) #H
+lapply (ldrop_fwd_length_minus2 … HK) #H
elim (discr_minus_x_xy … H) -H
[1,3: normalize <plus_n_Sm #H destruct ]
#H >H in HK; #HK
-lapply (ldrop_inv_refl … HK) -HK #H destruct
+lapply (ldrop_inv_O2 … HK) -HK #H destruct
lapply (inv_eq_minus_O … H) -H /3 width=1/
qed-.
lemma lpx_sn_deliftable_dropable: ∀R. l_deliftable_sn R → dropable_sn (lpx_sn R).
#R #HR #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #X #H >(lpx_sn_inv_atom1 … H) -H /2 width=3/
+[ #d #X #H >(lpx_sn_inv_atom1 … H) -H /2 width=3/
| #K1 #I #V1 #X #H
elim (lpx_sn_inv_pair1 … H) -H #L2 #V2 #HL12 #HV12 #H destruct /3 width=5/
| #L1 #K1 #I #V1 #e #_ #IHLK1 #X #H
lemma lpx_sn_liftable_dedropable: ∀R. (∀L. reflexive ? (R L)) →
l_liftable R → dedropable_sn (lpx_sn R).
#R #H1R #H2R #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
-[ #d #e #X #H >(lpx_sn_inv_atom1 … H) -H /2 width=3/
+[ #d #X #H >(lpx_sn_inv_atom1 … H) -H /2 width=3/
| #K1 #I #V1 #X #H
elim (lpx_sn_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=5/
| #L1 #K1 #I #V1 #e #_ #IHLK1 #K2 #HK12
fact lpx_sn_dropable_aux: ∀R,L2,K2,d,e. ⇩[d, e] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 →
d = 0 → ∃∃K1. ⇩[0, e] L1 ≡ K1 & lpx_sn R K1 K2.
#R #L2 #K2 #d #e #H elim H -L2 -K2 -d -e
-[ #d #e #X #H >(lpx_sn_inv_atom2 … H) -H /2 width=3/
+[ #d #X #H >(lpx_sn_inv_atom2 … H) -H /2 width=3/
| #K2 #I #V2 #X #H
elim (lpx_sn_inv_pair2 … H) -H #K1 #V1 #HK12 #HV12 #H destruct /3 width=5/
| #L2 #K2 #I #V2 #e #_ #IHLK2 #X #H #_
(* Basic inversion lemmas ***************************************************)
-fact lift_inv_refl_O2_aux: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → e = 0 → T1 = T2.
+fact lift_inv_O2_aux: ∀d,e,T1,T2. ⇧[d, e] T1 ≡ T2 → e = 0 → T1 = T2.
#d #e #T1 #T2 #H elim H -d -e -T1 -T2 // /3 width=1/
-qed.
+qed-.
-lemma lift_inv_refl_O2: ∀d,T1,T2. ⇧[d, 0] T1 ≡ T2 → T1 = T2.
-/2 width=4/ qed-.
+lemma lift_inv_O2: ∀d,T1,T2. ⇧[d, 0] T1 ≡ T2 → T1 = T2.
+/2 width=4 by lift_inv_O2_aux/ qed-.
fact lift_inv_sort1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k.
#d #e #T1 #T2 * -d -e -T1 -T2 //
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
-qed.
+qed-.
lemma lift_inv_sort1: ∀d,e,T2,k. ⇧[d,e] ⋆k ≡ T2 → T2 = ⋆k.
-/2 width=5/ qed-.
+/2 width=5 by lift_inv_sort1_aux/ qed-.
fact lift_inv_lref1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀i. T1 = #i →
(i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
]
-qed.
+qed-.
lemma lift_inv_lref1: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 →
(i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
-/2 width=3/ qed-.
+/2 width=3 by lift_inv_lref1_aux/ qed-.
lemma lift_inv_lref1_lt: ∀d,e,T2,i. ⇧[d,e] #i ≡ T2 → i < d → T2 = #i.
#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
-qed.
+qed-.
lemma lift_inv_gref1: ∀d,e,T2,p. ⇧[d,e] §p ≡ T2 → T2 = §p.
-/2 width=5/ qed-.
+/2 width=5 by lift_inv_gref1_aux/ qed-.
fact lift_inv_bind1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
∀a,I,V1,U1. T1 = ⓑ{a,I} V1.U1 →
| #b #J #W1 #W2 #T1 #T2 #d #e #HW #HT #a #I #V1 #U1 #H destruct /2 width=5/
| #J #W1 #W2 #T1 #T2 #d #e #_ #HT #a #I #V1 #U1 #H destruct
]
-qed.
+qed-.
lemma lift_inv_bind1: ∀d,e,T2,a,I,V1,U1. ⇧[d,e] ⓑ{a,I} V1. U1 ≡ T2 →
∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
T2 = ⓑ{a,I} V2. U2.
-/2 width=3/ qed-.
+/2 width=3 by lift_inv_bind1_aux/ qed-.
fact lift_inv_flat1_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
∀I,V1,U1. T1 = ⓕ{I} V1.U1 →
| #a #J #W1 #W2 #T1 #T2 #d #e #_ #_ #I #V1 #U1 #H destruct
| #J #W1 #W2 #T1 #T2 #d #e #HW #HT #I #V1 #U1 #H destruct /2 width=5/
]
-qed.
+qed-.
lemma lift_inv_flat1: ∀d,e,T2,I,V1,U1. ⇧[d,e] ⓕ{I} V1. U1 ≡ T2 →
∃∃V2,U2. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
T2 = ⓕ{I} V2. U2.
-/2 width=3/ qed-.
+/2 width=3 by lift_inv_flat1_aux/ qed-.
fact lift_inv_sort2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k.
#d #e #T1 #T2 * -d -e -T1 -T2 //
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
-qed.
+qed-.
(* Basic_1: was: lift_gen_sort *)
lemma lift_inv_sort2: ∀d,e,T1,k. ⇧[d,e] T1 ≡ ⋆k → T1 = ⋆k.
-/2 width=5/ qed-.
+/2 width=5 by lift_inv_sort2_aux/ qed-.
fact lift_inv_lref2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 → ∀i. T2 = #i →
(i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #i #H destruct
]
-qed.
+qed-.
(* Basic_1: was: lift_gen_lref *)
lemma lift_inv_lref2: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i →
(i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
-/2 width=3/ qed-.
+/2 width=3 by lift_inv_lref2_aux/ qed-.
(* Basic_1: was: lift_gen_lref_lt *)
lemma lift_inv_lref2_lt: ∀d,e,T1,i. ⇧[d,e] T1 ≡ #i → i < d → T1 = #i.
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
| #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
-qed.
+qed-.
lemma lift_inv_gref2: ∀d,e,T1,p. ⇧[d,e] T1 ≡ §p → T1 = §p.
-/2 width=5/ qed-.
+/2 width=5 by lift_inv_gref2_aux/ qed-.
fact lift_inv_bind2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
∀a,I,V2,U2. T2 = ⓑ{a,I} V2.U2 →
| #b #J #W1 #W2 #T1 #T2 #d #e #HW #HT #a #I #V2 #U2 #H destruct /2 width=5/
| #J #W1 #W2 #T1 #T2 #d #e #_ #_ #a #I #V2 #U2 #H destruct
]
-qed.
+qed-.
(* Basic_1: was: lift_gen_bind *)
lemma lift_inv_bind2: ∀d,e,T1,a,I,V2,U2. ⇧[d,e] T1 ≡ ⓑ{a,I} V2. U2 →
∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d+1,e] U1 ≡ U2 &
T1 = ⓑ{a,I} V1. U1.
-/2 width=3/ qed-.
+/2 width=3 by lift_inv_bind2_aux/ qed-.
fact lift_inv_flat2_aux: ∀d,e,T1,T2. ⇧[d,e] T1 ≡ T2 →
∀I,V2,U2. T2 = ⓕ{I} V2.U2 →
| #a #J #W1 #W2 #T1 #T2 #d #e #_ #_ #I #V2 #U2 #H destruct
| #J #W1 #W2 #T1 #T2 #d #e #HW #HT #I #V2 #U2 #H destruct /2 width=5/
]
-qed.
+qed-.
(* Basic_1: was: lift_gen_flat *)
lemma lift_inv_flat2: ∀d,e,T1,I,V2,U2. ⇧[d,e] T1 ≡ ⓕ{I} V2. U2 →
∃∃V1,U1. ⇧[d,e] V1 ≡ V2 & ⇧[d,e] U1 ≡ U2 &
T1 = ⓕ{I} V1. U1.
-/2 width=3/ qed-.
+/2 width=3 by lift_inv_flat2_aux/ qed-.
lemma lift_inv_pair_xy_x: ∀d,e,I,V,T. ⇧[d, e] ②{I} V. T ≡ V → ⊥.
#d #e #J #V elim V -V
#L1 #L2 #H elim H -L1 -L2
[ /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK1
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #K1 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK1
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
[ destruct
- elim (IHL12 L1 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ elim (IHL12 L1 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK1) -L1 /3 width=3/
]
]
#L1 #L2 #H elim H -L1 -L2
[ /2 width=3/
| #I #L1 #L2 #V #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK2
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
- elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ elim (IHL12 L2 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
| #L1 #L2 #V #W #A #HV #HW #_ #IHL12 #K2 #e #H
- elim (ldrop_inv_O1 … H) -H * #He #HLK2
+ elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
[ destruct
- elim (IHL12 L2 0 ?) -IHL12 // #X #HL12 #H
- <(ldrop_inv_refl … H) in HL12; -H /3 width=3/
+ elim (IHL12 L2 0) -IHL12 // #X #HL12 #H
+ <(ldrop_inv_O2 … H) in HL12; -H /3 width=3/
| elim (IHL12 … HLK2) -L2 /3 width=3/
]
]
lemma cpss_append: l_appendable_sn … cpss.
#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/
#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
-lapply (ldrop_fwd_ldrop2_length … HK0) #H
+lapply (ldrop_fwd_length_lt2 … HK0) #H
@(cpss_delta … (L@@K0) V1 … HVW2) //
@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
qed.
(* *)
(**************************************************************************)
-include "basic_2/substitution/fsupp.ma".
+include "basic_2/relocation/fsupq.ma".
(* STAR-ITERATED SUPCLOSURE *************************************************)
-definition fsups: bi_relation lenv term ≝ bi_star … fsup.
+definition fsups: bi_relation lenv term ≝ bi_TC … fsupq.
interpretation "star-iterated structural successor (closure)"
'SupTermStar L1 T1 L2 T2 = (fsups L1 T1 L2 T2).
(* Basic eliminators ********************************************************)
lemma fsups_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
- (∀L,L2,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ → ⦃L, T⦄ ⊃ ⦃L2, T2⦄ → R L T → R L2 T2) →
+ (∀L,L2,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ → ⦃L, T⦄ ⊃⸮ ⦃L2, T2⦄ → R L T → R L2 T2) →
∀L2,T2. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ → R L2 T2.
#L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
-@(bi_star_ind … IH1 IH2 ? ? H)
+@(bi_TC_star_ind … IH1 IH2 ? ? H) //
qed-.
lemma fsups_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
- (∀L1,L,T1,T. ⦃L1, T1⦄ ⊃ ⦃L, T⦄ → ⦃L, T⦄ ⊃* ⦃L2, T2⦄ → R L T → R L1 T1) →
+ (∀L1,L,T1,T. ⦃L1, T1⦄ ⊃⸮ ⦃L, T⦄ → ⦃L, T⦄ ⊃* ⦃L2, T2⦄ → R L T → R L1 T1) →
∀L1,T1. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ → R L1 T1.
#L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
-@(bi_star_ind_dx … IH1 IH2 ? ? H)
+@(bi_TC_star_ind_dx … IH1 IH2 ? ? H) //
qed-.
(* Basic properties *********************************************************)
lemma fsups_refl: bi_reflexive … fsups.
/2 width=1/ qed.
-lemma fsupp_fsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
+lemma fsupq_fsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃⸮ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
/2 width=1/ qed.
-lemma fsup_fsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
-/2 width=1/ qed.
-
-lemma fsups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ → ⦃L, T⦄ ⊃ ⦃L2, T2⦄ →
+lemma fsups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ → ⦃L, T⦄ ⊃⸮ ⦃L2, T2⦄ →
⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
/2 width=4/ qed.
-lemma fsups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃ ⦃L, T⦄ → ⦃L, T⦄ ⊃* ⦃L2, T2⦄ →
+lemma fsups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃⸮ ⦃L, T⦄ → ⦃L, T⦄ ⊃* ⦃L2, T2⦄ →
⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
/2 width=4/ qed.
-lemma fsups_fsupp_fsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ →
- ⦃L, T⦄ ⊃+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
-lemma fsupp_fsups_fsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃+ ⦃L, T⦄ →
- ⦃L, T⦄ ⊃* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃+ ⦃L2, T2⦄.
-/2 width=4/ qed.
-
(* Basic forward lemmas *****************************************************)
lemma fsups_fwd_fw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ → ♯{L2, T2} ≤ ♯{L1, T1}.
#L1 #L2 #T1 #T2 #H @(fsups_ind … H) -L2 -T2 //
-/4 width=3 by fsup_fwd_fw, lt_to_le_to_lt, lt_to_le/ (**) (* slow even with trace *)
+/3 width=3 by fsupq_fwd_fw, transitive_le/ (**) (* slow even with trace *)
qed-.
(*
(* Advanced inversion lemmas on plus-iterated supclosure ********************)
lemma fsup_cpss_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ▶* U2 →
∃∃L,U1. L1 ⊢ ▶* L & L ⊢ T1 ▶* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [2: * ] [1,2,3,4,5: /3 width=5/ ]
-#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
-elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-elim (ldrop_lpss_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
-lapply (cpss_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
+ elim (lift_total U2 d e) #T2 #HUT2
+ lapply (cpss_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
+| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+ elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+ elim (lift_total T d e) #U #HTU
+ elim (ldrop_lpss_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+ lapply (cpss_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+]
qed-.
∃∃K1. K1 ⊑ K2 & ⇩[0, i] L1 ≡ K1. ⓓW.
#L1 #L2 #H elim H -L1 -L2
[ #L #K2 #W #i #H
- lapply (ldrop_inv_atom1 … H) -H #H destruct
+ elim (ldrop_inv_atom1 … H) -H #H destruct
| #L1 #L2 #V #HL12 #IHL12 #K2 #W #i #H
- elim (ldrop_inv_O1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
+ elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
[ /2 width=3/
| elim (IHL12 … HLK2) -IHL12 -HLK2 /3 width=3/
]
| #I #L1 #L2 #V1 #V2 #_ #IHL12 #K2 #W #i #H
- elim (ldrop_inv_O1 … H) -H * #Hi #HLK2 destruct
+ elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct
elim (IHL12 … HLK2) -IHL12 -HLK2 /3 width=3/
]
qed-.
lemma cpqs_append: l_appendable_sn … cpqs.
#K #T1 #T2 #H elim H -K -T1 -T2 // /2 width=1/ /2 width=3/
#K #K0 #V1 #V2 #W2 #i #HK0 #_ #HVW2 #IHV12 #L
-lapply (ldrop_fwd_ldrop2_length … HK0) #H
+lapply (ldrop_fwd_length_lt2 … HK0) #H
@(cpqs_delta … (L@@K0) V1 … HVW2) //
@(ldrop_O1_append_sn_le … HK0) /2 width=2/ (**) (* /3/ does not work *)
qed.
lemma fsup_cpqs_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➤* U2 →
∃∃L,U1. L1 ⊢ ➤* L & L ⊢ T1 ➤* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [2: * ] [1,2,3,4,5: /3 width=5/ ]
-#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
-elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-elim (ldrop_lpqs_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
-lapply (cpqs_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+[ #L #K #U #T #d #e #HLK #HUT #He #U2 #HU2
+ elim (lift_total U2 d e) #T2 #HUT2
+ lapply (cpqs_lift … HU2 … HLK … HUT … HUT2) -HU2 -HUT /3 width=9/
+| #L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+ elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+ elim (lift_total T d e) #U #HTU
+ elim (ldrop_lpqs_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+ lapply (cpqs_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+]
qed-.
class "orange"
[ { "relocation" * } {
[ { "structural successor for closures" * } {
- [ "fsup ( ⦃?,?⦄ ⊃ ⦃?,?⦄ )" "fsupq ( ⦃?,?⦄ ⊃⸮ ⦃?,?⦄ )" * ]
+ [ "fsup ( ⦃?,?⦄ ⊃ ⦃?,?⦄ )" "fsupq ( ⦃?,?⦄ ⊃⸮ ⦃?,?⦄ )" "fsupq_alt" * ]
}
]
[ { "global env. slicing" * } {