]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lsubd_da.ma
- the trace is explicit in all auto tactics with depth > 1
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lsubd_da.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/da_da.ma".
16 include "basic_2/static/lsubd.ma".
17
18 (* LOCAL ENVIRONMENT REFINEMENT FOR DEGREE ASSIGNMENT ***********************)
19
20 (* Properties on degree assignment ******************************************)
21
22 lemma lsubd_da_trans: ∀h,g,G,L2,T,d. ⦃G, L2⦄ ⊢ T ▪[h, g] d →
23                       ∀L1. G ⊢ L1 ⫃▪[h, g] L2 → ⦃G, L1⦄ ⊢ T ▪[h, g] d.
24 #h #g #G #L2 #T #d #H elim H -G -L2 -T -d
25 [ /2 width=1 by da_sort/
26 | #G #L2 #K2 #V #i #d #HLK2 #_ #IHV #L1 #HL12
27   elim (lsubd_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
28   elim (lsubd_inv_pair2 … H) -H * #K1 [ | -IHV -HLK1 ]
29   [ #HK12 #H destruct /3 width=4 by da_ldef/
30   | #W #d0 #_ #_ #_ #H destruct
31   ]
32 | #G #L2 #K2 #W #i #d #HLK2 #HW #IHW #L1 #HL12
33   elim (lsubd_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
34   elim (lsubd_inv_pair2 … H) -H * #K1 [ -HW | -IHW ]
35   [ #HK12 #H destruct /3 width=4 by da_ldec/
36   | #V #d0 #HV #H0W #_ #_ #H destruct
37     lapply (da_mono … H0W … HW) -H0W -HW #H destruct /3 width=7 by da_ldef, da_flat/
38   ]
39 | /4 width=1 by lsubd_pair, da_bind/
40 | /3 width=1 by da_flat/
41 ]
42 qed-.
43
44 lemma lsubd_da_conf: ∀h,g,G,L1,T,d. ⦃G, L1⦄ ⊢ T ▪[h, g] d →
45                      ∀L2. G ⊢ L1 ⫃▪[h, g] L2 → ⦃G, L2⦄ ⊢ T ▪[h, g] d.
46 #h #g #G #L1 #T #d #H elim H -G -L1 -T -d
47 [ /2 width=1 by da_sort/
48 | #G #L1 #K1 #V #i #d #HLK1 #HV #IHV #L2 #HL12
49   elim (lsubd_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
50   elim (lsubd_inv_pair1 … H) -H * #K2 [ -HV | -IHV ]
51   [ #HK12 #H destruct /3 width=4 by da_ldef/
52   | #W0 #V0 #d0 #HV0 #HW0 #_ #_ #H1 #H2 destruct
53     lapply (da_inv_flat … HV) -HV #H0V0
54     lapply (da_mono … H0V0 … HV0) -H0V0 -HV0 #H destruct /2 width=4 by da_ldec/
55   ]
56 | #G #L1 #K1 #W #i #d #HLK1 #HW #IHW #L2 #HL12
57   elim (lsubd_drop_O1_conf … HL12 … HLK1) -L1 #X #H #HLK2
58   elim (lsubd_inv_pair1 … H) -H * #K2 [ -HW | -IHW ]
59   [ #HK12 #H destruct /3 width=4 by da_ldec/
60   | #W0 #V0 #d0 #HV0 #HW0 #_ #H destruct
61   ]
62 | /4 width=1 by lsubd_pair, da_bind/
63 | /3 width=1 by da_flat/
64 ]
65 qed-.