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