]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lsuba_drops.ma
- advances on drops
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lsuba_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 "basic_2/notation/relations/lrsubeqa_3.ma".
16 include "basic_2/static/lsubr.ma".
17 include "basic_2/static/aaa.ma".
18
19 (* RESTRICTED REFINEMENT FOR ATOMIC ARITY ASSIGNMENT ************************)
20
21 (* Basic properties *********************************************************)
22
23 (* Note: the constant 0 cannot be generalized *)
24 lemma lsuba_drop_O1_conf: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀K1,c,k. ⬇[c, 0, k] L1 ≡ K1 →
25                           ∃∃K2. G ⊢ K1 ⫃⁝ K2 & ⬇[c, 0, k] L2 ≡ K2.
26 #G #L1 #L2 #H elim H -L1 -L2
27 [ /2 width=3 by ex2_intro/
28 | #I #L1 #L2 #V #_ #IHL12 #K1 #c #k #H
29   elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1
30   [ destruct
31     elim (IHL12 L1 c 0) -IHL12 // #X #HL12 #H
32     <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, drop_pair, ex2_intro/
33   | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/
34   ]
35 | #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K1 #c #k #H
36   elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK1
37   [ destruct
38     elim (IHL12 L1 c 0) -IHL12 // #X #HL12 #H
39     <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_beta, drop_pair, ex2_intro/
40   | elim (IHL12 … HLK1) -L1 /3 width=3 by drop_drop_lt, ex2_intro/
41   ]
42 ]
43 qed-.
44
45 (* Note: the constant 0 cannot be generalized *)
46 lemma lsuba_drop_O1_trans: ∀G,L1,L2. G ⊢ L1 ⫃⁝ L2 → ∀K2,c,k. ⬇[c, 0, k] L2 ≡ K2 →
47                            ∃∃K1. G ⊢ K1 ⫃⁝ K2 & ⬇[c, 0, k] L1 ≡ K1.
48 #G #L1 #L2 #H elim H -L1 -L2
49 [ /2 width=3 by ex2_intro/
50 | #I #L1 #L2 #V #_ #IHL12 #K2 #c #k #H
51   elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2
52   [ destruct
53     elim (IHL12 L2 c 0) -IHL12 // #X #HL12 #H
54     <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_pair, drop_pair, ex2_intro/
55   | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/
56   ]
57 | #L1 #L2 #W #V #A #HV #HW #_ #IHL12 #K2 #c #k #H
58   elim (drop_inv_O1_pair1 … H) -H * #Hm #HLK2
59   [ destruct
60     elim (IHL12 L2 c 0) -IHL12 // #X #HL12 #H
61     <(drop_inv_O2 … H) in HL12; -H /3 width=3 by lsuba_beta, drop_pair, ex2_intro/
62   | elim (IHL12 … HLK2) -L2 /3 width=3 by drop_drop_lt, ex2_intro/
63   ]
64 ]
65 qed-.