]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/reduction/cpx_cix.ma
7567f9f9c580f3b5b85bc123f493b253dbb91295
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / cpx_cix.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/reduction/cix.ma".
16 include "basic_2/reduction/cpx.ma".
17
18 (* CONTEXT-SENSITIVE EXTENDED PARALLEL REDUCTION FOR TERMS ******************)
19
20 (* Advanced forward lemmas on context-sensitive extended irreducible terms **)
21
22 lemma cpx_fwd_cix: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 ➡[g] T2 → ⦃h, L⦄ ⊢ 𝐈[g]⦃T1⦄ → T2 = T1.
23 #h #g #L #T1 #T2 #H elim H -L -T1 -T2
24 [ //
25 | #L #k #l #Hkl #H elim (cix_inv_sort … Hkl H)
26 | #I #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #H
27   elim (cix_inv_delta … HLK) //
28 | #a * #L #V1 #V2 #T1 #T2 #_ #_ #IHV1 #IHT1 #H
29   [ elim (cix_inv_bind … H) -H #HV1 #HT1 * #H destruct
30     lapply (IHV1 … HV1) -IHV1 -HV1 #H destruct
31     lapply (IHT1 … HT1) -IHT1 #H destruct //
32   | elim (cix_inv_ib2 … H) -H /2 width=1/ /3 width=2/
33   ]
34 | * #L #V1 #V2 #T1 #T2 #_ #_ #IHV1 #IHT1 #H
35   [ elim (cix_inv_appl … H) -H #HV1 #HT1 #_
36     >IHV1 -IHV1 // -HV1 >IHT1 -IHT1 //
37   | elim (cix_inv_ri2 … H) /2 width=1/
38   ]
39 | #L #V1 #T1 #T #T2 #_ #_ #_ #H
40   elim (cix_inv_ri2 … H) /2 width=1/
41 | #L #V1 #T1 #T2 #_ #_ #H
42   elim (cix_inv_ri2 … H) /2 width=1/
43 | #L #V1 #V2 #T #_ #_ #H
44   elim (cix_inv_ri2 … H) /2 width=1/
45 | #a #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H
46   elim (cix_inv_appl … H) -H #_ #_ #H
47   elim (simple_inv_bind … H)
48 | #a #L #V #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
49   elim (cix_inv_appl … H) -H #_ #_ #H
50   elim (simple_inv_bind … H)
51 ]
52 qed-.
53