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. 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-.
/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.
#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 →