]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnx.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cnx.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/notation/relations/predtynormal_3.ma".
16 include "static_2/syntax/teqx.ma".
17 include "basic_2/rt_transition/cpx.ma".
18
19 (* NORMAL TERMS FOR EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION *******)
20
21 definition cnx: relation3 genv lenv term ≝
22            λG,L. NF … (cpx G L) teqx.
23
24 interpretation
25   "normality for extended context-sensitive parallel rt-transition (term)"
26   'PRedTyNormal G L T = (cnx G L T).
27
28 (* Basic inversion lemmas ***************************************************)
29
30 lemma cnx_inv_abst (G) (L):
31       ∀p,V,T. ❪G,L❫ ⊢ ⬈𝐍 ⓛ[p]V.T →
32       ∧∧ ❪G,L❫ ⊢ ⬈𝐍 V & ❪G,L.ⓛV❫ ⊢ ⬈𝐍 T.
33 #G #L #p #V1 #T1 #HVT1 @conj
34 [ #V2 #HV2 lapply (HVT1 (ⓛ[p]V2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2
35 | #T2 #HT2 lapply (HVT1 (ⓛ[p]V1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2
36 ]
37 #H elim (teqx_inv_pair … H) -H //
38 qed-.
39
40 (* Basic_2A1: was: cnx_inv_abbr *)
41 lemma cnx_inv_abbr_neg (G) (L):
42       ∀V,T. ❪G,L❫ ⊢ ⬈𝐍 -ⓓV.T →
43       ∧∧ ❪G,L❫ ⊢ ⬈𝐍 V & ❪G,L.ⓓV❫ ⊢ ⬈𝐍 T.
44 #G #L #V1 #T1 #HVT1 @conj
45 [ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpx_pair_sn/ -HV2
46 | #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpx_bind/ -HT2
47 ]
48 #H elim (teqx_inv_pair … H) -H //
49 qed-.
50
51 (* Basic_2A1: was: cnx_inv_eps *)
52 lemma cnx_inv_cast (G) (L):
53       ∀V,T. ❪G,L❫ ⊢ ⬈𝐍 ⓝV.T → ⊥.
54 #G #L #V #T #H lapply (H T ?) -H
55 /2 width=6 by cpx_eps, teqx_inv_pair_xy_y/
56 qed-.
57
58 (* Basic properties *********************************************************)
59
60 lemma cnx_sort (G) (L):
61       ∀s. ❪G,L❫ ⊢ ⬈𝐍 ⋆s.
62 #G #L #s #X #H elim (cpx_inv_sort1 … H) -H
63 /2 width=1 by teqx_sort/
64 qed.
65
66 lemma cnx_abst (G) (L):
67       ∀p,W,T. ❪G,L❫ ⊢ ⬈𝐍 W → ❪G,L.ⓛW❫ ⊢ ⬈𝐍 T → ❪G,L❫ ⊢ ⬈𝐍 ⓛ[p]W.T.
68 #G #L #p #W #T #HW #HT #X #H
69 elim (cpx_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
70 @teqx_pair [ @HW | @HT ] // (**) (* auto fails because δ-expansion gets in the way *)
71 qed.