(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
(* Vector form of forward lemmas involving same top term constructor ********)
-(*
-lemma cpr_fwd_beta_vector: ∀L,V,W,T,U,Vs. L ⊢ ⒶVs. ⓐV. ⓛW. T ➡ U →
- ⒶVs. ⓐV. ⓛW. T ≃ U ∨ L ⊢ ⒶVs. ⓓV. T ➡* U.
-#L #V #W #T #U * /2 width=1 by cpr_fwd_beta/
-#V0 #Vs #H
-elim (cpr_inv_appl1_simple … H ?) -H
-[ #V1 #T1 #_ #_ #H destruct /2 width=1/
-| elim Vs -Vs //
+
+(* Basic_1: was: pr3_iso_appls_beta *)
+lemma cprs_fwd_beta_vector: ∀L,Vs,V,W,T,U. L ⊢ ⒶVs. ⓐV. ⓛW. T ➡* U →
+ ⒶVs. ⓐV. ⓛW. T ≃ U ∨ L ⊢ ⒶVs. ⓓV. T ➡* U.
+#L #Vs elim Vs -Vs /2 width=1 by cprs_fwd_beta/
+#V0 #Vs #IHVs #V #W #T #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ -IHVs #V1 #T1 #_ #_ #H destruct /2 width=1/
+| #V1 #W1 #T1 #HV01 #HT1 #HU
+ elim (IHVs … HT1) -IHVs -HT1 #HT1
+ [ elim (tstc_inv_bind_appls_simple … HT1 ?) //
+ | @or_intror -W (**) (* explicit constructor *)
+ @(cprs_trans … HU) -U
+ @(cprs_strap1 … (ⓐV1.ⓛW1.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=1/
+ ]
+| #V1 #V2 #V3 #T1 #HV01 #HV12 #HT1 #HU
+ elim (IHVs … HT1) -IHVs -HT1 #HT1
+ [ elim (tstc_inv_bind_appls_simple … HT1 ?) //
+ | @or_intror -W (**) (* explicit constructor *)
+ @(cprs_trans … HU) -U
+ @(cprs_strap1 … (ⓐV1.ⓓV3.T1)) [ /2 width=1/ ] -V -V0 -Vs -T /3 width=3/
+ ]
]
qed-.
-lemma cpr_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
- ∀V,T,U. L ⊢ ⒶV1s. ⓓV. T ➡ U →
- ⒶV1s. ⓓV. T ≃ U ∨ L ⊢ ⓓV. ⒶV2s. T ➡* U.
+(* Basic_1: was: pr3_iso_appls_abbr *)
+lemma cprs_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
+ ∀V,T,U. L ⊢ ⒶV1s. ⓓV. T ➡* U →
+ ⒶV1s. ⓓV. T ≃ U ∨ L ⊢ ⓓV. ⒶV2s. T ➡* U.
#L #V1s #V2s * -V1s -V2s /3 width=1/
-#V1s #V2s #V1a #V2a #HV12a * -V1s -V2s /2 width=1 by cpr_fwd_theta/ -HV12a
-#V1s #V2s #V1b #V2b #_ #_ #V #U #T #H
-elim (cpr_inv_appl1_simple … H ?) -H //
-#V0 #T0 #_ #_ #H destruct /2 width=1/
+#V1s #V2s #V1a #V2a #HV12a #HV12s
+generalize in match HV12a; -HV12a
+generalize in match V2a; -V2a
+generalize in match V1a; -V1a
+elim HV12s -V1s -V2s /2 width=1 by cprs_fwd_theta/
+#V1s #V2s #V1b #V2b #HV12b #_ #IHV12s #V1a #V2a #HV12a #V #T #U #H
+elim (cprs_inv_appl1 … H) -H *
+[ -IHV12s -HV12a -HV12b #V0 #T0 #_ #_ #H destruct /2 width=1/
+| #V0a #W0 #T0 #HV10a #HT0 #HU
+ elim (IHV12s … HV12b … HT0) -IHV12s -HT0 #HT0
+ [ -HV12a -HV12b -HV10a -HU
+ elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct
+ | @or_intror -V1s (**) (* explicit constructor *)
+ @(cprs_trans … HU) -U
+ elim (cprs_inv_abbr1 … HT0) -HT0 *
+ [ -HV12a -HV12b -HV10a #V1 #T1 #_ #_ #H destruct
+ | -V1b #X #H #HT1
+ elim (lift_inv_bind1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
+ @(cprs_trans … (ⓓV.ⓐV2a.ⓛW1.T1)) [ /3 width=1/ ] -T -V2b -V2s
+ @(cprs_strap2 … (ⓐV1a.ⓛW0.T0)) [ /5 width=3/ ] -V -V2a -W1 -T1
+ @(cprs_strap2 … (ⓓV1a.T0)) [ /3 width=1/ ] -W0 /2 width=1/
+ ]
+ ]
+| #V0a #Va #V0 #T0 #HV10a #HV0a #HT0 #HU
+ elim (IHV12s … HV12b … HT0) -HV12b -IHV12s -HT0 #HT0
+ [ -HV12a -HV10a -HV0a -HU
+ elim (tstc_inv_pair1 … HT0) #V1 #T1 #H destruct
+ | @or_intror -V1s -V1b (**) (* explicit constructor *)
+ @(cprs_trans … HU) -U
+ elim (cprs_inv_abbr1 … HT0) -HT0 *
+ [ #V1 #T1 #HV1 #HT1 #H destruct
+ lapply (cprs_lift (L.ⓓV) … HV12a … HV10a … HV0a) -V1a -V0a [ /2 width=1/ ] #HV2a
+ @(cprs_trans … (ⓓV.ⓐV2a.T1)) [ /3 width=1/ ] -T -V2b -V2s /3 width=1/
+ | #X #H #HT1
+ elim (lift_inv_bind1 … H) -H #V1 #T1 #HW01 #HT01 #H destruct
+ lapply (cprs_lift (L.ⓓV0) … HV12a … HV10a … HV0a) -V0a [ /2 width=1/ ] #HV2a
+ @(cprs_trans … (ⓓV.ⓐV2a.ⓓV1.T1)) [ /3 width=1/ ] -T -V2b -V2s
+ @(cprs_strap2 … (ⓐV1a.ⓓV0.T0)) [ /5 width=3/ ] -V -V1 -T1
+ @(cprs_strap2 … (ⓓV0.ⓐV2a.T0)) [ /3 width=3/ ] -V1a /3 width=1/
+ ]
+ ]
+]
qed-.
-*)
(* Basic_1: was: pr3_iso_appls_cast *)
lemma cprs_fwd_tau_vector: ∀L,Vs,W,T,U. L ⊢ ⒶVs. ⓣW. T ➡* U →
| #V0 #W0 #T0 #HV0 #HT0 #HU
elim (IHVs … HT0) -IHVs -HT0 #HT0
[ elim (tstc_inv_bind_appls_simple … HT0 ?) //
- | @or_intror
- @(cprs_trans … HU) -HU
- @(cprs_strap1 … (ⓐV0.ⓛW0.T0)) /2 width=1/ -HV0 -HT0 /3 width=1/
+ | @or_intror -W (**) (* explicit constructor *)
+ @(cprs_trans … HU) -U
+ @(cprs_strap1 … (ⓐV0.ⓛW0.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=1/
]
| #V0 #V1 #V2 #T0 #HV0 #HV01 #HT0 #HU
elim (IHVs … HT0) -IHVs -HT0 #HT0
[ elim (tstc_inv_bind_appls_simple … HT0 ?) //
- | @or_intror
- @(cprs_trans … HU) -HU
- @(cprs_strap1 … (ⓐV0.ⓓV2.T0)) /2 width=1/ -HV0 -HT0 /3 width=3/
+ | @or_intror -W (**) (* explicit constructor *)
+ @(cprs_trans … HU) -U
+ @(cprs_strap1 … (ⓐV0.ⓓV2.T0)) [ /2 width=1/ ] -V -Vs -T /3 width=3/
]
qed-.
-
-axiom cprs_fwd_theta_vector: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
- ∀V,T,U. L ⊢ ⒶV1s. ⓓV. T ➡* U →
- ⒶV1s. ⓓV. T ≃ U ∨ L ⊢ ⓓV. ⒶV2s. T ➡* U.
]
qed.
*)
+(* Basic_1: was: sn3_appls_beta *)
+lemma csn_applv_beta: ∀L,W. L ⊢ ⬇* W →
+ ∀Vs,V,T. L ⊢ ⬇* ⒶVs.ⓓV.T →
+ L ⊢ ⬇* ⒶVs. ⓐV.ⓛW. T.
+#L #W #HW #Vs elim Vs -Vs /2 width=1/ -HW
+#V0 #Vs #IHV #V #T #H1T
+lapply (csn_fwd_pair_sn … H1T) #HV0
+lapply (csn_fwd_flat_dx … H1T) #H2T
+@csn_appl_simple_tstc // -HV0 /2 width=1/ -IHV -H2T
+[ #X #H #H0
+ elim (cprs_fwd_beta_vector … H) -H #H
+ [ -H1T elim (H0 ?) -H0 //
+ | -H0 @(csn_cprs_trans … H1T) -H1T /2 width=1/
+ ]
+| -H1T elim Vs -Vs //
+]
+qed.
+
+(* Basic_1: was: sn3_appls_abbr *)
lemma csn_applv_theta: ∀L,V1s,V2s. ⇧[0, 1] V1s ≡ V2s →
∀V,T. L ⊢ ⬇* ⓓV. ⒶV2s. T → L ⊢ ⬇* V →
L ⊢ ⬇* ⒶV1s. ⓓV. T.
]
qed.
+(* Basic_1: was: sn3_appls_cast *)
lemma csn_applv_tau: ∀L,W. L ⊢ ⬇* W →
∀Vs,T. L ⊢ ⬇* ⒶVs. T →
L ⊢ ⬇* ⒶVs. ⓣW. T.
theorem csn_acr: acr cpr (eq …) (csn …) (λL,T. L ⊢ ⬇* T).
@mk_acr //
[
-|
+| /2 width=1/
|
| #L #V1 #V2 #HV12 #V #T #H #HVT
@(csn_applv_theta … HV12) -HV12 //