]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/fsup/ldrop_fsup.etc
- extended multiple substitutions now uses bounds in ynat (ie. they
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / fsup / ldrop_fsup.etc
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/fsup.ma".
16 include "basic_2/substitution/ldrop_ldrop.ma".
17
18 (* LOCAL ENVIRONMENT SLICING ************************************************)
19
20 (* Inversion lemmas on supclosure *******************************************)
21
22 lemma fsup_inv_atom1_ldrop: ∀K,V,L,I. ⦃L, ⓪{I}⦄ ⊃ ⦃K, V⦄ →
23                             ∃∃J,i. ⇩[0, i] L ≡ K.ⓑ{J}V & I = LRef i.
24 #K #V #L @(f_ind … length … L) -L #n #IH #L #Hn #I #H
25 elim (fsup_inv_atom1 … H) -H *
26 [ #J #L0 #V0 #H1 #H2 #H3 #H4 destruct /2 width=4/
27 | #J #L0 #V0 #i #HLK #H1 #H2 destruct
28   elim (IH … HLK) -IH -HLK [2: normalize // ] #I #j #HLK #H destruct /3 width=4/
29 ]
30 qed-.
31
32 (* Advanced eliminators on supclosure ***************************************)
33
34 lemma fsup_ind_ldrop: ∀R:bi_relation lenv term.
35                       (∀I,L,K,V,i. ⇩[0, i] L ≡ K.ⓑ{I}V → R L (#i) K V) →
36                       (∀a,I,L,V,T. R L (ⓑ{a,I}V.T) L V) →
37                       (∀a,I,L,V,T. R L (ⓑ{a,I}V.T) (L.ⓑ{I}V) T) →
38                       (∀I,L,V,T. R L (ⓕ{I}V.T) L V) →
39                       (∀I,L,V,T. R L (ⓕ{I}V.T) L T) →
40                       ∀L1,T1,L2,T2. ⦃L1,T1⦄⊃⦃L2,T2⦄ → R L1 T1 L2 T2.
41 #R #H1 #H2 #H3 #H4 #H5 #L1 #T1 #L2 #T2 #H elim H -L1 -T1 -L2 -T2 //
42 [ /3 width=2/
43 | #I #L #K #V #T #i #H #H1LK
44   elim (fsup_inv_atom1_ldrop … H) -H #J #j #H2LK #H destruct /3 width=2/
45 ]
46 qed-.
47
48 (* Advanced inversion lemmas on supclosure **********************************)
49
50 lemma fsup_inv_ldrop: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ →
51                       ∀J,W,j. ⇩[0, j] L1 ≡ L2.ⓑ{J}W → T1 = #j ∧ T2 = W.
52 #L1 #L2 #T1 #T2 #H @(fsup_ind_ldrop … H) -L1 -L2 -T1 -T2
53 [ #I #L #K #V #i #HLKV #J #W #j #HLKW
54   elim (ldrop_conf_div … HLKV … HLKW) -L /2 width=1/
55 | #a
56 | #a
57 ]
58 #I #L #V #T #J #W #j #H
59 lapply (ldrop_pair2_fwd_fw … H W) -H #H
60 [2: lapply (transitive_lt (♯{L,W}) … H) /2 width=1/ -H #H ]
61 elim (lt_refl_false … H)
62 qed-.