]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/static/lsubr_lsubr.ma
milestone update in ground_2 and basic_2A
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / static / lsubr_lsubr.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 "ground_2/xoa/ex_4_3.ma".
16 include "basic_2A/static/lsubr.ma".
17
18 (* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************)
19
20 (* Auxiliary inversion lemmas ***********************************************)
21
22 fact lsubr_inv_pair1_aux: ∀L1,L2. L1 ⫃ L2 → ∀I,K1,X. L1 = K1.ⓑ{I}X →
23                           ∨∨ L2 = ⋆
24                            | ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓑ{I}X
25                            | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW &
26                                        I = Abbr & X = ⓝW.V.
27 #L1 #L2 * -L1 -L2
28 [ #L #J #K1 #X #H destruct /2 width=1 by or3_intro0/
29 | #I #L1 #L2 #V #HL12 #J #K1 #X #H destruct /3 width=3 by or3_intro1, ex2_intro/
30 | #L1 #L2 #V #W #HL12 #J #K1 #X #H destruct /3 width=6 by or3_intro2, ex4_3_intro/
31 ]
32 qed-.
33
34 lemma lsubr_inv_pair1: ∀I,K1,L2,X. K1.ⓑ{I}X ⫃ L2 →
35                        ∨∨ L2 = ⋆
36                         | ∃∃K2. K1 ⫃ K2 & L2 = K2.ⓑ{I}X
37                         | ∃∃K2,V,W. K1 ⫃ K2 & L2 = K2.ⓛW &
38                                     I = Abbr & X = ⓝW.V.
39 /2 width=3 by lsubr_inv_pair1_aux/ qed-.
40
41 (* Main properties **********************************************************)
42
43 theorem lsubr_trans: Transitive … lsubr.
44 #L1 #L #H elim H -L1 -L
45 [ #L1 #X #H
46   lapply (lsubr_inv_atom1 … H) -H //
47 | #I #L1 #L #V #_ #IHL1 #X #H
48   elim (lsubr_inv_pair1 … H) -H // *
49   #L2 [2: #V2 #W2 ] #HL2 #H1 [ #H2 #H3 ] destruct /3 width=1 by lsubr_pair, lsubr_beta/
50 | #L1 #L #V1 #W #_ #IHL1 #X #H
51   elim (lsubr_inv_abst1 … H) -H // *
52   #L2 #HL2 #H destruct /3 width=1 by lsubr_beta/
53 ]
54 qed-.