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