(* *)
(**************************************************************************)
-include "basic_2/substitution/lpss_cpss.ma".
+include "basic_2/substitution/lpss_lpss.ma".
include "basic_2/reduction/lpr_lpss.ma".
include "basic_2/computation/cprs.ma".
elim (cprs_lpss_conf_dx … HT01 … HL01) -HT01 #T #HT1
lapply (lpss_cpss_trans … HL01 … HT1) -HT1 /2 width=3/
qed-.
+
+lemma cprs_cpss_lpss_conf_sn: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. L2 ⊢ T2 ➡* U2 & L1 ⊢ U1 ▶* U2.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
+elim (cprs_cpss_conf … HTU1 … HT12) -T1 #U #HU1 #HT2U
+elim (cprs_lpss_conf_sn … HT2U … HL12) -HT2U -HL12 #U2 #HU2 #HTU2
+lapply (cpss_trans … HU1 … HU2) -U /2 width=3/
+qed-.
+
+lemma cprs_cpss_lpss_conf_dx: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U2. L2 ⊢ T2 ➡* U2 & L2 ⊢ U1 ▶* U2.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
+elim (cprs_lpss_conf_dx … HTU1 … HL12) -HTU1 #U2 #HU12 #HT1U2
+elim (lpss_cpss_conf_dx … HT12 … HL12) -L1 #T #HT1 #HT2
+elim (cprs_cpss_conf … HT1U2 … HT1) -T1 #U #HU2 #HTU
+lapply (cpss_trans … HU12 … HU2) -U2
+lapply (cpss_cprs_trans … HT2 … HTU) -T /2 width=3/
+qed-.
+
+
+lemma cprs_cpss2_lpss_conf_sn: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀U2. L1 ⊢ U1 ▶* U2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U. L2 ⊢ T2 ➡* U & L1 ⊢ U2 ▶* U.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 #L2 #HL12
+elim (cprs_cpss_lpss_conf_sn … HTU1 … HT12 … HL12) -T1 #T1 #HT21 #HUT1
+elim (cpss_conf … HU12 … HUT1) -U1 #U1 #HU21 #HTU1
+elim (lpss_cpss_conf_sn … HTU1 … HL12) -HTU1 -HL12 #U2 #HT1U2 #HU12
+lapply (cpss_trans … HU21 … HU12) -U1
+lapply (cprs_cpss_trans … HT21 … HT1U2) -T1 /2 width=3/
+qed-.
+
+lemma cprs_cpss2_lpss_conf_dx: ∀L1,T1,U1. L1 ⊢ T1 ➡* U1 → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀U2. L1 ⊢ U1 ▶* U2 → ∀L2. L1 ⊢ ▶* L2 →
+ ∃∃U. L2 ⊢ T2 ➡* U & L2 ⊢ U2 ▶* U.
+#L1 #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12 #L2 #HL12
+elim (cprs_cpss_lpss_conf_dx … HTU1 … HT12 … HL12) -T1 #T1 #HT21 #HUT1
+elim (lpss_cpss_conf_dx … HU12 … HL12) -L1 #U #HU1 #HU2
+elim (cpss_conf … HU1 … HUT1) -U1 #U1 #HU1 #HTU1
+lapply (cpss_trans … HU2 … HU1) -U
+lapply (cprs_cpss_trans … HT21 … HTU1) -T1 /2 width=3/
+qed-.
\ No newline at end of file
lemma dxprs_cpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*➡*[g] U1 → ∀T2. L ⊢ T1 ▶* T2 →
∃∃U2. ⦃h, L⦄ ⊢ T2 •*➡*[g] U2 & L ⊢ U1 ▶* U2.
#h #g #L #T1 #U1 * #W1 #HTW1 #HWU1 #T2 #HT12
-elim (sstas_tpss_conf … HTW1 … HT12) -T1 #W2 #HTW2 #HW12
+elim (sstas_cpss_conf … HTW1 … HT12) -T1 #W2 #HTW2 #HW12
elim (cprs_cpss_conf … HWU1 … HW12) -W1 /3 width=3/
qed-.
-lemma dxprs_lpss_cpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
- ∀L2. L1 ⊢ ▶* L2 → ∀T2. L1 ⊢ T1 ▶* T2 →
+lemma dxprs_cpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*➡*[g] U1 →
+ ∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
∃∃U2. ⦃h, L2⦄ ⊢ T2 •*➡*[g] U2 & L1 ⊢ U1 ▶* U2.
-#h #g #L1 #T1 #U1 #HTU1 #L2 #HL12 #T2 #HT12
+#h #g #L1 #T1 #U1 #HTU1 #T2 #HT12 #L2 #HL12
elim (dxprs_cpss_conf … HTU1 … HT12) -T1 #U2 #HTU2 #HU12
elim (dxprs_lpss_conf … HTU2 … HL12) -HTU2 -HL12 #U #HT2U #HU2
lapply (cpss_trans … HU12 … HU2) -U2 /2 width=3/
#h #g #L1 #L2 #H elim H -L1 -L2 // /2 width=1/ /2 width=6/
qed-.
-lemma lsubsv_fwd_lsubr1: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⊑[0, |L1|] L2.
+lemma lsubsv_fwd_lsubr1: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⊑ L2.
/3 width=3 by lsubsv_fwd_lsubss, lsubss_fwd_lsubr1/
qed-.
-lemma lsubsv_fwd_lsubr2: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⊑[0, |L2|] L2.
+lemma lsubsv_fwd_lsubr2: ∀h,g,L1,L2. h ⊢ L1 ¡⊑[g] L2 → L1 ⊑ L2.
/3 width=3 by lsubsv_fwd_lsubss, lsubss_fwd_lsubr2/
qed-.
(* *)
(**************************************************************************)
-include "basic_2/unwind/sstas_sstas.ma".
-include "basic_2/equivalence/cpcs_ltpr.ma".
-include "basic_2/dynamic/snv_ltpss_dx.ma".
+include "basic_2/unfold/sstas_sstas.ma".
+include "basic_2/equivalence/cpcs_cpcs.ma".
include "basic_2/dynamic/snv_sstas.ma".
include "basic_2/dynamic/ygt.ma".
(* Inductive premises for the preservation results **************************)
-definition IH_snv_ltpr_tpr: ∀h:sh. sd h → relation2 lenv term ≝
- λh,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
+definition IH_snv_cpr_lpr: ∀h:sh. sd h → relation2 lenv term ≝
+ λh,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
+ ∀T2. L1 ⊢ T1 ➡ T2 → ∀L2. L1 ⊢ ➡ L2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
-definition IH_ssta_ltpr_tpr: ∀h:sh. sd h → relation2 lenv term ≝
- λh,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
- ∀L2. L1 ➡ L2 → ∀T2. T1 ➡ T2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L2 ⊢ U1 ⬌* U2.
+definition IH_ssta_cpr_lpr: ∀h:sh. sd h → relation2 lenv term ≝
+ λh,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
+ ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
+ ∀T2. L1 ⊢ T1 ➡ T2 → ∀L2. L1 ⊢ ➡ L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L1 ⊢ U1 ⬌* U2.
definition IH_snv_ssta: ∀h:sh. sd h → relation2 lenv term ≝
λh,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
(* Properties for the preservation results **********************************)
-fact snv_ltpr_cpr_aux: ∀h,g,L1,T1. IH_snv_ltpr_tpr h g L1 T1 →
- ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡ T2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
-#h #g #L1 #T1 #IH #HT1 #L2 #HL12 #T2 * #T #HT1T #HTT2
-lapply (IH … HL12 … HT1T) -HL12 // -T1 #HT0
-lapply (snv_tpss_conf … HT0 … HTT2) -T //
+fact snv_cprs_lpr_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ ∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
+ ∀T2. L1 ⊢ T1 ➡* T2 → ∀L2. L1 ⊢ ➡ L2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
+#h #g #L0 #T0 #IH #L1 #T1 #HLT0 #HT1 #T2 #H
+elim H -T2 [ /2 width=6/ ] -HT1
+/4 width=6 by ygt_yprs_trans, cprs_yprs/
qed-.
-fact ssta_ltpr_cpr_aux: ∀h,g,L1,T1. IH_ssta_ltpr_tpr h g L1 T1 →
- ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
- ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡ T2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L2 ⊢ U1 ⬌* U2.
-#h #g #L1 #T1 #IH #HT1 #U1 #l #HTU1 #L2 #HL12 #T2 * #T #HT1T #HTT2
-elim (IH … HTU1 … HL12 … HT1T) // -L1 -T1 #U #HTU #HU1
-elim (ssta_tpss_conf … HTU … HTT2) -T #U2 #HTU2 #HU2
-lapply (cpcs_cpr_strap1 … HU1 U2 ?) /2 width=3/
-qed-.
-
-fact snv_ltpr_cprs_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ltpr_tpr h g L1 T1) →
+fact ssta_cprs_lpr_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡* T2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
-#h #g #L0 #T0 #IH #L1 #T1 #HLT0 #HT1 #L2 #HL12 #T2 #H
-@(cprs_ind … H) -T2 [ /2 width=6 by snv_ltpr_cpr_aux/ ] -HT1
-/5 width=6 by snv_ltpr_cpr_aux, ygt_yprs_trans, ltpr_cprs_yprs/
-qed-.
-
-fact ssta_ltpr_cprs_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ltpr_tpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_ltpr_tpr h g L1 T1) →
- ∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
- ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡* T2 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L2 ⊢ U1 ⬌* U2.
-#h #g #L0 #T0 #IH2 #IH1 #L1 #T1 #H01 #HT1 #U1 #l #HTU1 #L2 #HL12 #T2 #H
-@(cprs_ind … H) -T2 [ /2 width=7 by ssta_ltpr_cpr_aux/ ]
-#T #T2 #HT1T #HTT2 * #U #HTU #HU1
-elim (ssta_ltpr_cpr_aux … HTU … HTT2) //
-[2: /3 width=9 by snv_ltpr_cprs_aux/
-|3: /5 width=6 by ygt_yprs_trans, ltpr_cprs_yprs/
-] -L0 -L1 -T0 -T1 -T #U2 #HTU2 #HU2
+ ∀U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
+ ∀T2. L1 ⊢ T1 ➡* T2 → ∀L2. L1 ⊢ ➡ L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L1 ⊢ U1 ⬌* U2.
+#h #g #L0 #T0 #IH2 #IH1 #L1 #T1 #H01 #HT1 #U1 #l #HTU1 #T2 #H
+elim H -T2 [ /2 width=5/ ]
+#T #T2 #HT1T #HTT2 #IHT1 #L2 #HL12
+elim (IHT1 L1) // -IHT1 #U #HTU #HU1
+elim (IH1 … HTU … HTT2 … HL12) -IH1 -HTU -HTT2 -HL12
+[2: /3 width=9 by snv_cprs_lpr_aux/
+|3: /5 width=6 by ygt_yprs_trans, cprs_yprs/
+] -L0 -T0 -T1 -T #U2 #HTU2 #HU2
lapply (cpcs_trans … HU1 … HU2) -U /2 width=3/
qed-.
-fact ssta_ltpr_cpcs_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ltpr_tpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_ltpr_tpr h g L1 T1) →
- ∀L1,L2,T1,T2. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → h ⊢ ⦃L0, T0⦄ >[g] ⦃L2, T2⦄ →
- ⦃h, L1⦄ ⊢ T1 ¡[g] → ⦃h, L2⦄ ⊢ T2 ¡[g] →
- ∀U1,l1. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l1, U1⦄ →
- ∀U2,l2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l2, U2⦄ →
- L1 ➡ L2 → L2 ⊢ T1 ⬌* T2 →
- l1 = l2 ∧ L2 ⊢ U1 ⬌* U2.
-#h #g #L0 #T0 #IH2 #IH1 #L1 #L2 #T1 #T2 #HLT01 #HLT02 #HT1 #HT2 #U1 #l1 #HTU1 #U2 #l2 #HTU2 #HL12 #H
+fact ssta_cpcs_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
+ ∀L,T1,T2. h ⊢ ⦃L0, T0⦄ >[g] ⦃L, T1⦄ → h ⊢ ⦃L0, T0⦄ >[g] ⦃L, T2⦄ →
+ ⦃h, L⦄ ⊢ T1 ¡[g] → ⦃h, L⦄ ⊢ T2 ¡[g] →
+ ∀U1,l1. ⦃h, L⦄ ⊢ T1 •[g] ⦃l1, U1⦄ →
+ ∀U2,l2. ⦃h, L⦄ ⊢ T2 •[g] ⦃l2, U2⦄ →
+ L ⊢ T1 ⬌* T2 → l1 = l2 ∧ L ⊢ U1 ⬌* U2.
+#h #g #L0 #T0 #IH2 #IH1 #L #T1 #T2 #HLT01 #HLT02 #HT1 #HT2 #U1 #l1 #HTU1 #U2 #l2 #HTU2 #H
elim (cpcs_inv_cprs … H) -H #T #H1 #H2
-elim (ssta_ltpr_cprs_aux … HLT01 HT1 … HTU1 … H1) -T1 /2 width=1/ #W1 #H1 #HUW1
-elim (ssta_ltpr_cprs_aux … HLT02 HT2 … HTU2 … H2) -T2 /2 width=1/ #W2 #H2 #HUW2 -L1 -L0 -T0
+elim (ssta_cprs_lpr_aux … HLT01 HT1 … HTU1 … H1 L) -T1 // /2 width=1/ #W1 #H1 #HUW1
+elim (ssta_cprs_lpr_aux … HLT02 HT2 … HTU2 … H2 L) -T2 // /2 width=1/ #W2 #H2 #HUW2 -L0 -T0
elim (ssta_mono … H1 … H2) -h -T #H1 #H2 destruct
lapply (cpcs_canc_dx … HUW1 … HUW2) -W2 /2 width=1/
qed-.
@(sstas_ind … H) -U1 // -HT1 /4 width=5 by ygt_yprs_trans, sstas_yprs/
qed-.
-fact sstas_ltpr_cprs_aux: ∀h,g,L0,T0.
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ltpr_tpr h g L1 T1) →
- (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_ltpr_tpr h g L1 T1) →
- ∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀L2. L1 ➡ L2 → ∀T2. L2 ⊢ T1 ➡* T2 → ∀U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
- ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L2 ⊢ U1 ⬌* U2.
+fact sstas_cprs_lpr_aux: ∀h,g,L0,T0.
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_ssta h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_snv_cpr_lpr h g L1 T1) →
+ (∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → IH_ssta_cpr_lpr h g L1 T1) →
+ ∀L1,T1. h ⊢ ⦃L0, T0⦄ >[g] ⦃L1, T1⦄ → ⦃h, L1⦄ ⊢ T1 ¡[g] →
+ ∀T2. L1 ⊢ T1 ➡* T2 → ∀U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 → ∀L2. L1 ⊢ ➡ L2 →
+ ∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L1 ⊢ U1 ⬌* U2.
#h #g #L0 #T0 #IH3 #IH2 #IH1 #L1 #T1 #H01 #HT1 #L2 #HL12 #T2 #HT12 #U1 #H
@(sstas_ind … H) -U1 [ /3 width=3/ ]
#U1 #W1 #l1 #HTU1 #HUW1 * #U2 #HTU2 #HU12
| #a #L #W #W0 #W1 #U #U1 #l #_ #_ #HW0 #HW01 #HU1 #IHW #IHU #K #d #e #HLK #X #H
elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct
elim (ssta_inv_lift1 … HW0 … HLK … HVW) -HW0 #V0 #HV0 #HVW0
- elim (cprs_inv_lift1 … HLK … HVW0 … HW01) -W0 #V1 #HVW1 #HV01
+ elim (cprs_inv_lift1 … HW01 … HLK … HVW0) -W0 #V1 #HVW1 #HV01
elim (dxprs_inv_lift1 … HLK … HTU … HU1) -HU1 #X #H #HTU
elim (lift_inv_bind2 … H) -H #Y #T1 #HY #HTU1 #H destruct
lapply (lift_inj … HY … HVW1) -HY #H destruct /3 width=8/
--- /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/computation/dxprs_lpss.ma".
+include "basic_2/equivalence/cpcs_lpss.ma".
+include "basic_2/dynamic/snv_lift.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties about sn parallel substitution for local environments *********)
+
+lemma snv_cpss_lpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] → ∀T2. L1 ⊢ T1 ▶* T2 →
+ ∀L2. L1 ⊢ ▶* L2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
+#h #g #L1 #T1 #H elim H -L1 -T1
+[ #L1 #k #X #H #L2 #_
+ >(cpss_inv_sort1 … H) -X //
+| #I #L1 #K1 #V1 #i #HLK1 #_ #IHV1 #W2 #H #L2 #HL12
+ elim (cpss_inv_lref1 … H) -H
+ [ #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V2 #HK12 #HV12 #H destruct
+ lapply (IHV1 … HV12 … HK12) -IHV1 -HV12 -HK12 /2 width=5/
+ | * #K0 #V0 #V2 #HLK0 #HV12 #HVW2
+ lapply (ldrop_mono … HLK0 … HLK1) -HLK0 #H destruct
+ elim (lpss_ldrop_conf … HLK1 … HL12) -L1 #X #H #HLK2
+ elim (lpss_inv_pair1 … H) -H #K2 #V #HK12 #_ #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -V #HLK2
+ lapply (IHV1 … HV12 … HK12) -IHV1 -HV12 -HK12 /2 width=7/
+ ]
+| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (IHV1 … HV12 … HL12) -IHV1 #HV2
+ lapply (IHT1 … HT12 (L2.ⓑ{I}V2) ?) -IHT1 -HT12 /2 width=1/
+| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (IHV1 … HV12 … HL12) -IHV1 #HV2
+ lapply (IHT1 … HT12 … HL12) -IHT1 #HT2
+ elim (ssta_cpss_lpss_conf … HVW1 … HV12 … HL12) -V1 #W2 #HVW2 #HW12
+ elim (dxprs_cpss_lpss_conf … HTU1 … HT12 … HL12) -T1 #X #HTU2 #H
+ elim (cpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
+ elim (cprs_cpss2_lpss_conf_dx … HW10 … HW12 … HW0 … HL12) -L1 -W1 -W0 #W0 #HW20 #HW0
+ lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
+| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #X #H #L2 #HL12
+ elim (cpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+ lapply (IHW1 … HW12 … HL12) -IHW1 #HW2
+ lapply (IHT1 … HT12 … HL12) -IHT1 #HT2
+ elim (ssta_cpss_lpss_conf … HTU1 … HT12 … HL12) -T1 #U2 #HTU2 #HU12
+ lapply (cpcs_cpss2_lpss_conf … HUW1 … HU12 … HW12 … HL12) -L1 -W1 -U1 /2 width=4/
+]
+qed-.
+
+lemma snv_lpss_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊢ T ¡[g] →
+ ∀L2. L1 ⊢ ▶* L2 → ⦃h, L2⦄ ⊢ T ¡[g].
+#h #g #L1 #T #HT #L2 #HL12
+@(snv_cpss_lpss_conf … HT … HL12) //
+qed-.
+
+lemma snv_cpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
+ ∀T2. L ⊢ T1 ▶* T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
+#h #g #L #T1 #HT1 #T2 #HT12
+@(snv_cpss_lpss_conf … HT1 … HT12) //
+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/computation/dxprs_ltpss_dx.ma".
-include "basic_2/equivalence/cpcs_ltpss_dx.ma".
-include "basic_2/dynamic/snv_lift.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties about dx parallel unfold **************************************)
-
-lemma snv_ltpss_dx_tpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
- ∀L2,d,e. L1 ▶* [d, e] L2 →
- ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
-#h #g #L1 #T1 #H elim H -L1 -T1
-[ #L1 #k #L2 #d #e #_ #X #H
- >(tpss_inv_sort1 … H) -X //
-| #I #L1 #K1 #V1 #i #HLK1 #HV1 #IHV1 #L2 #d #e #HL12 #X #H
- elim (tpss_inv_lref1 … H) -H
- [ #H destruct
- elim (lt_or_ge i d) #Hdi [ | elim (lt_or_ge i (d + e)) #Hide ]
- [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 …) -L1 /2 width=2/ #X #H #HLK2
- elim (ltpss_dx_inv_tpss11 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
- lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
- | elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H #HLK2
- elim (ltpss_dx_inv_tpss21 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
- lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
- | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=5/
- ]
- | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
- elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H1 #H2
- elim (ltpss_dx_inv_tpss21 … H1 …) -H1 /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
- lapply (ldrop_mono … H2 … HLK2) -H2 #H destruct
- lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
- lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
- lapply (IHV1 … HK12 … HV1W2) -IHV1 -HK12 -HV1W2 /2 width=7/
- ]
-| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
- elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
- lapply (IHT1 … HT12) -IHT1 -HT12 /2 width=1/
-| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
- elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
- lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
- lapply (IHT1 … HT12) -IHT1 /2 width=1/ #HT2
- elim (ssta_ltpss_dx_tpss_conf … HVW1 … HL12 … HV12) -V1 #W2 #HVW2 #HW12
- elim (dxprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #X #HTU2 #H
- elim (tpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
- elim (cprs_ltpss_dx_tpss2_conf … HW10 … HL12 … HW12 … HW0) -L1 -W1 -W0 #W0 #HW20 #HW0
- lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
-| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #L2 #d #e #HL12 #X #H
- elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
- lapply (IHW1 … HL12 … HW12) -IHW1 #HW2
- lapply (IHT1 … HL12 … HT12) -IHT1 #HT2
- elim (ssta_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #U2 #HTU2 #HU12
- lapply (cpcs_ltpss_dx_tpss2_conf … HL12 … HUW1 … HU12 … HW12) -L1 -W1 -U1 /2 width=4/
-]
-qed-.
-
-lemma snv_ltpss_dx_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊢ T ¡[g] →
- ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊢ T ¡[g].
-#h #g #L1 #T #HT #L2 #d #e #HL12
-@(snv_ltpss_dx_tpss_conf … HT … HL12) //
-qed-.
-
-lemma snv_tpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
- ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
-#h #g #L #T1 #HT1 #T2 #d #e #HT12
-@(snv_ltpss_dx_tpss_conf … HT1 … HT12) //
-qed-.
-
-lemma snv_tps_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
- ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
-#h #g #L #T1 #HT1 #T2 #d #e #HT12
-@(snv_tpss_conf … HT1 T2) /2 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/dynamic/snv_ltpss_dx.ma".
-
-(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
-
-(* Properties about sn parallel unfold **************************************)
-
-lemma snv_ltpss_sn_conf: ∀h,g,L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
- ∀T. ⦃h, L1⦄ ⊢ T ¡[g] → ⦃h, L2⦄ ⊢ T ¡[g].
-#h #g #L1 #L2 #d #e #H
-lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 //
-#L #L2 #_ #HL2 #IHL1 #T1 #HT1
-lapply (IHL1 … HT1) -IHL1 -HT1 #HT1
-lapply (snv_ltpss_dx_conf … HT1 … HL2) -HT1 -HL2 //
-qed-.
(* *)
(**************************************************************************)
-include "basic_2/unwind/sstas_lift.ma".
+include "basic_2/unfold/sstas_lift.ma".
include "basic_2/dynamic/snv.ma".
(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
inductive ygt (h) (g) (L1) (T1): relation2 lenv term ≝
| ygt_inj : ∀L,L2,T,T2. h ⊢ ⦃L1, T1⦄ ≥[g] ⦃L, T⦄ → h ⊢ ⦃L, T⦄ ≻[g] ⦃L2, T2⦄ →
ygt h g L1 T1 L2 T2
-| ygt_step: ∀L,L2,T. ygt h g L1 T1 L T → L ➡ L2 → ygt h g L1 T1 L2 T
+| ygt_step: â\88\80L,L2,T. ygt h g L1 T1 L T â\86\92 L â\8a¢ â\9e¡ L2 â\86\92 ygt h g L1 T1 L2 T
.
interpretation "'big tree' proper parallel computation (closure)"
lemma ygt_fwd_yprs: ∀h,g,L1,L2,T1,T2. h ⊢ ⦃L1, T1⦄ >[g] ⦃L2, T2⦄ →
h ⊢ ⦃L1, T1⦄ ≥[g] ⦃L2, T2⦄.
#h #g #L1 #L2 #T1 #T2 #H elim H -L2 -T2
-/3 width=4 by yprs_strap1, ysc_ypr, ypr_ltpr/
+/3 width=4 by yprs_strap1, ysc_ypr, ypr_lpr/
qed-.
(* Basic properties *********************************************************)
(* *)
(**************************************************************************)
-include "basic_2/reducibility/ltpr.ma".
+include "basic_2/reduction/lpr.ma".
include "basic_2/dynamic/lsubsv.ma".
(* "BIG TREE" PARALLEL REDUCTION FOR CLOSURES *******************************)
inductive ypr (h) (g) (L1) (T1): relation2 lenv term ≝
| ypr_fw : ∀L2,T2. ♯{L2, T2} < ♯{L1, T1} → ypr h g L1 T1 L2 T2
-| ypr_ltpr : ∀L2. L1 ➡ L2 → ypr h g L1 T1 L2 T1
+| ypr_lpr : ∀L2. L1 ⊢ ➡ L2 → ypr h g L1 T1 L2 T1
| ypr_cpr : ∀T2. L1 ⊢ T1 ➡ T2 → ypr h g L1 T1 L1 T2
| ypr_ssta : ∀T2,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l+1, T2⦄ → ypr h g L1 T1 L1 T2
| ypr_lsubsv: ∀L2. h ⊢ L2 ¡⊑[g] L1 → ypr h g L1 T1 L2 T1
(* *)
(**************************************************************************)
-include "basic_2/computation/ltprs.ma".
+include "basic_2/computation/lprs.ma".
include "basic_2/dynamic/ypr.ma".
(* "BIG TREE" PARALLEL COMPUTATION FOR CLOSURES *****************************)
#h #g #L #T1 #T2 #H @(cprs_ind … H) -T2 // /3 width=4 by ypr_cpr, yprs_strap1/
qed.
-lemma ltprs_yprs: ∀h,g,L1,L2,T. L1 ➡* L2 → h ⊢ ⦃L1, T⦄ ≥[g] ⦃L2, T⦄.
-#h #g #L1 #L2 #T #H @(ltprs_ind … H) -L2 // /3 width=4 by ypr_ltpr, yprs_strap1/
+lemma lprs_yprs: ∀h,g,L1,L2,T. L1 ⊢ ➡* L2 → h ⊢ ⦃L1, T⦄ ≥[g] ⦃L2, T⦄.
+#h #g #L1 #L2 #T #H @(lprs_ind … H) -L2 // /3 width=4 by ypr_lpr, yprs_strap1/
qed.
lemma sstas_yprs: ∀h,g,L,T1,T2. ⦃h, L⦄ ⊢ T1 •*[g] T2 →
lemma lsubsv_yprs: ∀h,g,L1,L2,T. h ⊢ L2 ¡⊑[g] L1 → h ⊢ ⦃L1, T⦄ ≥[g] ⦃L2, T⦄.
/3 width=1/ qed.
-lemma ltpr_cprs_yprs: ∀h,g,L1,L2,T1,T2. L1 ➡ L2 → L2 ⊢ T1 ➡* T2 →
- h ⊢ ⦃L1, T1⦄ ≥[g] ⦃L2, T2⦄.
-/3 width=4 by yprs_strap2, ypr_ltpr, cprs_yprs/
+lemma lpr_cprs_yprs: ∀h,g,L1,L2,T1,T2. L1 ⊢ ➡ L2 → L2 ⊢ T1 ➡* T2 →
+ h ⊢ ⦃L1, T1⦄ ≥[g] ⦃L2, T2⦄.
+/3 width=4 by yprs_strap2, ypr_lpr, cprs_yprs/
qed.
(* Inversion lemmas on "big tree" parallel reduction for closures ***********)
lemma ypr_inv_ysc: ∀h,g,L1,L2,T1,T2. h ⊢ ⦃L1, T1⦄ ≽[g] ⦃L2, T2⦄ →
- h ⊢ ⦃L1, T1⦄ ≻[g] ⦃L2, T2⦄ ∨ (L1 ➡ L2 ∧ T1 = T2).
+ h â\8a¢ â¦\83L1, T1â¦\84 â\89»[g] â¦\83L2, T2â¦\84 â\88¨ (L1 â\8a¢ â\9e¡ L2 â\88§ T1 = T2).
#h #g #L1 #L2 #T1 #T2 * -L2 -T2 /3 width=1/ /3 width=2/
[ #T2 #HT12 elim (term_eq_dec T1 T2) #H destruct /3 width=1/ /4 width=1/
| #L2 #HL21 elim (lenv_eq_dec L1 L2) #H destruct /3 width=1/ /4 width=1/
@(cpcs_cpr_strap1 … HT1) -T1 /2 width=3/
qed-.
+lemma cpcs_cpss_strap2: ∀L,T1,T. L ⊢ T1 ▶* T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #HT2
+@(cpcs_cpr_strap2 … HT2) -T2 /2 width=3/
+qed-.
+
lemma cpcs_cpss_conf: ∀L,T,T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
#L #T #T1 #HT1 #T2 #HT2
@(cpcs_cpr_conf … HT2) -T2 /2 width=3/
qed-.
+lemma cpcs_cpss_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ▶* T → L ⊢ T1 ⬌* T2.
+#L #T1 #T #HT1 #T2 #HT2
+@(cpcs_cpr_div … HT1) -T1 /2 width=3/
+qed-.
+
(* Basic_1: removed theorems 9:
clear_pc3_trans pc3_ind_left
pc3_head_1 pc3_head_2 pc3_head_12 pc3_head_21
(* Properties on sn parallel substitution for local environments ************)
-lemma cpcs_lpss_conf: ∀L1,L2. L1 ⊢ ▶* L2 → ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #HL12 #T1 #T2 #H
+lemma cpcs_lpss_conf: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T1 ⬌* T2.
+#L1 #T1 #T2 #H #L2 #HL12
elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
elim (cprs_lpss_conf_dx … HT1 … HL12) -HT1 #U1 #H1 #HTU1
elim (cprs_lpss_conf_dx … HT2 … HL12) -L1 #U2 #H2 #HTU2
lapply (cprs_cpss_trans … HTU2 … HU2) -U2 /2 width=3/
qed-.
-lemma cpcs_lpss_cpss_conf: ∀L1,L2. L1 ⊢ ▶* L2 →
- ∀T,T2. L1 ⊢ T ⬌* T2 →
- ∀T1. L2 ⊢ T ▶* T1 →
- L2 ⊢ T1 ⬌* T2.
-#L1 #L2 #HL12 #T #T2 #HT2 #T1 #HT1
-lapply (cpcs_lpss_conf … HL12 … HT2) -L1 #HT2
-lapply (cpcs_cpss_conf … HT1 … HT2) -T //
+lemma cpcs_cpss_lpss_conf: ∀L1,T,T2. L1 ⊢ T ⬌* T2 → ∀T1. L1 ⊢ T ▶* T1 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T1 ⬌* T2.
+#L1 #T #T2 #HT2 #T1 #HT1 #L2 #HL12
+lapply (cpcs_lpss_conf … HT2 … HL12) -HT2 #HT2
+elim (lpss_cpss_conf_dx … HT1 … HL12) -L1 #T0 #HT0 #HT10
+lapply (cpcs_cpss_conf … HT0 … HT2) -T #HT02
+lapply (cpcs_cpss_strap2 … HT10 … HT02) -T0 //
qed-.
-lemma cpcs_lpss_cpss2_conf: ∀L1,L2. L1 ⊢ ▶* L2 → ∀T1,T2. L1 ⊢ T1 ⬌* T2 →
- ∀T3. L2 ⊢ T1 ▶* T3 → ∀T4. L2 ⊢ T2 ▶* T4 →
- L2 ⊢ T3 ⬌* T4.
-#L1 #L2 #HL12 #T1 #T2 #HT12 #T3 #HT13 #T4 #HT24
-lapply (cpcs_lpss_cpss_conf … HL12 … HT12 … HT13) -L1 -T1 #HT32
-lapply (cpcs_cpss_strap1 … HT32 … HT24) -T2 //
+lemma cpcs_cpss2_lpss_conf: ∀L1,T1,T2. L1 ⊢ T1 ⬌* T2 →
+ ∀T3. L1 ⊢ T1 ▶* T3 → ∀T4. L1 ⊢ T2 ▶* T4 →
+ ∀L2. L1 ⊢ ▶* L2 → L2 ⊢ T3 ⬌* T4.
+#L1 #T1 #T2 #HT12 #T3 #HT13 #T4 #HT24 #L2 #HL12
+lapply (cpcs_cpss_lpss_conf … HT12 … HT13 … HL12) -T1 #HT32
+elim (lpss_cpss_conf_dx … HT24 … HL12) -L1 #T #HT2 #HT4
+lapply (cpcs_cpss_strap1 … HT32 … HT2) -T2 #HT3
+lapply (cpcs_cpss_div … HT3 … HT4) -T //
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/computation/dxprs_ltpss_dx.ma".
+include "basic_2/equivalence/cpcs_ltpss_dx.ma".
+include "basic_2/dynamic/snv_lift.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties about dx parallel unfold **************************************)
+
+lemma snv_ltpss_dx_tpss_conf: ∀h,g,L1,T1. ⦃h, L1⦄ ⊢ T1 ¡[g] →
+ ∀L2,d,e. L1 ▶* [d, e] L2 →
+ ∀T2. L2 ⊢ T1 ▶* [d, e] T2 → ⦃h, L2⦄ ⊢ T2 ¡[g].
+#h #g #L1 #T1 #H elim H -L1 -T1
+[ #L1 #k #L2 #d #e #_ #X #H
+ >(tpss_inv_sort1 … H) -X //
+| #I #L1 #K1 #V1 #i #HLK1 #HV1 #IHV1 #L2 #d #e #HL12 #X #H
+ elim (tpss_inv_lref1 … H) -H
+ [ #H destruct
+ elim (lt_or_ge i d) #Hdi [ | elim (lt_or_ge i (d + e)) #Hide ]
+ [ elim (ltpss_dx_ldrop_conf_le … HL12 … HLK1 …) -L1 /2 width=2/ #X #H #HLK2
+ elim (ltpss_dx_inv_tpss11 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+ lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
+ | elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H #HLK2
+ elim (ltpss_dx_inv_tpss21 … H …) -H /2 width=1/ #K2 #V2 #HK12 #HV12 #H destruct
+ lapply (IHV1 … HK12 … HV12) -IHV1 -HK12 -HV12 /2 width=5/
+ | lapply (ltpss_dx_ldrop_conf_ge … HL12 … HLK1 ?) -L1 // -Hide /2 width=5/
+ ]
+ | * #K2 #V2 #W2 #Hdi #Hide #HLK2 #HVW2 #HWT2
+ elim (ltpss_dx_ldrop_conf_be … HL12 … HLK1 …) -L1 // /2 width=2/ #X #H1 #H2
+ elim (ltpss_dx_inv_tpss21 … H1 …) -H1 /2 width=1/ #K0 #V0 #HK12 #HV12 #H destruct
+ lapply (ldrop_mono … H2 … HLK2) -H2 #H destruct
+ lapply (ldrop_fwd_ldrop2 … HLK2) -HLK2 #HLK2
+ lapply (tpss_trans_eq … HV12 HVW2) -V2 #HV1W2
+ lapply (IHV1 … HK12 … HV1W2) -IHV1 -HK12 -HV1W2 /2 width=7/
+ ]
+| #a #I #L1 #V1 #T1 #_ #_ #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+ elim (tpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
+ lapply (IHT1 … HT12) -IHT1 -HT12 /2 width=1/
+| #a #L1 #V1 #W1 #W0 #T1 #U1 #l #_ #_ #HVW1 #HW10 #HTU1 #IHV1 #IHT1 #L2 #d #e #HL12 #X #H
+ elim (tpss_inv_flat1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (IHV1 … HL12 … HV12) -IHV1 #HV2
+ lapply (IHT1 … HT12) -IHT1 /2 width=1/ #HT2
+ elim (ssta_ltpss_dx_tpss_conf … HVW1 … HL12 … HV12) -V1 #W2 #HVW2 #HW12
+ elim (dxprs_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #X #HTU2 #H
+ elim (tpss_inv_bind1 … H) -H #W #U2 #HW0 #_ #H -U1 destruct
+ elim (cprs_ltpss_dx_tpss2_conf … HW10 … HL12 … HW12 … HW0) -L1 -W1 -W0 #W0 #HW20 #HW0
+ lapply (dxprs_strap1 … (ⓛ{a}W0.U2) HTU2 ?) -HTU2 /3 width=3/ -HW0 /2 width=8/
+| #L1 #W1 #T1 #U1 #l #_ #_ #HTU1 #HUW1 #IHW1 #IHT1 #L2 #d #e #HL12 #X #H
+ elim (tpss_inv_flat1 … H) -H #W2 #T2 #HW12 #HT12 #H destruct
+ lapply (IHW1 … HL12 … HW12) -IHW1 #HW2
+ lapply (IHT1 … HL12 … HT12) -IHT1 #HT2
+ elim (ssta_ltpss_dx_tpss_conf … HTU1 … HL12 … HT12) -T1 #U2 #HTU2 #HU12
+ lapply (cpcs_ltpss_dx_tpss2_conf … HL12 … HUW1 … HU12 … HW12) -L1 -W1 -U1 /2 width=4/
+]
+qed-.
+
+lemma snv_ltpss_dx_conf: ∀h,g,L1,T. ⦃h, L1⦄ ⊢ T ¡[g] →
+ ∀L2,d,e. L1 ▶* [d, e] L2 → ⦃h, L2⦄ ⊢ T ¡[g].
+#h #g #L1 #T #HT #L2 #d #e #HL12
+@(snv_ltpss_dx_tpss_conf … HT … HL12) //
+qed-.
+
+lemma snv_tpss_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
+ ∀T2,d,e. L ⊢ T1 ▶* [d, e] T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
+#h #g #L #T1 #HT1 #T2 #d #e #HT12
+@(snv_ltpss_dx_tpss_conf … HT1 … HT12) //
+qed-.
+
+lemma snv_tps_conf: ∀h,g,L,T1. ⦃h, L⦄ ⊢ T1 ¡[g] →
+ ∀T2,d,e. L ⊢ T1 ▶ [d, e] T2 → ⦃h, L⦄ ⊢ T2 ¡[g].
+#h #g #L #T1 #HT1 #T2 #d #e #HT12
+@(snv_tpss_conf … HT1 T2) /2 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/dynamic/snv_ltpss_dx.ma".
+
+(* STRATIFIED NATIVE VALIDITY FOR TERMS *************************************)
+
+(* Properties about sn parallel unfold **************************************)
+
+lemma snv_ltpss_sn_conf: ∀h,g,L1,L2,d,e. L1 ⊢ ▶* [d, e] L2 →
+ ∀T. ⦃h, L1⦄ ⊢ T ¡[g] → ⦃h, L2⦄ ⊢ T ¡[g].
+#h #g #L1 #L2 #d #e #H
+lapply (ltpss_sn_ltpssa … H) -H #H @(ltpssa_ind … H) -L2 //
+#L #L2 #_ #HL2 #IHL1 #T1 #HT1
+lapply (IHL1 … HT1) -IHL1 -HT1 #HT1
+lapply (snv_ltpss_dx_conf … HT1 … HL2) -HT1 -HL2 //
+qed-.
(* Properties about sn parallel substitution ********************************)
(* Note: apparently this was missing in basic_1 *)
-lemma ssta_tpss_lpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
+lemma ssta_cpss_lpss_conf: ∀h,g,L1,T1,U1,l. ⦃h, L1⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
∃∃U2. ⦃h, L2⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L1 ⊢ U1 ▶* U2.
#h #g #L1 #T1 #U1 #l #H elim H -L1 -T1 -U1 -l
lemma ssta_cpss_conf: ∀h,g,L,T1,U1,l. ⦃h, L⦄ ⊢ T1 •[g] ⦃l, U1⦄ →
∀T2. L ⊢ T1 ▶* T2 →
∃∃U2. ⦃h, L⦄ ⊢ T2 •[g] ⦃l, U2⦄ & L ⊢ U1 ▶* U2.
-/2 width=3 by ssta_tpss_lpss_conf/ qed-.
+/2 width=3 by ssta_cpss_lpss_conf/ qed-.
lemma ssta_lpss_conf: ∀h,g,L1,T,U1,l. ⦃h, L1⦄ ⊢ T •[g] ⦃l, U1⦄ →
∀L2. L1 ⊢ ▶* L2 →
∃∃U2. ⦃h, L2⦄ ⊢ T •[g] ⦃l, U2⦄ & L1 ⊢ U1 ▶* U2.
-/2 width=3 by ssta_tpss_lpss_conf/ qed-.
+/2 width=3 by ssta_cpss_lpss_conf/ qed-.
(* ITERATED STRATIFIED STATIC TYPE ASSIGNMENT FOR TERMS *********************)
-(* Properties about sn parallel substitution ********************************)
+(* Properties about sn parallel substitution for local environments *********)
-lemma sstas_tpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
+lemma sstas_cpss_lpss_conf: ∀h,g,L1,T1,U1. ⦃h, L1⦄ ⊢ T1 •*[g] U1 →
∀T2. L1 ⊢ T1 ▶* T2 → ∀L2. L1 ⊢ ▶* L2 →
∃∃U2. ⦃h, L2⦄ ⊢ T2 •*[g] U2 & L1 ⊢ U1 ▶* U2.
#h #g #L1 #T1 #U1 #H @(sstas_ind_dx … H) -T1 /2 width=3/
#T0 #U0 #l0 #HTU0 #_ #IHU01 #T #HT0 #L2 #HL12
-elim (ssta_tpss_lpss_conf … HTU0 … HT0 … HL12) -HTU0 -HT0 #U #HTU #HU0
+elim (ssta_cpss_lpss_conf … HTU0 … HT0 … HL12) -HTU0 -HT0 #U #HTU #HU0
elim (IHU01 … HU0 … HL12) -IHU01 -U0 -HL12 /3 width=4/
qed-.
-lemma sstas_tpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
+lemma sstas_cpss_conf: ∀h,g,L,T1,U1. ⦃h, L⦄ ⊢ T1 •*[g] U1 →
∀T2. L ⊢ T1 ▶* T2 →
∃∃U2. ⦃h, L⦄ ⊢ T2 •*[g] U2 & L ⊢ U1 ▶* U2.
-/2 width=3 by sstas_tpss_lpss_conf/ qed-.
+/2 width=3 by sstas_cpss_lpss_conf/ qed-.
lemma sstas_lpss_conf: ∀h,g,L1,T,U1. ⦃h, L1⦄ ⊢ T •*[g] U1 →
∀L2. L1 ⊢ ▶* L2 →
∃∃U2. ⦃h, L2⦄ ⊢ T •*[g] U2 & L1 ⊢ U1 ▶* U2.
-/2 width=3 by sstas_tpss_lpss_conf/ qed-.
+/2 width=3 by sstas_cpss_lpss_conf/ qed-.
}
]
[ { "stratified native validity" * } {
- [ "snv ( ⦃?,?⦄ ⊢ ? ¡[?] )" "snv_lift" + "snv_ltpss_dx" + "snv_ltpss_sn" + "snv_aaa" + "snv_ssta" + "snv_sstas" + "snv_ssta_ltpr" + "snv_ltpr" + "snv_cpcs" * ]
+ [ "snv ( ⦃?,?⦄ ⊢ ? ¡[?] )" "snv_lift" + "snv_lpss" + "snv_aaa" + "snv_ssta" + "snv_sstas" + "snv_ssta_ltpr" + "snv_ltpr" + "snv_cpcs" * ]
}
]
}