]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/reduction/lpx_aaa.ma
4d9d55261752ba2c92b40df1f175e5e59a9b7313
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / lpx_aaa.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/aaa_lift.ma".
16 include "basic_2/static/lsuba_aaa.ma".
17 include "basic_2/reduction/lpx_ldrop.ma".
18
19 (* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
20
21 (* Properties on atomic arity assignment for terms **************************)
22
23 lemma aaa_cpx_lpx_conf: ∀h,g,L1,T1,A. L1 ⊢ T1 ⁝ A → ∀T2. ⦃h, L1⦄ ⊢ T1 ➡[g] T2 →
24                         ∀L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → L2 ⊢ T2 ⁝ A.
25 #h #g #L1 #T1 #A #H elim H -L1 -T1 -A
26 [ #L1 #k #X #H
27   elim (cpx_inv_sort1 … H) -H // * //
28 | #I #L1 #K1 #V1 #B #i #HLK1 #_ #IHV1 #X #H #L2 #HL12
29   elim (cpx_inv_lref1 … H) -H
30   [ #H destruct
31     elim (lpx_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
32     elim (lpx_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct /3 width=6/
33   | * #J #Y #Z #V2 #H #HV12 #HV2
34     lapply (ldrop_mono … H … HLK1) -H #H destruct
35     elim (lpx_ldrop_conf … HLK1 … HL12) -L1 #Z #H #HLK2
36     elim (lpx_inv_pair1 … H) -H #K2 #V0 #HK12 #_ #H destruct
37     lapply (ldrop_fwd_ldrop2 … HLK2) -V0 /3 width=7/
38   ]
39 | #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
40   elim (cpx_inv_abbr1 … H) -H *
41   [ #V2 #T2 #HV12 #HT12 #H destruct /4 width=2/
42   | #T2 #HT12 #HT2 #H destruct -IHV1
43     @(aaa_inv_lift (L2.ⓓV1) … HT2) -HT2 /2 width=1/ /3 width=1/
44   ]
45 | #a #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
46   elim (cpx_inv_abst1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct /4 width=1/
47 | #L1 #V1 #T1 #B #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
48   elim (cpx_inv_appl1 … H) -H *
49   [ #V2 #T2 #HV12 #HT12 #H destruct /3 width=3/
50   | #b #V2 #W1 #W2 #U1 #U2 #HV12 #HW12 #HU12 #H1 #H2 destruct
51     lapply (IHV1 … HV12 … HL12) -IHV1 -HV12 #HV2
52     lapply (IHT1 (ⓛ{b}W2.U2) … HL12) -IHT1 /2 width=1/ -L1 #H
53     elim (aaa_inv_abst … H) -H #B0 #A0 #HW1 #HU2 #H destruct
54     lapply (lsuba_aaa_trans … HU2 (L2.ⓓⓝW2.V2) ?) -HU2 /3 width=3/
55   | #b #V #V2 #W1 #W2 #U1 #U2 #HV1 #HV2 #HW12 #HU12 #H1 #H2 destruct
56     lapply (aaa_lift L2 … B … (L2.ⓓW2) … HV2) -HV2 /2 width=1/ #HV2
57     lapply (IHT1 (ⓓ{b}W2.U2) … HL12) -IHT1 /2 width=1/ -L1 #H
58     elim (aaa_inv_abbr … H) -H /3 width=3/
59   ]
60 | #L1 #V1 #T1 #A #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
61   elim (cpx_inv_cast1 … H) -H
62   [ * #V2 #T2 #HV12 #HT12 #H destruct /3 width=1/
63   | -IHV1 /2 width=1/
64   | -IHT1 /2 width=1/
65   ]
66 ]
67 qed-.
68
69 lemma aaa_cpx_conf: ∀h,g,L,T1,A. L ⊢ T1 ⁝ A → ∀T2. ⦃h, L⦄ ⊢ T1 ➡[g] T2 → L ⊢ T2 ⁝ A.
70 /2 width=7 by aaa_cpx_lpx_conf/ qed-.
71
72 lemma aaa_lpx_conf: ∀h,g,L1,T,A. L1 ⊢ T ⁝ A → ∀L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → L2 ⊢ T ⁝ A.
73 /2 width=7 by aaa_cpx_lpx_conf/ qed-.
74 (*
75 lamma aaa_cpr_conf: ∀L,T1,A. L ⊢ T1 ⁝ A → ∀T2. L ⊢ T1 ➡ T2 → L ⊢ T2 ⁝ A.
76 /3 width=5 by aaa_cpx_conf, cpr_cpx/ qed-.
77
78 lamma aaa_lpr_conf: ∀L1,T,A. L1 ⊢ T ⁝ A → ∀L2. L1 ⊢ ➡ L2 → L2 ⊢ T ⁝ A.
79 /3 width=5 by aaa_lpx_conf, lpr_lpx/ qed-.
80 *)