]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/etc/lcoeq/ldrop_lcoeq.etc
milestone update in ground_2 and basic_2A
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / etc / lcoeq / ldrop_lcoeq.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 "ground_2/ynat/ynat_minus.ma".
16 include "basic_2/grammar/lcoeq.ma".
17 include "basic_2/relocation/ldrop.ma".
18
19 (* BASIC SLICING FOR LOCAL ENVIRONMENTS *************************************)
20
21 (* Properties on coequivalence **********************************************)
22
23 lemma lcoeq_ldrop_trans_lt: ∀L1,L2,d,e. L1 ≅[d, e] L2 →
24                             ∀I,K2,W,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓑ{I}W → i < d →
25                             ∃∃K1. K1 ≅[⫰(d-i), e] K2 & ⇩[s, 0, i] L1 ≡ K1.ⓑ{I}W.
26 #L1 #L2 #d #e #H elim H -L1 -L2 -d -e
27 [ #d #e #J #K2 #W #s #i #H
28   elim (ldrop_inv_atom1 … H) -H #H destruct
29 | #I #L1 #L2 #V #_ #_ #J #K2 #W #s #i #_ #H
30   elim (ylt_yle_false … H) //
31 | #I1 #I2 #L1 #L2 #V1 #V2 #e #_ #_ #J #K2 #W #s #i #_ #H
32   elim (ylt_yle_false … H) //
33 | #I #L1 #L2 #V #d #e #HL12 #IHL12 #J #K2 #W #s #i #H
34   elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK1 [ -IHL12 | -HL12 ]
35   [ #_ destruct >ypred_succ
36     /2 width=3 by ldrop_pair, ex2_intro/
37   | lapply (ylt_inv_O1 i ?) /2 width=1 by ylt_inj/
38     #H <H -H #H lapply (ylt_inv_succ … H) -H
39     #Hie elim (IHL12 … HLK1) -IHL12 -HLK1 // -Hie
40     >yminus_succ <yminus_inj /3 width=3 by ldrop_drop_lt, ex2_intro/
41   ]
42 ]
43 qed-.
44
45 lemma lcoeq_ldrop_conf_lt: ∀L1,L2,d,e. L1 ≅[d, e] L2 →
46                            ∀I,K1,W,s,i. ⇩[s, 0, i] L1 ≡ K1.ⓑ{I}W → i < d →
47                            ∃∃K2. K1 ≅[⫰(d-i), e] K2 & ⇩[s, 0, i] L2 ≡ K2.ⓑ{I}W.
48 #L1 #L2 #d #e #HL12 #I #K1 #W #s #i #HLK1 #Hid
49 elim (lcoeq_ldrop_trans_lt … (lcoeq_sym … HL12) … HLK1) // -L1 -Hid
50 /3 width=3 by lcoeq_sym, ex2_intro/
51 qed-.