]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cnr.ma
update in basic_2 and apps_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cnr.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/prednormal_5.ma".
16 include "basic_2/rt_transition/cpr.ma".
17
18 (* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
19
20 definition cnr (h) (n) (G) (L): predicate term ≝
21            NF … (cpm h G L n) (eq …).
22
23 interpretation
24    "normality for context-sensitive r-transition (term)"
25    'PRedNormal h n G L T = (cnr h n G L T).
26
27 (* Basic inversion lemmas ***************************************************)
28
29 lemma cnr_inv_abst (h) (p) (G) (L):
30       ∀V,T. ❪G,L❫ ⊢ ➡𝐍[h,0] ⓛ[p]V.T →
31       ∧∧ ❪G,L❫ ⊢ ➡𝐍[h,0] V & ❪G,L.ⓛV❫ ⊢ ➡𝐍[h,0] T.
32 #h #p #G #L #V1 #T1 #HVT1 @conj
33 [ #V2 #HV2 lapply (HVT1 (ⓛ[p]V2.T1) ?) -HVT1 /2 width=2 by cpr_pair_sn/ -HV2 #H destruct //
34 | #T2 #HT2 lapply (HVT1 (ⓛ[p]V1.T2) ?) -HVT1 /2 width=2 by cpm_bind/ -HT2 #H destruct //
35 ]
36 qed-.
37
38 (* Basic_2A1: was: cnr_inv_abbr *)
39 lemma cnr_inv_abbr_neg (h) (G) (L):
40       ∀V,T. ❪G,L❫ ⊢ ➡𝐍[h,0] -ⓓV.T →
41       ∧∧ ❪G,L❫ ⊢ ➡𝐍[h,0] V & ❪G,L.ⓓV❫ ⊢ ➡𝐍[h,0] T.
42 #h #G #L #V1 #T1 #HVT1 @conj
43 [ #V2 #HV2 lapply (HVT1 (-ⓓV2.T1) ?) -HVT1 /2 width=2 by cpr_pair_sn/ -HV2 #H destruct //
44 | #T2 #HT2 lapply (HVT1 (-ⓓV1.T2) ?) -HVT1 /2 width=2 by cpm_bind/ -HT2 #H destruct //
45 ]
46 qed-.
47
48 (* Basic_2A1: was: cnr_inv_eps *)
49 lemma cnr_inv_cast (h) (G) (L):
50       ∀V,T. ❪G,L❫ ⊢ ➡𝐍[h,0] ⓝV.T → ⊥.
51 #h #G #L #V #T #H lapply (H T ?) -H
52 /2 width=4 by cpm_eps, discr_tpair_xy_y/
53 qed-.
54
55 (* Basic properties *********************************************************)
56
57 (* Basic_1: was: nf2_sort *)
58 lemma cnr_sort (h) (G) (L):
59       ∀s. ❪G,L❫ ⊢ ➡𝐍[h,0] ⋆s.
60 #h #G #L #s #X #H
61 >(cpr_inv_sort1 … H) //
62 qed.
63
64 lemma cnr_gref (h) (G) (L):
65       ∀l. ❪G,L❫ ⊢ ➡𝐍[h,0] §l.
66 #h #G #L #l #X #H
67 >(cpr_inv_gref1 … H) //
68 qed.
69
70 (* Basic_1: was: nf2_abst *)
71 lemma cnr_abst (h) (p) (G) (L):
72       ∀W,T. ❪G,L❫ ⊢ ➡𝐍[h,0] W → ❪G,L.ⓛW❫ ⊢ ➡𝐍[h,0] T → ❪G,L❫ ⊢ ➡𝐍[h,0] ⓛ[p]W.T.
73 #h #p #G #L #W #T #HW #HT #X #H
74 elim (cpm_inv_abst1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
75 <(HW … HW0) -W0 <(HT … HT0) -T0 //
76 qed.
77
78 lemma cnr_abbr_neg (h) (G) (L):
79       ∀V,T. ❪G,L❫ ⊢ ➡𝐍[h,0] V → ❪G,L.ⓓV❫ ⊢ ➡𝐍[h,0] T → ❪G,L❫ ⊢ ➡𝐍[h,0] -ⓓV.T.
80 #h #G #L #V #T #HV #HT #X #H
81 elim (cpm_inv_abbr1 … H) -H *
82 [ #V0 #T0 #HV0 #HT0 #H destruct
83   <(HV … HV0) -V0 <(HT … HT0) -T0 //
84 | #T0 #_ #_ #H destruct
85 ]
86 qed.
87
88
89 (* Basic_1: removed theorems 1: nf2_abst_shift *)