]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs.ma
severe bug found in parallel zeta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cpxs.ma
index 2a60dd3d40423df23fcbbf58535fc44ec809d226..ce01889c15f5d71b16ed8a65b11bc89cedbfee66 100644 (file)
@@ -16,27 +16,27 @@ include "ground_2/lib/star.ma".
 include "basic_2/notation/relations/predtystar_5.ma".
 include "basic_2/rt_transition/cpx.ma".
 
-(* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS ************)
+(* UNBOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
 
 definition cpxs: sh → relation4 genv lenv term term ≝
-                 λh,G. LTC … (cpx h G).
+                 λh,G. CTC … (cpx h G).
 
-interpretation "uncounted context-sensitive parallel rt-computation (term)"
+interpretation "unbound context-sensitive parallel rt-computation (term)"
    'PRedTyStar h G L T1 T2 = (cpxs h G L T1 T2).
 
 (* Basic eliminators ********************************************************)
 
-lemma cpxs_ind: ∀h,G,L,T1. ∀R:predicate term. R T1 →
-                (∀T,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T → ⦃G, L⦄ ⊢ T ⬈[h] T2 → R T → R T2) →
-                ∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → R T2.
-#h #L #G #T1 #R #HT1 #IHT1 #T2 #HT12
+lemma cpxs_ind: ∀h,G,L,T1. ∀Q:predicate term. Q T1 →
+                (∀T,T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T → ⦃G, L⦄ ⊢ T ⬈[h] T2 → Q T → Q T2) →
+                ∀T2. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → Q T2.
+#h #L #G #T1 #Q #HT1 #IHT1 #T2 #HT12
 @(TC_star_ind … HT1 IHT1 … HT12) //
 qed-.
 
-lemma cpxs_ind_dx: ∀h,G,L,T2. ∀R:predicate term. R T2 →
-                   (∀T1,T. ⦃G, L⦄ ⊢ T1 ⬈[h] T → ⦃G, L⦄ ⊢ T ⬈*[h] T2 → R T → R T1) →
-                   ∀T1. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → R T1.
-#h #G #L #T2 #R #HT2 #IHT2 #T1 #HT12
+lemma cpxs_ind_dx: ∀h,G,L,T2. ∀Q:predicate term. Q T2 →
+                   (∀T1,T. ⦃G, L⦄ ⊢ T1 ⬈[h] T → ⦃G, L⦄ ⊢ T ⬈*[h] T2 → Q T → Q T1) →
+                   ∀T1. ⦃G, L⦄ ⊢ T1 ⬈*[h] T2 → Q T1.
+#h #G #L #T2 #Q #HT2 #IHT2 #T1 #HT12
 @(TC_star_ind_dx … HT2 IHT2 … HT12) //
 qed-.
 
@@ -89,9 +89,18 @@ lemma cpxs_pair_sn: ∀h,I,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ⬈*[h] V2 →
 /3 width=3 by cpxs_strap1, cpx_pair_sn/
 qed.
 
-lemma cpxs_zeta: ∀h,G,L,V,T1,T,T2. ⬆*[1] T2 ≡ T →
-                 ⦃G, L.ⓓV⦄ ⊢ T1 ⬈*[h] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
-#h #G #L #V #T1 #T #T2 #HT2 #H @(cpxs_ind_dx … H) -T1
+lemma cpxs_zeta (h) (G) (L) (V):
+                ∀T1,T. ⬆*[1] T ≘ T1 →
+                ∀T2. ⦃G, L⦄ ⊢ T ⬈*[h] T2 → ⦃G, L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
+#h #G #L #V #T1 #T #HT1 #T2 #H @(cpxs_ind … H) -T2
+/3 width=3 by cpxs_strap1, cpx_cpxs, cpx_zeta/
+qed.
+
+(* Basic_2A1: was: cpxs_zeta *)
+lemma cpxs_zeta_dx (h) (G) (L) (V):
+                   ∀T2,T. ⬆*[1] T2 ≘ T →
+                   ∀T1. ⦃G, L.ⓓV⦄ ⊢ T1 ⬈*[h] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ⬈*[h] T2.
+#h #G #L #V #T2 #T #HT2 #T1 #H @(cpxs_ind_dx … H) -T1
 /3 width=3 by cpxs_strap2, cpx_cpxs, cpx_bind, cpx_zeta/
 qed.
 
@@ -116,7 +125,7 @@ lemma cpxs_beta_dx: ∀h,p,G,L,V1,V2,W1,W2,T1,T2.
 qed.
 
 lemma cpxs_theta_dx: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
-                     â¦\83G, Lâ¦\84 â\8a¢ V1 â¬\88[h] V â\86\92 â¬\86*[1] V â\89¡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 →
+                     â¦\83G, Lâ¦\84 â\8a¢ V1 â¬\88[h] V â\86\92 â¬\86*[1] V â\89\98 V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈*[h] T2 →
                      ⦃G, L⦄ ⊢ W1 ⬈[h] W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{p}W1.T1 ⬈*[h] ⓓ{p}W2.ⓐV2.T2.
 #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2 
 /4 width=9 by cpx_cpxs, cpxs_strap1, cpxs_bind_dx, cpxs_flat_dx, cpx_theta/
@@ -130,7 +139,7 @@ lemma cpxs_inv_sort1: ∀h,G,L,X2,s. ⦃G, L⦄ ⊢ ⋆s ⬈*[h] X2 →
 #h #G #L #X2 #s #H @(cpxs_ind … H) -X2 /2 width=2 by ex_intro/
 #X #X2 #_ #HX2 * #n #H destruct
 elim (cpx_inv_sort1 … HX2) -HX2 #H destruct /2 width=2 by ex_intro/
-@(ex_intro â\80¦ (⫯n)) >iter_S //
+@(ex_intro â\80¦ (â\86\91n)) >iter_S //
 qed-.
 
 lemma cpxs_inv_cast1: ∀h,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ⬈*[h] U2 →