]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lsuba_ldrop.ma
preservation of stratified vaildity through ordinary reduction and static typing
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lsuba_ldrop.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/static/lsuba.ma".
16
17 (* LOCAL ENVIRONMENT REFINEMENT FOR ATOMIC ARITY ASSIGNMENT *****************)
18
19 (* Properties concerning basic local environment slicing ********************)
20
21 (* Note: the constant 0 cannot be generalized *)
22 lemma lsuba_ldrop_O1_conf: ∀G,L1,L2. G ⊢ L1 ⁝⫃ L2 → ∀K1,s,e. ⇩[s, 0, e] L1 ≡ K1 →
23                            ∃∃K2. G ⊢ K1 ⁝⫃ K2 & ⇩[s, 0, e] L2 ≡ K2.
24 #G #L1 #L2 #H elim H -L1 -L2
25 [ /2 width=3/
26 | #I #L1 #L2 #V #_ #IHL12 #K1 #s #e #H
27   elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
28   [ destruct
29     elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H
30     <(ldrop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, ldrop_pair, ex2_intro/
31   | elim (IHL12 … HLK1) -L1 /3 width=3 by ldrop_drop_lt, ex2_intro/
32   ]
33 | #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K1 #s #e #H
34   elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK1
35   [ destruct
36     elim (IHL12 L1 s 0) -IHL12 // #X #HL12 #H
37     <(ldrop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_abbr, ldrop_pair, ex2_intro/
38   | elim (IHL12 … HLK1) -L1 /3 width=3 by ldrop_drop_lt, ex2_intro/
39   ]
40 ]
41 qed-.
42
43 (* Note: the constant 0 cannot be generalized *)
44 lemma lsuba_ldrop_O1_trans: ∀G,L1,L2. G ⊢ L1 ⁝⫃ L2 → ∀K2,s,e. ⇩[s, 0, e] L2 ≡ K2 →
45                             ∃∃K1. G ⊢ K1 ⁝⫃ K2 & ⇩[s, 0, e] L1 ≡ K1.
46 #G #L1 #L2 #H elim H -L1 -L2
47 [ /2 width=3/
48 | #I #L1 #L2 #V #_ #IHL12 #K2 #s #e #H
49   elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
50   [ destruct
51     elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H
52     <(ldrop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, ldrop_pair, ex2_intro/
53   | elim (IHL12 … HLK2) -L2 /3 width=3 by ldrop_drop_lt, ex2_intro/
54   ]
55 | #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K2 #s #e #H
56   elim (ldrop_inv_O1_pair1 … H) -H * #He #HLK2
57   [ destruct
58     elim (IHL12 L2 s 0) -IHL12 // #X #HL12 #H
59     <(ldrop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_abbr, ldrop_pair, ex2_intro/
60   | elim (IHL12 … HLK2) -L2 /3 width=3 by ldrop_drop_lt, ex2_intro/
61   ]
62 ]
63 qed-.