]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/fle_drops.ma
advances on cpx_lfxs_conf_fle
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / fle_drops.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/syntax/lveq_length.ma".
16 include "basic_2/static/frees_drops.ma".
17 include "basic_2/static/fle.ma".
18
19 (* FREE VARIABLES INCLUSION FOR RESTRICTED CLOSURES *************************)
20
21 (* Advanced properties ******************************************************)
22
23 lemma fle_lifts_sn: ∀T1,U1. ⬆*[1] T1 ≡ U1 → ∀L1,L2. |L2| ≤ |L1| →
24                     ∀T2. ⦃L1, T1⦄ ⊆ ⦃L2, T2⦄ → ⦃L1.ⓧ, U1⦄ ⊆ ⦃L2, T2⦄.
25 #T1 #U1 #HTU1 #L1 #L2 #H1L #T2
26 * #n #m #f #g #Hf #Hg #H2L #Hfg
27 lapply (lveq_length_fwd_dx … H2L ?) // -H1L #H destruct
28 lapply (frees_lifts_SO (Ⓣ) (L1.ⓧ) … HTU1 … Hf)
29 [ /3 width=4 by drops_refl, drops_drop/ ] -T1 #Hf
30 @(ex4_4_intro … Hf Hg) /2 width=4 by lveq_void_sn/ (**) (* explict constructor *)
31 qed-.
32
33 lemma fle_lifts_SO: ∀K1,K2. |K1| = |K2| → ∀T1,T2. ⦃K1, T1⦄ ⊆ ⦃K2, T2⦄ →
34                     ∀U1,U2. ⬆*[1] T1 ≡ U1 → ⬆*[1] T2 ≡ U2 →
35                     ∀I1,I2.  ⦃K1.ⓘ{I1}, U1⦄ ⊆ ⦃K2.ⓘ{I2}, U2⦄.
36 #K1 #K2 #HK #T1 #T2
37 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
38 #U1 #U2 #HTU1 #HTU2 #I1 #I2
39 elim (lveq_inj_length … HK12) // -HK #H1 #H2 destruct
40 /5 width=12 by frees_lifts_SO, drops_refl, drops_drop, lveq_bind, sle_push, ex4_4_intro/
41 qed.
42
43 (* Advanced inversion lemmas ************************************************)
44
45 lemma fle_inv_lifts_sn: ∀T1,U1. ⬆*[1] T1 ≡ U1 →
46                         ∀I1,I2,L1,L2,V1,V2,U2. ⦃L1.ⓑ{I1}V1,U1⦄ ⊆ ⦃L2.ⓑ{I2}V2, U2⦄ →
47                         ∀p. ⦃L1, T1⦄ ⊆ ⦃L2, ⓑ{p,I2}V2.U2⦄.
48 #T1 #U1 #HTU1 #I1 #I2 #L1 #L2 #V1 #V2 #U2
49 * #n #m #f2 #g2 #Hf2 #Hg2 #HL #Hfg2 #p
50 elim (lveq_inv_pair_pair … HL) -HL #HL #H1 #H2 destruct
51 elim (frees_total L2 V2) #g1 #Hg1
52 elim (sor_isfin_ex g1 (⫱g2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #g #Hg #_
53 lapply (frees_inv_lifts_SO (Ⓣ) … Hf2 … HTU1)
54 [1,2: /3 width=4 by drops_refl, drops_drop/ ] -U1 #Hf2
55 lapply (sor_inv_sle_dx … Hg) #H0g
56 /5 width=10 by frees_bind, sle_tl, sle_trans, ex4_4_intro/
57 qed-.