1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/notation/relations/predtynormal_3.ma".
16 include "static_2/syntax/teqx.ma".
17 include "basic_2/rt_transition/cpx.ma".
19 (* NORMAL TERMS FOR EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION *******)
21 definition cnx: relation3 genv lenv term ≝
22 λG,L. NF … (cpx G L) teqx.
25 "normality for extended context-sensitive parallel rt-transition (term)"
26 'PRedTyNormal G L T = (cnx G L T).
28 (* Basic inversion lemmas ***************************************************)
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
37 #H elim (teqx_inv_pair … H) -H //
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
48 #H elim (teqx_inv_pair … H) -H //
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, teqg_inv_pair_xy_y/
58 (* Basic properties *********************************************************)
60 lemma cnx_sort (G) (L):
62 #G #L #s #X #H elim (cpx_inv_sort1 … H) -H
63 /2 width=1 by teqg_sort/
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 *)