--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_ltpr.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties concerning parallel unfold on terms ***************************)
+
+(* Basic_1: was only: pr3_subst1 *)
+lemma cprs_tpss_ltpr: ∀L1,T1,U1,d,e. L1 ⊢ T1 ▶* [d, e] U1 →
+ ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡* T2 →
+ ∃∃U2. L2 ⊢ U1 ➡* U2 & L2 ⊢ T2 ▶* [d, e] U2.
+#L1 #T1 #U1 #d #e #HTU1 #L2 #HL12 #T2 #HT12 elim HT12 -T2
+[ #T2 #HT12
+ elim (cpr_tpss_ltpr … HL12 … HT12 … HTU1) -L1 -T1 /3 width=3/
+| #T #T2 #_ #HT2 * #U #HU1 #HTU
+ elim (cpr_tpss_ltpr … HT2 … HTU) -L1 -T // /3 width=3/
+]
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/reducibility/cpr_tpss.ma".
+include "basic_2/computation/cprs.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
+
+(* Properties on partial unfold for terms ***********************************)
+
+lemma cprs_tpss_trans: ∀L,T1,T. L ⊢ T1 ➡* T →
+ ∀T2,d,e. L ⊢ T ▶* [d, e] T2 → L ⊢ T1 ➡* T2.
+#L #T1 #T #H @(cprs_ind … H) -T /2 width=3/ /3 width=5/
+qed.
+
+lemma cprs_tps_trans: ∀L,T1,T. L ⊢ T1 ➡* T →
+ ∀T2,d,e. L ⊢ T ▶ [d, e] T2 → L ⊢ T1 ➡* T2.
+/3 width=5 by inj, cprs_tpss_trans/ qed. (**) (* auto too slow without trace *)
+
+lemma cprs_tpss_conf: ∀L,T0,T1. L ⊢ T0 ➡* T1 →
+ ∀T2,d,e. L ⊢ T0 ▶* [d, e] T2 →
+ ∃∃T. L ⊢ T1 ▶* [d, e] T & L ⊢ T2 ➡* T.
+#L #T0 #T1 #H @(cprs_ind … H) -T1 /2 width=3/
+#T #T1 #_ #HT1 #IHT0 #T2 #d #e #HT02
+elim (IHT0 … HT02) -T0 #T0 #HT0 #HT20
+elim (cpr_tpss_conf … HT1 … HT0) -T /3 width=5/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/relocation/fsup.ma".
-include "basic_2/reduction/lpr_ldrop.ma".
-
-(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
-
-(* Main properties on context-sensitive parallel reduction for terms ********)
-
-fact cpr_conf_lpr_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ➡ T & L2 ⊢ ⓪{I} ➡ T.
-/2 width=3/ qed-.
-
-fact cpr_conf_lpr_atom_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ #i ➡ T & L2 ⊢ T2 ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-(* Basic_1: includes: pr0_delta_delta pr2_delta_delta *)
-fact cpr_conf_lpr_delta_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ T1 ➡ T & L2 ⊢ T2 ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpr_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpr_conf_lpr_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ➡ T & L2 ⊢ ⓑ{a,I}V2.T2 ➡ T.
-#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpr_conf_lpr_bind_zeta:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 →
- ∀T2. L0.ⓓV0 ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ +ⓓV1.T1 ➡ T & L2 ⊢ X2 ➡ T.
-#L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 // /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
-elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ /3 width=3/
-qed-.
-
-fact cpr_conf_lpr_zeta_zeta:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
- ∀T2. L0.ⓓV0 ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ X1 ➡ T & L2 ⊢ X2 ➡ T.
-#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
-#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 // /2 width=1/ -L0 -T0 #T #HT1 #HT2
-elim (cpr_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ #T1 #HT1 #HXT1
-elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ #T2 #HT2 #HXT2
-lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3/
-qed-.
-
-fact cpr_conf_lpr_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ➡ T & L2 ⊢ ⓕ{I}V2.T2 ➡ T.
-#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
-qed-.
-
-fact cpr_conf_lpr_flat_tau:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1,T1. L0 ⊢ T0 ➡ T1 → ∀T2. L0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓝV1.T1 ➡ T & L2 ⊢ T2 ➡ T.
-#L0 #V0 #T0 #IH #V1 #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
-qed-.
-
-fact cpr_conf_lpr_tau_tau:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀T1. L0 ⊢ T0 ➡ T1 → ∀T2. L0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ T1 ➡ T & L2 ⊢ T2 ➡ T.
-#L0 #V0 #T0 #IH #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3/
-qed-.
-
-fact cpr_conf_lpr_flat_beta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓛ{a}W0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ ⓛ{a}W0.T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓐV1.T1 ➡ T & L2 ⊢ ⓓ{a}V2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (cpr_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW1)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-lapply (cpr_lsubr_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ /3 width=5/
-qed-.
-
-(* Basic-1: includes:
- pr0_cong_upsilon_refl pr0_cong_upsilon_zeta
- pr0_cong_upsilon_cong pr0_cong_upsilon_delta
-*)
-fact cpr_conf_lpr_flat_theta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓓ{a}W0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ ⓓ{a}W0.T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
- ∀W2. L0 ⊢ W0 ➡ W2 → ∀T2. L0.ⓓW0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓐV1.T1 ➡ T & L2 ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
-#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (lift_total V 0 1) #U #HVU
-lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=1/ #HU2
-elim (cpr_inv_abbr1 … H) -H *
-[ #W1 #T1 #HW01 #HT01 #H destruct
- elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
- elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0 /4 width=7/
-| #T1 #HT01 #HXT1 #H destruct
- elim (IH … HT01 … HT02 (L1.ⓓW2) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
- elim (cpr_inv_lift1 … HT1 L1 … HXT1) -HXT1 /2 width=1/ #Y #HYT #HXY
- @(ex2_intro … (ⓐV.Y)) /2 width=1/ /3 width=5/ (**) (* auto /4 width=9/ is too slow *)
-]
-qed-.
-
-fact cpr_conf_lpr_beta_beta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓛ{a}W0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ➡ T & L2 ⊢ ⓓ{a}V2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HT01 … HT02 (L1.ⓛW0) … (L2.ⓛW0)) /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
-lapply (cpr_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/
-lapply (cpr_lsubr_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ /3 width=5/
-qed-.
-
-(* Basic_1: was: pr0_upsilon_upsilon *)
-fact cpr_conf_lpr_theta_theta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓓ{a}W0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
- ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
- ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓓW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
- ∀W2. L0 ⊢ W0 ➡ W2 → ∀T2. L0.ⓓW0 ⊢ T0 ➡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
- ∃∃T. L1 ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & L2 ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
-#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
-elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0
-elim (lift_total V 0 1) #U #HVU
-lapply (cpr_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=1/
-lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=1/ /4 width=7/
-qed-.
-
-theorem cpr_conf_lpr: lpx_sn_confluent cpr cpr.
-#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
-[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpr_inv_atom1 … H1) -H1
- elim (cpr_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpr_conf_lpr_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpr_conf_lpr_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /4 width=10 by ex2_commute, cpr_conf_lpr_atom_delta/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpr_conf_lpr_delta_delta/
- ]
-| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpr_inv_bind1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #T1 #HT01 #HXT1 #H11 #H12
- ]
- elim (cpr_inv_bind1 … H2) -H2 *
- [1,3: #V2 #T2 #HV02 #HT02 #H2
- |2,4: #T2 #HT02 #HXT2 #H21 #H22
- ] destruct
- [ /3 width=10 by cpr_conf_lpr_bind_bind/
- | /4 width=11 by ex2_commute, cpr_conf_lpr_bind_zeta/
- | /3 width=11 by cpr_conf_lpr_bind_zeta/
- | /3 width=12 by cpr_conf_lpr_zeta_zeta/
- ]
-| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpr_inv_flat1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #HX1 #H1
- | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
- | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
- ]
- elim (cpr_inv_flat1 … H2) -H2 *
- [1,5,9,13: #V2 #T2 #HV02 #HT02 #H2
- |2,6,10,14: #HX2 #H2
- |3,7,11,15: #a2 #V2 #Y2 #Z2 #T2 #HV02 #HZT2 #H21 #H22 #H23
- |4,8,12,16: #a2 #V2 #U2 #Y2 #W2 #Z2 #T2 #HV02 #HVU2 #HYW2 #HZT2 #H21 #H22 #H23
- ] destruct
- [ /3 width=10 by cpr_conf_lpr_flat_flat/
- | /4 width=8 by ex2_commute, cpr_conf_lpr_flat_tau/
- | /4 width=11 by ex2_commute, cpr_conf_lpr_flat_beta/
- | /4 width=14 by ex2_commute, cpr_conf_lpr_flat_theta/
- | /3 width=8 by cpr_conf_lpr_flat_tau/
- | /3 width=7 by cpr_conf_lpr_tau_tau/
- | /3 width=11 by cpr_conf_lpr_flat_beta/
- | /3 width=11 by cpr_conf_lpr_beta_beta/
- | /3 width=14 by cpr_conf_lpr_flat_theta/
- | /3 width=17 by cpr_conf_lpr_theta_theta/
- ]
-]
-qed-.
-
-(* Basic_1: includes: pr0_confluence pr2_confluence *)
-theorem cpr_conf: ∀L. confluent … (cpr L).
-/2 width=6 by cpr_conf_lpr/ qed-.
-
-(* Properties on context-sensitive parallel reduction for terms *************)
-
-lemma lpr_cpr_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ➡ L1 →
- ∃∃T. L1 ⊢ T0 ➡ T & L1 ⊢ T1 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
-qed-.
-
-lemma lpr_cpr_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ➡ L1 →
- ∃∃T. L1 ⊢ T0 ➡ T & L0 ⊢ T1 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
-lemma fsup_cpr_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➡ U2 →
- ∃∃L,U1. L1 ⊢ ➡ L & L ⊢ T1 ➡ U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
-#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
-#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
-elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-elim (ldrop_lpr_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
-lapply (cpr_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/substitution/lpss_ldrop.ma".
-include "basic_2/reduction/lpr_ldrop.ma".
-
-(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
-
-(* Properties on context-sensitive parallel substitution for terms **********)
-
-fact cpr_cpss_conf_lpr_lpss_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ➡ T.
-/2 width=3/ qed-.
-
-fact cpr_cpss_conf_lpr_lpss_atom_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_delta_atom:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ #i ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1 #L1 #HL01 #L2 #HL02
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1 /3 width=9/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_delta_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ➡ T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ➡ T.
-#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_bind_zeta:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓓV0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ X1 ▶* T & L2 ⊢ +ⓓV2.T2 ➡ T.
-#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV2) … (L2.ⓓV2)) -IH -HT01 -HT02 // /2 width=1/ /3 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
-elim (cpss_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ /3 width=9/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ➡ T.
-#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_tau:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀T1. L0 ⊢ T0 ➡ T1 → ∀V2,T2. L0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ ⓝV2.T2 ➡ T.
-#L0 #V0 #T0 #IH #T1 #HT01
-#V2 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_beta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓛ{a}W0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓛ{a}W0.T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
-elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (IH … HT01 … HT02 (L1.ⓛW2) … (L2.ⓛW2)) /2 width=1/ /3 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
-lapply (cpss_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/ /3 width=5/
-qed-.
-
-fact cpr_cpss_conf_lpr_lpss_flat_theta:
- ∀a,L0,V0,W0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓓ{a}W0.T0} →
- ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
- ) →
- ∀V1. L0 ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
- ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓓW0 ⊢ T0 ➡ T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓓ{a}W0.T0 ▶* T2 →
- ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓓ{a}W1.ⓐU1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
-#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
-#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
-elim (lift_total V 0 1) #U #HVU
-lapply (cpss_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=1/ #HU1
-elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
-elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
-elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0
-/4 width=9 by ex2_intro, cpr_theta, cpss_bind, cpss_flat/ (**) (* auto too slow without trace *)
-qed-.
-
-lemma cpr_cpss_conf_lpr_lpss: lpx_sn_confluent cpr cpss.
-#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
-[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpr_inv_atom1 … H1) -H1
- elim (cpss_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpr_cpss_conf_lpr_lpss_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpr_cpss_conf_lpr_lpss_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=10 by cpr_cpss_conf_lpr_lpss_delta_atom/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpr_cpss_conf_lpr_lpss_delta_delta/
- ]
-| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
- elim (cpr_inv_bind1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #T1 #HT01 #HXT1 #H11 #H12
- ] destruct
- [ /3 width=10 by cpr_cpss_conf_lpr_lpss_bind_bind/
- | /3 width=11 by cpr_cpss_conf_lpr_lpss_bind_zeta/
- ]
-| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
- elim (cpr_inv_flat1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #HX1 #H1
- | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
- | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
- ] destruct
- [ /3 width=10 by cpr_cpss_conf_lpr_lpss_flat_flat/
- | /3 width=8 by cpr_cpss_conf_lpr_lpss_flat_tau/
- | /3 width=11 by cpr_cpss_conf_lpr_lpss_flat_beta/
- | /3 width=14 by cpr_cpss_conf_lpr_lpss_flat_theta/
- ]
-]
-qed-.
-
-(* Basic_1: includes: pr0_subst1 *)
-lemma cpr_cpss_conf: ∀L. confluent2 … (cpr L) (cpss L).
-/2 width=6 by cpr_cpss_conf_lpr_lpss/ qed-.
-
-lemma cpr_lpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L1 … HL01) // /2 width=1/ -L0 /2 width=3/
-qed-.
-
-lemma cpr_lpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L0 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
-(* Basic_1: includes: pr0_subst1_fwd *)
-lemma lpr_cpss_conf: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ➡ L1 →
- ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ➡ T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpr_cpss_conf_lpr_lpss ?? T0 … HT01 … HL01 L0) // -HT01 -HL01 /2 width=3/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/relocation/fsup.ma".
include "basic_2/relocation/ldrop_lpx_sn.ma".
include "basic_2/reduction/cpr_lift.ma".
include "basic_2/reduction/lpr.ma".
lemma lpr_ldrop_trans_O1: dropable_dx lpr.
/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on context-sensitive parallel reduction for terms *************)
+
+lemma fsup_cpr_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➡ U2 →
+ ∃∃L,U1. L1 ⊢ ➡ L & L ⊢ T1 ➡ U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
+#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
+#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+elim (lift_total T d e) #U #HTU
+elim (ldrop_lpr_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+lapply (cpr_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+qed-.
(* *)
(**************************************************************************)
-include "basic_2/reduction/lpr_cpr.ma".
+include "basic_2/grammar/lpx_sn_lpx_sn.ma".
+include "basic_2/relocation/fsup.ma".
+include "basic_2/reduction/lpr_ldrop.ma".
-(* SN PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ******************************)
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+(* Main properties on context-sensitive parallel reduction for terms ********)
+
+fact cpr_conf_lpr_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ➡ T & L2 ⊢ ⓪{I} ➡ T.
+/2 width=3/ qed-.
+
+fact cpr_conf_lpr_atom_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ #i ➡ T & L2 ⊢ T2 ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+(* Basic_1: includes: pr0_delta_delta pr2_delta_delta *)
+fact cpr_conf_lpr_delta_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ➡ V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ T1 ➡ T & L2 ⊢ T2 ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpr_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpr_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpr_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpr_conf_lpr_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ➡ T & L2 ⊢ ⓑ{a,I}V2.T2 ➡ T.
+#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpr_conf_lpr_bind_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 →
+ ∀T2. L0.ⓓV0 ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ +ⓓV1.T1 ➡ T & L2 ⊢ X2 ➡ T.
+#L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 // /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
+elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ /3 width=3/
+qed-.
+
+fact cpr_conf_lpr_zeta_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
+ ∀T2. L0.ⓓV0 ⊢ T0 ➡ T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ X1 ➡ T & L2 ⊢ X2 ➡ T.
+#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
+#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 // /2 width=1/ -L0 -T0 #T #HT1 #HT2
+elim (cpr_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ #T1 #HT1 #HXT1
+elim (cpr_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ #T2 #HT2 #HXT2
+lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3/
+qed-.
+
+fact cpr_conf_lpr_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ➡ T & L2 ⊢ ⓕ{I}V2.T2 ➡ T.
+#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
+qed-.
+
+fact cpr_conf_lpr_flat_tau:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1,T1. L0 ⊢ T0 ➡ T1 → ∀T2. L0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓝV1.T1 ➡ T & L2 ⊢ T2 ➡ T.
+#L0 #V0 #T0 #IH #V1 #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
+qed-.
+
+fact cpr_conf_lpr_tau_tau:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀T1. L0 ⊢ T0 ➡ T1 → ∀T2. L0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ T1 ➡ T & L2 ⊢ T2 ➡ T.
+#L0 #V0 #T0 #IH #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3/
+qed-.
+
+fact cpr_conf_lpr_flat_beta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓛ{a}W0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ ⓛ{a}W0.T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓐV1.T1 ➡ T & L2 ⊢ ⓓ{a}V2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (cpr_inv_abst1 … H) -H #W1 #T1 #HW01 #HT01 #H destruct
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HT01 … HT02 (L1.ⓛW1) … (L2.ⓛW1)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (cpr_lsubr_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ /3 width=5/
+qed-.
+
+(* Basic-1: includes:
+ pr0_cong_upsilon_refl pr0_cong_upsilon_zeta
+ pr0_cong_upsilon_cong pr0_cong_upsilon_delta
+*)
+fact cpr_conf_lpr_flat_theta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓓ{a}W0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ ⓓ{a}W0.T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
+ ∀W2. L0 ⊢ W0 ➡ W2 → ∀T2. L0.ⓓW0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓐV1.T1 ➡ T & L2 ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #X #H
+#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (lift_total V 0 1) #U #HVU
+lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=1/ #HU2
+elim (cpr_inv_abbr1 … H) -H *
+[ #W1 #T1 #HW01 #HT01 #H destruct
+ elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
+ elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0 /4 width=7/
+| #T1 #HT01 #HXT1 #H destruct
+ elim (IH … HT01 … HT02 (L1.ⓓW2) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+ elim (cpr_inv_lift1 … HT1 L1 … HXT1) -HXT1 /2 width=1/ #Y #HYT #HXY
+ @(ex2_intro … (ⓐV.Y)) /2 width=1/ /3 width=5/ (**) (* auto /4 width=9/ is too slow *)
+]
+qed-.
+
+fact cpr_conf_lpr_beta_beta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓛ{a}W0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀T2. L0.ⓛW0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ➡ T & L2 ⊢ ⓓ{a}V2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HT01 … HT02 (L1.ⓛW0) … (L2.ⓛW0)) /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
+lapply (cpr_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/
+lapply (cpr_lsubr_trans … HT2 (L2.ⓓV2) ?) -HT2 /2 width=1/ /3 width=5/
+qed-.
+
+(* Basic_1: was: pr0_upsilon_upsilon *)
+fact cpr_conf_lpr_theta_theta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓓ{a}W0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ➡ T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ➡ L2 →
+ ∃∃T0. L1 ⊢ T1 ➡ T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
+ ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓓW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ➡ V2 → ∀U2. ⇧[O, 1] V2 ≡ U2 →
+ ∀W2. L0 ⊢ W0 ➡ W2 → ∀T2. L0.ⓓW0 ⊢ T0 ➡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ➡ L2 →
+ ∃∃T. L1 ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & L2 ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
+#V2 #HV02 #U2 #HVU2 #W2 #HW02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
+elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0
+elim (lift_total V 0 1) #U #HVU
+lapply (cpr_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=1/
+lapply (cpr_lift … HV2 (L2.ⓓW2) … HVU2 … HVU) -HVU2 /2 width=1/ /4 width=7/
+qed-.
+
+theorem cpr_conf_lpr: lpx_sn_confluent cpr cpr.
+#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
+[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpr_inv_atom1 … H1) -H1
+ elim (cpr_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpr_conf_lpr_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpr_conf_lpr_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /4 width=10 by ex2_commute, cpr_conf_lpr_atom_delta/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpr_conf_lpr_delta_delta/
+ ]
+| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpr_inv_bind1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #T1 #HT01 #HXT1 #H11 #H12
+ ]
+ elim (cpr_inv_bind1 … H2) -H2 *
+ [1,3: #V2 #T2 #HV02 #HT02 #H2
+ |2,4: #T2 #HT02 #HXT2 #H21 #H22
+ ] destruct
+ [ /3 width=10 by cpr_conf_lpr_bind_bind/
+ | /4 width=11 by ex2_commute, cpr_conf_lpr_bind_zeta/
+ | /3 width=11 by cpr_conf_lpr_bind_zeta/
+ | /3 width=12 by cpr_conf_lpr_zeta_zeta/
+ ]
+| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpr_inv_flat1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #HX1 #H1
+ | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
+ | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
+ ]
+ elim (cpr_inv_flat1 … H2) -H2 *
+ [1,5,9,13: #V2 #T2 #HV02 #HT02 #H2
+ |2,6,10,14: #HX2 #H2
+ |3,7,11,15: #a2 #V2 #Y2 #Z2 #T2 #HV02 #HZT2 #H21 #H22 #H23
+ |4,8,12,16: #a2 #V2 #U2 #Y2 #W2 #Z2 #T2 #HV02 #HVU2 #HYW2 #HZT2 #H21 #H22 #H23
+ ] destruct
+ [ /3 width=10 by cpr_conf_lpr_flat_flat/
+ | /4 width=8 by ex2_commute, cpr_conf_lpr_flat_tau/
+ | /4 width=11 by ex2_commute, cpr_conf_lpr_flat_beta/
+ | /4 width=14 by ex2_commute, cpr_conf_lpr_flat_theta/
+ | /3 width=8 by cpr_conf_lpr_flat_tau/
+ | /3 width=7 by cpr_conf_lpr_tau_tau/
+ | /3 width=11 by cpr_conf_lpr_flat_beta/
+ | /3 width=11 by cpr_conf_lpr_beta_beta/
+ | /3 width=14 by cpr_conf_lpr_flat_theta/
+ | /3 width=17 by cpr_conf_lpr_theta_theta/
+ ]
+]
+qed-.
+
+(* Basic_1: includes: pr0_confluence pr2_confluence *)
+theorem cpr_conf: ∀L. confluent … (cpr L).
+/2 width=6 by cpr_conf_lpr/ qed-.
+
+(* Properties on context-sensitive parallel reduction for terms *************)
+
+lemma lpr_cpr_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ➡ L1 →
+ ∃∃T. L1 ⊢ T0 ➡ T & L1 ⊢ T1 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_conf_lpr … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
+qed-.
+
+lemma lpr_cpr_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ➡ L1 →
+ ∃∃T. L1 ⊢ T0 ➡ T & L0 ⊢ T1 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_conf_lpr … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
(* Main properties **********************************************************)
(* *)
(**************************************************************************)
-include "basic_2/reduction/lpr_cpss.ma".
+include "basic_2/grammar/lpx_sn_lpx_sn.ma".
+include "basic_2/substitution/lpss_ldrop.ma".
+include "basic_2/reduction/lpr_ldrop.ma".
-(* SN PARALLEL REDUCTION ON LOCAL ENVIRONMENTS ******************************)
+(* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+fact cpr_cpss_conf_lpr_lpss_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ➡ T.
+/2 width=3/ qed-.
+
+fact cpr_cpss_conf_lpr_lpss_atom_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_delta_atom:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ #i ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1 #L1 #HL01 #L2 #HL02
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #V2 #HK02 #HV02 #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1 /3 width=9/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_delta_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➡ V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ➡ T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpr_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpr_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpr_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ➡ T.
+#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_bind_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀T1. L0.ⓓV0 ⊢ T0 ➡ T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓓV0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ X1 ▶* T & L2 ⊢ +ⓓV2.T2 ➡ T.
+#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV2) … (L2.ⓓV2)) -IH -HT01 -HT02 // /2 width=1/ /3 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
+elim (cpss_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ /3 width=9/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ➡ T.
+#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_tau:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀T1. L0 ⊢ T0 ➡ T1 → ∀V2,T2. L0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ ⓝV2.T2 ➡ T.
+#L0 #V0 #T0 #IH #T1 #HT01
+#V2 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_beta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓛ{a}W0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀T1. L0.ⓛW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓛ{a}W0.T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓓ{a}V1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
+elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (IH … HT01 … HT02 (L1.ⓛW2) … (L2.ⓛW2)) /2 width=1/ /3 width=1/ -L0 -V0 -W0 -T0 #T #HT1 #HT2
+lapply (cpss_lsubr_trans … HT1 (L1.ⓓV1) ?) -HT1 /2 width=1/ /3 width=5/
+qed-.
+
+fact cpr_cpss_conf_lpr_lpss_flat_theta:
+ ∀a,L0,V0,W0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓐV0.ⓓ{a}W0.T0} →
+ ∀T1. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ➡ L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ➡ T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➡ V1 → ∀U1. ⇧[O, 1] V1 ≡ U1 →
+ ∀W1. L0 ⊢ W0 ➡ W1 → ∀T1. L0.ⓓW0 ⊢ T0 ➡ T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ ⓓ{a}W0.T0 ▶* T2 →
+ ∀L1. L0 ⊢ ➡ L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓓ{a}W1.ⓐU1.T1 ▶* T & L2 ⊢ ⓐV2.T2 ➡ T.
+#a #L0 #V0 #W0 #T0 #IH #V1 #HV01 #U1 #HVU1 #W1 #HW01 #T1 #HT01
+#V2 #HV02 #X #H #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) -HV01 -HV02 /2 width=1/ #V #HV1 #HV2
+elim (lift_total V 0 1) #U #HVU
+lapply (cpss_lift … HV1 (L1.ⓓW1) … HVU1 … HVU) -HVU1 /2 width=1/ #HU1
+elim (cpss_inv_bind1 … H) -H #W2 #T2 #HW02 #HT02 #H destruct
+elim (IH … HW01 … HW02 … HL01 … HL02) /2 width=1/
+elim (IH … HT01 … HT02 (L1.ⓓW1) … (L2.ⓓW2)) /2 width=1/ -L0 -V0 -W0 -T0
+/4 width=9 by ex2_intro, cpr_theta, cpss_bind, cpss_flat/ (**) (* auto too slow without trace *)
+qed-.
+
+lemma cpr_cpss_conf_lpr_lpss: lpx_sn_confluent cpr cpss.
+#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
+[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpr_inv_atom1 … H1) -H1
+ elim (cpss_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpr_cpss_conf_lpr_lpss_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpr_cpss_conf_lpr_lpss_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=10 by cpr_cpss_conf_lpr_lpss_delta_atom/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpr_cpss_conf_lpr_lpss_delta_delta/
+ ]
+| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
+ elim (cpr_inv_bind1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #T1 #HT01 #HXT1 #H11 #H12
+ ] destruct
+ [ /3 width=10 by cpr_cpss_conf_lpr_lpss_bind_bind/
+ | /3 width=11 by cpr_cpss_conf_lpr_lpss_bind_zeta/
+ ]
+| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H2
+ elim (cpr_inv_flat1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #HX1 #H1
+ | #a1 #V1 #Y1 #Z1 #T1 #HV01 #HZT1 #H11 #H12 #H13
+ | #a1 #V1 #U1 #Y1 #W1 #Z1 #T1 #HV01 #HVU1 #HYW1 #HZT1 #H11 #H12 #H13
+ ] destruct
+ [ /3 width=10 by cpr_cpss_conf_lpr_lpss_flat_flat/
+ | /3 width=8 by cpr_cpss_conf_lpr_lpss_flat_tau/
+ | /3 width=11 by cpr_cpss_conf_lpr_lpss_flat_beta/
+ | /3 width=14 by cpr_cpss_conf_lpr_lpss_flat_theta/
+ ]
+]
+qed-.
+
+(* Basic_1: includes: pr0_subst1 *)
+lemma cpr_cpss_conf: ∀L. confluent2 … (cpr L) (cpss L).
+/2 width=6 by cpr_cpss_conf_lpr_lpss/ qed-.
+
+lemma cpr_lpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L1 … HL01) // /2 width=1/ -L0 /2 width=3/
+qed-.
+
+lemma cpr_lpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➡ T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L0 ⊢ T1 ▶* T & L1 ⊢ T0 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_cpss_conf_lpr_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
+
+(* Basic_1: includes: pr0_subst1_fwd *)
+lemma lpr_cpss_conf: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ➡ L1 →
+ ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ➡ T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpr_cpss_conf_lpr_lpss ?? T0 … HT01 … HL01 L0) // -HT01 -HL01 /2 width=3/
+qed-.
(* Properties on sn parallel substitution on local environments *************)
(**************************************************************************)
include "basic_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/relocation/fsup.ma".
include "basic_2/substitution/lpss_ldrop.ma".
(* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
(* Main properties on context-sensitive parallel substitution for terms *****)
-fact cpss_conf_lpss_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ▶* T.
-/2 width=3/ qed-.
-
-fact cpss_conf_lpss_atom_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ▶* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpss_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-fact cpss_conf_lpss_delta_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ▶* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ▶* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpss_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpss_conf_lpss_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ▶* T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ▶* T.
-#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpss_conf_lpss_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
- ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
- ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
- ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
- ) →
- ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0 ⊢ T0 ▶* T1 →
- ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
- ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ▶* T.
-#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
-qed-.
-
-theorem cpss_conf_lpss: lpx_sn_confluent cpss cpss.
-#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
-[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_atom1 … H1) -H1
- elim (cpss_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpss_conf_lpss_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpss_conf_lpss_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /4 width=10 by ex2_commute, cpss_conf_lpss_atom_delta/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpss_conf_lpss_delta_delta/
- ]
-| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_bind1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
- elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
- /3 width=10 by cpss_conf_lpss_bind_bind/
-| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpss_inv_flat1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
- elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
- /3 width=10 by cpss_conf_lpss_flat_flat/
-]
-qed-.
-
-(* Basic_1: was only: subst1_confluence_eq *)
-theorem cpss_conf: ∀L. confluent … (cpss L).
-/2 width=6 by cpss_conf_lpss/ qed-.
-
theorem cpss_trans_lpss: lpx_sn_transitive cpss cpss.
#L1 #T1 @(f2_ind … fw … L1 T1) -L1 -T1 #n #IH #L1 * [|*]
[ #I #Hn #T #H1 #L2 #HL12 #T2 #HT2 destruct
(* Properties on context-sensitive parallel substitution for terms **********)
-(* Basic_1: was only: subst1_subst1_back *)
-lemma lpss_cpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T0 ▶* T & L1 ⊢ T1 ▶* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpss_conf_lpss … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
-qed-.
-
-lemma lpss_cpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
- ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ▶* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpss_conf_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
(* Basic_1: was only: subst1_subst1 *)
lemma lpss_cpss_trans: ∀L1,L2. L1 ⊢ ▶* L2 →
∀T1,T2. L2 ⊢ T1 ▶* T2 → L1 ⊢ T1 ▶* T2.
/2 width=5 by cpss_trans_lpss/ qed-.
-
-lemma fsup_cpss_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ▶* U2 →
- ∃∃L,U1. L1 ⊢ ▶* L & L ⊢ T1 ▶* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
-#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
-#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
-elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-elim (ldrop_lpss_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
-lapply (cpss_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/relocation/fsup.ma".
include "basic_2/relocation/ldrop_lpx_sn.ma".
include "basic_2/substitution/cpss_lift.ma".
include "basic_2/substitution/lpss.ma".
lemma lpss_ldrop_trans_O1: dropable_dx lpss.
/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+lemma fsup_cpss_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ▶* U2 →
+ ∃∃L,U1. L1 ⊢ ▶* L & L ⊢ T1 ▶* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
+#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
+#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+elim (lift_total T d e) #U #HTU
+elim (ldrop_lpss_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+lapply (cpss_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+qed-.
(* SN PARALLEL SUBSTITUTION ON LOCAL ENVIRONMENTS ***************************)
+(* Main properties on context-sensitive parallel substitution for terms *****)
+
+fact cpss_conf_lpss_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ▶* T & L2 ⊢ ⓪{I} ▶* T.
+/2 width=3/ qed-.
+
+fact cpss_conf_lpss_atom_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ #i ▶* T & L2 ⊢ T2 ▶* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpss_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+fact cpss_conf_lpss_delta_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ▶* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ▶* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ T1 ▶* T & L2 ⊢ T2 ▶* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpss_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpss_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpss_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpss_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpss_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpss_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpss_conf_lpss_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ▶* T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ▶* T & L2 ⊢ ⓑ{a,I}V2.T2 ▶* T.
+#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpss_conf_lpss_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
+ ∀T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ▶* T2 →
+ ∀L1. L ⊢ ▶* L1 → ∀L2. L ⊢ ▶* L2 →
+ ∃∃T0. L1 ⊢ T1 ▶* T0 & L2 ⊢ T2 ▶* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ▶* V1 → ∀T1. L0 ⊢ T0 ▶* T1 →
+ ∀V2. L0 ⊢ V0 ▶* V2 → ∀T2. L0 ⊢ T0 ▶* T2 →
+ ∀L1. L0 ⊢ ▶* L1 → ∀L2. L0 ⊢ ▶* L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ▶* T & L2 ⊢ ⓕ{I}V2.T2 ▶* T.
+#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
+qed-.
+
+theorem cpss_conf_lpss: lpx_sn_confluent cpss cpss.
+#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
+[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_atom1 … H1) -H1
+ elim (cpss_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpss_conf_lpss_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpss_conf_lpss_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /4 width=10 by ex2_commute, cpss_conf_lpss_atom_delta/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpss_conf_lpss_delta_delta/
+ ]
+| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_bind1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
+ elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
+ /3 width=10 by cpss_conf_lpss_bind_bind/
+| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpss_inv_flat1 … H1) -H1 #V1 #T1 #HV01 #HT01 #H destruct
+ elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV02 #HT02 #H destruct
+ /3 width=10 by cpss_conf_lpss_flat_flat/
+]
+qed-.
+
+(* Basic_1: was only: subst1_confluence_eq *)
+theorem cpss_conf: ∀L. confluent … (cpss L).
+/2 width=6 by cpss_conf_lpss/ qed-.
+
+(* Properties on context-sensitive parallel substitution for terms **********)
+
+(* Basic_1: was only: subst1_subst1_back *)
+lemma lpss_cpss_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T0 ▶* T & L1 ⊢ T1 ▶* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpss_conf_lpss … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
+qed-.
+
+lemma lpss_cpss_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ▶* T1 → ∀L1. L0 ⊢ ▶* L1 →
+ ∃∃T. L1 ⊢ T0 ▶* T & L0 ⊢ T1 ▶* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpss_conf_lpss … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
+
(* Main properties **********************************************************)
theorem lpss_conf: confluent … lpss.
(**************************************************************************)
include "basic_2/grammar/lpx_sn_lpx_sn.ma".
-include "basic_2/relocation/fsup.ma".
include "basic_2/unfold/lpqs_ldrop.ma".
(* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
(* Main properties on context-sensitive rest parallel computation for terms *)
-fact cpqs_conf_lpqs_atom_atom:
- ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ➤* T & L2 ⊢ ⓪{I} ➤* T.
-/2 width=3/ qed-.
-
-fact cpqs_conf_lpqs_atom_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V2. K0 ⊢ V0 ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ #i ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpqs_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
-elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
-qed-.
-
-fact cpqs_conf_lpqs_delta_delta:
- ∀L0,i. (
- ∀L,T.♯{L, T} < ♯{L0, #i} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
- ∀V1. K0 ⊢ V0 ➤* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
- ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
- ∀V2. KX ⊢ VX ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
-#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
-lapply (ldrop_mono … H … HLK0) -H #H destruct
-elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
-elim (lpqs_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
-elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
-elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
-lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
-lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
-elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
-elim (lift_total V 0 (i+1)) #T #HVT
-lapply (cpqs_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
-lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_bind_bind:
- ∀a,I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➤* T1 →
- ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ➤* T & L2 ⊢ ⓑ{a,I}V2.T2 ➤* T.
-#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
-qed-.
-
-fact cpqs_conf_lpqs_bind_zeta:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 →
- ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ +ⓓV1.T1 ➤* T & L2 ⊢ X2 ➤* T.
-#L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 // /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
-elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ /3 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_zeta_zeta:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
- ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ X1 ➤* T & L2 ⊢ X2 ➤* T.
-#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
-#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 // /2 width=1/ -L0 -T0 #T #HT1 #HT2
-elim (cpqs_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ #T1 #HT1 #HXT1
-elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ #T2 #HT2 #HXT2
-lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_flat_flat:
- ∀I,L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0 ⊢ T0 ➤* T1 →
- ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ➤* T & L2 ⊢ ⓕ{I}V2.T2 ➤* T.
-#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
-#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HV01 … HV02 … HL01 … HL02) //
-elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
-qed-.
-
-fact cpqs_conf_lpqs_flat_tau:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀V1,T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ ⓝV1.T1 ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #V0 #T0 #IH #V1 #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
-qed-.
-
-fact cpqs_conf_lpqs_tau_tau:
- ∀L0,V0,T0. (
- ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
- ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
- ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
- ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
- ) →
- ∀T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
- ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
- ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
-#L0 #V0 #T0 #IH #T1 #HT01
-#T2 #HT02 #L1 #HL01 #L2 #HL02
-elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3/
-qed-.
-
-theorem cpqs_conf_lpqs: lpx_sn_confluent cpqs cpqs.
-#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
-[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpqs_inv_atom1 … H1) -H1
- elim (cpqs_inv_atom1 … H2) -H2
- [ #H2 #H1 destruct
- /2 width=1 by cpqs_conf_lpqs_atom_atom/
- | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
- /3 width=10 by cpqs_conf_lpqs_atom_delta/
- | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
- /4 width=10 by ex2_commute, cpqs_conf_lpqs_atom_delta/
- | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
- * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
- /3 width=17 by cpqs_conf_lpqs_delta_delta/
- ]
-| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpqs_inv_bind1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #T1 #HT01 #HXT1 #H11 #H12
- ]
- elim (cpqs_inv_bind1 … H2) -H2 *
- [1,3: #V2 #T2 #HV02 #HT02 #H2
- |2,4: #T2 #HT02 #HXT2 #H21 #H22
- ] destruct
- [ /3 width=10 by cpqs_conf_lpqs_bind_bind/
- | /4 width=11 by ex2_commute, cpqs_conf_lpqs_bind_zeta/
- | /3 width=11 by cpqs_conf_lpqs_bind_zeta/
- | /3 width=12 by cpqs_conf_lpqs_zeta_zeta/
- ]
-| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
- elim (cpqs_inv_flat1 … H1) -H1 *
- [ #V1 #T1 #HV01 #HT01 #H1
- | #HX1 #H1
- ]
- elim (cpqs_inv_flat1 … H2) -H2 *
- [1,3: #V2 #T2 #HV02 #HT02 #H2
- |2,4: #HX2 #H2
- ] destruct
- [ /3 width=10 by cpqs_conf_lpqs_flat_flat/
- | /4 width=8 by ex2_commute, cpqs_conf_lpqs_flat_tau/
- | /3 width=8 by cpqs_conf_lpqs_flat_tau/
- | /3 width=7 by cpqs_conf_lpqs_tau_tau/
- ]
-]
-qed-.
-
-theorem cpqs_conf: ∀L. confluent … (cpqs L).
-/2 width=6 by cpqs_conf_lpqs/ qed-.
-
theorem cpqs_trans_lpqs: lpx_sn_transitive cpqs cpqs.
#L1 #T1 @(f2_ind … fw … L1 T1) -L1 -T1 #n #IH #L1 * [|*]
[ #I #Hn #T #H1 #L2 #HL12 #T2 #HT2 destruct
(* Properties on context-sensitive rest. parallel computation for terms *****)
-lemma lpqs_cpqs_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
- ∃∃T. L1 ⊢ T0 ➤* T & L1 ⊢ T1 ➤* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpqs_conf_lpqs … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
-qed-.
-
-lemma lpqs_cpqs_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
- ∃∃T. L1 ⊢ T0 ➤* T & L0 ⊢ T1 ➤* T.
-#L0 #T0 #T1 #HT01 #L1 #HL01
-elim (cpqs_conf_lpqs … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
-qed-.
-
lemma lpqs_cpqs_trans: ∀L1,L2. L1 ⊢ ➤* L2 →
∀T1,T2. L2 ⊢ T1 ➤* T2 → L1 ⊢ T1 ➤* T2.
/2 width=5 by cpqs_trans_lpqs/ qed-.
-
-lemma fsup_cpqs_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➤* U2 →
- ∃∃L,U1. L1 ⊢ ➤* L & L ⊢ T1 ➤* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
-#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
-#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
-elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
-elim (lift_total T d e) #U #HTU
-elim (ldrop_lpqs_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
-lapply (cpqs_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
-qed-.
(* *)
(**************************************************************************)
+include "basic_2/relocation/fsup.ma".
include "basic_2/relocation/ldrop_lpx_sn.ma".
include "basic_2/unfold/cpqs_lift.ma".
include "basic_2/unfold/lpqs.ma".
lemma lpqs_ldrop_trans_O1: dropable_dx lpqs.
/2 width=3 by lpx_sn_dropable/ qed-.
+
+(* Properties on context-sensitive rest. parallel computation for terms *****)
+
+lemma fsup_cpqs_trans: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀U2. L2 ⊢ T2 ➤* U2 →
+ ∃∃L,U1. L1 ⊢ ➤* L & L ⊢ T1 ➤* U1 & ⦃L, U1⦄ ⊃ ⦃L2, U2⦄.
+#L1 #L2 #T1 #T2 #H elim H -L1 -L2 -T1 -T2 [1,2,3,4,5: /3 width=5/ ]
+#L1 #K1 #K2 #T1 #T2 #U1 #d #e #HLK1 #HTU1 #_ #IHT12 #U2 #HTU2
+elim (IHT12 … HTU2) -IHT12 -HTU2 #K #T #HK1 #HT1 #HT2
+elim (lift_total T d e) #U #HTU
+elim (ldrop_lpqs_trans … HLK1 … HK1) -HLK1 -HK1 #L2 #HL12 #HL2K
+lapply (cpqs_lift … HT1 … HL2K … HTU1 … HTU) -HT1 -HTU1 /3 width=11/
+qed-.
(* SN RESTRICTED PARALLEL COMPUTATION ON LOCAL ENVIRONMENTS *****************)
+(* Main properties on context-sensitive rest parallel computation for terms *)
+
+fact cpqs_conf_lpqs_atom_atom:
+ ∀I,L1,L2. ∃∃T. L1 ⊢ ⓪{I} ➤* T & L2 ⊢ ⓪{I} ➤* T.
+/2 width=3/ qed-.
+
+fact cpqs_conf_lpqs_atom_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V2. K0 ⊢ V0 ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ #i ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpqs_inv_pair1 … H1) -H1 #K1 #V1 #HK01 #HV01 #H destruct
+elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 /3 width=6/
+qed-.
+
+fact cpqs_conf_lpqs_delta_delta:
+ ∀L0,i. (
+ ∀L,T.♯{L, T} < ♯{L0, #i} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀K0,V0. ⇩[O, i] L0 ≡ K0.ⓓV0 →
+ ∀V1. K0 ⊢ V0 ➤* V1 → ∀T1. ⇧[O, i + 1] V1 ≡ T1 →
+ ∀KX,VX. ⇩[O, i] L0 ≡ KX.ⓓVX →
+ ∀V2. KX ⊢ VX ➤* V2 → ∀T2. ⇧[O, i + 1] V2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
+#KX #VX #H #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
+lapply (ldrop_mono … H … HLK0) -H #H destruct
+elim (lpqs_ldrop_conf … HLK0 … HL01) -HL01 #X1 #H1 #HLK1
+elim (lpqs_inv_pair1 … H1) -H1 #K1 #W1 #HK01 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK1) -W1 #HLK1
+elim (lpqs_ldrop_conf … HLK0 … HL02) -HL02 #X2 #H2 #HLK2
+elim (lpqs_inv_pair1 … H2) -H2 #K2 #W2 #HK02 #_ #H destruct
+lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
+lapply (ldrop_pair2_fwd_fw … HLK0 (#i)) -HLK0 #HLK0
+elim (IH … HLK0 … HV01 … HV02 … HK01 … HK02) -L0 -K0 -V0 #V #HV1 #HV2
+elim (lift_total V 0 (i+1)) #T #HVT
+lapply (cpqs_lift … HV1 … HLK1 … HVT1 … HVT) -K1 -V1
+lapply (cpqs_lift … HV2 … HLK2 … HVT2 … HVT) -K2 -V2 -V /2 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_bind_bind:
+ ∀a,I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓑ{a,I}V0.T0} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓑ{I}V0 ⊢ T0 ➤* T1 →
+ ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0.ⓑ{I}V0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ ⓑ{a,I}V1.T1 ➤* T & L2 ⊢ ⓑ{a,I}V2.T2 ➤* T.
+#a #I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 (L1.ⓑ{I}V1) … (L2.ⓑ{I}V2)) -IH // /2 width=1/ /3 width=5/
+qed-.
+
+fact cpqs_conf_lpqs_bind_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 →
+ ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ +ⓓV1.T1 ➤* T & L2 ⊢ X2 ➤* T.
+#L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV1) … (L2.ⓓV1)) -IH -HT01 -HT02 // /2 width=1/ -L0 -V0 -T0 #T #HT1 #HT2
+elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ /3 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_zeta_zeta:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,+ⓓV0.T0} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀T1. L0.ⓓV0 ⊢ T0 ➤* T1 → ∀X1. ⇧[O, 1] X1 ≡ T1 →
+ ∀T2. L0.ⓓV0 ⊢ T0 ➤* T2 → ∀X2. ⇧[O, 1] X2 ≡ T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ X1 ➤* T & L2 ⊢ X2 ➤* T.
+#L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
+#T2 #HT02 #X2 #HXT2 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 (L1.ⓓV0) … (L2.ⓓV0)) -IH -HT01 -HT02 // /2 width=1/ -L0 -T0 #T #HT1 #HT2
+elim (cpqs_inv_lift1 … HT1 L1 … HXT1) -T1 /2 width=1/ #T1 #HT1 #HXT1
+elim (cpqs_inv_lift1 … HT2 L2 … HXT2) -T2 /2 width=1/ #T2 #HT2 #HXT2
+lapply (lift_inj … HT2 … HT1) -T #H destruct /2 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_flat_flat:
+ ∀I,L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓕ{I}V0.T0} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1. L0 ⊢ V0 ➤* V1 → ∀T1. L0 ⊢ T0 ➤* T1 →
+ ∀V2. L0 ⊢ V0 ➤* V2 → ∀T2. L0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ ⓕ{I}V1.T1 ➤* T & L2 ⊢ ⓕ{I}V2.T2 ➤* T.
+#I #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
+#V2 #HV02 #T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HV01 … HV02 … HL01 … HL02) //
+elim (IH … HT01 … HT02 … HL01 … HL02) // /3 width=5/
+qed-.
+
+fact cpqs_conf_lpqs_flat_tau:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀V1,T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ ⓝV1.T1 ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #V0 #T0 #IH #V1 #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /3 width=3/
+qed-.
+
+fact cpqs_conf_lpqs_tau_tau:
+ ∀L0,V0,T0. (
+ ∀L,T.♯{L,T} < ♯{L0,ⓝV0.T0} →
+ ∀T1. L ⊢ T ➤* T1 → ∀T2. L ⊢ T ➤* T2 →
+ ∀L1. L ⊢ ➤* L1 → ∀L2. L ⊢ ➤* L2 →
+ ∃∃T0. L1 ⊢ T1 ➤* T0 & L2 ⊢ T2 ➤* T0
+ ) →
+ ∀T1. L0 ⊢ T0 ➤* T1 → ∀T2. L0 ⊢ T0 ➤* T2 →
+ ∀L1. L0 ⊢ ➤* L1 → ∀L2. L0 ⊢ ➤* L2 →
+ ∃∃T. L1 ⊢ T1 ➤* T & L2 ⊢ T2 ➤* T.
+#L0 #V0 #T0 #IH #T1 #HT01
+#T2 #HT02 #L1 #HL01 #L2 #HL02
+elim (IH … HT01 … HT02 … HL01 … HL02) // -L0 -V0 -T0 /2 width=3/
+qed-.
+
+theorem cpqs_conf_lpqs: lpx_sn_confluent cpqs cpqs.
+#L0 #T0 @(f2_ind … fw … L0 T0) -L0 -T0 #n #IH #L0 * [|*]
+[ #I0 #Hn #T1 #H1 #T2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpqs_inv_atom1 … H1) -H1
+ elim (cpqs_inv_atom1 … H2) -H2
+ [ #H2 #H1 destruct
+ /2 width=1 by cpqs_conf_lpqs_atom_atom/
+ | * #K0 #V0 #V2 #i2 #HLK0 #HV02 #HVT2 #H2 #H1 destruct
+ /3 width=10 by cpqs_conf_lpqs_atom_delta/
+ | #H2 * #K0 #V0 #V1 #i1 #HLK0 #HV01 #HVT1 #H1 destruct
+ /4 width=10 by ex2_commute, cpqs_conf_lpqs_atom_delta/
+ | * #X #Y #V2 #z #H #HV02 #HVT2 #H2
+ * #K0 #V0 #V1 #i #HLK0 #HV01 #HVT1 #H1 destruct
+ /3 width=17 by cpqs_conf_lpqs_delta_delta/
+ ]
+| #a #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpqs_inv_bind1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #T1 #HT01 #HXT1 #H11 #H12
+ ]
+ elim (cpqs_inv_bind1 … H2) -H2 *
+ [1,3: #V2 #T2 #HV02 #HT02 #H2
+ |2,4: #T2 #HT02 #HXT2 #H21 #H22
+ ] destruct
+ [ /3 width=10 by cpqs_conf_lpqs_bind_bind/
+ | /4 width=11 by ex2_commute, cpqs_conf_lpqs_bind_zeta/
+ | /3 width=11 by cpqs_conf_lpqs_bind_zeta/
+ | /3 width=12 by cpqs_conf_lpqs_zeta_zeta/
+ ]
+| #I #V0 #T0 #Hn #X1 #H1 #X2 #H2 #L1 #HL01 #L2 #HL02 destruct
+ elim (cpqs_inv_flat1 … H1) -H1 *
+ [ #V1 #T1 #HV01 #HT01 #H1
+ | #HX1 #H1
+ ]
+ elim (cpqs_inv_flat1 … H2) -H2 *
+ [1,3: #V2 #T2 #HV02 #HT02 #H2
+ |2,4: #HX2 #H2
+ ] destruct
+ [ /3 width=10 by cpqs_conf_lpqs_flat_flat/
+ | /4 width=8 by ex2_commute, cpqs_conf_lpqs_flat_tau/
+ | /3 width=8 by cpqs_conf_lpqs_flat_tau/
+ | /3 width=7 by cpqs_conf_lpqs_tau_tau/
+ ]
+]
+qed-.
+
+theorem cpqs_conf: ∀L. confluent … (cpqs L).
+/2 width=6 by cpqs_conf_lpqs/ qed-.
+
+(* Properties on context-sensitive rest. parallel computation for terms *****)
+
+lemma lpqs_cpqs_conf_dx: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
+ ∃∃T. L1 ⊢ T0 ➤* T & L1 ⊢ T1 ➤* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpqs_conf_lpqs … HT01 T0 … HL01 … HL01) // -L0 /2 width=3/
+qed-.
+
+lemma lpqs_cpqs_conf_sn: ∀L0,T0,T1. L0 ⊢ T0 ➤* T1 → ∀L1. L0 ⊢ ➤* L1 →
+ ∃∃T. L1 ⊢ T0 ➤* T & L0 ⊢ T1 ➤* T.
+#L0 #T0 #T1 #HT01 #L1 #HL01
+elim (cpqs_conf_lpqs … HT01 T0 … L0 … HL01) // -HT01 -HL01 /2 width=3/
+qed-.
+
(* Main properties **********************************************************)
theorem lpqs_conf: confluent … lpqs.
]
[ { "context-sensitive computation" * } {
[ "lprs ( ? ⊢ ➡* ? )" "lprs_alt ( ? ⊢ ➡➡* ? )" "lprs_ldrop" + "lprs_aaa" + "lprs_cprs" + "lprs_lprs" * ]
- [ "cprs ( ? ⊢ ? ➡* ?)" "cprs_lift" + "cprs_tpss" + "cprs_ltpss_dx" + "cprs_ltpss_sn" + "cprs_aaa" + "cprs_lpr" + "cprs_cprs" + "cprs_tstc" + "cprs_tstc_vector" * ]
+ [ "cprs ( ? ⊢ ? ➡* ?)" "cprs_lift" + "cprs_cpss" + "cprs_ltpss_dx" + "cprs_ltpss_sn" + "cprs_aaa" + "cprs_lpr" + "cprs_cprs" + "cprs_tstc" + "cprs_tstc_vector" * ]
}
]
[ { "local env. ref. for abstract candidates of reducibility" * } {
}
]
[ { "context-sensitive reduction" * } {
- [ "lpr ( ? ⊢ ➡ ? )" "lpr_ldrop" + "lpr_cpss" + "lpr_lpss" + "lpr_aaa" + "lpr_cpr" + "lpr_lpr" * ]
+ [ "lpr ( ? ⊢ ➡ ? )" "lpr_ldrop" + "lpr_lpss" + "lpr_aaa" + "lpr_lpr" * ]
[ "cpr ( ? ⊢ ? ➡ ? )" "cpr_lift" + "cpr_cif" * ]
}
]