#h #g #G #L #T1 #T2 #H @(cprs_ind … H) -T2 /3 width=3 by cpxs_strap1, cpr_cpx/
qed.
+lemma cpxs_sort: ∀h,g,G,L,k,l1. deg h g k l1 →
+ ∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ ⋆k ➡*[h, g] ⋆((next h)^l2 k).
+#h #g #G #L #k #l1 #Hkl1 #l2 @(nat_ind_plus … l2) -l2 /2 width=1 by cpx_cpxs/
+#l2 #IHl2 #Hl21 >iter_SO
+@(cpxs_strap1 … (⋆(iter l2 ℕ (next h) k)))
+[ /3 width=3 by lt_to_le/
+| @(cpx_st … (l1-l2-1)) <plus_minus_m_m
+ /2 width=1 by deg_iter, monotonic_le_minus_r/
+]
+qed.
+
lemma cpxs_bind_dx: ∀h,g,G,L,V1,V2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 →
∀I,T1,T2. ⦃G, L. ⓑ{I}V1⦄ ⊢ T1 ➡*[h, g] T2 →
∀a. ⦃G, L⦄ ⊢ ⓑ{a,I}V1.T1 ➡*[h, g] ⓑ{a,I}V2.T2.
(**************************************************************************)
include "basic_2/multiple/fqus_fqus.ma".
-include "basic_2/unfold/lstas_da.ma".
include "basic_2/reduction/cpx_lift.ma".
include "basic_2/computation/cpxs.ma".
(* Advanced properties ******************************************************)
-lemma lstas_cpxs: ∀h,g,G,L,T1,T2,l1. ⦃G, L⦄ ⊢ T1 •* [h, l1] T2 →
- ∀l2. ⦃G, L⦄ ⊢ T1 ▪ [h, g] l2 → l1 ≤ l2 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2.
-#h #g #G #L #T1 #T2 #l1 #H @(lstas_ind_dx … H) -T2 -l1 //
-#l1 #T #T2 #HT1 #HT2 #IHT1 #l2 #Hl2 #Hl12
-lapply (lstas_da_conf … HT1 … Hl2) -HT1
->(plus_minus_m_m (l2-l1) 1 ?)
-[ /4 width=5 by cpxs_strap1, sta_cpx, lt_to_le/
-| /2 width=1 by monotonic_le_minus_r/
-]
-qed.
-
lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i.
⇩[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 →
∀W2. ⇧[0, i+1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2.
]
qed.
+lemma lstas_cpxs: ∀h,g,G,L,T1,T2,l2. ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 →
+ ∀l1. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1 → l2 ≤ l1 → ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2.
+#h #g #G #L #T1 #T2 #l2 #H elim H -G -L -T1 -T2 -l2 //
+[ /3 width=3 by cpxs_sort, da_inv_sort/
+| #G #L #K #V1 #V2 #W2 #i #l2 #HLK #_ #HVW2 #IHV12 #l1 #H #Hl21
+ elim (da_inv_lref … H) -H * #K0 #V0 [| #l0 ] #HLK0
+ lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct /3 width=7 by cpxs_delta/
+| #G #L #K #V1 #V2 #W2 #i #l2 #HLK #_ #HVW2 #IHV12 #l1 #H #Hl21
+ elim (da_inv_lref … H) -H * #K0 #V0 [| #l0 ] #HLK0
+ lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct
+ #HV1 #H destruct lapply (le_plus_to_le_r … Hl21) -Hl21
+ /3 width=7 by cpxs_delta/
+| /4 width=3 by cpxs_bind_dx, da_inv_bind/
+| /4 width=3 by cpxs_flat_dx, da_inv_flat/
+| /4 width=3 by cpxs_eps, da_inv_flat/
+]
+qed.
+
(* Advanced inversion lemmas ************************************************)
lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 →
lemma fquq_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
∀U2,l1. ⦃G2, L2⦄ ⊢ T2 •*[h, l1] U2 →
- ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪ [h, g] l2 → l1 ≤ l2 →
+ ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] l2 → l1 ≤ l2 →
∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐⸮ ⦃G2, L2, U2⦄.
/3 width=5 by fquq_cpxs_trans, lstas_cpxs/ qed-.
lemma fqus_lstas_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐* ⦃G2, L2, T2⦄ →
∀U2,l1. ⦃G2, L2⦄ ⊢ T2 •*[h, l1] U2 →
- ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪ [h, g] l2 → l1 ≤ l2 →
+ ∀l2. ⦃G2, L2⦄ ⊢ T2 ▪[h, g] l2 → l1 ≤ l2 →
∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊐* ⦃G2, L2, U2⦄.
/3 width=6 by fqus_cpxs_trans, lstas_cpxs/ qed-.
/5 width=5 by fpbc_fpbg, fpbu_fpbc, lstas_fpbu/ qed.
lemma sta_fpbg: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 →
- ⦃G, L⦄ ⊢ T1 •[h] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄.
+ ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ >≡[h, g] ⦃G, L, T2⦄.
/4 width=2 by fpbc_fpbg, fpbu_fpbc, sta_fpbu/ qed.
/3 width=5 by cpxs_fpbs, lstas_cpxs/ qed.
lemma sta_fpbs: ∀h,g,G,L,T,U,l.
- ⦃G, L⦄ ⊢ T ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T •[h] U →
+ ⦃G, L⦄ ⊢ T ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T •*[h, 1] U →
⦃G, L, T⦄ ≥[h, g] ⦃G, L, U⦄.
/4 width=2 by fpb_fpbs, sta_fpb/ qed.
(* Note: this is used in the closure proof *)
lemma cpr_lpr_sta_fpbs: ∀h,g,G,L1,L2,T1,T2,U2,l2.
⦃G, L1⦄ ⊢ T1 ➡ T2 → ⦃G, L1⦄ ⊢ ➡ L2 →
- ⦃G, L2⦄ ⊢ T2 ▪[h, g] l2+1 → ⦃G, L2⦄ ⊢ T2 •[h] U2 →
+ ⦃G, L2⦄ ⊢ T2 ▪[h, g] l2+1 → ⦃G, L2⦄ ⊢ T2 •*[h, 1] U2 →
⦃G, L1, T1⦄ ≥[h, g] ⦃G, L2, U2⦄.
/4 width=5 by fpbs_strap1, cpr_lpr_fpbs, sta_cpx, fpb_cpx/ qed.
(* *)
(**************************************************************************)
-include "basic_2/static/sta_sta.ma".
+include "basic_2/unfold/lstas_da.ma".
include "basic_2/computation/cpxs_lift.ma".
include "basic_2/computation/fpbu.ma".
/4 width=5 by fpbu_cpxs, lstas_cpxs/ qed.
lemma sta_fpbu: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 →
- ⦃G, L⦄ ⊢ T1 •[h] T2 → ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄.
+ ⦃G, L⦄ ⊢ T1 •*[h, 1] T2 → ⦃G, L, T1⦄ ≻[h, g] ⦃G, L, T2⦄.
#h #g #G #L #T1 #T2 #l #HT1 #HT12 elim (eq_term_dec T1 T2)
-/3 width=5 by sta_lstas, lstas_fpbu/ #H destruct
-elim (sta_inv_refl_pos … HT1 … HT12)
+/3 width=5 by lstas_fpbu/ #H destruct
+elim (lstas_inv_refl_pos h G L T2 0) //
qed.
include "basic_2/notation/relations/dpredstar_7.ma".
include "basic_2/static/da.ma".
-include "basic_2/unfold/lstas.ma".
include "basic_2/computation/cprs.ma".
(* STRATIFIED DECOMPOSED PARALLEL COMPUTATION ON TERMS **********************)
(* Basic properties *********************************************************)
-lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T1 •[h] T →
+lemma sta_cprs_scpds: ∀h,g,G,L,T1,T,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l+1 → ⦃G, L⦄ ⊢ T1 •*[h, 1] T →
⦃G, L⦄ ⊢ T ➡* T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 1] T2.
-/3 width=6 by sta_lstas, ex4_2_intro/ qed.
+/2 width=6 by ex4_2_intro/ qed.
lemma lstas_scpds: ∀h,g,G,L,T1,T2,l1. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1 →
∀l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ T1 •*[h, l2] T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l2] T2.
/2 width=6 by ex4_2_intro/ qed.
-lemma cprs_scpds: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l → ⦃G, L⦄ ⊢ T1 ➡* T2 →
- ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2.
-/2 width=6 by lstar_O, ex4_2_intro/ qed.
-
-lemma scpds_refl: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ▪[h, g] l → ⦃G, L⦄ ⊢ T •*➡*[h, g, 0] T.
-/2 width=2 by cprs_scpds/ qed.
-
lemma scpds_strap1: ∀h,g,G,L,T1,T,T2,l.
⦃G, L⦄ ⊢ T1 •*➡*[h, g, l] T → ⦃G, L⦄ ⊢ T ➡ T2 → ⦃G, L⦄ ⊢ T1 •*➡*[h, g, l] T2.
#h #g #G #L #T1 #T #T2 #l * /3 width=8 by cprs_strap1, ex4_2_intro/
lemma scpds_fwd_cprs: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*➡*[h, g, 0] T2 →
⦃G, L⦄ ⊢ T1 ➡* T2.
-#h #g #G #L #T1 #T2 *
-#T #l #_ #_ #H lapply (lstas_inv_O … H) -l -H
-#H destruct //
+#h #g #G #L #T1 #T2 * /3 width=3 by cprs_strap2, lstas_cpr/
qed-.
(* *)
(**************************************************************************)
-include "basic_2/unfold/lstas_lstas.ma".
+include "basic_2/unfold/lstas_da.ma".
include "basic_2/computation/lprs_cprs.ma".
include "basic_2/computation/cpxs_cpxs.ma".
include "basic_2/computation/scpds.ma".
(* Advanced properties ******************************************************)
lemma scpds_strap2: ∀h,g,G,L,T1,T,T2,l1,l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l1+1 →
- ⦃G, L⦄ ⊢ T1 •[h] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, l] T2 →
+ ⦃G, L⦄ ⊢ T1 •*[h, 1] T → ⦃G, L⦄ ⊢ T •*➡*[h, g, l] T2 →
⦃G, L⦄ ⊢ T1 •*➡*[h, g, l+1] T2.
#h #g #G #L #T1 #T #T2 #l1 #l #Hl1 #HT1 *
#T0 #l0 #Hl0 #HTl0 #HT0 #HT02
-lapply (da_sta_conf … HT1 … Hl1) <minus_plus_m_m #HTl1
+lapply (lstas_da_conf … HT1 … Hl1) <minus_plus_m_m #HTl1
lapply (da_mono … HTl0 … HTl1) -HTl0 -HTl1 #H destruct
-/3 width=6 by lstas_step_sn, le_S_S, ex4_2_intro/
+lapply (lstas_trans … HT1 … HT0) -T >commutative_plus
+/3 width=6 by le_S_S, ex4_2_intro/
qed.
lemma scpds_cprs_trans: ∀h,g,G,L,T1,T,T2,l.
(* *)
(**************************************************************************)
-include "basic_2/static/lsubd_da.ma".
-include "basic_2/unfold/lstas_alt.ma".
include "basic_2/equivalence/scpes_cpcs.ma".
-include "basic_2/dynamic/lsubsv_lsubd.ma".
+include "basic_2/dynamic/lsubsv.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
∀l1. l2 ≤ l1 → ⦃G, L2⦄ ⊢ T ▪[h, g] l1 →
∀L1. G ⊢ L1 ⫃¡[h, g] L2 →
∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, l2] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2.
-#h #g #G #L2 #T #U #l2 #H @(lstas_ind_alt … H) -G -L2 -T -U -l2
-[1,2: /2 width=3 by ex2_intro/
-| #G #L2 #K2 #X #Y #U #i #l2 #HLK2 #_ #HYU #IHXY #l1 #Hl21 #Hl1 #L1 #HL12
+#h #g #G #L2 #T #U #l2 #H elim H -G -L2 -T -U -l2
+[ /2 width=3 by ex2_intro/
+| #G #L2 #K2 #V #W #U #i #l2 #HLK2 #_ #HWU #IHVW #l1 #Hl21 #Hl1 #L1 #HL12
elim (da_inv_lref … Hl1) -Hl1 * #K0 #V0 [| #l0 ] #HK0 #HV0
lapply (drop_mono … HK0 … HLK2) -HK0 #H destruct
- elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
- elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HYU -IHXY -HLK1 ]
+ elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1
+ elim (lsubsv_inv_pair2 … H) -H * #K1 [ | -HWU -IHVW -HLK1 ]
[ #HK12 #H destruct
- elim (IHXY … Hl21 HV0 … HK12) -K2 -l1 #T #HXT #HTY
+ elim (IHVW … Hl21 HV0 … HK12) -K2 -l1 #T #HVT #HTW
lapply (drop_fwd_drop2 … HLK1) #H
elim (lift_total T 0 (i+1))
/3 width=12 by lstas_ldef, cpcs_lift, ex2_intro/
- | #V #l0 #_ #_ #_ #_ #_ #H destruct
+ | #V0 #l0 #_ #_ #_ #_ #_ #H destruct
]
-| #G #L2 #K2 #X #Y #Y0 #U #i #l2 #HLK2 #HXY0 #_ #HYU #IHXY #l1 #Hl21 #Hl1 #L1 #HL12
+| #G #L2 #K2 #V #W #i #HLK2 #_ #IHVW #l1 #_ #Hl1 #L1 #HL12
+ elim (da_inv_lref … Hl1) -Hl1 * #K0 #V0 [| #l0 ] #HK0 #HV0 [| #H1 ]
+ lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct
+ elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1
+ elim (lsubsv_inv_pair2 … H) -H * #K1
+ [ #HK12 #H destruct
+ elim (IHVW … HV0 … HK12) -K2 /3 width=5 by lstas_zero, ex2_intro/
+ | #V1 #l1 #_ #_ #HV1 #HV #HK12 #_ #H destruct
+ lapply (da_mono … HV0 … HV) -HV #H destruct
+ elim (da_lstas … HV1 0) -HV1 #W1 #HVW1 #_
+ elim (lift_total W1 0 (i+1)) #U1 #HWU1
+ elim (IHVW … HV0 … HK12) -K2 // #X #HVX #_ -W
+ @(ex2_intro … U1) /3 width=6 by lstas_cast, lstas_ldef/ (**) (* full auto too slow *)
+ @cpcs_cprs_sn @(cprs_delta … HLK1 … HWU1)
+ /4 width=2 by cprs_strap1, cpr_cprs, lstas_cpr, cpr_eps/
+ ]
+| #G #L2 #K2 #V #W #U #i #l2 #HLK2 #_ #HWU #IHVW #l1 #Hl21 #Hl1 #L1 #HL12
elim (da_inv_lref … Hl1) -Hl1 * #K0 #V0 [| #l0 ] #HK0 #HV0 [| #H1 ]
lapply (drop_mono … HK0 … HLK2) -HK0 #H2 destruct
lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21
- elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #X #H #HLK1
+ elim (lsubsv_drop_O1_trans … HL12 … HLK2) -L2 #Y #H #HLK1
elim (lsubsv_inv_pair2 … H) -H * #K1
[ #HK12 #H destruct
- lapply (lsubsv_fwd_lsubd … HK12) #H
- lapply (lsubd_da_trans … HV0 … H) -H #H
- elim (da_inv_sta … H) -H
- elim (IHXY … Hl21 HV0 … HK12) -K2 -Hl21 #Y1
+ elim (IHVW … Hl21 HV0 … HK12) -K2 -Hl21 #X
lapply (drop_fwd_drop2 … HLK1)
- elim (lift_total Y1 0 (i+1))
- /3 width=12 by lstas_ldec, cpcs_lift, ex2_intro/
- | #V #l1 #HXV #_ #HV #HX #HK12 #_ #H destruct
- lapply (da_mono … HV0 … HX) -HX #H destruct
- elim (shnv_inv_cast … HXV) -HXV #_ #_ #H
- lapply (H … Hl21) -H #HXV
- elim (IHXY … Hl21 HV0 … HK12) -K2 -Hl21 #Y0 #HXY0 #HY0
- elim (da_inv_sta … HV) -HV #W #HVW
- elim (lstas_total … HVW (l2+1)) -W #W #HVW
- lapply (scpes_inv_lstas_eq … HXV … HXY0 … HVW) -HXV -HXY0 #HY0W
- lapply (cpcs_canc_sn … HY0W … HY0) -Y0 #HYW
- elim (lift_total W 0 (i+1))
+ elim (lift_total X 0 (i+1))
+ /3 width=12 by lstas_succ, cpcs_lift, ex2_intro/
+ | #V1 #l1 #H0 #_ #HV1 #HV #HK12 #_ #H destruct
+ lapply (da_mono … HV0 … HV) -HV #H destruct
+ elim (shnv_inv_cast … H0) -H0 #_ #_ #H
+ lapply (H … Hl21) -H #HVV1
+ elim (IHVW … Hl21 HV0 … HK12) -K2 -Hl21 #X #HVX #HXW
+ elim (da_lstas … HV1 (l2+1)) -HV1 #X1 #HVX1 #_
+ lapply (scpes_inv_lstas_eq … HVV1 … HVX … HVX1) -HVV1 -HVX #HXX1
+ lapply (cpcs_canc_sn … HXX1 … HXW) -X
+ elim (lift_total X1 0 (i+1))
lapply (drop_fwd_drop2 … HLK1)
/4 width=12 by cpcs_lift, lstas_cast, lstas_ldef, ex2_intro/
]
]
qed-.
-lemma lsubsv_sta_trans: ∀h,g,G,L2,T,U2. ⦃G, L2⦄ ⊢ T •[h] U2 →
+lemma lsubsv_sta_trans: ∀h,g,G,L2,T,U2. ⦃G, L2⦄ ⊢ T •*[h, 1] U2 →
∀l. ⦃G, L2⦄ ⊢ T ▪[h, g] l+1 →
∀L1. G ⊢ L1 ⫃¡[h, g] L2 →
- ∃∃U1. ⦃G, L1⦄ ⊢ T •[h] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2.
-#h #g #G #L2 #T #U2 #H #l #HTl #L1 #HL12
-elim (lsubsv_lstas_trans … U2 1 … HTl … HL12)
-/3 width=3 by lstas_inv_SO, sta_lstas, ex2_intro/
-qed-.
+ ∃∃U1. ⦃G, L1⦄ ⊢ T •*[h, 1] U1 & ⦃G, L1⦄ ⊢ U1 ⬌* U2.
+/2 width=7 by lsubsv_lstas_trans/ qed-.
(* *)
(**************************************************************************)
+include "basic_2/static/lsubd_da.ma".
+include "basic_2/dynamic/lsubsv_lsubd.ma".
include "basic_2/dynamic/lsubsv_lstas.ma".
(* LOCAL ENVIRONMENT REFINEMENT FOR STRATIFIED NATIVE VALIDITY **************)
elim (cprs_conf … HWV0 … HW0) -W0
/4 width=10 by snv_appl, scpds_cprs_trans, cprs_bind/
| #G #L2 #U #T #U0 #_ #_ #HU0 #HTU0 #IHU #IHT #L1 #HL12
- elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0
- /4 width=5 by lsubsv_cprs_trans, snv_cast, cprs_trans/
+ elim (lsubsv_scpds_trans … HTU0 … HL12) -HTU0 #X0 #HTX0 #H1
+ elim (lsubsv_scpds_trans … HU0 … HL12) -HU0 #X #HUX #H2
+ elim (cprs_conf … H1 … H2) -U0 /3 width=5 by snv_cast, scpds_cprs_trans/
]
qed-.
lemma shnv_inv_snv: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ¡[h, g, l] → ⦃G, L⦄ ⊢ T ¡[h, g].
#h #g #G #L #T #l * -T
-#U #T #HU #HT #HUT elim (HUT 0) -HUT
-/3 width=3 by snv_cast, scpds_fwd_cprs/
+#U #T #HU #HT #HUT elim (HUT 0) -HUT /2 width=3 by snv_cast/
qed-.
+
+(* Basic properties *********************************************************)
+
+lemma snv_shnv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, 0].
+#h #g #G #L #U #T #H elim (snv_inv_cast … H) -H
+#U0 #HU #HT #HU0 #HTU0 @shnv_cast // -HU -HT
+#l #H <(le_n_O_to_eq … H) -l /2 width=3 by scpds_div/
+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_aaa.ma".
-include "basic_2/dynamic/shnv.ma".
-
-(* STRATIFIED HIGHER NATIVE VALIDITY FOR TERMS ******************************)
-
-(* Advanced properties ******************************************************)
-
-lemma snv_shnv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g, 0].
-#h #g #G #L #U #T #H elim (snv_inv_cast … H) -H
-#U0 #HU #HT #HU0 #HTU0 @shnv_cast // -HT
-#l #H <(le_n_O_to_eq … H) -l
-elim (snv_fwd_da … HU) -HU /3 width=3 by cprs_scpds, scpds_div/
-qed.
| snv_appl: ∀a,G,L,V,W0,T,U0,l. snv h g G L V → snv h g G L T →
⦃G, L⦄ ⊢ V •*➡*[h, g, 1] W0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, l] ⓛ{a}W0.U0 → snv h g G L (ⓐV.T)
| snv_cast: ∀G,L,U,T,U0. snv h g G L U → snv h g G L T →
- â¦\83G, Lâ¦\84 â\8a¢ U â\9e¡* U0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0 → snv h g G L (ⓝU.T)
+ â¦\83G, Lâ¦\84 â\8a¢ U â\80¢*â\9e¡*[h, g, 0] U0 → ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0 → snv h g G L (ⓝU.T)
.
interpretation "stratified native validity (term)"
fact snv_inv_cast_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀U,T. X = ⓝU.T →
∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] &
- â¦\83G, Lâ¦\84 â\8a¢ U â\9e¡* U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0.
+ â¦\83G, Lâ¦\84 â\8a¢ U â\80¢*â\9e¡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0.
#h #g #G #L #X * -G -L -X
[ #G #L #k #X1 #X2 #H destruct
| #I #G #L #K #V #i #_ #_ #X1 #X2 #H destruct
lemma snv_inv_cast: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g] →
∃∃U0. ⦃G, L⦄ ⊢ U ¡[h, g] & ⦃G, L⦄ ⊢ T ¡[h, g] &
- â¦\83G, Lâ¦\84 â\8a¢ U â\9e¡* U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0.
+ â¦\83G, Lâ¦\84 â\8a¢ U â\80¢*â\9e¡*[h, g, 0] U0 & ⦃G, L⦄ ⊢ T •*➡*[h, g, 1] U0.
/2 width=3 by snv_inv_cast_aux/ qed-.
(**************************************************************************)
include "basic_2/static/da_aaa.ma".
-include "basic_2/unfold/lstas_lift.ma".
include "basic_2/computation/csx_aaa.ma".
include "basic_2/computation/scpds_aaa.ma".
include "basic_2/dynamic/snv.ma".
elim (aaa_inv_abst … H) -H #B0 #A #H1 #HU #H2 destruct
lapply (aaa_mono … H1 … HW0) -W0 #H destruct /3 width=4 by aaa_appl, ex_intro/
| #G #L #U #T #U0 #_ #_ #HU0 #HTU0 * #B #HU * #A #HT
- lapply (cprs_aaa_conf … HU … HU0) -HU0 #HU0
+ lapply (scpds_aaa_conf … HU … HU0) -HU0 #HU0
lapply (scpds_aaa_conf … HT … HTU0) -HTU0 #H
lapply (aaa_mono … H … HU0) -U0 #H destruct /3 width=3 by aaa_cast, ex_intro/
]
#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_da/
qed-.
-lemma snv_fwd_sta: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] → ∃U. ⦃G, L⦄ ⊢ T •[h] U.
-#h #g #G #L #T #H elim (snv_fwd_aaa … H) -H /2 width=2 by aaa_sta/
-qed-.
-
-lemma snv_lstas_fwd_correct: ∀h,g,G,L,T1,T2,l. ⦃G, L⦄ ⊢ T1 ¡[h, g] → ⦃G, L⦄ ⊢ T1 •* [h, l] T2 →
- ∃U2. ⦃G, L⦄ ⊢ T2 •[h] U2.
-#h #g #G #L #T1 #T2 #l #HT1 #HT12
-elim (snv_fwd_sta … HT1) -HT1 /2 width=5 by lstas_fwd_correct/
+lemma snv_fwd_lstas: ∀h,g,G,L,T. ⦃G, L⦄ ⊢ T ¡[h, g] →
+ ∀l. ∃U. ⦃G, L⦄ ⊢ T •*[h, l] U.
+#h #g #G #L #T #H #l elim (snv_fwd_aaa … H) -H
+#A #HT elim (aaa_lstas h … HT l) -HT /2 width=2 by ex_intro/
qed-.
elim (scpds_inv_abst1 … HTU1) -HTU1 #W3 #U3 #HW3 #_ #H destruct -U3 -l1
elim (snv_fwd_da … HV1) #l1 #Hl1
elim (snv_fwd_da … HW) #l0 #Hl0
- lapply (scpds_div … W … 0 … HVW1) /2 width=2 by cprs_scpds/ -W3 #H
+ lapply (cprs_scpds_div … HW3 … Hl0 … 1 HVW1) -W3 #H
elim (da_scpes_aux … IH3 IH2 IH1 … Hl0 … Hl1 … H) -IH3 -IH2 -H /2 width=1 by fqup_fpbg/ #_ #H1
<minus_n_O #H destruct >(plus_minus_m_m l1 1) in Hl1; // -H1 #Hl1
lapply (IH1 … HV1 … Hl1 … HV12 … HL12) -HV1 -Hl1 -HV12 [ /2 by fqup_fpbg/ ]
| #G #K #V #T #U0 #_ #_ #HVU0 #HTU0 #IHV #IHT #L #s #d #e #HLK #X #H
elim (lift_inv_flat1 … H) -H #W #U #HVW #HTU #H destruct
elim (lift_total U0 d e)
- /3 width=12 by snv_cast, cprs_lift, scpds_lift/
+ /3 width=12 by snv_cast, scpds_lift/
]
qed.
/3 width=6 by snv_appl/
| #G #L #W #U #U1 #_ #_ #HWU1 #HU1 #IHW #IHU #K #s #d #e #HLK #X #H
elim (lift_inv_flat2 … H) -H #V #T #HVW #HTU #H destruct
- elim (cprs_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0
+ elim (scpds_inv_lift1 … HWU1 … HLK … HVW) -HWU1 #U0 #HU01 #HVU0
elim (scpds_inv_lift1 … HU1 … HLK … HTU) -HU1 #X #HX #HTU0
lapply (lift_inj … HX … HU01) -HX #H destruct
/3 width=5 by snv_cast/
elim (scpds_inv_abst1 … HTU1) -HTU1 #W30 #T30 #HW130 #_ #H destruct -T30 -l0
elim (snv_fwd_da … HV1) #l #HV1l
elim (snv_fwd_da … HW10) #l0 #HW10l
- lapply (scpds_div … W10 … 0 … HVW1) /2 width=2 by cprs_scpds/ -W30 #HVW10
+ lapply (cprs_scpds_div … HW130 … HW10l … 1 HVW1) -W30 #HVW10
elim (da_scpes_aux … IH4 IH1 IH2 … HW10l … HV1l … HVW10) /2 width=1 by fqup_fpbg/
#_ #Hl <minus_n_O #H destruct >(plus_minus_m_m l 1) in HV1l; // -Hl #HV1l
lapply (scpes_cpr_lpr_aux … IH2 IH3 … HVW10 … HW120 … HV12 … HL12) /2 width=1 by fqup_fpbg/ -HVW10 #HVW20
elim (cpr_inv_cast1 … H2) -H2
[ * #W2 #T2 #HW12 #HT12 #H destruct
elim (snv_fwd_da … HW1) #l #HW1l
- lapply (scpds_div … W1 … 0 … HTU1) /2 width=2 by cprs_scpds/ -U1 -l #HWT1
+ lapply (scpds_div … HWU1 … HTU1) -U1 -l #HWT1
lapply (scpes_cpr_lpr_aux … IH2 IH3 … HWT1 … HW12 … HT12 … HL12) /2 width=1 by fqup_fpbg/
lapply (IH1 … HW12 … HL12) /2 width=1 by fqup_fpbg/
lapply (IH1 … HT12 … HL12) /2 width=1 by fqup_fpbg/ -L1
#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G1 #L1 * * [|||| * ]
[ #k #HG0 #HL0 #HT0 #_ #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1
>(lstas_inv_sort1 … H2) -X //
-| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X #H2 destruct -IH4 -IH3 -IH2
- [ lapply (lstas_inv_O … H2) -H2 #H destruct // ]
+| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #T #H2 destruct -IH4 -IH3 -IH2
elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HLK0 #HX0
- elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l ] #HLK1 [ #Hl1 | #Hl #H ]
+ elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l0 ] #HLK1 [ #Hl1 | #Hl0 #H ]
lapply (drop_mono … HLK0 … HLK1) -HLK0 #H0 destruct
- elim (lstas_inv_lref1 … H2) -H2 * #K0 #Y0 #X0 [2,4: #Y1 ] #HLK0 [1,2: #HY01 ] #HYX0 #HX0
- lapply (drop_mono … HLK0 … HLK1) -HLK0 #H destruct
- [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 ]
+ elim (lstas_inv_lref1 … H2) -H2 * #K #Y #X [3,6: #l ] #HLK #HYX [1,2: #HXT #H0 |3,5: #HXT |4,6: #H1 #H2 ]
+ lapply (drop_mono … HLK … HLK1) -HLK #H destruct
+ [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 |3: -Hl21 ]
lapply (fqup_lref … G1 … HLK1) #H
- lapply (drop_fwd_drop2 … HLK1) -HLK1 /4 width=8 by fqup_fpbg, snv_lift/
+ lapply (drop_fwd_drop2 … HLK1) /4 width=8 by snv_lift, snv_lref, fqup_fpbg/
| #p #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2 -IH1
elim (snv_inv_gref … H1)
| #a #I #V1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2
lapply (IH1 … HT1 … Hl1 … HT10) /2 width=1 by fqup_fpbg/ #HT0
lapply (lstas_scpds_aux … IH1 IH4 IH3 IH2 … Hl1 … HT10 … HTU1) -IH4 -IH3 -IH2 -IH1 /2 width=1 by fqup_fpbg/ -T1 -l1 #H
elim (scpes_inv_abst2 … H) -H /3 width=6 by snv_appl, scpds_cprs_trans/
-| #U1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X #H2 destruct -IH4 -IH3 -IH2
- [ lapply (lstas_inv_O … H2) -H2 #H destruct // ]
- elim (snv_inv_cast … H1) -H1
+| #U1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X #H2 destruct -IH4 -IH3 -IH2
+ elim (snv_inv_cast … H1) -H1
lapply (da_inv_flat … Hl1) -Hl1
lapply (lstas_inv_cast1 … H2) -H2 /3 width=8 by fqup_fpbg/
]
[ #k #_ #_ #_ #_ #l1 #l2 #_ #_ #X2 #H2 #X3 #H3 #L2 #_ -IH4 -IH3 -IH2 -IH1
>(lstas_inv_sort1 … H2) -X2
>(cpr_inv_sort1 … H3) -X3 /2 width=3 by ex2_intro/
-| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3
- [ lapply (lstas_inv_O … H2) -H2 #H destruct -IH1 -H1 -l1 /4 width=5 by lpr_cpcs_conf, cpr_cpcs_dx, ex2_intro/ ]
+| #i #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3
elim (snv_inv_lref … H1) -H1 #I0 #K0 #X0 #HK0 #HX0
- elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l0 ] #HLK1 [ #HVl1 | #HWl1 #H destruct ]
+ elim (da_inv_lref … Hl1) -Hl1 * #K1 [ #V1 | #W1 #l ] #HLK1 [ #HVl1 | #HWl1 #H destruct ]
lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct
- elim (lstas_inv_lref1 … H2) -H2 * #K0 #V0 #W0 [2,4: #X0 ] #HK0 [1,2: #_ -X0 ] #HVW0 #HX2
+ elim (lstas_inv_lref1 … H2) -H2 * #K0 #V0 #X0 [3,6: #l0 ] #HK0 #HVX0 [1,2: #HX02 #H |3,5: #HX02 |4,6: #H1 #H2 ] destruct
lapply (drop_mono … HK0 … HLK1) -HK0 #H destruct
- [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 ]
+ [ lapply (le_plus_to_le_r … Hl21) -Hl21 #Hl21 |3: -Hl21 ]
lapply (fqup_lref … G1 … HLK1) #HKV1
elim (lpr_drop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
- elim (lpr_inv_pair1 … H) -H #K2 [ #W2 | #V2 ] #HK12 [ #HW12 | #HV12 ] #H destruct
+ elim (lpr_inv_pair1 … H) -H #K2 [ #W2 | #W2 | #V2 ] #HK12 [ #HW12 | #HW12 | #HV12 ] #H destruct
lapply (drop_fwd_drop2 … HLK2) #H2
elim (cpr_inv_lref1 … H3) -H3
- [1,3: #H destruct -HLK1
- |2,4: * #K0 #V0 #X0 #H #HVX0 #HX0
- lapply (drop_mono … H … HLK1) -H -HLK1 #H destruct
+ [1,3,5: #H destruct -HLK1
+ |2,4,6: * #K #V #X #H #HVX #HX3
+ lapply (drop_mono … H … HLK1) -H -HLK1 #H destruct
]
[ lapply (IH2 … HWl1 … HW12 … HK12) /2 width=1 by fqup_fpbg/ -IH2 #H
- elim (da_inv_sta … H) -H
- elim (IH1 … HWl1 … HVW0 … HW12 … HK12) -IH1 -HVW0 /2 width=1 by fqup_fpbg/ #V2 #HWV2 #HV2
+ elim (da_lstas … H l0) -H
+ elim (IH1 … HWl1 … HVX0 … HW12 … HK12) -IH1 -HVX0 /2 width=1 by fqup_fpbg/ #V2 #HWV2 #HV2
elim (lift_total V2 0 (i+1))
- /3 width=12 by cpcs_lift, lstas_ldec, ex2_intro/
- | elim (IH1 … HVl1 … HVW0 … HV12 … HK12) -IH1 -HVl1 -HVW0 -HV12 -HK12 -IH2 /2 width=1 by fqup_fpbg/ #W2 #HVW2 #HW02
+ /3 width=12 by cpcs_lift, lstas_succ, ex2_intro/
+ | elim (IH1 … HWl1 … HVX0 … HW12 … HK12) -IH1 -HVX0
+ /3 width=5 by fqup_fpbg, lstas_zero, ex2_intro/
+ | elim (IH1 … HVl1 … HVX0 … HV12 … HK12) -IH1 -HVl1 -HVX0 -HV12 -HK12 -IH2 /2 width=1 by fqup_fpbg/ #W2 #HVW2 #HW02
elim (lift_total W2 0 (i+1))
/4 width=12 by cpcs_lift, lstas_ldef, ex2_intro/
- | elim (IH1 … HVl1 … HVW0 … HVX0 … HK12) -IH1 -HVl1 -HVW0 -HVX0 -HK12 -IH2 -V2 /2 width=1 by fqup_fpbg/ -l1 #W2 #HXW2 #HW02
+ | elim (IH1 … HVl1 … HVX0 … HVX … HK12) -IH1 -HVl1 -HVX0 -HVX -HK12 -IH2 -V2 /2 width=1 by fqup_fpbg/ -l1 #W2 #HXW2 #HW02
elim (lift_total W2 0 (i+1))
/3 width=12 by cpcs_lift, lstas_lift, ex2_intro/
]
elim (lstas_inv_bind1 … HT1U) -HT1U #U #HT2U #H destruct
elim (scpds_inv_abst1 … HTU1) -HTU1 #W0 #U0 #HW20 #_ #H destruct -U0 -l0
elim (snv_fwd_da … HW2) #l0 #HW2l
- lapply (scpds_div … W2 … 0 … HVW1) /2 width=3 by cprs_scpds/ -W0 #H21
+ lapply (cprs_scpds_div … HW20 … HW2l … HVW1) -W0 #H21
elim (snv_fwd_da … HV1) #l #HV1l
elim (da_scpes_aux … IH4 IH3 IH2 … HW2l … HV1l … H21) /2 width=1 by fqup_fpbg/ #_ #H
<minus_n_O #H0 destruct >(plus_minus_m_m l 1) in HV1l; // -H #HV1l
lapply (cpcs_cpr_strap1 … HU02 (ⓓ{b}W2.ⓐV2.U2) ?)
/4 width=3 by lstas_appl, lstas_bind, cpr_theta, ex2_intro/
]
-| #W1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 @(nat_ind_plus … l2) -l2 [ #_ | #l2 #_ #Hl21 ] #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2
- [ lapply (lstas_inv_O … H2) -H2 #H destruct -IH1 -H1 -l1 /4 width=5 by lpr_cpcs_conf, cpr_cpcs_dx, ex2_intro/ ]
+| #W1 #T1 #HG0 #HL0 #HT0 #H1 #l1 #l2 #Hl21 #Hl1 #X2 #H2 #X3 #H3 #L2 #HL12 destruct -IH4 -IH3 -IH2
elim (snv_inv_cast … H1) -H1 #U1 #_ #HT1 #_ #_ -U1
lapply (da_inv_flat … Hl1) -Hl1 #Hl1
lapply (lstas_inv_cast1 … H2) -H2 #HTU1
lapply (da_cprs_lpr_aux … IH3 IH2 … HXl … HXT2 L ?)
[1,2,3: /3 width=8 by fpbg_fpbs_trans, lstas_fpbs/ ] #HTl2
elim (le_or_ge l1 l2) #Hl12 >(eq_minus_O … Hl12)
-[ /5 width=3 by scpds_refl, lstas_conf_le, monotonic_le_minus_l, ex4_2_intro, ex2_intro/
-| lapply (lstas_conf_le … HTX … HT1) // #HXT1 -HT1
+[ elim (da_lstas … HTl2 0) #X2 #HTX2 #_ -IH4 -IH3 -IH2 -IH1 -H0 -HT -HTl -HXl
+ /5 width=6 by lstas_scpds, scpds_div, cprs_strap1, lstas_cpr, lstas_conf_le, monotonic_le_minus_l, ex4_2_intro/
+| elim (da_lstas … HTl1 0) #X1 #HTX1 #_
+ lapply (lstas_conf_le … HTX … HT1) // #HXT1 -HT1
elim (lstas_cprs_lpr_aux … IH3 IH2 IH1 … HXl … HXT1 … HXT2 L) -IH3 -IH2 -IH1 -HXl -HXT1 -HXT2
- /3 width=8 by cpcs_scpes, fpbg_fpbs_trans, lstas_fpbs, monotonic_le_minus_l/
+ /4 width=8 by cpcs_scpes, cpcs_cpr_conf, fpbg_fpbs_trans, lstas_fpbs, lstas_cpr, monotonic_le_minus_l/
]
qed-.
∀l11. ⦃G, L⦄ ⊢ T1 ▪[h, g] l11 → ∀l12. ⦃G, L⦄ ⊢ T2 ▪[h, g] l12 →
∀l21,l22,l. l21 + l ≤ l11 → l22 + l ≤ l12 →
⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l21, l22] T2 → ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l21+l, l22+l] T2.
-#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T1 #H01 #HT1 #T2 #H02 #HT2 #l11 #Hl11 #Hl12 #Hl12 #l21 #l22 #l #H1 #H2 * #T0 #HT10 #HT20
-elim (da_inv_sta … Hl11) #X1 #HTX1
-elim (lstas_total … HTX1 (l21+l)) -X1 #X1 #HTX1
-elim (da_inv_sta … Hl12) #X2 #HTX2
-elim (lstas_total … HTX2 (l22+l)) -X2 #X2 #HTX2
+#h #g #G0 #L0 #T0 #IH4 #IH3 #IH2 #IH1 #G #L #T1 #H01 #HT1 #T2 #H02 #HT2 #l11 #Hl11 #Hl12 #Hl12 #l21 #l22 #l #H1 #H2 * #T0 #HT10 #HT20
+elim (da_lstas … Hl11 (l21+l)) #X1 #HTX1 #_
+elim (da_lstas … Hl12 (l22+l)) #X2 #HTX2 #_
lapply (lstas_scpds_aux … IH4 IH3 IH2 IH1 … Hl11 … HTX1 … HT10) -HT10
[1,2,3: // | >eq_minus_O [2: // ] <minus_plus_m_m_commutative #HX1 ]
lapply (lstas_scpds_aux … IH4 IH3 IH2 IH1 … Hl12 … HTX2 … HT20) -HT20
lemma snv_cast_scpes: ∀h,g,G,L,U,T. ⦃G, L⦄ ⊢ U ¡[h, g] → ⦃G, L⦄ ⊢ T ¡[h, g] →
⦃G, L⦄ ⊢ U •*⬌*[h, g, 0, 1] T → ⦃G, L⦄ ⊢ ⓝU.T ¡[h, g].
-#h #g #G #L #U #T #HU #HT * /3 width=3 by snv_cast, scpds_fwd_cprs/
+#h #g #G #L #U #T #HU #HT * /2 width=3 by snv_cast/
qed.
⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l1, l2] T2.
/2 width=3 by ex2_intro/ qed.
-lemma scpes_refl_O_O: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ▪[h, g] l →
- ⦃G, L⦄ ⊢ T •*⬌*[h, g, 0, 0] T.
-/3 width=3 by scpds_refl, scpds_div/ qed.
-
lemma scpes_sym: ∀h,g,G,L,T1,T2,l1,l2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l1, l2] T2 →
⦃G, L⦄ ⊢ T2 •*⬌*[h, g, l2, l1] T1.
#h #g #G #L #T1 #T2 #L1 #l2 * /2 width=3 by scpds_div/
(* Inversion lemmas on parallel equivalence for terms ***********************)
lemma scpes_inv_lstas_eq: ∀h,g,G,L,T1,T2,l1,l2. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l1, l2] T2 →
- ∀U1. ⦃G, L⦄ ⊢ T1 •*[h, l1] U1 →
- ∀U2. ⦃G, L⦄ ⊢ T2 •*[h, l2] U2 → ⦃G, L⦄ ⊢ U1 ⬌* U2.
+ ∀U1. ⦃G, L⦄ ⊢ T1 •*[h, l1] U1 →
+ ∀U2. ⦃G, L⦄ ⊢ T2 •*[h, l2] U2 → ⦃G, L⦄ ⊢ U1 ⬌* U2.
#h #g #G #L #T1 #T2 #l1 #l2 * #T #HT1 #HT2 #U1 #HTU1 #U2 #HTU2
/3 width=8 by scpds_inv_lstas_eq, cprs_div/
qed-.
-(* Properties on parallel equivalence for terms ***********************)
+(* Properties on parallel equivalence for terms *****************************)
lemma cpcs_scpes: ∀h,g,G,L,T1,l11. ⦃G, L⦄ ⊢ T1 ▪[h, g] l11 →
∀U1,l12. l12 ≤ l11 → ⦃G, L⦄ ⊢ T1 •*[h, l12] U1 →
lemma scpes_refl: ∀h,g,G,L,T,l1,l2. l2 ≤ l1 → ⦃G, L⦄ ⊢ T ▪[h, g] l1 →
⦃G, L⦄ ⊢ T •*⬌*[h, g, l2, l2] T.
#h #g #G #L #T #l1 #l2 #Hl21 #Hl1
-elim (da_inv_sta … Hl1) #U #HTU
-elim (lstas_total … HTU l2) -U /3 width=3 by scpds_div, lstas_scpds/
+elim (da_lstas … Hl1 … l2) #U #HTU #_
+/3 width=3 by scpds_div, lstas_scpds/
qed.
lemma lstas_scpes_trans: ∀h,g,G,L,T1,l0,l1. ⦃G, L⦄ ⊢ T1 ▪[h, g] l0 → l1 ≤ l0 →
#h #g #G #L #T1 #l0 #l1 #Hl0 #Hl10 #T #HT1 #T2 #l #l2 *
/3 width=3 by scpds_div, lstas_scpds_trans/ qed-.
+(* Properties on parallel computation for terms *****************************)
+
+lemma cprs_scpds_div: ∀h,g,G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡* T →
+ ∀l. ⦃G, L⦄ ⊢ T1 ▪[h, g] l →
+ ∀T2,l2. ⦃G, L⦄ ⊢ T2 •*➡*[h, g, l2] T →
+ ⦃G, L⦄⊢ T1 •*⬌*[h, g, 0, l2] T2.
+#h #g #G #L #T1 #T #HT1 #l #Hl elim (da_lstas … Hl 0)
+#X1 #HTX1 #_ elim (cprs_strip … HT1 X1) -HT1
+/3 width=5 by scpds_strap1, scpds_div, lstas_cpr, ex4_2_intro/
+qed.
+
(* Main properties **********************************************************)
theorem scpes_trans: ∀h,g,G,L,T1,T,l1,l. ⦃G, L⦄ ⊢ T1 •*⬌*[h, g, l1, l] T →
(**************************************************************************)
include "basic_2/notation/relations/pred_4.ma".
-include "basic_2/grammar/genv.ma".
include "basic_2/static/lsubr.ma".
include "basic_2/unfold/lstas.ma".
| #G #L #K #V1 #V2 #i #_ #_ #_ #H destruct
| #G #L #K #V1 #V2 #W2 #i #l2 #HLK #HV12 #HVW2 #_ #H0 #H
lapply (discr_plus_xy_y … H0) -H0 #H0 destruct
- elim (da_inv_lref … H) -H * #K0 #V0 [| #l1 ] #HLK0
+ elim (da_inv_lref … H) -H * #K0 #V0 [| #l0 ] #HLK0
lapply (drop_mono … HLK0 … HLK) -HLK0 #H destruct
/4 width=7 by cpx_delta, cpr_cpx, lstas_cpr/
| /4 width=2 by cpx_bind, da_inv_bind/
</news>
<subsection>Stage "A": "Weakening the Applicability Condition"</subsection>
+ <news date="2014 September 9.">
+ Interated static type assignment defined (more elegantly)
+ as a primitive notion.
+ </news>
<news date="2014 June 18.">
Preservation of stratified native validity
for context-sensitive computation on terms.
}
]
[ { "stratified native validity" * } {
- [ "shnv ( ⦃?,?⦄ ⊢ ? ¡[?,?,?] )" "shnv_aaa" * ]
+ [ "shnv ( ⦃?,?⦄ ⊢ ? ¡[?,?,?] )" * ]
[ "snv ( ⦃?,?⦄ ⊢ ? ¡[?,?] )" "snv_lift" + "snv_aaa" + "snv_da_lpr" + "snv_lstas" + "snv_lstas_lpr" + "snv_lpr" + "snv_scpes" + "snv_preserve" * ]
}
]
}
]
[ { "iterated static type assignment" * } {
- [ "lstas ( ⦃?,?⦄ ⊢ ? •*[?,?] ? )" "lstas_alt ( ⦃?,?⦄ ⊢ ? ••*[?,?] ? )" "lstas_lift" + "lstas_aaa" + "lstas_da" + "lstas_lstas" * ]
+ [ "lstas ( ⦃?,?⦄ ⊢ ? •*[?,?] ? )" "lstas_lift" + "lstas_llpx_sn.ma" + "lstas_aaa" + "lstas_da" + "lstas_lstas" * ]
}
]
}
}
]
[ { "degree assignment" * } {
- [ "da ( ⦃?,?⦄ ⊢ ? ▪[?,?] ? )" "da_lift" + "da_aaa" + "da_sta" + "da_da" * ]
- }
- ]
- [ { "static type assignment" * } {
- [ "sta ( ⦃?,?⦄ ⊢ ? •[?] ? )" "sta_lift" + "sta_lpx_sn" + "sta_aaa" + "sta_sta" * ]
+ [ "da ( ⦃?,?⦄ ⊢ ? ▪[?,?] ? )" "da_lift" + "da_aaa" + "da_da" * ]
}
]
[ { "parameters" * } {