]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx_simple.ma
dfee9d0e0ea167378f31b4a976c2d4d8bfe2fedb
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cnx_simple.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/rt_transition/cpx_simple.ma".
16 include "basic_2/rt_transition/cnx.ma".
17
18 (* NORMAL TERMS FOR UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ********)
19
20 (* Inversion lemmas with simple terms ***************************************)
21
22 lemma cnx_inv_appl: ∀h,G,L,V,T. ❪G,L❫ ⊢ ⬈𝐍[h] ⓐV.T →
23                     ∧∧ ❪G,L❫ ⊢ ⬈𝐍[h] V & ❪G,L❫ ⊢ ⬈𝐍[h] T & 𝐒❪T❫.
24 #h #G #L #V1 #T1 #HVT1 @and3_intro
25 [ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpx_pair_sn/ -HV2
26   #H elim (teqx_inv_pair … H) -H //
27 | #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpx_flat/ -HT2
28   #H elim (teqx_inv_pair … H) -H //
29 | generalize in match HVT1; -HVT1 elim T1 -T1 * //
30   #p * #W1 #U1 #_ #_ #H
31   [ elim (lifts_total V1 (𝐔❨1❩)) #V2 #HV12
32     lapply (H (ⓓ[p]W1.ⓐV2.U1) ?) -H /2 width=3 by cpx_theta/ -HV12
33     #H elim (teqx_inv_pair … H) -H #H destruct
34   | lapply (H (ⓓ[p]ⓝW1.V1.U1) ?) -H /2 width=1 by cpx_beta/
35     #H elim (teqx_inv_pair … H) -H #H destruct
36   ]
37 ]
38 qed-.
39
40 (* Properties with simple terms *********************************************)
41
42 lemma cnx_appl_simple: ∀h,G,L,V,T. ❪G,L❫ ⊢ ⬈𝐍[h] V → ❪G,L❫ ⊢ ⬈𝐍[h] T → 𝐒❪T❫ →
43                        ❪G,L❫ ⊢ ⬈𝐍[h] ⓐV.T.
44 #h #G #L #V #T #HV #HT #HS #X #H elim (cpx_inv_appl1_simple … H) -H //
45 #V0 #T0 #HV0 #HT0 #H destruct
46 @teqx_pair [ @HV | @HT ] // (**) (* auto fails because δ-expansion gets in the way *)
47 qed.