]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/multiple/llor_etc.ma
- some work on append
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / multiple / llor_etc.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/substitution/ldrop_append.ma".
16 include "basic_2/multiple/llor_ldrop.ma".
17
18 (* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************)
19
20 lemma lt_plus_SO_to_le: ∀x,y. x < y + 1 → x ≤ y.
21 /2 width=1 by monotonic_pred/ qed-.
22
23 (*
24 lemma llor_tail_frees: ∀L1,L2,L,U,d. L1 ⩖[U, d] L2 ≡ L → d < yinj (|L1|) →
25                        ∀I1,W1. ⓑ{I1}W1.L1 ⊢ |L1| ϵ 𝐅*[d]⦃U⦄ →
26                        ∀I2,W2. ⓑ{I1}W1.L1 ⩖[U, d] ⓑ{I2}W2.L2 ≡ ⓑ{I1}W2.L.
27 #L1 #L2 #L #U #d * #HL12 #HL1 #IH #Hd #I1 #W1 #HU #I2 #W2
28 @and3_intro [1,2: >ltail_length /2 width=1 by le_S_S/ ]
29 #J1 #J2 #J #K1 #K2 #K #V1 #V2 #V #i #HLK1 #HLK2 #HLK
30 lapply (ldrop_fwd_length_lt2 … HLK1) >ltail_length #H
31 lapply (lt_plus_SO_to_le … H) -H #H
32 elim (le_to_or_lt_eq … H) -H #H
33 [ elim (ldrop_O1_lt (Ⓕ) … H) #Z1 #Y1 #X1 #HLY1
34   elim (ldrop_O1_lt (Ⓕ) L2 i) [2: /2 width=3 by lt_to_le_to_lt/ ] #Z2 #Y2 #X2 #HLY2
35   elim (ldrop_O1_lt (Ⓕ) L i) // #Z #Y #X #HLY
36   lapply (ldrop_O1_inv_append1_le … HLK1 … HLY1) /2 width=1 by lt_to_le/ -HLK1 normalize #H destruct
37   lapply (ldrop_O1_inv_append1_le … HLK2 … HLY2) /3 width=3 by lt_to_le_to_lt, lt_to_le/ -HLK2 normalize #H destruct
38   lapply (ldrop_O1_inv_append1_le … HLK … HLY) /2 width=1 by lt_to_le/ -HLK normalize #H destruct
39   elim (IH … HLY1 HLY2 HLY) -IH -HLY1 -HLY2 -HLY *
40   [ /3 width=1 by and3_intro, or3_intro0/
41   | #HnU #HZ #HX
42   | #Hdi #H2U #HZ #HX
43   ]
44 | -IH destruct
45   lapply (ldrop_O1_inv_append1_le … HLK1 … (⋆) ?) // -HLK1 normalize #H destruct
46   lapply (ldrop_O1_inv_append1_le … HLK2 … HL12)
47   lapply (ldrop_O1_inv_append1_le … HLK … (⋆) ?) // -HLK normalize #H destruct
48   @or3_intro2 @and4_intro /2 width=1 by ylt_fwd_le/
49 ]
50 *)