1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/substitution/fsup.ma".
16 include "basic_2/substitution/ldrop_ldrop.ma".
18 (* LOCAL ENVIRONMENT SLICING ************************************************)
20 (* Inversion lemmas on supclosure *******************************************)
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/
32 (* Advanced eliminators on supclosure ***************************************)
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 //
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/
48 (* Advanced inversion lemmas on supclosure **********************************)
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/
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)