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_4.ma".
16 include "static_2/syntax/teqx.ma".
17 include "basic_2/rt_transition/cpx.ma".
19 (* NORMAL TERMS FOR UNBOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ********)
21 definition cnx: ∀h. relation3 genv lenv term ≝
22 λh,G,L. NF … (cpx h G L) teqx.
25 "normality for unbound context-sensitive parallel rt-transition (term)"
26 'PRedTyNormal h G L T = (cnx h G L T).
28 (* Basic inversion lemmas ***************************************************)
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
36 #H elim (teqx_inv_pair … H) -H //
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
46 #H elim (teqx_inv_pair … H) -H //
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/
55 (* Basic properties *********************************************************)
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/
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 *)