1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/relocation/lpx_sn_alt.ma".
16 include "basic_2/substitution/llor.ma".
18 (* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************)
20 (* Alternative definition ***************************************************)
22 theorem llor_intro_alt: ∀T,L2,L1,L. |L1| ≤ |L2| → |L1| = |L| →
23 (∀I1,I,K1,K,V1,V,i. ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L ≡ K.ⓑ{I}V →
24 (K1 ⊢ |L2|-|L1|+i ~ϵ 𝐅*[yinj 0]⦃T⦄ → I1 = I ∧ V1 = V) ∧
25 (∀I2,K2,V2. (K1 ⊢ |L2|-|L1|+i ~ϵ 𝐅*[yinj 0]⦃T⦄ → ⊥) →
26 ⇩[|L2|-|L1|+i] L2 ≡ K2.ⓑ{I2}V2 → I1 = I ∧ V2 = V
29 #T #L2 #L1 #L #HL12 #HL1 #IH @lpx_sn_intro_alt // -HL1
30 #I1 #I #K1 #K #V1 #V #i #HLK1 #HLK
31 lapply (ldrop_fwd_length_minus4 … HLK1)
32 lapply (ldrop_fwd_length_le4 … HLK1)
33 normalize in ⊢ (%→%→?); #HKL1 #Hi
34 lapply (plus_minus_minus_be_aux … HL12 Hi) // -Hi <minus_plus #Hi
35 lapply (transitive_le … HKL1 HL12) -HKL1 -HL12 #HKL1
36 elim (IH … HLK1 HLK) -IH -HLK1 -HLK #IH1 #IH2
37 elim (cofrees_dec K1 T 0 (|L2|-|L1|+i))
38 [ -IH2 #HT elim (IH1 … HT) -IH1
39 #HI1 #HV1 @conj // <HV1 -V @clor_sn // <Hi -Hi //
40 | -IH1 #HnT elim (ldrop_O1_lt (Ⓕ) L2 (|L2|-|L1|+i)) /2 width=1 by monotonic_lt_minus_l/
41 #I2 #K2 #V2 #HLK2 elim (IH2 … HLK2) -IH2 /2 width=1 by/
42 #HI1 #HV2 @conj // <HV2 -V @(clor_dx … I2 K2) // <Hi -Hi /2 width=1 by/
46 theorem llor_inv_alt: ∀T,L2,L1,L. L1 ⩖[T] L2 ≡ L → |L1| ≤ |L2| →
49 ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L ≡ K.ⓑ{I}V →
50 (∧∧ K1 ⊢ |L2|-|L1|+i ~ϵ 𝐅*[yinj 0]⦃T⦄ & I1 = I & V1 = V) ∨
51 (∃∃I2,K2,V2. (K1 ⊢ |L2|-|L1|+i ~ϵ 𝐅*[yinj 0]⦃T⦄ → ⊥) &
52 ⇩[|L2|-|L1|+i] L2 ≡ K2.ⓑ{I2}V2 &
56 #T #L2 #L1 #L #H #HL12 elim (lpx_sn_inv_alt … H) -H
57 #HL1 #IH @conj // -HL1
58 #I1 #I #K1 #K #V1 #V #i #HLK1 #HLK
59 lapply (ldrop_fwd_length_minus4 … HLK1)
60 lapply (ldrop_fwd_length_le4 … HLK1)
61 normalize in ⊢ (%→%→?); #HKL1 #Hi
62 lapply (plus_minus_minus_be_aux … HL12 Hi) // -HL12 -Hi -HKL1
63 <minus_plus #Hi >Hi -Hi
64 elim (IH … HLK1 HLK) -IH #HI1 *
65 /4 width=5 by or_introl, or_intror, and3_intro, ex4_3_intro/