]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/static/fsle_drops.ma
update in ground and delayed updating
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / static / fsle_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 "static_2/static/frees_drops.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_lifts_sn: ∀T1,U1. ⇧[1] T1 ≘ U1 → ∀L1,L2. |L2| ≤ |L1| →
23                      ∀T2. ❨L1,T1❩ ⊆ ❨L2,T2❩ → ❨L1.ⓧ,U1❩ ⊆ ❨L2,T2❩.
24 #T1 #U1 #HTU1 #L1 #L2 #H1L #T2
25 * #n #m #f #g #Hf #Hg #H2L #Hfg
26 lapply (lveq_length_fwd_dx … H2L ?) // -H1L #H destruct
27 lapply (frees_lifts_SO (Ⓣ) (L1.ⓧ) … HTU1 … Hf)
28 [ /3 width=4 by drops_refl, drops_drop/ ] -T1 #Hf
29 @(ex4_4_intro … Hf Hg) /2 width=4 by lveq_void_sn/ (**) (* explict constructor *)
30 qed-.
31
32 lemma fsle_lifts_dx (L1) (L2):
33                     |L1| ≤ |L2| → ∀T2,U2. ⇧[1]T2 ≘ U2 →
34                     ∀T1. ❨L1,T1❩ ⊆ ❨L2,T2❩ → ❨L1,T1❩ ⊆ ❨L2.ⓧ,U2❩.
35 #L1 #L2 #HL21 #T2 #U2 #HTU2 #T1
36 * #n #m #f #g #Hf #Hg #H2L #Hfg
37 lapply (lveq_length_fwd_sn … H2L ?) // -HL21 #H destruct
38 lapply (frees_lifts_SO (Ⓣ) (L2.ⓧ) … HTU2 … Hg)
39 [ /3 width=4 by drops_refl, drops_drop/ ] -T2 #Hg
40 @(ex4_4_intro … Hf Hg) /2 width=4 by lveq_void_dx/ (**) (* explict constructor *)
41 qed-.
42
43 lemma fsle_lifts_SO_sn: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ❨K1,V1❩ ⊆ ❨K2,V2❩ →
44                         ∀W1. ⇧[1] V1 ≘ W1 → ∀I1,I2. ❨K1.ⓘ[I1],W1❩ ⊆ ❨K2.ⓑ[I2]V2,#O❩.
45 #K1 #K2 #HK #V1 #V2
46 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
47 #W1 #HVW1 #I1 #I2
48 elim (lveq_inj_length … HK12) // -HK #H1 #H2 destruct
49 /5 width=12 by frees_lifts_SO, frees_pair, drops_refl, drops_drop, lveq_bind, pr_sle_weak, ex4_4_intro/
50 qed.
51
52 lemma fsle_lifts_SO: ∀K1,K2. |K1| = |K2| → ∀T1,T2. ❨K1,T1❩ ⊆ ❨K2,T2❩ →
53                      ∀U1,U2. ⇧[1] T1 ≘ U1 → ⇧[1] T2 ≘ U2 →
54                      ∀I1,I2.  ❨K1.ⓘ[I1],U1❩ ⊆ ❨K2.ⓘ[I2],U2❩.
55 #K1 #K2 #HK #T1 #T2
56 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
57 #U1 #U2 #HTU1 #HTU2 #I1 #I2
58 elim (lveq_inj_length … HK12) // -HK #H1 #H2 destruct
59 /5 width=12 by frees_lifts_SO, drops_refl, drops_drop, lveq_bind, pr_sle_push, ex4_4_intro/
60 qed.
61
62 (* Advanced inversion lemmas ************************************************)
63
64 lemma fsle_inv_lifts_sn: ∀T1,U1. ⇧[1] T1 ≘ U1 →
65                          ∀I1,I2,L1,L2,V1,V2,U2. ❨L1.ⓑ[I1]V1,U1❩ ⊆ ❨L2.ⓑ[I2]V2,U2❩ →
66                          ∀p. ❨L1,T1❩ ⊆ ❨L2,ⓑ[p,I2]V2.U2❩.
67 #T1 #U1 #HTU1 #I1 #I2 #L1 #L2 #V1 #V2 #U2
68 * #n #m #f2 #g2 #Hf2 #Hg2 #HL #Hfg2 #p
69 elim (lveq_inv_pair_pair … HL) -HL #HL #H1 #H2 destruct
70 elim (frees_total L2 V2) #g1 #Hg1
71 elim (pr_sor_isf_bi g1 (⫰g2)) /3 width=3 by frees_fwd_isfin, pr_isf_tl/ #g #Hg #_
72 lapply (frees_inv_lifts_SO (Ⓣ) … Hf2 … HTU1)
73 [1,2: /3 width=4 by drops_refl, drops_drop/ ] -U1 #Hf2
74 lapply (pr_sor_inv_sle_dx … Hg) #H0g
75 /5 width=10 by frees_bind, pr_sle_tl, pr_sle_trans, ex4_4_intro/
76 qed-.