]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/static/fsle_fqup.ma
syntactic components detached from basic_2 become static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / static / fsle_fqup.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 "static_2/static/frees_fqup.ma".
16 include "static_2/static/fsle_length.ma".
17
18 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
19
20 (* Advanced properties ******************************************************)
21
22 lemma fsle_refl: bi_reflexive … fsle.
23 #L #T
24 elim (frees_total L T) #f #Hf
25 /2 width=8 by sle_refl, ex4_4_intro/
26 qed.
27
28 lemma fsle_shift: ∀L1,L2. |L1| = |L2| →
29                   ∀I,T1,T2,V.  ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2.ⓑ{I}V, T2⦄ →
30                   ∀p. ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V.T2⦄.
31 #L1 #L2 #H1L #I #T1 #T2 #V
32 * #n #m #f2 #g2 #Hf2 #Hg2 #H2L #Hfg2 #p
33 elim (lveq_inj_length … H2L) // -H1L #H1 #H2 destruct
34 lapply (lveq_inv_bind … H2L) -H2L #HL
35 elim (frees_total L2 V) #g1 #Hg1
36 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
37 lapply (sor_inv_sle_dx … Hg) #H0g
38 /4 width=10 by frees_bind, lveq_void_sn, sle_tl, sle_trans, ex4_4_intro/
39 qed.
40
41 lemma fsle_bind_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
42                        ∀p,I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
43 #L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #p #I #T2
44 elim (frees_total (L2.ⓧ) T2) #g2 #Hg2
45 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
46 @(ex4_4_intro … g Hf1 … HL12) (**) (* full auto too slow *)
47 /4 width=5 by frees_bind_void, sor_inv_sle_sn, sor_tls, sle_trans/
48 qed.
49
50 lemma fsle_bind_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2.ⓧ, T2⦄ → |L1| ≤ |L2| →
51                        ∀p,I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I}V2.T2⦄.
52 #L1 #L2 #T1 #T2 * #n1 #x1 #f2 #g2 #Hf2 #Hg2 #H #Hfg2 #HL12 #p #I #V2
53 elim (lveq_inv_void_dx_length … H HL12) -H -HL12 #m1 #HL12 #H1 #H2 destruct
54 <tls_xn in Hfg2; #Hfg2
55 elim (frees_total L2 V2) #g1 #Hg1
56 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
57 @(ex4_4_intro … g Hf2 … HL12) (**) (* full auto too slow *)
58 /4 width=5 by frees_bind_void, sor_inv_sle_dx, sor_tls, sle_trans/
59 qed.
60
61 lemma fsle_flat_dx_sn: ∀L1,L2,V1,V2. ⦃L1, V1⦄ ⊆ ⦃L2, V2⦄ →
62                        ∀I,T2. ⦃L1, V1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
63 #L1 #L2 #V1 #V2 * #n1 #m1 #f1 #g1 #Hf1 #Hg1 #HL12 #Hfg1 #I #T2
64 elim (frees_total L2 T2) #g2 #Hg2
65 elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
66 @(ex4_4_intro … g Hf1 … HL12) (**) (* full auto too slow *)
67 /4 width=5 by frees_flat, sor_inv_sle_sn, sor_tls, sle_trans/
68 qed.
69
70 lemma fsle_flat_dx_dx: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ →
71                        ∀I,V2. ⦃L1, T1⦄ ⊆ ⦃L2, ⓕ{I}V2.T2⦄.
72 #L1 #L2 #T1 #T2 * #n1 #m1 #f2 #g2 #Hf2 #Hg2 #HL12 #Hfg2 #I #V2
73 elim (frees_total L2 V2) #g1 #Hg1
74 elim (sor_isfin_ex g1 g2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
75 @(ex4_4_intro … g Hf2 … HL12) (**) (* full auto too slow *)
76 /4 width=5 by frees_flat, sor_inv_sle_dx, sor_tls, sle_trans/
77 qed.
78
79 (* Advanced forward lemmas ***************************************************)
80
81 lemma fsle_fwd_pair_sn: ∀I1,I2,L1,L2,V1,V2,T1,T2. ⦃L1.ⓑ{I1}V1, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄ →
82                         ⦃L1.ⓧ, T1⦄ ⊆ ⦃L2.ⓑ{I2}V2, T2⦄.
83 #I1 #I2 #L1 #L2 #V1 #V2 #T1 #T2 *
84 #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HL12 #Hf12
85 elim (lveq_inv_pair_pair … HL12) -HL12 #HL12 #H1 #H2 destruct
86 elim (frees_total (L1.ⓧ) T1) #g1 #Hg1
87 lapply (lsubr_lsubf … Hg1 … Hf1) -Hf1 /2 width=1 by lsubr_unit/ #Hfg1
88 /5 width=10 by lsubf_fwd_sle, lveq_bind, sle_trans, ex4_4_intro/ (**) (* full auto too slow *)
89 qed-.