]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/reduction/cnx.ma
- revision of ground_2 and basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / cnx.ma
index 47f92caaab641e51ea7cf0868278a84adf6ad840..942ccc285e75e84c8cbc41069e335875671df205 100644 (file)
 (*                                                                        *)
 (**************************************************************************)
 
-include "basic_2/notation/relations/normal_5.ma".
+include "basic_2/notation/relations/prednormal_5.ma".
 include "basic_2/reduction/cnr.ma".
 include "basic_2/reduction/cpx.ma".
 
-(* CONTEXT-SENSITIVE EXTENDED NORMAL TERMS **********************************)
+(* NORMAL TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION ********************)
 
 definition cnx: ∀h. sd h → relation3 genv lenv term ≝
                 λh,g,G,L. NF … (cpx h g G L) (eq …).
 
 interpretation
-   "context-sensitive extended normality (term)"
-   'Normal h g L T = (cnx h g L T).
+   "normality for context-sensitive extended reduction (term)"
+   'PRedNormal h g L T = (cnx h g L T).
 
 (* Basic inversion lemmas ***************************************************)
 
 lemma cnx_inv_sort: ∀h,g,G,L,k. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄ → deg h g k 0.
 #h #g #G #L #k #H elim (deg_total h g k)
-#l @(nat_ind_plus … l) -l // #l #_ #Hkl
-lapply (H (⋆(next h k)) ?) -H /2 width=2 by cpx_sort/ -L -l #H destruct -H -e0 (**) (* destruct does not remove some premises *)
-lapply (next_lt h k) >e1 -e1 #H elim (lt_refl_false … H)
+#d @(nat_ind_plus … d) -d // #d #_ #Hkd
+lapply (H (⋆(next h k)) ?) -H /2 width=2 by cpx_st/ -L -d #H
+lapply (destruct_tatom_tatom_aux … H) -H #H (**) (* destruct lemma needed *)
+lapply (destruct_sort_sort_aux … H) -H #H (**) (* destruct lemma needed *)
+lapply (next_lt h k) >H -H #H elim (lt_refl_false … H)
 qed-.
 
-lemma cnx_inv_delta: â\88\80h,g,I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄ → ⊥.
+lemma cnx_inv_delta: â\88\80h,g,I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄ → ⊥.
 #h #g #I #G #L #K #V #i #HLK #H
 elim (lift_total V 0 (i+1)) #W #HVW
 lapply (H W ?) -H [ /3 width=7 by cpx_delta/ ] -HLK #H destruct
-elim (lift_inv_lref2_be … HVW) -HVW //
+elim (lift_inv_lref2_be … HVW) -HVW /2 width=1 by ylt_inj/
 qed-.
 
 lemma cnx_inv_abst: ∀h,g,a,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓛ{a}V.T⦄ →
@@ -82,9 +84,9 @@ lemma cnx_inv_appl: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓐV.T⦄ 
 ]
 qed-.
 
-lemma cnx_inv_tau: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓝV.T⦄ → ⊥.
+lemma cnx_inv_eps: ∀h,g,G,L,V,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃ⓝV.T⦄ → ⊥.
 #h #g #G #L #V #T #H lapply (H T ?) -H
-/2 width=4 by cpx_tau, discr_tpair_xy_y/
+/2 width=4 by cpx_eps, discr_tpair_xy_y/
 qed-.
 
 (* Basic forward lemmas *****************************************************)
@@ -97,23 +99,23 @@ qed-.
 (* Basic properties *********************************************************)
 
 lemma cnx_sort: ∀h,g,G,L,k. deg h g k 0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆k⦄.
-#h #g #G #L #k #Hk #X #H elim (cpx_inv_sort1 … H) -H // * #l #Hkl #_
-lapply (deg_mono … Hkl Hk) -h -L <plus_n_Sm #H destruct
+#h #g #G #L #k #Hk #X #H elim (cpx_inv_sort1 … H) -H // * #d #Hkd #_
+lapply (deg_mono … Hkd Hk) -h -L <plus_n_Sm #H destruct
 qed.
 
-lemma cnx_sort_iter: ∀h,g,G,L,k,l. deg h g k l → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆((next h)^l k)⦄.
-#h #g #G #L #k #l #Hkl
-lapply (deg_iter … l Hkl) -Hkl <minus_n_n /2 width=6 by cnx_sort/
+lemma cnx_sort_iter: ∀h,g,G,L,k,d. deg h g k d → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃⋆((next h)^d k)⦄.
+#h #g #G #L #k #d #Hkd
+lapply (deg_iter … d Hkd) -Hkd <minus_n_n /2 width=6 by cnx_sort/
 qed.
 
 lemma cnx_lref_free: ∀h,g,G,L,i. |L| ≤ i → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄.
 #h #g #G #L #i #Hi #X #H elim (cpx_inv_lref1 … H) -H // *
-#I #K #V1 #V2 #HLK lapply (ldrop_fwd_length_lt2 … HLK) -HLK
+#I #K #V1 #V2 #HLK lapply (drop_fwd_length_lt2 … HLK) -HLK
 #H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/
 qed.
 
-lemma cnx_lref_atom: â\88\80h,g,G,L,i. â\87©[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄.
-#h #g #G #L #i #HL @cnx_lref_free >(ldrop_fwd_length … HL) -HL //
+lemma cnx_lref_atom: â\88\80h,g,G,L,i. â¬\87[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄.
+#h #g #G #L #i #HL @cnx_lref_free >(drop_fwd_length … HL) -HL //
 qed.
 
 lemma cnx_abst: ∀h,g,a,G,L,W,T. ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃W⦄ → ⦃G, L.ⓛW⦄ ⊢ ➡[h, g] 𝐍⦃T⦄ →