(* Main properties **********************************************************)
-theorem flift_lift: â\88\80T,d,e. â\87§[d, e] T ≡ ↑[d, e] T.
+theorem flift_lift: â\88\80T,d,e. â¬\86[d, e] T ≡ ↑[d, e] T.
#T elim T -T
[ * #i #d #e //
elim (lt_or_eq_or_gt i d) #Hid normalize
(* Main inversion properties ************************************************)
-theorem flift_inv_lift: â\88\80d,e,T1,T2. â\87§[d, e] T1 ≡ T2 → ↑[d, e] T1 = T2.
+theorem flift_inv_lift: â\88\80d,e,T1,T2. â¬\86[d, e] T1 ≡ T2 → ↑[d, e] T1 = T2.
#d #e #T1 #T2 #H elim H -d -e -T1 -T2 normalize //
[ #i #d #e #Hid >(tri_lt ?????? Hid) //
| #i #d #e #Hid
(* Derived properties *******************************************************)
-lemma flift_join: â\88\80e1,e2,T. â\87§[e1, e2] ↑[0, e1] T ≡ ↑[0, e1 + e2] T.
+lemma flift_join: â\88\80e1,e2,T. â¬\86[e1, e2] ↑[0, e1] T ≡ ↑[0, e1 + e2] T.
#e1 #e2 #T
lapply (flift_lift T 0 (e1+e2)) #H
elim (lift_split … H e1 e1) -H // #U #H
/3 width=3 by cprs_strap1, cpr_cprs, cpr_pair_sn, cpr_flat/
qed.
-lemma cprs_zeta: â\88\80G,L,V,T1,T,T2. â\87§[0, 1] T2 ≡ T →
+lemma cprs_zeta: â\88\80G,L,V,T1,T,T2. â¬\86[0, 1] T2 ≡ T →
⦃G, L.ⓓV⦄ ⊢ T1 ➡* T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡* T2.
#G #L #V #T1 #T #T2 #HT2 #H @(cprs_ind_dx … H) -T1
/3 width=3 by cprs_strap2, cpr_cprs, cpr_bind, cpr_zeta/
qed.
lemma cprs_theta_dx: ∀a,G,L,V1,V,V2,W1,W2,T1,T2.
- â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V â\86\92 â\87§[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 →
+ â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V â\86\92 â¬\86[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 →
⦃G, L⦄ ⊢ W1 ➡ W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2.
#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2
/4 width=9 by cprs_strap1, cpr_cprs, cprs_bind_dx, cprs_flat_dx, cpr_theta/
qed.
theorem cprs_theta_rc: ∀a,G,L,V1,V,V2,W1,W2,T1,T2.
- â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V â\86\92 â\87§[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 →
+ â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V â\86\92 â¬\86[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 →
⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2.
#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cprs_ind … H) -W2
/3 width=5 by cprs_trans, cprs_theta_dx, cprs_bind_dx/
qed.
theorem cprs_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2.
- â\87§[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 →
+ â¬\86[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡* W2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡* T2 →
⦃G, L⦄ ⊢ V1 ➡* V → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡* ⓓ{a}W2.ⓐV2.T2.
#a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(cprs_ind_dx … H) -V1
/3 width=3 by cprs_trans, cprs_theta_rc, cprs_flat_dx/
U2 = ⓐV2. T2
| ∃∃a,W,T. ⦃G, L⦄ ⊢ T1 ➡* ⓛ{a}W.T &
⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V1.T ➡* U2
- | â\88\83â\88\83a,V0,V2,V,T. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡* V0 & â\87§[0,1] V0 ≡ V2 &
+ | â\88\83â\88\83a,V0,V2,V,T. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡* V0 & â¬\86[0,1] V0 ≡ V2 &
⦃G, L⦄ ⊢ T1 ➡* ⓓ{a}V.T &
⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡* U2.
#G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by or3_intro0, ex3_2_intro/
(* Note: apparently this was missing in basic_1 *)
lemma cprs_delta: ∀G,L,K,V,V2,i.
- â\87©[i] L ≡ K.ⓓV → ⦃G, K⦄ ⊢ V ➡* V2 →
- â\88\80W2. â\87§[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡* W2.
+ â¬\87[i] L ≡ K.ⓓV → ⦃G, K⦄ ⊢ V ➡* V2 →
+ â\88\80W2. â¬\86[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡* W2.
#G #L #K #V #V2 #i #HLK #H elim H -V2 [ /3 width=6 by cpr_cprs, cpr_delta/ ]
#V1 #V2 #_ #HV12 #IHV1 #W2 #HVW2
lapply (drop_fwd_drop2 … HLK) -HLK #HLK
(* Basic_1: was: pr3_gen_lref *)
lemma cprs_inv_lref1: ∀G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡* T2 →
T2 = #i ∨
- â\88\83â\88\83K,V1,T1. â\87©[i] L ≡ K.ⓓV1 & ⦃G, K⦄ ⊢ V1 ➡* T1 &
- â\87§[0, i + 1] T1 ≡ T2.
+ â\88\83â\88\83K,V1,T1. â¬\87[i] L ≡ K.ⓓV1 & ⦃G, K⦄ ⊢ V1 ➡* T1 &
+ â¬\86[0, i + 1] T1 ≡ T2.
#G #L #T2 #i #H @(cprs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
[ #H destruct
/3 width=3 by cpxs_strap1, cpx_pair_sn/
qed.
-lemma cpxs_zeta: â\88\80h,g,G,L,V,T1,T,T2. â\87§[0, 1] T2 ≡ T →
+lemma cpxs_zeta: â\88\80h,g,G,L,V,T1,T,T2. â¬\86[0, 1] T2 ≡ T →
⦃G, L.ⓓV⦄ ⊢ T1 ➡*[h, g] T → ⦃G, L⦄ ⊢ +ⓓV.T1 ➡*[h, g] T2.
#h #g #G #L #V #T1 #T #T2 #HT2 #H @(cpxs_ind_dx … H) -T1
/3 width=3 by cpxs_strap2, cpx_cpxs, cpx_bind, cpx_zeta/
qed.
lemma cpxs_theta_dx: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2.
- â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V â\86\92 â\87§[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 →
+ â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V â\86\92 â¬\86[0, 1] V ≡ V2 → ⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 →
⦃G, L⦄ ⊢ W1 ➡[h, g] W2 → ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2.
#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2
/4 width=9 by cpx_cpxs, cpxs_strap1, cpxs_bind_dx, cpxs_flat_dx, cpx_theta/
qed.
theorem cpxs_theta_rc: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2.
- â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V â\86\92 â\87§[0, 1] V ≡ V2 →
+ â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V â\86\92 â¬\86[0, 1] V ≡ V2 →
⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 →
⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2.
#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cpxs_ind … H) -W2
qed.
theorem cpxs_theta: ∀h,g,a,G,L,V1,V,V2,W1,W2,T1,T2.
- â\87§[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 →
+ â¬\86[0, 1] V ≡ V2 → ⦃G, L⦄ ⊢ W1 ➡*[h, g] W2 →
⦃G, L.ⓓW1⦄ ⊢ T1 ➡*[h, g] T2 → ⦃G, L⦄ ⊢ V1 ➡*[h, g] V →
⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}W1.T1 ➡*[h, g] ⓓ{a}W2.ⓐV2.T2.
#h #g #a #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(TC_ind_dx … V1 H) -V1
∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L⦄ ⊢ T1 ➡*[h, g] T2 &
U2 = ⓐV2. T2
| ∃∃a,W,T. ⦃G, L⦄ ⊢ T1 ➡*[h, g] ⓛ{a}W.T & ⦃G, L⦄ ⊢ ⓓ{a}ⓝW.V1.T ➡*[h, g] U2
- | â\88\83â\88\83a,V0,V2,V,T. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡*[h, g] V0 & â\87§[0,1] V0 ≡ V2 &
+ | â\88\83â\88\83a,V0,V2,V,T. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡*[h, g] V0 & â¬\86[0,1] V0 ≡ V2 &
⦃G, L⦄ ⊢ T1 ➡*[h, g] ⓓ{a}V.T & ⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U2.
#h #g #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 [ /3 width=5 by or3_intro0, ex3_2_intro/ ]
#U #U2 #_ #HU2 * *
(* Advanced properties ******************************************************)
lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i.
- â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 →
- â\88\80W2. â\87§[0, i+1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2.
+ â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 →
+ â\88\80W2. â¬\86[0, i+1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2.
#h #g #I #G #L #K #V #V2 #i #HLK #H elim H -V2
[ /3 width=9 by cpx_cpxs, cpx_delta/
| #V1 lapply (drop_fwd_drop2 … HLK) -HLK
lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 →
T2 = #i ∨
- â\88\83â\88\83I,K,V1,T1. â\87©[i] L ≡ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ➡*[h, g] T1 &
- â\87§[0, i+1] T1 ≡ T2.
+ â\88\83â\88\83I,K,V1,T1. â¬\87[i] L ≡ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ➡*[h, g] T1 &
+ â¬\86[0, i+1] T1 ≡ T2.
#h #g #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
[ #H destruct
qed-.
(* Note: probably this is an inversion lemma *)
-lemma cpxs_fwd_delta: â\88\80h,g,I,G,L,K,V1,i. â\87©[i] L ≡ K.ⓑ{I}V1 →
- â\88\80V2. â\87§[0, i + 1] V1 ≡ V2 →
+lemma cpxs_fwd_delta: â\88\80h,g,I,G,L,K,V1,i. â¬\87[i] L ≡ K.ⓑ{I}V1 →
+ â\88\80V2. â¬\86[0, i + 1] V1 ≡ V2 →
∀U. ⦃G, L⦄ ⊢ #i ➡*[h, g] U →
#i ≂ U ∨ ⦃G, L⦄ ⊢ V2 ➡*[h, g] U.
#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H
qed-.
lemma cpxs_fwd_theta: ∀h,g,a,G,L,V1,V,T,U. ⦃G, L⦄ ⊢ ⓐV1.ⓓ{a}V.T ➡*[h, g] U →
- â\88\80V2. â\87§[0, 1] V1 ≡ V2 → ⓐV1.ⓓ{a}V.T ≂ U ∨
+ â\88\80V2. â¬\86[0, 1] V1 ≡ V2 → ⓐV1.ⓓ{a}V.T ≂ U ∨
⦃G, L⦄ ⊢ ⓓ{a}V.ⓐV2.T ➡*[h, g] U.
#h #g #a #G #L #V1 #V #T #U #H #V2 #HV12
elim (cpxs_inv_appl1 … H) -H *
]
qed-.
-lemma cpxs_fwd_delta_vector: â\88\80h,g,I,G,L,K,V1,i. â\87©[i] L ≡ K.ⓑ{I}V1 →
- â\88\80V2. â\87§[0, i + 1] V1 ≡ V2 →
+lemma cpxs_fwd_delta_vector: â\88\80h,g,I,G,L,K,V1,i. â¬\87[i] L ≡ K.ⓑ{I}V1 →
+ â\88\80V2. â¬\86[0, i + 1] V1 ≡ V2 →
∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ➡*[h, g] U →
ⒶVs.#i ≂ U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ➡*[h, g] U.
#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta/
qed-.
(* Basic_1: was just: pr3_iso_appls_abbr *)
-lemma cpxs_fwd_theta_vector: â\88\80h,g,G,L,V1s,V2s. â\87§[0, 1] V1s ≡ V2s →
+lemma cpxs_fwd_theta_vector: â\88\80h,g,G,L,V1s,V2s. â¬\86[0, 1] V1s ≡ V2s →
∀a,V,T,U. ⦃G, L⦄ ⊢ ⒶV1s.ⓓ{a}V.T ➡*[h, g] U →
ⒶV1s. ⓓ{a}V. T ≂ U ∨ ⦃G, L⦄ ⊢ ⓓ{a}V.ⒶV2s.T ➡*[h, g] U.
#h #g #G #L #V1s #V2s * -V1s -V2s /3 width=1 by or_intror/
(* Basic_1: was just: sn3_lift *)
lemma csx_lift: ∀h,g,G,L2,L1,T1,s,d,e. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 →
- â\88\80T2. â\87©[s, d, e] L2 â\89¡ L1 â\86\92 â\87§[d, e] T1 ≡ T2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2.
+ â\88\80T2. â¬\87[s, d, e] L2 â\89¡ L1 â\86\92 â¬\86[d, e] T1 ≡ T2 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2.
#h #g #G #L2 #L1 #T1 #s #d #e #H elim H -T1 #T1 #_ #IHT1 #T2 #HL21 #HT12
@csx_intro #T #HLT2 #HT2
elim (cpx_inv_lift1 … HLT2 … HL21 … HT12) -HLT2 #T0 #HT0 #HLT10
(* Basic_1: was just: sn3_gen_lift *)
lemma csx_inv_lift: ∀h,g,G,L2,L1,T1,s,d,e. ⦃G, L1⦄ ⊢ ⬊*[h, g] T1 →
- â\88\80T2. â\87©[s, d, e] L1 â\89¡ L2 â\86\92 â\87§[d, e] T2 ≡ T1 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2.
+ â\88\80T2. â¬\87[s, d, e] L1 â\89¡ L2 â\86\92 â¬\86[d, e] T2 ≡ T1 → ⦃G, L2⦄ ⊢ ⬊*[h, g] T2.
#h #g #G #L2 #L1 #T1 #s #d #e #H elim H -T1 #T1 #_ #IHT1 #T2 #HL12 #HT21
@csx_intro #T #HLT2 #HT2
elim (lift_total T d e) #T0 #HT0
(* Advanced inversion lemmas ************************************************)
(* Basic_1: was: sn3_gen_def *)
-lemma csx_inv_lref_bind: â\88\80h,g,I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V →
+lemma csx_inv_lref_bind: â\88\80h,g,I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V →
⦃G, L⦄ ⊢ ⬊*[h, g] #i → ⦃G, K⦄ ⊢ ⬊*[h, g] V.
#h #g #I #G #L #K #V #i #HLK #Hi
elim (lift_total V 0 (i+1))
(* Advanced properties ******************************************************)
(* Basic_1: was just: sn3_abbr *)
-lemma csx_lref_bind: â\88\80h,g,I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ ⬊*[h, g] V → ⦃G, L⦄ ⊢ ⬊*[h, g] #i.
+lemma csx_lref_bind: â\88\80h,g,I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ ⬊*[h, g] V → ⦃G, L⦄ ⊢ ⬊*[h, g] #i.
#h #g #I #G #L #K #V #i #HLK #HV
@csx_intro #X #H #Hi
elim (cpx_inv_lref1 … H) -H
lemma csx_appl_beta: ∀h,g,a,G,L,V,W,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}ⓝW.V.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV.ⓛ{a}W.T.
/2 width=3 by csx_appl_beta_aux/ qed.
-fact csx_appl_theta_aux: â\88\80h,g,a,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â¬\8a*[h, g] U â\86\92 â\88\80V1,V2. â\87§[0, 1] V1 ≡ V2 →
+fact csx_appl_theta_aux: â\88\80h,g,a,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â¬\8a*[h, g] U â\86\92 â\88\80V1,V2. â¬\86[0, 1] V1 ≡ V2 →
∀V,T. U = ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T.
#h #g #a #G #L #X #H @(csx_ind_alt … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
lapply (csx_fwd_pair_sn … HVT) #HV
]
qed-.
-lemma csx_appl_theta: â\88\80h,g,a,V1,V2. â\87§[0, 1] V1 ≡ V2 →
+lemma csx_appl_theta: â\88\80h,g,a,V1,V2. â¬\86[0, 1] V1 ≡ V2 →
∀G,L,V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⓐV2.T → ⦃G, L⦄ ⊢ ⬊*[h, g] ⓐV1.ⓓ{a}V.T.
/2 width=5 by csx_appl_theta_aux/ qed.
]
qed.
-lemma csx_applv_delta: â\88\80h,g,I,G,L,K,V1,i. â\87©[i] L ≡ K.ⓑ{I}V1 →
- â\88\80V2. â\87§[0, i + 1] V1 ≡ V2 →
+lemma csx_applv_delta: â\88\80h,g,I,G,L,K,V1,i. â¬\87[i] L ≡ K.ⓑ{I}V1 →
+ â\88\80V2. â¬\86[0, i + 1] V1 ≡ V2 →
∀Vs. ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.V2) → ⦃G, L⦄ ⊢ ⬊*[h, g] (ⒶVs.#i).
#h #g #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
[ /4 width=12 by csx_inv_lift, csx_lref_bind, drop_fwd_drop2/
qed.
(* Basic_1: was just: sn3_appls_abbr *)
-lemma csx_applv_theta: â\88\80h,g,a,G,L,V1s,V2s. â\87§[0, 1] V1s ≡ V2s →
+lemma csx_applv_theta: â\88\80h,g,a,G,L,V1s,V2s. â¬\86[0, 1] V1s ≡ V2s →
∀V,T. ⦃G, L⦄ ⊢ ⬊*[h, g] ⓓ{a}V.ⒶV2s.T →
⦃G, L⦄ ⊢ ⬊*[h, g] ⒶV1s.ⓓ{a}V.T.
#h #g #a #G #L #V1s #V2s * -V1s -V2s /2 width=1 by/
(* Basic_1: was: sc3_arity_csubc *)
theorem acr_aaa_csubc_lifts: ∀RR,RS,RP.
gcp RR RS RP → gcr RR RS RP RP →
- â\88\80G,L1,T,A. â¦\83G, L1â¦\84 â\8a¢ T â\81\9d A â\86\92 â\88\80L0,des. â\87©*[Ⓕ, des] L0 ≡ L1 →
- â\88\80T0. â\87§*[des] T ≡ T0 → ∀L2. G ⊢ L2 ⫃[RP] L0 →
+ â\88\80G,L1,T,A. â¦\83G, L1â¦\84 â\8a¢ T â\81\9d A â\86\92 â\88\80L0,des. â¬\87*[Ⓕ, des] L0 ≡ L1 →
+ â\88\80T0. â¬\86*[des] T ≡ T0 → ∀L2. G ⊢ L2 ⫃[RP] L0 →
⦃G, L2, T0⦄ ϵ[RP] 〚A〛.
#RR #RS #RP #H1RP #H2RP #G #L1 #T #A #H elim H -G -L1 -T -A
[ #G #L #k #L0 #des #HL0 #X #H #L2 #HL20
∀G,L,Vs. all … (RP G L) Vs → ∀k. C G L (ⒶVs.⋆k).
definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i.
- C G L (â\92¶Vs.V2) â\86\92 â\87§[0, i+1] V1 ≡ V2 →
- â\87©[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i).
+ C G L (â\92¶Vs.V2) â\86\92 â¬\86[0, i+1] V1 ≡ V2 →
+ â¬\87[i] L ≡ K.ⓑ{I}V1 → C G L (ⒶVs.#i).
definition S6 ≝ λRP,C:candidate.
- â\88\80G,L,V1s,V2s. â\87§[0, 1] V1s ≡ V2s →
+ â\88\80G,L,V1s,V2s. â¬\86[0, 1] V1s ≡ V2s →
∀a,V,T. C G (L.ⓓV) (ⒶV2s.T) → RP G L V → C G L (ⒶV1s.ⓓ{a}V.T).
definition S7 ≝ λC:candidate.
(* the functional construction for candidates *)
definition cfun: candidate → candidate → candidate ≝
λC1,C2,G,K,T. ∀L,W,U,des.
- â\87©*[â\92», des] L â\89¡ K â\86\92 â\87§*[des] T ≡ U → C1 G L W → C2 G L (ⓐW.U).
+ â¬\87*[â\92», des] L â\89¡ K â\86\92 â¬\86*[des] T ≡ U → C1 G L W → C2 G L (ⓐW.U).
(* the reducibility candidate associated to an atomic arity *)
let rec acr (RP:candidate) (A:aarity) on A: candidate ≝
lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
∀a,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → (
- â\88\80L0,V0,W0,T0,des. â\87©*[â\92», des] L0 â\89¡ L â\86\92 â\87§*[des] W â\89¡ W0 â\86\92 â\87§*[des + 1] T ≡ T0 →
+ â\88\80L0,V0,W0,T0,des. â¬\87*[â\92», des] L0 â\89¡ L â\86\92 â¬\86*[des] W â\89¡ W0 â\86\92 â¬\86*[des + 1] T ≡ T0 →
⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛
) →
⦃G, L, ⓛ{a}W.T⦄ ϵ[RP] 〚②B.A〛.
qed.
lemma lcosx_drop_trans_lt: ∀h,g,G,L,d. G ⊢ ~⬊*[h, g, d] L →
- â\88\80I,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → i < d →
+ â\88\80I,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → i < d →
G ⊢ ~⬊*[h, g, ⫰(d-i)] K ∧ G ⊢ ⬊*[h, g, V, ⫰(d-i)] K.
#h #g #G #L #d #H elim H -L -d
[ #d #J #K #V #i #H elim (drop_inv_atom1 … H) -H #H destruct
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡* V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡* T2 &
U2 = ⓓ{a}V2.T2
) ∨
- â\88\83â\88\83T2. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡* T2 & â\87§[0, 1] U2 ≡ T2 & a = true.
+ â\88\83â\88\83T2. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡* T2 & â¬\86[0, 1] U2 ≡ T2 & a = true.
#a #G #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/
#U0 #U2 #_ #HU02 * *
[ #V0 #T0 #HV10 #HT10 #H destruct
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡*[h, g] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡*[h, g] T2 &
U2 = ⓓ{a}V2.T2
) ∨
- â\88\83â\88\83T2. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡*[h, g] T2 & â\87§[0, 1] U2 ≡ T2 & a = true.
+ â\88\83â\88\83T2. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡*[h, g] T2 & â¬\86[0, 1] U2 ≡ T2 & a = true.
#h #g #a #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/
#U0 #U2 #_ #HU02 * *
[ #V0 #T0 #HV10 #HT10 #H destruct
(* Basic_1: was: csubc_drop_conf_O *)
(* Note: the constant 0 can not be generalized *)
-lemma lsubc_drop_O1_trans: â\88\80RP,G,L1,L2. G â\8a¢ L1 â«\83[RP] L2 â\86\92 â\88\80K2,s,e. â\87©[s, 0, e] L2 ≡ K2 →
- â\88\83â\88\83K1. â\87©[s, 0, e] L1 ≡ K1 & G ⊢ K1 ⫃[RP] K2.
+lemma lsubc_drop_O1_trans: â\88\80RP,G,L1,L2. G â\8a¢ L1 â«\83[RP] L2 â\86\92 â\88\80K2,s,e. â¬\87[s, 0, e] L2 ≡ K2 →
+ â\88\83â\88\83K1. â¬\87[s, 0, e] L1 ≡ K1 & G ⊢ K1 ⫃[RP] K2.
#RP #G #L1 #L2 #H elim H -L1 -L2
[ #X #s #e #H elim (drop_inv_atom1 … H) -H /4 width=3 by drop_atom, ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #X #s #e #H
(* Basic_1: was: csubc_drop_conf_rev *)
lemma drop_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP →
- â\88\80G,L1,K1,d,e. â\87©[Ⓕ, d, e] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 →
- â\88\83â\88\83L2. G â\8a¢ L1 â«\83[RP] L2 & â\87©[Ⓕ, d, e] L2 ≡ K2.
+ â\88\80G,L1,K1,d,e. â¬\87[Ⓕ, d, e] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 →
+ â\88\83â\88\83L2. G â\8a¢ L1 â«\83[RP] L2 & â¬\87[Ⓕ, d, e] L2 ≡ K2.
#RR #RS #RP #Hgcp #G #L1 #K1 #d #e #H elim H -L1 -K1 -d -e
[ #d #e #He #X #H elim (lsubc_inv_atom1 … H) -H
>He /2 width=3 by ex2_intro/
(* Basic_1: was: csubc_drop1_conf_rev *)
lemma drops_lsubc_trans: ∀RR,RS,RP. gcp RR RS RP →
- â\88\80G,L1,K1,des. â\87©*[Ⓕ, des] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 →
- â\88\83â\88\83L2. G â\8a¢ L1 â«\83[RP] L2 & â\87©*[Ⓕ, des] L2 ≡ K2.
+ â\88\80G,L1,K1,des. â¬\87*[Ⓕ, des] L1 ≡ K1 → ∀K2. G ⊢ K1 ⫃[RP] K2 →
+ â\88\83â\88\83L2. G â\8a¢ L1 â«\83[RP] L2 & â¬\87*[Ⓕ, des] L2 ≡ K2.
#RR #RS #RP #Hgcp #G #L1 #K1 #des #H elim H -L1 -K1 -des
[ /2 width=3 by drops_nil, ex2_intro/
| #L1 #L #K1 #des #d #e #_ #HLK1 #IHL #K2 #HK12
qed.
lemma lsx_ge_up: ∀h,g,G,L,T,U,dt,d,e. dt ≤ yinj d + yinj e →
- â\87§[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L → G ⊢ ⬊*[h, g, U, d] L.
+ â¬\86[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L → G ⊢ ⬊*[h, g, U, d] L.
#h #g #G #L #T #U #dt #d #e #Hdtde #HTU #H @(lsx_ind … H) -L
/5 width=7 by lsx_intro, lleq_ge_up/
qed-.
lemma lsx_lref_be_lpxs: ∀h,g,I,G,K1,V,i,d. d ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, g] V →
∀K2. G ⊢ ⬊*[h, g, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, g] K2 →
- â\88\80L2. â\87©[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, d] L2.
+ â\88\80L2. â¬\87[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, d] L2.
#h #g #I #G #K1 #V #i #d #Hdi #H @(csx_ind_alt … H) -V
#V0 #_ #IHV0 #K2 #H @(lsx_ind … H) -K2
#K0 #HK0 #IHK0 #HK10 #L0 #HLK0 @lsx_intro
lemma lsx_lref_be: ∀h,g,I,G,K,V,i,d. d ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, g] V →
G ⊢ ⬊*[h, g, V, 0] K →
- â\88\80L. â\87©[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, d] L.
+ â\88\80L. â¬\87[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, #i, d] L.
/2 width=8 by lsx_lref_be_lpxs/ qed.
(* Main properties **********************************************************)
(* Advanced forward lemmas **************************************************)
lemma lsx_fwd_lref_be: ∀h,g,I,G,L,d,i. d ≤ yinj i → G ⊢ ⬊*[h, g, #i, d] L →
- â\88\80K,V. â\87©[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, V, 0] K.
+ â\88\80K,V. â¬\87[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, g, V, 0] K.
#h #g #I #G #L #d #i #Hdi #H @(lsx_ind … H) -L
#L1 #_ #IHL1 #K1 #V #HLK1 @lsx_intro
#K2 #HK12 #HnK12 lapply (drop_fwd_drop2 … HLK1)
(* Properties on relocation *************************************************)
lemma lsx_lift_le: ∀h,g,G,K,T,U,dt,d,e. dt ≤ yinj d →
- â\87§[d, e] T ≡ U → G ⊢ ⬊*[h, g, T, dt] K →
- â\88\80L. â\87©[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, U, dt] L.
+ â¬\86[d, e] T ≡ U → G ⊢ ⬊*[h, g, T, dt] K →
+ â\88\80L. â¬\87[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, U, dt] L.
#h #g #G #K #T #U #dt #d #e #Hdtd #HTU #H @(lsx_ind … H) -K
#K1 #_ #IHK1 #L1 #HLK1 @lsx_intro
#L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12
qed-.
lemma lsx_lift_ge: ∀h,g,G,K,T,U,dt,d,e. yinj d ≤ dt →
- â\87§[d, e] T ≡ U → G ⊢ ⬊*[h, g, T, dt] K →
- â\88\80L. â\87©[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, U, dt + e] L.
+ â¬\86[d, e] T ≡ U → G ⊢ ⬊*[h, g, T, dt] K →
+ â\88\80L. â¬\87[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, U, dt + e] L.
#h #g #G #K #T #U #dt #d #e #Hddt #HTU #H @(lsx_ind … H) -K
#K1 #_ #IHK1 #L1 #HLK1 @lsx_intro
#L2 #HL12 #HnU elim (lpx_drop_conf … HLK1 … HL12) -HL12
(* Inversion lemmas on relocation *******************************************)
lemma lsx_inv_lift_le: ∀h,g,G,L,T,U,dt,d,e. dt ≤ yinj d →
- â\87§[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L →
- â\88\80K. â\87©[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, T, dt] K.
+ â¬\86[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L →
+ â\88\80K. â¬\87[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, T, dt] K.
#h #g #G #L #T #U #dt #d #e #Hdtd #HTU #H @(lsx_ind … H) -L
#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro
#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12
qed-.
lemma lsx_inv_lift_be: ∀h,g,G,L,T,U,dt,d,e. yinj d ≤ dt → dt ≤ d + e →
- â\87§[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L →
- â\88\80K. â\87©[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, T, d] K.
+ â¬\86[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L →
+ â\88\80K. â¬\87[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, T, d] K.
#h #g #G #L #T #U #dt #d #e #Hddt #Hdtde #HTU #H @(lsx_ind … H) -L
#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro
#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12
qed-.
lemma lsx_inv_lift_ge: ∀h,g,G,L,T,U,dt,d,e. yinj d + yinj e ≤ dt →
- â\87§[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L →
- â\88\80K. â\87©[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, T, dt-e] K.
+ â¬\86[d, e] T ≡ U → G ⊢ ⬊*[h, g, U, dt] L →
+ â\88\80K. â¬\87[Ⓕ, d, e] L ≡ K → G ⊢ ⬊*[h, g, T, dt-e] K.
#h #g #G #L #T #U #dt #d #e #Hdedt #HTU #H @(lsx_ind … H) -L
#L1 #_ #IHL1 #K1 #HLK1 @lsx_intro
#K2 #HK12 #HnT elim (drop_lpx_trans … HLK1 … HK12) -HK12
qed-.
lemma scpds_inv_abbr_abst: ∀h,g,a1,a2,G,L,V1,W2,T1,T2,l. ⦃G, L⦄ ⊢ ⓓ{a1}V1.T1 •*➡*[h, g, l] ⓛ{a2}W2.T2 →
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\80¢*â\9e¡*[h, g, l] T & â\87§[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true.
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\80¢*â\9e¡*[h, g, l] T & â¬\86[0, 1] ⓛ{a2}W2.T2 ≡ T & a1 = true.
#h #g #a1 #a2 #G #L #V1 #W2 #T1 #T2 #l2 * #X #l1 #Hl21 #Hl1 #H1 #H2
lapply (da_inv_bind … Hl1) -Hl1 #Hl1
elim (lstas_inv_bind1 … H1) -H1 #U1 #HTU1 #H destruct
(* Note: the constant 0 cannot be generalized *)
lemma lsubsv_drop_O1_conf: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 →
- â\88\80K1,s,e. â\87©[s, 0, e] L1 ≡ K1 →
- â\88\83â\88\83K2. G â\8a¢ K1 â«\83¡[h, g] K2 & â\87©[s, 0, e] L2 ≡ K2.
+ â\88\80K1,s,e. â¬\87[s, 0, e] L1 ≡ K1 →
+ â\88\83â\88\83K2. G â\8a¢ K1 â«\83¡[h, g] K2 & â¬\87[s, 0, e] L2 ≡ K2.
#h #g #G #L1 #L2 #H elim H -L1 -L2
[ /2 width=3 by ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #K1 #s #e #H
(* Note: the constant 0 cannot be generalized *)
lemma lsubsv_drop_O1_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃¡[h, g] L2 →
- â\88\80K2,s, e. â\87©[s, 0, e] L2 ≡ K2 →
- â\88\83â\88\83K1. G â\8a¢ K1 â«\83¡[h, g] K2 & â\87©[s, 0, e] L1 ≡ K1.
+ â\88\80K2,s, e. â¬\87[s, 0, e] L2 ≡ K2 →
+ â\88\83â\88\83K1. G â\8a¢ K1 â«\83¡[h, g] K2 & â¬\87[s, 0, e] L1 ≡ K1.
#h #g #G #L1 #L2 #H elim H -L1 -L2
[ /2 width=3 by ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #K2 #s #e #H
(* activate genv *)
inductive snv (h) (g): relation3 genv lenv term ≝
| snv_sort: ∀G,L,k. snv h g G L (⋆k)
-| snv_lref: â\88\80I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → snv h g G K V → snv h g G L (#i)
+| snv_lref: â\88\80I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → snv h g G K V → snv h g G L (#i)
| snv_bind: ∀a,I,G,L,V,T. snv h g G L V → snv h g G (L.ⓑ{I}V) T → snv h g G L (ⓑ{a,I}V.T)
| 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)
(* Basic inversion lemmas ***************************************************)
fact snv_inv_lref_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀i. X = #i →
- â\88\83â\88\83I,K,V. â\87©[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g].
+ â\88\83â\88\83I,K,V. â¬\87[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g].
#h #g #G #L #X * -G -L -X
[ #G #L #k #i #H destruct
| #I #G #L #K #V #i0 #HLK #HV #i #H destruct /2 width=5 by ex2_3_intro/
qed-.
lemma snv_inv_lref: ∀h,g,G,L,i. ⦃G, L⦄ ⊢ #i ¡[h, g] →
- â\88\83â\88\83I,K,V. â\87©[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g].
+ â\88\83â\88\83I,K,V. â¬\87[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ¡[h, g].
/2 width=3 by snv_inv_lref_aux/ qed-.
fact snv_inv_gref_aux: ∀h,g,G,L,X. ⦃G, L⦄ ⊢ X ¡[h, g] → ∀p. X = §p → ⊥.
(* Relocation properties ****************************************************)
-lemma snv_lift: â\88\80h,g,G,K,T. â¦\83G, Kâ¦\84 â\8a¢ T ¡[h, g] â\86\92 â\88\80L,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U. â\87§[d, e] T ≡ U → ⦃G, L⦄ ⊢ U ¡[h, g].
+lemma snv_lift: â\88\80h,g,G,K,T. â¦\83G, Kâ¦\84 â\8a¢ T ¡[h, g] â\86\92 â\88\80L,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U. â¬\86[d, e] T ≡ U → ⦃G, L⦄ ⊢ U ¡[h, g].
#h #g #G #K #T #H elim H -G -K -T
[ #G #K #k #L #s #d #e #_ #X #H
>(lift_inv_sort1 … H) -X -K -d -e //
]
qed.
-lemma snv_inv_lift: â\88\80h,g,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ U ¡[h, g] â\86\92 â\88\80K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T. â\87§[d, e] T ≡ U → ⦃G, K⦄ ⊢ T ¡[h, g].
+lemma snv_inv_lift: â\88\80h,g,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ U ¡[h, g] â\86\92 â\88\80K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T. â¬\86[d, e] T ≡ U → ⦃G, K⦄ ⊢ T ¡[h, g].
#h #g #G #L #U #H elim H -G -L -U
[ #G #L #k #K #s #d #e #_ #X #H
>(lift_inv_sort2 … H) -X -L -d -e //
qed-.
(* Basic_1: was: pc3_gen_lift *)
-lemma cpcs_inv_lift: â\88\80G,L,K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T1,U1. â\87§[d, e] T1 â\89¡ U1 â\86\92 â\88\80T2,U2. â\87§[d, e] T2 ≡ U2 →
+lemma cpcs_inv_lift: â\88\80G,L,K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T1,U1. â¬\86[d, e] T1 â\89¡ U1 â\86\92 â\88\80T2,U2. â¬\86[d, e] T2 ≡ U2 →
⦃G, L⦄ ⊢ U1 ⬌* U2 → ⦃G, K⦄ ⊢ T1 ⬌* T2.
#G #L #K #s #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HU12
elim (cpcs_inv_cprs … HU12) -HU12 #U #HU1 #HU2
qed-.
(* Basic_1: was: pc3_lift *)
-lemma cpcs_lift: â\88\80G,L,K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T1,U1. â\87§[d, e] T1 â\89¡ U1 â\86\92 â\88\80T2,U2. â\87§[d, e] T2 ≡ U2 →
+lemma cpcs_lift: â\88\80G,L,K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T1,U1. â¬\86[d, e] T1 â\89¡ U1 â\86\92 â\88\80T2,U2. â¬\86[d, e] T2 ≡ U2 →
⦃G, K⦄ ⊢ T1 ⬌* T2 → ⦃G, L⦄ ⊢ U1 ⬌* U2.
#G #L #K #s #d #e #HLK #T1 #U1 #HTU1 #T2 #U2 #HTU2 #HT12
elim (cpcs_inv_cprs … HT12) -HT12 #T #HT1 #HT2
(* Basic properties *********************************************************)
-lemma Delta_lift: â\88\80W1,W2,d,e. â\87§[d, e] W1 ≡ W2 →
- â\87§[d, e] (Delta W1) ≡ (Delta W2).
+lemma Delta_lift: â\88\80W1,W2,d,e. â¬\86[d, e] W1 ≡ W2 →
+ â¬\86[d, e] (Delta W1) ≡ (Delta W2).
/4 width=1 by lift_flat, lift_bind, lift_lref_lt/ qed.
(* Main properties **********************************************************)
(* Basic forward lemmas *****************************************************)
lemma cpys_fwd_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80T1,d,e. â\87§[d, e] T1 ≡ U1 →
+ â\88\80T1,d,e. â¬\86[d, e] T1 ≡ U1 →
d ≤ dt → d + e ≤ dt + et →
- â\88\83â\88\83T2. â¦\83G, Lâ¦\84 â\8a¢ U1 â\96¶*[d+e, dt+et-(d+e)] U2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Lâ¦\84 â\8a¢ U1 â\96¶*[d+e, dt+et-(d+e)] U2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #T1 #d #e #HTU1 #Hddt #Hdedet @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HU1 #HTU
qed-.
lemma cpys_inv_lift1_eq: ∀G,L,U1,U2. ∀d,e:nat.
- â¦\83G, Lâ¦\84 â\8a¢ U1 â\96¶*[d, e] U2 â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 → U1 = U2.
+ â¦\83G, Lâ¦\84 â\8a¢ U1 â\96¶*[d, e] U2 â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 → U1 = U2.
#G #L #U1 #U2 #d #e #H #T1 #HTU1 @(cpys_ind … H) -U2
/2 width=7 by cpy_inv_lift1_eq/
qed-.
inductive cpysa: ynat → ynat → relation4 genv lenv term term ≝
| cpysa_atom : ∀I,G,L,d,e. cpysa d e G L (⓪{I}) (⓪{I})
| cpysa_subst: ∀I,G,L,K,V1,V2,W2,i,d,e. d ≤ yinj i → i < d+e →
- â\87©[i] L ≡ K.ⓑ{I}V1 → cpysa 0 (⫰(d+e-i)) G K V1 V2 →
- â\87§[0, i+1] V2 ≡ W2 → cpysa d e G L (#i) W2
+ â¬\87[i] L ≡ K.ⓑ{I}V1 → cpysa 0 (⫰(d+e-i)) G K V1 V2 →
+ â¬\86[0, i+1] V2 ≡ W2 → cpysa d e G L (#i) W2
| cpysa_bind : ∀a,I,G,L,V1,V2,T1,T2,d,e.
cpysa d e G L V1 V2 → cpysa (⫯d) e G (L.ⓑ{I}V1) T1 T2 →
cpysa d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
lemma cpys_ind_alt: ∀R:ynat→ynat→relation4 genv lenv term term.
(∀I,G,L,d,e. R d e G L (⓪{I}) (⓪{I})) →
(∀I,G,L,K,V1,V2,W2,i,d,e. d ≤ yinj i → i < d + e →
- â\87©[i] L ≡ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(d+e-i)] V2 →
- â\87§[O, i+1] V2 ≡ W2 → R O (⫰(d+e-i)) G K V1 V2 → R d e G L (#i) W2
+ â¬\87[i] L ≡ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ▶*[O, ⫰(d+e-i)] V2 →
+ â¬\86[O, i+1] V2 ≡ W2 → R O (⫰(d+e-i)) G K V1 V2 → R d e G L (#i) W2
) →
(∀a,I,G,L,V1,V2,T1,T2,d,e. ⦃G, L⦄ ⊢ V1 ▶*[d, e] V2 →
⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ▶*[⫯d, e] T2 → R d e G L V1 V2 →
qed-.
lemma cpys_inv_lift1_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[d, dt + et - (yinj d + e)] T2 &
- â\87§[d, e] T2 ≡ U2.
+ â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
elim (cpys_split_up … HU12 (d + e)) -HU12 // -Hdedet #U #HU1 #HU2
lapply (cpys_weak … HU1 d e ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hddt -Hdtde #HU1
lemma cpys_subst: ∀I,G,L,K,V,U1,i,d,e.
d ≤ yinj i → i < d + e →
- â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ⫰(d+e-i)] U1 →
- â\88\80U2. â\87§[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, e] U2.
+ â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ⫰(d+e-i)] U1 →
+ â\88\80U2. â¬\86[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, e] U2.
#I #G #L #K #V #U1 #i #d #e #Hdi #Hide #HLK #H @(cpys_ind … H) -U1
[ /3 width=5 by cpy_cpys, cpy_subst/
| #U #U1 #_ #HU1 #IHU #U2 #HU12
lemma cpys_subst_Y2: ∀I,G,L,K,V,U1,i,d.
d ≤ yinj i →
- â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ∞] U1 →
- â\88\80U2. â\87§[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, ∞] U2.
+ â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ▶*[0, ∞] U1 →
+ â\88\80U2. â¬\86[0, i+1] U1 ≡ U2 → ⦃G, L⦄ ⊢ #i ▶*[d, ∞] U2.
#I #G #L #K #V #U1 #i #d #Hdi #HLK #HVU1 #U2 #HU12
@(cpys_subst … HLK … HU12) >yminus_Y_inj //
qed.
lemma cpys_inv_atom1: ∀I,G,L,T2,d,e. ⦃G, L⦄ ⊢ ⓪{I} ▶*[d, e] T2 →
T2 = ⓪{I} ∨
∃∃J,K,V1,V2,i. d ≤ yinj i & i < d + e &
- â\87©[i] L ≡ K.ⓑ{J}V1 &
+ â¬\87[i] L ≡ K.ⓑ{J}V1 &
⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2 &
- â\87§[O, i+1] V2 ≡ T2 &
+ â¬\86[O, i+1] V2 ≡ T2 &
I = LRef i.
#I #G #L #T2 #d #e #H @(cpys_ind … H) -T2
[ /2 width=1 by or_introl/
lemma cpys_inv_lref1: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶*[d, e] T2 →
T2 = #i ∨
∃∃I,K,V1,V2. d ≤ i & i < d + e &
- â\87©[i] L ≡ K.ⓑ{I}V1 &
+ â¬\87[i] L ≡ K.ⓑ{I}V1 &
⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2 &
- â\87§[O, i+1] V2 ≡ T2.
+ â¬\86[O, i+1] V2 ≡ T2.
#G #L #T2 #i #d #e #H elim (cpys_inv_atom1 … H) -H /2 width=1 by or_introl/
* #I #K #V1 #V2 #j #Hdj #Hjde #HLK #HV12 #HVT2 #H destruct /3 width=7 by ex5_4_intro, or_intror/
qed-.
lemma cpys_inv_lref1_Y2: ∀G,L,T2,i,d. ⦃G, L⦄ ⊢ #i ▶*[d, ∞] T2 →
T2 = #i ∨
- â\88\83â\88\83I,K,V1,V2. d â\89¤ i & â\87©[i] L ≡ K.ⓑ{I}V1 &
- â¦\83G, Kâ¦\84 â\8a¢ V1 â\96¶*[0, â\88\9e] V2 & â\87§[O, i+1] V2 ≡ T2.
+ â\88\83â\88\83I,K,V1,V2. d â\89¤ i & â¬\87[i] L ≡ K.ⓑ{I}V1 &
+ â¦\83G, Kâ¦\84 â\8a¢ V1 â\96¶*[0, â\88\9e] V2 & â¬\86[O, i+1] V2 ≡ T2.
#G #L #T2 #i #d #H elim (cpys_inv_lref1 … H) -H /2 width=1 by or_introl/
* >yminus_Y_inj /3 width=7 by or_intror, ex4_4_intro/
qed-.
lemma cpys_inv_lref1_drop: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶*[d, e] T2 →
- â\88\80I,K,V1. â\87©[i] L ≡ K.ⓑ{I}V1 →
- â\88\80V2. â\87§[O, i+1] V2 ≡ T2 →
+ â\88\80I,K,V1. â¬\87[i] L ≡ K.ⓑ{I}V1 →
+ â\88\80V2. â¬\86[O, i+1] V2 ≡ T2 →
∧∧ ⦃G, K⦄ ⊢ V1 ▶*[0, ⫰(d+e-i)] V2
& d ≤ i
& i < d + e.
(* Properties on relocation *************************************************)
lemma cpys_lift_le: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
- â\88\80L,U1,s,d,e. dt + et â\89¤ yinj d â\86\92 â\87©[s, d, e] L ≡ K →
- â\87§[d, e] T1 â\89¡ U1 â\86\92 â\88\80U2. â\87§[d, e] T2 ≡ U2 →
+ â\88\80L,U1,s,d,e. dt + et â\89¤ yinj d â\86\92 â¬\87[s, d, e] L ≡ K →
+ â¬\86[d, e] T1 â\89¡ U1 â\86\92 â\88\80U2. â¬\86[d, e] T2 ≡ U2 →
⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2.
#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hdetd #HLK #HTU1 @(cpys_ind … H) -T2
[ #U2 #H >(lift_mono … HTU1 … H) -H //
lemma cpys_lift_be: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
∀L,U1,s,d,e. dt ≤ yinj d → d ≤ dt + et →
- â\87©[s, d, e] L â\89¡ K â\86\92 â\87§[d, e] T1 ≡ U1 →
- â\88\80U2. â\87§[d, e] T2 ≡ U2 → ⦃G, L⦄ ⊢ U1 ▶*[dt, et + e] U2.
+ â¬\87[s, d, e] L â\89¡ K â\86\92 â¬\86[d, e] T1 ≡ U1 →
+ â\88\80U2. â¬\86[d, e] T2 ≡ U2 → ⦃G, L⦄ ⊢ U1 ▶*[dt, et + e] U2.
#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hdtd #Hddet #HLK #HTU1 @(cpys_ind … H) -T2
[ #U2 #H >(lift_mono … HTU1 … H) -H //
| -HTU1 #T #T2 #_ #HT2 #IHT #U2 #HTU2
qed-.
lemma cpys_lift_ge: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶*[dt, et] T2 →
- â\88\80L,U1,s,d,e. yinj d â\89¤ dt â\86\92 â\87©[s, d, e] L ≡ K →
- â\87§[d, e] T1 â\89¡ U1 â\86\92 â\88\80U2. â\87§[d, e] T2 ≡ U2 →
+ â\88\80L,U1,s,d,e. yinj d â\89¤ dt â\86\92 â¬\87[s, d, e] L ≡ K →
+ â¬\86[d, e] T1 â\89¡ U1 â\86\92 â\88\80U2. â¬\86[d, e] T2 ≡ U2 →
⦃G, L⦄ ⊢ U1 ▶*[dt+e, et] U2.
#G #K #T1 #T2 #dt #et #H #L #U1 #s #d #e #Hddt #HLK #HTU1 @(cpys_ind … H) -T2
[ #U2 #H >(lift_mono … HTU1 … H) -H //
(* Inversion lemmas for relocation ******************************************)
lemma cpys_inv_lift1_le: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt + et ≤ d →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, et] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, et] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdetd @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
qed-.
lemma cpys_inv_lift1_be: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt ≤ d → yinj d + e ≤ dt + et →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, et - e] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, et - e] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdedet @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
qed-.
lemma cpys_inv_lift1_ge: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
yinj d + e ≤ dt →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt - e, et] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt - e, et] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdedt @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
(* Advanced inversion lemmas on relocation **********************************)
lemma cpys_inv_lift1_ge_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
∃∃T2. ⦃G, K⦄ ⊢ T1 ▶*[d, dt + et - (yinj d + e)] T2 &
- â\87§[d, e] T2 ≡ U2.
+ â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
qed-.
lemma cpys_inv_lift1_be_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt ≤ d → dt + et ≤ yinj d + e →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, d - dt] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, d - dt] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
qed-.
lemma cpys_inv_lift1_le_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶*[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt ≤ d → d ≤ dt + et → dt + et ≤ yinj d + e →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, d - dt] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶*[dt, d - dt] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde @(cpys_ind … H) -U2
[ /2 width=3 by ex2_intro/
| -HTU1 #U #U2 #_ #HU2 * #T #HT1 #HTU
qed-.
lemma cpys_inv_lift1_subst: ∀G,L,W1,W2,d,e. ⦃G, L⦄ ⊢ W1 ▶*[d, e] W2 →
- â\88\80K,V1,i. â\87©[i+1] L â\89¡ K â\86\92 â\87§[O, i+1] V1 ≡ W1 →
+ â\88\80K,V1,i. â¬\87[i+1] L â\89¡ K â\86\92 â¬\86[O, i+1] V1 ≡ W1 →
d ≤ yinj i → i < d + e →
- â\88\83â\88\83V2. â¦\83G, Kâ¦\84 â\8a¢ V1 â\96¶*[O, â«°(d+e-i)] V2 & â\87§[O, i+1] V2 ≡ W2.
+ â\88\83â\88\83V2. â¦\83G, Kâ¦\84 â\8a¢ V1 â\96¶*[O, â«°(d+e-i)] V2 & â¬\86[O, i+1] V2 ≡ W2.
#G #L #W1 #W2 #d #e #HW12 #K #V1 #i #HLK #HVW1 #Hdi #Hide
elim (cpys_inv_lift1_ge_up … HW12 … HLK … HVW1 ? ? ?) //
>yplus_O1 <yplus_inj >yplus_SO2
inductive drops (s:bool): list2 nat nat → relation lenv ≝
| drops_nil : ∀L. drops s (◊) L L
| drops_cons: ∀L1,L,L2,des,d,e.
- drops s des L1 L â\86\92 â\87©[s, d, e] L ≡ L2 → drops s ({d, e} @ des) L1 L2
+ drops s des L1 L â\86\92 â¬\87[s, d, e] L ≡ L2 → drops s ({d, e} @ des) L1 L2
.
interpretation "iterated slicing (local environment) abstract"
*)
definition l_liftable1: relation2 lenv term → predicate bool ≝
- λR,s. â\88\80K,T. R K T â\86\92 â\88\80L,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U. â\87§[d, e] T ≡ U → R L U.
+ λR,s. â\88\80K,T. R K T â\86\92 â\88\80L,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U. â¬\86[d, e] T ≡ U → R L U.
definition l_liftables1: relation2 lenv term → predicate bool ≝
- λR,s. â\88\80L,K,des. â\87©*[s, des] L ≡ K →
- â\88\80T,U. â\87§*[des] T ≡ U → R K T → R L U.
+ λR,s. â\88\80L,K,des. â¬\87*[s, des] L ≡ K →
+ â\88\80T,U. â¬\86*[des] T ≡ U → R K T → R L U.
definition l_liftables1_all: relation2 lenv term → predicate bool ≝
- λR,s. â\88\80L,K,des. â\87©*[s, des] L ≡ K →
- â\88\80Ts,Us. â\87§*[des] Ts ≡ Us →
+ λR,s. â\88\80L,K,des. â¬\87*[s, des] L ≡ K →
+ â\88\80Ts,Us. â¬\86*[des] Ts ≡ Us →
all … (R K) Ts → all … (R L) Us.
(* Basic inversion lemmas ***************************************************)
-fact drops_inv_nil_aux: â\88\80L1,L2,s,des. â\87©*[s, des] L1 ≡ L2 → des = ◊ → L1 = L2.
+fact drops_inv_nil_aux: â\88\80L1,L2,s,des. â¬\87*[s, des] L1 ≡ L2 → des = ◊ → L1 = L2.
#L1 #L2 #s #des * -L1 -L2 -des //
#L1 #L #L2 #d #e #des #_ #_ #H destruct
qed-.
(* Basic_1: was: drop1_gen_pnil *)
-lemma drops_inv_nil: â\88\80L1,L2,s. â\87©*[s, ◊] L1 ≡ L2 → L1 = L2.
+lemma drops_inv_nil: â\88\80L1,L2,s. â¬\87*[s, ◊] L1 ≡ L2 → L1 = L2.
/2 width=4 by drops_inv_nil_aux/ qed-.
-fact drops_inv_cons_aux: â\88\80L1,L2,s,des. â\87©*[s, des] L1 ≡ L2 →
+fact drops_inv_cons_aux: â\88\80L1,L2,s,des. â¬\87*[s, des] L1 ≡ L2 →
∀d,e,tl. des = {d, e} @ tl →
- â\88\83â\88\83L. â\87©*[s, tl] L1 â\89¡ L & â\87©[s, d, e] L ≡ L2.
+ â\88\83â\88\83L. â¬\87*[s, tl] L1 â\89¡ L & â¬\87[s, d, e] L ≡ L2.
#L1 #L2 #s #des * -L1 -L2 -des
[ #L #d #e #tl #H destruct
| #L1 #L #L2 #des #d #e #HT1 #HT2 #hd #he #tl #H destruct
qed-.
(* Basic_1: was: drop1_gen_pcons *)
-lemma drops_inv_cons: â\88\80L1,L2,s,d,e,des. â\87©*[s, {d, e} @ des] L1 ≡ L2 →
- â\88\83â\88\83L. â\87©*[s, des] L1 â\89¡ L & â\87©[s, d, e] L ≡ L2.
+lemma drops_inv_cons: â\88\80L1,L2,s,d,e,des. â¬\87*[s, {d, e} @ des] L1 ≡ L2 →
+ â\88\83â\88\83L. â¬\87*[s, des] L1 â\89¡ L & â¬\87[s, d, e] L ≡ L2.
/2 width=3 by drops_inv_cons_aux/ qed-.
lemma drops_inv_skip2: ∀I,s,des,des2,i. des ▭ i ≡ des2 →
- â\88\80L1,K2,V2. â\87©*[s, des2] L1 ≡ K2. ⓑ{I} V2 →
+ â\88\80L1,K2,V2. â¬\87*[s, des2] L1 ≡ K2. ⓑ{I} V2 →
∃∃K1,V1,des1. des + 1 ▭ i + 1 ≡ des1 + 1 &
- â\87©*[s, des1] K1 ≡ K2 &
- â\87§*[des1] V2 ≡ V1 &
+ â¬\87*[s, des1] K1 ≡ K2 &
+ â¬\86*[des1] V2 ≡ V1 &
L1 = K1. ⓑ{I} V1.
#I #s #des #des2 #i #H elim H -des -des2 -i
[ #i #L1 #K2 #V2 #H
(* Basic properties *********************************************************)
(* Basic_1: was: drop1_skip_bind *)
-lemma drops_skip: â\88\80L1,L2,s,des. â\87©*[s, des] L1 â\89¡ L2 â\86\92 â\88\80V1,V2. â\87§*[des] V2 ≡ V1 →
- â\88\80I. â\87©*[s, des + 1] L1.ⓑ{I}V1 ≡ L2.ⓑ{I}V2.
+lemma drops_skip: â\88\80L1,L2,s,des. â¬\87*[s, des] L1 â\89¡ L2 â\86\92 â\88\80V1,V2. â¬\86*[des] V2 ≡ V1 →
+ â\88\80I. â¬\87*[s, des + 1] L1.ⓑ{I}V1 ≡ L2.ⓑ{I}V2.
#L1 #L2 #s #des #H elim H -L1 -L2 -des
[ #L #V1 #V2 #HV12 #I
>(lifts_inv_nil … HV12) -HV12 //
(* Properties concerning basic local environment slicing ********************)
-lemma drops_drop_trans: â\88\80L1,L,des. â\87©*[â\92», des] L1 â\89¡ L â\86\92 â\88\80L2,i. â\87©[i] L ≡ L2 →
- â\88\83â\88\83L0,des0,i0. â\87©[i0] L1 â\89¡ L0 & â\87©*[Ⓕ, des0] L0 ≡ L2 &
+lemma drops_drop_trans: â\88\80L1,L,des. â¬\87*[â\92», des] L1 â\89¡ L â\86\92 â\88\80L2,i. â¬\87[i] L ≡ L2 →
+ â\88\83â\88\83L0,des0,i0. â¬\87[i0] L1 â\89¡ L0 & â¬\87*[Ⓕ, des0] L0 ≡ L2 &
@⦃i, des⦄ ≡ i0 & des ▭ i ≡ des0.
#L1 #L #des #H elim H -L1 -L -des
[ /2 width=7 by drops_nil, minuss_nil, at_nil, ex4_3_intro/
(* Main properties **********************************************************)
(* Basic_1: was: drop1_trans *)
-theorem drops_trans: â\88\80L,L2,s,des2. â\87©*[s, des2] L â\89¡ L2 â\86\92 â\88\80L1,des1. â\87©*[s, des1] L1 ≡ L →
- â\87©*[s, des2 @@ des1] L1 ≡ L2.
+theorem drops_trans: â\88\80L,L2,s,des2. â¬\87*[s, des2] L â\89¡ L2 â\86\92 â\88\80L1,des1. â¬\87*[s, des1] L1 ≡ L →
+ â¬\87*[s, des2 @@ des1] L1 ≡ L2.
#L #L2 #s #des2 #H elim H -L -L2 -des2 /3 width=3 by drops_cons/
qed-.
⦃G1, L1, T1⦄ ⊐+ ⦃G2, L2, T2⦄.
/2 width=5 by tri_TC_strap/ qed.
-lemma fqup_drop: â\88\80G1,G2,L1,K1,K2,T1,T2,U1,e. â\87©[e] L1 â\89¡ K1 â\86\92 â\87§[0, e] T1 ≡ U1 →
+lemma fqup_drop: â\88\80G1,G2,L1,K1,K2,T1,T2,U1,e. â¬\87[e] L1 â\89¡ K1 â\86\92 â¬\86[0, e] T1 ≡ U1 →
⦃G1, K1, T1⦄ ⊐+ ⦃G2, K2, T2⦄ → ⦃G1, L1, U1⦄ ⊐+ ⦃G2, K2, T2⦄.
#G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 #e #HLK1 #HTU1 #HT12 elim (eq_or_gt … e) #H destruct
[ >(drop_inv_O2 … HLK1) -L1 <(lift_inv_O2 … HTU1) -U1 //
]
qed-.
-lemma fqup_lref: â\88\80I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+ ⦃G, K, V⦄.
+lemma fqup_lref: â\88\80I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, L, #i⦄ ⊐+ ⦃G, K, V⦄.
/3 width=6 by fqu_lref_O, fqu_fqup, lift_lref_ge, fqup_drop/ qed.
lemma fqup_pair_sn: ∀I,G,L,V,T. ⦃G, L, ②{I}V.T⦄ ⊐+ ⦃G, L, V⦄.
/2 width=5 by tri_TC_strap/ qed-.
lemma fqus_drop: ∀G1,G2,K1,K2,T1,T2. ⦃G1, K1, T1⦄ ⊐* ⦃G2, K2, T2⦄ →
- â\88\80L1,U1,e. â\87©[e] L1 â\89¡ K1 â\86\92 â\87§[0, e] T1 ≡ U1 →
+ â\88\80L1,U1,e. â¬\87[e] L1 â\89¡ K1 â\86\92 â¬\86[0, e] T1 ≡ U1 →
⦃G1, L1, U1⦄ ⊐* ⦃G2, K2, T2⦄.
#G1 #G2 #K1 #K2 #T1 #T2 #H @(fqus_ind … H) -G2 -K2 -T2
/3 width=5 by fqus_strap1, fquq_fqus, fquq_drop/
(* CONTEXT-SENSITIVE FREE VARIABLES *****************************************)
inductive frees: relation4 ynat lenv term nat ≝
-| frees_eq: â\88\80L,U,d,i. (â\88\80T. â\87§[i, 1] T ≡ U → ⊥) → frees d L U i
+| frees_eq: â\88\80L,U,d,i. (â\88\80T. â¬\86[i, 1] T ≡ U → ⊥) → frees d L U i
| frees_be: ∀I,L,K,U,W,d,i,j. d ≤ yinj j → j < i →
- (â\88\80T. â\87§[j, 1] T â\89¡ U â\86\92 â\8a¥) â\86\92 â\87©[j]L ≡ K.ⓑ{I}W →
+ (â\88\80T. â¬\86[j, 1] T â\89¡ U â\86\92 â\8a¥) â\86\92 â¬\87[j]L ≡ K.ⓑ{I}W →
frees 0 K W (i-j-1) → frees d L U i.
interpretation
(* Basic inversion lemmas ***************************************************)
lemma frees_inv: ∀L,U,d,i. L ⊢ i ϵ 𝐅*[d]⦃U⦄ →
- (â\88\80T. â\87§[i, 1] T ≡ U → ⊥) ∨
- â\88\83â\88\83I,K,W,j. d â\89¤ yinj j & j < i & (â\88\80T. â\87§[j, 1] T ≡ U → ⊥) &
- â\87©[j]L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄.
+ (â\88\80T. â¬\86[i, 1] T ≡ U → ⊥) ∨
+ â\88\83â\88\83I,K,W,j. d â\89¤ yinj j & j < i & (â\88\80T. â¬\86[j, 1] T ≡ U → ⊥) &
+ â¬\87[j]L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄.
#L #U #d #i * -L -U -d -i /4 width=9 by ex5_4_intro, or_intror, or_introl/
qed-.
lemma frees_inv_lref: ∀L,d,j,i. L ⊢ i ϵ 𝐅*[d]⦃#j⦄ →
j = i ∨
- â\88\83â\88\83I,K,W. d â\89¤ yinj j & j < i & â\87©[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄.
+ â\88\83â\88\83I,K,W. d â\89¤ yinj j & j < i & â¬\87[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄.
#L #d #x #i #H elim (frees_inv … H) -H
[ /4 width=2 by nlift_inv_lref_be_SO, or_introl/
| * #I #K #W #j #Hdj #Hji #Hnx #HLK #HW
qed-.
lemma frees_inv_lref_lt: ∀L,d,j,i.L ⊢ i ϵ 𝐅*[d]⦃#j⦄ → j < i →
- â\88\83â\88\83I,K,W. d â\89¤ yinj j & â\87©[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄.
+ â\88\83â\88\83I,K,W. d â\89¤ yinj j & â¬\87[j] L ≡ K.ⓑ{I}W & K ⊢ (i-j-1) ϵ 𝐅*[yinj 0]⦃W⦄.
#L #d #j #i #H #Hji elim (frees_inv_lref … H) -H
[ #H elim (lt_refl_false j) //
| * /2 width=5 by ex3_3_intro/
lemma frees_lref_eq: ∀L,d,i. L ⊢ i ϵ 𝐅*[d]⦃#i⦄.
/3 width=7 by frees_eq, lift_inv_lref2_be/ qed.
-lemma frees_lref_be: â\88\80I,L,K,W,d,i,j. d â\89¤ yinj j â\86\92 j < i â\86\92 â\87©[j]L ≡ K.ⓑ{I}W →
+lemma frees_lref_be: â\88\80I,L,K,W,d,i,j. d â\89¤ yinj j â\86\92 j < i â\86\92 â¬\87[j]L ≡ K.ⓑ{I}W →
K ⊢ i-j-1 ϵ 𝐅*[0]⦃W⦄ → L ⊢ i ϵ 𝐅*[d]⦃#j⦄.
/3 width=9 by frees_be, lift_inv_lref2_be/ qed.
]
qed-.
-lemma frees_S: â\88\80L,U,d,i. L â\8a¢ i ϵ ð\9d\90\85*[yinj d]â¦\83Uâ¦\84 â\86\92 â\88\80I,K,W. â\87©[d] L ≡ K.ⓑ{I}W →
+lemma frees_S: â\88\80L,U,d,i. L â\8a¢ i ϵ ð\9d\90\85*[yinj d]â¦\83Uâ¦\84 â\86\92 â\88\80I,K,W. â¬\87[d] L ≡ K.ⓑ{I}W →
(K ⊢ i-d-1 ϵ 𝐅*[0]⦃W⦄ → ⊥) → L ⊢ i ϵ 𝐅*[⫯d]⦃U⦄.
#L #U #d #i #H elim (frees_inv … H) -H /3 width=2 by frees_eq/
* #I #K #W #j #Hdj #Hji #HnU #HLK #HW #I0 #K0 #W0 #HLK0 #HnW0
(* Properties on relocation *************************************************)
lemma frees_lift_ge: ∀K,T,d,i. K ⊢ i ϵ𝐅*[d]⦃T⦄ →
- â\88\80L,s,d0,e0. â\87©[s, d0, e0] L ≡ K →
- â\88\80U. â\87§[d0, e0] T ≡ U → d0 ≤ i →
+ â\88\80L,s,d0,e0. â¬\87[s, d0, e0] L ≡ K →
+ â\88\80U. â¬\86[d0, e0] T ≡ U → d0 ≤ i →
L ⊢ i+e0 ϵ 𝐅*[d]⦃U⦄.
#K #T #d #i #H elim H -K -T -d -i
[ #K #T #d #i #HnT #L #s #d0 #e0 #_ #U #HTU #Hd0i -K -s
(* Inversion lemmas on relocation *******************************************)
lemma frees_inv_lift_be: ∀L,U,d,i. L ⊢ i ϵ 𝐅*[d]⦃U⦄ →
- â\88\80K,s,d0,e0. â\87©[s, d0, e0+1] L ≡ K →
- â\88\80T. â\87§[d0, e0+1] T ≡ U → d0 ≤ i → i ≤ d0 + e0 → ⊥.
+ â\88\80K,s,d0,e0. â¬\87[s, d0, e0+1] L ≡ K →
+ â\88\80T. â¬\86[d0, e0+1] T ≡ U → d0 ≤ i → i ≤ d0 + e0 → ⊥.
#L #U #d #i #H elim H -L -U -d -i
[ #L #U #d #i #HnU #K #s #d0 #e0 #_ #T #HTU #Hd0i #Hide0
elim (lift_split … HTU i e0) -HTU /2 width=2 by/
qed-.
lemma frees_inv_lift_ge: ∀L,U,d,i. L ⊢ i ϵ 𝐅*[d]⦃U⦄ →
- â\88\80K,s,d0,e0. â\87©[s, d0, e0] L ≡ K →
- â\88\80T. â\87§[d0, e0] T ≡ U → d0 + e0 ≤ i →
+ â\88\80K,s,d0,e0. â¬\87[s, d0, e0] L ≡ K →
+ â\88\80T. â¬\86[d0, e0] T ≡ U → d0 + e0 ≤ i →
K ⊢ i-e0 ϵ𝐅*[d-yinj e0]⦃T⦄.
#L #U #d #i #H elim H -L -U -d -i
[ #L #U #d #i #HnU #K #s #d0 #e0 #HLK #T #HTU #Hde0i -L -s
inductive lifts: list2 nat nat → relation term ≝
| lifts_nil : ∀T. lifts (◊) T T
| lifts_cons: ∀T1,T,T2,des,d,e.
- â\87§[d,e] T1 ≡ T → lifts des T T2 → lifts ({d, e} @ des) T1 T2
+ â¬\86[d,e] T1 ≡ T → lifts des T T2 → lifts ({d, e} @ des) T1 T2
.
interpretation "generic relocation (term)"
(* Basic inversion lemmas ***************************************************)
-fact lifts_inv_nil_aux: â\88\80T1,T2,des. â\87§*[des] T1 ≡ T2 → des = ◊ → T1 = T2.
+fact lifts_inv_nil_aux: â\88\80T1,T2,des. â¬\86*[des] T1 ≡ T2 → des = ◊ → T1 = T2.
#T1 #T2 #des * -T1 -T2 -des //
#T1 #T #T2 #d #e #des #_ #_ #H destruct
qed-.
-lemma lifts_inv_nil: â\88\80T1,T2. â\87§*[◊] T1 ≡ T2 → T1 = T2.
+lemma lifts_inv_nil: â\88\80T1,T2. â¬\86*[◊] T1 ≡ T2 → T1 = T2.
/2 width=3 by lifts_inv_nil_aux/ qed-.
-fact lifts_inv_cons_aux: â\88\80T1,T2,des. â\87§*[des] T1 ≡ T2 →
+fact lifts_inv_cons_aux: â\88\80T1,T2,des. â¬\86*[des] T1 ≡ T2 →
∀d,e,tl. des = {d, e} @ tl →
- â\88\83â\88\83T. â\87§[d, e] T1 â\89¡ T & â\87§*[tl] T ≡ T2.
+ â\88\83â\88\83T. â¬\86[d, e] T1 â\89¡ T & â¬\86*[tl] T ≡ T2.
#T1 #T2 #des * -T1 -T2 -des
[ #T #d #e #tl #H destruct
| #T1 #T #T2 #des #d #e #HT1 #HT2 #hd #he #tl #H destruct
/2 width=3 by ex2_intro/
qed-.
-lemma lifts_inv_cons: â\88\80T1,T2,d,e,des. â\87§*[{d, e} @ des] T1 ≡ T2 →
- â\88\83â\88\83T. â\87§[d, e] T1 â\89¡ T & â\87§*[des] T ≡ T2.
+lemma lifts_inv_cons: â\88\80T1,T2,d,e,des. â¬\86*[{d, e} @ des] T1 ≡ T2 →
+ â\88\83â\88\83T. â¬\86[d, e] T1 â\89¡ T & â¬\86*[des] T ≡ T2.
/2 width=3 by lifts_inv_cons_aux/ qed-.
(* Basic_1: was: lift1_sort *)
-lemma lifts_inv_sort1: â\88\80T2,k,des. â\87§*[des] ⋆k ≡ T2 → T2 = ⋆k.
+lemma lifts_inv_sort1: â\88\80T2,k,des. â¬\86*[des] ⋆k ≡ T2 → T2 = ⋆k.
#T2 #k #des elim des -des
[ #H <(lifts_inv_nil … H) -H //
| #d #e #des #IH #H
qed-.
(* Basic_1: was: lift1_lref *)
-lemma lifts_inv_lref1: â\88\80T2,des,i1. â\87§*[des] #i1 ≡ T2 →
+lemma lifts_inv_lref1: â\88\80T2,des,i1. â¬\86*[des] #i1 ≡ T2 →
∃∃i2. @⦃i1, des⦄ ≡ i2 & T2 = #i2.
#T2 #des elim des -des
[ #i1 #H <(lifts_inv_nil … H) -H /2 width=3 by at_nil, ex2_intro/
]
qed-.
-lemma lifts_inv_gref1: â\88\80T2,p,des. â\87§*[des] §p ≡ T2 → T2 = §p.
+lemma lifts_inv_gref1: â\88\80T2,p,des. â¬\86*[des] §p ≡ T2 → T2 = §p.
#T2 #p #des elim des -des
[ #H <(lifts_inv_nil … H) -H //
| #d #e #des #IH #H
qed-.
(* Basic_1: was: lift1_bind *)
-lemma lifts_inv_bind1: â\88\80a,I,T2,des,V1,U1. â\87§*[des] ⓑ{a,I} V1. U1 ≡ T2 →
- â\88\83â\88\83V2,U2. â\87§*[des] V1 â\89¡ V2 & â\87§*[des + 1] U1 ≡ U2 &
+lemma lifts_inv_bind1: â\88\80a,I,T2,des,V1,U1. â¬\86*[des] ⓑ{a,I} V1. U1 ≡ T2 →
+ â\88\83â\88\83V2,U2. â¬\86*[des] V1 â\89¡ V2 & â¬\86*[des + 1] U1 ≡ U2 &
T2 = ⓑ{a,I} V2. U2.
#a #I #T2 #des elim des -des
[ #V1 #U1 #H
qed-.
(* Basic_1: was: lift1_flat *)
-lemma lifts_inv_flat1: â\88\80I,T2,des,V1,U1. â\87§*[des] ⓕ{I} V1. U1 ≡ T2 →
- â\88\83â\88\83V2,U2. â\87§*[des] V1 â\89¡ V2 & â\87§*[des] U1 ≡ U2 &
+lemma lifts_inv_flat1: â\88\80I,T2,des,V1,U1. â¬\86*[des] ⓕ{I} V1. U1 ≡ T2 →
+ â\88\83â\88\83V2,U2. â¬\86*[des] V1 â\89¡ V2 & â¬\86*[des] U1 ≡ U2 &
T2 = ⓕ{I} V2. U2.
#I #T2 #des elim des -des
[ #V1 #U1 #H
(* Basic forward lemmas *****************************************************)
-lemma lifts_simple_dx: â\88\80T1,T2,des. â\87§*[des] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+lemma lifts_simple_dx: â\88\80T1,T2,des. â¬\86*[des] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
#T1 #T2 #des #H elim H -T1 -T2 -des /3 width=5 by lift_simple_dx/
qed-.
-lemma lifts_simple_sn: â\88\80T1,T2,des. â\87§*[des] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+lemma lifts_simple_sn: â\88\80T1,T2,des. â¬\86*[des] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
#T1 #T2 #des #H elim H -T1 -T2 -des /3 width=5 by lift_simple_sn/
qed-.
(* Basic properties *********************************************************)
-lemma lifts_bind: â\88\80a,I,T2,V1,V2,des. â\87§*[des] V1 ≡ V2 →
- â\88\80T1. â\87§*[des + 1] T1 ≡ T2 →
- â\87§*[des] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2.
+lemma lifts_bind: â\88\80a,I,T2,V1,V2,des. â¬\86*[des] V1 ≡ V2 →
+ â\88\80T1. â¬\86*[des + 1] T1 ≡ T2 →
+ â¬\86*[des] ⓑ{a,I} V1. T1 ≡ ⓑ{a,I} V2. T2.
#a #I #T2 #V1 #V2 #des #H elim H -V1 -V2 -des
[ #V #T1 #H >(lifts_inv_nil … H) -H //
| #V1 #V #V2 #des #d #e #HV1 #_ #IHV #T1 #H
]
qed.
-lemma lifts_flat: â\88\80I,T2,V1,V2,des. â\87§*[des] V1 ≡ V2 →
- â\88\80T1. â\87§*[des] T1 ≡ T2 →
- â\87§*[des] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2.
+lemma lifts_flat: â\88\80I,T2,V1,V2,des. â¬\86*[des] V1 ≡ V2 →
+ â\88\80T1. â¬\86*[des] T1 ≡ T2 →
+ â¬\86*[des] ⓕ{I} V1. T1 ≡ ⓕ{I} V2. T2.
#I #T2 #V1 #V2 #des #H elim H -V1 -V2 -des
[ #V #T1 #H >(lifts_inv_nil … H) -H //
| #V1 #V #V2 #des #d #e #HV1 #_ #IHV #T1 #H
]
qed.
-lemma lifts_total: â\88\80des,T1. â\88\83T2. â\87§*[des] T1 ≡ T2.
+lemma lifts_total: â\88\80des,T1. â\88\83T2. â¬\86*[des] T1 ≡ T2.
#des elim des -des /2 width=2 by lifts_nil, ex_intro/
#d #e #des #IH #T1 elim (lift_total T1 d e)
#T #HT1 elim (IH T) -IH /3 width=4 by lifts_cons, ex_intro/
(* Properties concerning basic term relocation ******************************)
(* Basic_1: was: lift1_xhg (right to left) *)
-lemma lifts_lift_trans_le: â\88\80T1,T,des. â\87§*[des] T1 â\89¡ T â\86\92 â\88\80T2. â\87§[0, 1] T ≡ T2 →
- â\88\83â\88\83T0. â\87§[0, 1] T1 â\89¡ T0 & â\87§*[des + 1] T0 ≡ T2.
+lemma lifts_lift_trans_le: â\88\80T1,T,des. â¬\86*[des] T1 â\89¡ T â\86\92 â\88\80T2. â¬\86[0, 1] T ≡ T2 →
+ â\88\83â\88\83T0. â¬\86[0, 1] T1 â\89¡ T0 & â¬\86*[des + 1] T0 ≡ T2.
#T1 #T #des #H elim H -T1 -T -des
[ /2 width=3/
| #T1 #T3 #T #des #d #e #HT13 #_ #IHT13 #T2 #HT2
(* Basic_1: was: lift1_free (right to left) *)
lemma lifts_lift_trans: ∀des,i,i0. @⦃i, des⦄ ≡ i0 →
∀des0. des + 1 ▭ i + 1 ≡ des0 + 1 →
- â\88\80T1,T0. â\87§*[des0] T1 ≡ T0 →
- â\88\80T2. â\87§[O, i0 + 1] T0 ≡ T2 →
- â\88\83â\88\83T. â\87§[0, i + 1] T1 â\89¡ T & â\87§*[des] T ≡ T2.
+ â\88\80T1,T0. â¬\86*[des0] T1 ≡ T0 →
+ â\88\80T2. â¬\86[O, i0 + 1] T0 ≡ T2 →
+ â\88\83â\88\83T. â¬\86[0, i + 1] T1 â\89¡ T & â¬\86*[des] T ≡ T2.
#des elim des -des normalize
[ #i #x #H1 #des0 #H2 #T1 #T0 #HT10 #T2
<(at_inv_nil … H1) -x #HT02
(* Main properties **********************************************************)
(* Basic_1: was: lifts1_xhg (right to left) *)
-lemma liftsv_liftv_trans_le: â\88\80T1s,Ts,des. â\87§*[des] T1s ≡ Ts →
- â\88\80T2s:list term. â\87§[0, 1] Ts ≡ T2s →
- â\88\83â\88\83T0s. â\87§[0, 1] T1s â\89¡ T0s & â\87§*[des + 1] T0s ≡ T2s.
+lemma liftsv_liftv_trans_le: â\88\80T1s,Ts,des. â¬\86*[des] T1s ≡ Ts →
+ â\88\80T2s:list term. â¬\86[0, 1] Ts ≡ T2s →
+ â\88\83â\88\83T0s. â¬\86[0, 1] T1s â\89¡ T0s & â¬\86*[des + 1] T0s ≡ T2s.
#T1s #Ts #des #H elim H -T1s -Ts
[ #T1s #H
>(liftv_inv_nil1 … H) -T1s /2 width=3/
(* Main properties **********************************************************)
(* Basic_1: was: lift1_lift1 (left to right) *)
-theorem lifts_trans: â\88\80T1,T,des1. â\87§*[des1] T1 â\89¡ T â\86\92 â\88\80T2:term. â\88\80des2. â\87§*[des2] T ≡ T2 →
- â\87§*[des1 @@ des2] T1 ≡ T2.
+theorem lifts_trans: â\88\80T1,T,des1. â¬\86*[des1] T1 â\89¡ T â\86\92 â\88\80T2:term. â\88\80des2. â¬\86*[des2] T ≡ T2 →
+ â¬\86*[des1 @@ des2] T1 ≡ T2.
#T1 #T #des1 #H elim H -T1 -T -des1 // /3 width=3/
qed.
inductive liftsv (des:list2 nat nat) : relation (list term) ≝
| liftsv_nil : liftsv des (◊) (◊)
| liftsv_cons: ∀T1s,T2s,T1,T2.
- â\87§*[des] T1 ≡ T2 → liftsv des T1s T2s →
+ â¬\86*[des] T1 ≡ T2 → liftsv des T1s T2s →
liftsv des (T1 @ T1s) (T2 @ T2s)
.
(* Basic inversion lemmas ***************************************************)
(* Basic_1: was: lifts1_flat (left to right) *)
-lemma lifts_inv_applv1: â\88\80V1s,U1,T2,des. â\87§*[des] Ⓐ V1s. U1 ≡ T2 →
- â\88\83â\88\83V2s,U2. â\87§*[des] V1s â\89¡ V2s & â\87§*[des] U1 ≡ U2 &
+lemma lifts_inv_applv1: â\88\80V1s,U1,T2,des. â¬\86*[des] Ⓐ V1s. U1 ≡ T2 →
+ â\88\83â\88\83V2s,U2. â¬\86*[des] V1s â\89¡ V2s & â¬\86*[des] U1 ≡ U2 &
T2 = Ⓐ V2s. U2.
#V1s elim V1s -V1s normalize
[ #T1 #T2 #des #HT12
(* Basic properties *********************************************************)
(* Basic_1: was: lifts1_flat (right to left) *)
-lemma lifts_applv: â\88\80V1s,V2s,des. â\87§*[des] V1s ≡ V2s →
- â\88\80T1,T2. â\87§*[des] T1 ≡ T2 →
- â\87§*[des] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2.
+lemma lifts_applv: â\88\80V1s,V2s,des. â¬\86*[des] V1s ≡ V2s →
+ â\88\80T1,T2. â¬\86*[des] T1 ≡ T2 →
+ â¬\86*[des] Ⓐ V1s. T1 ≡ Ⓐ V2s. T2.
#V1s #V2s #des #H elim H -V1s -V2s /3 width=1 by lifts_flat/
qed.
∀L1,L2,d,i. |L1| = |L2| → yinj i < d → R d (#i) L1 L2
) → (
∀I,L1,L2,K1,K2,V,d,i. d ≤ yinj i →
- â\87©[i] L1 â\89¡ K1.â\93\91{I}V â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I}V →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I}V â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I}V →
K1 ≡[V, yinj O] K2 → R (yinj O) V K1 K2 → R d (#i) L1 L2
) → (
∀L1,L2,d,i. |L1| = |L2| → |L1| ≤ i → |L2| ≤ i → R d (#i) L1 L2
lemma lleq_fwd_lref: ∀L1,L2,d,i. L1 ≡[#i, d] L2 →
∨∨ |L1| ≤ i ∧ |L2| ≤ i
| yinj i < d
- | â\88\83â\88\83I,K1,K2,V. â\87©[i] L1 ≡ K1.ⓑ{I}V &
- â\87©[i] L2 ≡ K2.ⓑ{I}V &
+ | â\88\83â\88\83I,K1,K2,V. â¬\87[i] L1 ≡ K1.ⓑ{I}V &
+ â¬\87[i] L2 ≡ K2.ⓑ{I}V &
K1 ≡[V, yinj 0] K2 & d ≤ yinj i.
#L1 #L2 #d #i #H elim (llpx_sn_fwd_lref … H) /2 width=1/
* /3 width=7 by or3_intro2, ex4_4_intro/
qed-.
-lemma lleq_fwd_drop_sn: â\88\80L1,L2,T,d. L1 â\89¡[d, T] L2 â\86\92 â\88\80K1,i. â\87©[i] L1 ≡ K1 →
- â\88\83K2. â\87©[i] L2 ≡ K2.
+lemma lleq_fwd_drop_sn: â\88\80L1,L2,T,d. L1 â\89¡[d, T] L2 â\86\92 â\88\80K1,i. â¬\87[i] L1 ≡ K1 →
+ â\88\83K2. â¬\87[i] L2 ≡ K2.
/2 width=7 by llpx_sn_fwd_drop_sn/ qed-.
-lemma lleq_fwd_drop_dx: â\88\80L1,L2,T,d. L1 â\89¡[d, T] L2 â\86\92 â\88\80K2,i. â\87©[i] L2 ≡ K2 →
- â\88\83K1. â\87©[i] L1 ≡ K1.
+lemma lleq_fwd_drop_dx: â\88\80L1,L2,T,d. L1 â\89¡[d, T] L2 â\86\92 â\88\80K2,i. â¬\87[i] L2 ≡ K2 →
+ â\88\83K1. â¬\87[i] L1 ≡ K1.
/2 width=7 by llpx_sn_fwd_drop_dx/ qed-.
lemma lleq_fwd_bind_sn: ∀a,I,L1,L2,V,T,d.
/2 width=1 by llpx_sn_skip/ qed.
lemma lleq_lref: ∀I,L1,L2,K1,K2,V,d,i. d ≤ yinj i →
- â\87©[i] L1 â\89¡ K1.â\93\91{I}V â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I}V →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I}V â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I}V →
K1 ≡[V, 0] K2 → L1 ≡[#i, d] L2.
/2 width=9 by llpx_sn_lref/ qed.
qed-.
lemma lleq_ge_up: ∀L1,L2,U,dt. L1 ≡[U, dt] L2 →
- â\88\80T,d,e. â\87§[d, e] T ≡ U →
+ â\88\80T,d,e. â¬\86[d, e] T ≡ U →
dt ≤ d + e → L1 ≡[U, d] L2.
/2 width=6 by llpx_sn_ge_up/ qed-.
theorem lleq_intro_alt: ∀L1,L2,T,d. |L1| = |L2| →
(∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → L1 ⊢ i ϵ 𝐅*[d]⦃T⦄ →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
I1 = I2 ∧ V1 = V2
) → L1 ≡[T, d] L2.
#L1 #L2 #T #d #HL12 #IH @llpx_sn_alt_inv_llpx_sn @conj // -HL12
theorem lleq_inv_alt: ∀L1,L2,T,d. L1 ≡[T, d] L2 →
|L1| = |L2| ∧
∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → L1 ⊢ i ϵ 𝐅*[d]⦃T⦄ →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
I1 = I2 ∧ V1 = V2.
#L1 #L2 #T #d #H elim (llpx_sn_llpx_sn_alt … H) -H
#HL12 #IH @conj //
(* Alternative definition (recursive) ***************************************)
theorem lleq_intro_alt_r: ∀L1,L2,T,d. |L1| = |L2| →
- (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2
) → L1 ≡[T, d] L2.
#L1 #L2 #T #d #HL12 #IH @llpx_sn_intro_alt_r // -HL12
theorem lleq_ind_alt_r: ∀S:relation4 ynat term lenv lenv.
(∀L1,L2,T,d. |L1| = |L2| → (
- â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2 & S 0 V1 K1 K2
) → S d T L1 L2) →
∀L1,L2,T,d. L1 ≡[T, d] L2 → S d T L1 L2.
theorem lleq_inv_alt_r: ∀L1,L2,T,d. L1 ≡[T, d] L2 →
|L1| = |L2| ∧
- â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & V1 = V2 & K1 ≡[V1, 0] K2.
#L1 #L2 #T #d #H elim (llpx_sn_inv_alt_r … H) -H
#HL12 #IH @conj //
(* Advanced inversion lemmas ************************************************)
lemma lleq_inv_lref_ge_dx: ∀L1,L2,d,i. L1 ≡[#i, d] L2 → d ≤ i →
- â\88\80I,K2,V. â\87©[i] L2 ≡ K2.ⓑ{I}V →
- â\88\83â\88\83K1. â\87©[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2.
+ â\88\80I,K2,V. â¬\87[i] L2 ≡ K2.ⓑ{I}V →
+ â\88\83â\88\83K1. â¬\87[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2.
#L1 #L2 #d #i #H #Hdi #I #K2 #V #HLK2 elim (llpx_sn_inv_lref_ge_dx … H … HLK2) -L2
/2 width=3 by ex2_intro/
qed-.
lemma lleq_inv_lref_ge_sn: ∀L1,L2,d,i. L1 ≡[#i, d] L2 → d ≤ i →
- â\88\80I,K1,V. â\87©[i] L1 ≡ K1.ⓑ{I}V →
- â\88\83â\88\83K2. â\87©[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2.
+ â\88\80I,K1,V. â¬\87[i] L1 ≡ K1.ⓑ{I}V →
+ â\88\83â\88\83K2. â¬\87[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2.
#L1 #L2 #d #i #H #Hdi #I1 #K1 #V #HLK1 elim (llpx_sn_inv_lref_ge_sn … H … HLK1) -L1
/2 width=3 by ex2_intro/
qed-.
lemma lleq_inv_lref_ge_bi: ∀L1,L2,d,i. L1 ≡[#i, d] L2 → d ≤ i →
∀I1,I2,K1,K2,V1,V2.
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & K1 ≡[V1, 0] K2 & V1 = V2.
/2 width=8 by llpx_sn_inv_lref_ge_bi/ qed-.
lemma lleq_inv_lref_ge: ∀L1,L2,d,i. L1 ≡[#i, d] L2 → d ≤ i →
- â\88\80I,K1,K2,V. â\87©[i] L1 â\89¡ K1.â\93\91{I}V â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I}V →
+ â\88\80I,K1,K2,V. â¬\87[i] L1 â\89¡ K1.â\93\91{I}V â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I}V →
K1 ≡[V, 0] K2.
#L1 #L2 #d #i #HL12 #Hdi #I #K1 #K2 #V #HLK1 #HLK2
elim (lleq_inv_lref_ge_bi … HL12 … HLK1 HLK2) //
qed-.
lemma lleq_inv_S: ∀L1,L2,T,d. L1 ≡[T, d+1] L2 →
- â\88\80I,K1,K2,V. â\87©[d] L1 â\89¡ K1.â\93\91{I}V â\86\92 â\87©[d] L2 ≡ K2.ⓑ{I}V →
+ â\88\80I,K1,K2,V. â¬\87[d] L1 â\89¡ K1.â\93\91{I}V â\86\92 â¬\87[d] L2 ≡ K2.ⓑ{I}V →
K1 ≡[V, 0] K2 → L1 ≡[T, d] L2.
/2 width=9 by llpx_sn_inv_S/ qed-.
(* Advanced forward lemmas **************************************************)
lemma lleq_fwd_lref_dx: ∀L1,L2,d,i. L1 ≡[#i, d] L2 →
- â\88\80I,K2,V. â\87©[i] L2 ≡ K2.ⓑ{I}V →
+ â\88\80I,K2,V. â¬\87[i] L2 ≡ K2.ⓑ{I}V →
i < d ∨
- â\88\83â\88\83K1. â\87©[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2 & d ≤ i.
+ â\88\83â\88\83K1. â¬\87[i] L1 ≡ K1.ⓑ{I}V & K1 ≡[V, 0] K2 & d ≤ i.
#L1 #L2 #d #i #H #I #K2 #V #HLK2 elim (llpx_sn_fwd_lref_dx … H … HLK2) -L2
[ | * ] /3 width=3 by ex3_intro, or_intror, or_introl/
qed-.
lemma lleq_fwd_lref_sn: ∀L1,L2,d,i. L1 ≡[#i, d] L2 →
- â\88\80I,K1,V. â\87©[i] L1 ≡ K1.ⓑ{I}V →
+ â\88\80I,K1,V. â¬\87[i] L1 ≡ K1.ⓑ{I}V →
i < d ∨
- â\88\83â\88\83K2. â\87©[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2 & d ≤ i.
+ â\88\83â\88\83K2. â¬\87[i] L2 ≡ K2.ⓑ{I}V & K1 ≡[V, 0] K2 & d ≤ i.
#L1 #L2 #d #i #H #I #K1 #V #HLK1 elim (llpx_sn_fwd_lref_sn … H … HLK1) -L1
[ | * ] /3 width=3 by ex3_intro, or_intror, or_introl/
qed-.
(* Properties on relocation *************************************************)
lemma lleq_lift_le: ∀K1,K2,T,dt. K1 ≡[T, dt] K2 →
- â\88\80L1,L2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80U. â\87§[d, e] T ≡ U → dt ≤ d → L1 ≡[U, dt] L2.
+ â\88\80L1,L2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80U. â¬\86[d, e] T ≡ U → dt ≤ d → L1 ≡[U, dt] L2.
/3 width=10 by llpx_sn_lift_le, lift_mono/ qed-.
lemma lleq_lift_ge: ∀K1,K2,T,dt. K1 ≡[T, dt] K2 →
- â\88\80L1,L2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80U. â\87§[d, e] T ≡ U → d ≤ dt → L1 ≡[U, dt+e] L2.
+ â\88\80L1,L2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80U. â¬\86[d, e] T ≡ U → d ≤ dt → L1 ≡[U, dt+e] L2.
/2 width=9 by llpx_sn_lift_ge/ qed-.
(* Inversion lemmas on relocation *******************************************)
lemma lleq_inv_lift_le: ∀L1,L2,U,dt. L1 ≡[U, dt] L2 →
- â\88\80K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80T. â\87§[d, e] T ≡ U → dt ≤ d → K1 ≡[T, dt] K2.
+ â\88\80K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80T. â¬\86[d, e] T ≡ U → dt ≤ d → K1 ≡[T, dt] K2.
/3 width=10 by llpx_sn_inv_lift_le, ex2_intro/ qed-.
lemma lleq_inv_lift_be: ∀L1,L2,U,dt. L1 ≡[U, dt] L2 →
- â\88\80K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80T. â\87§[d, e] T ≡ U → d ≤ dt → dt ≤ yinj d + e → K1 ≡[T, d] K2.
+ â\88\80K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80T. â¬\86[d, e] T ≡ U → d ≤ dt → dt ≤ yinj d + e → K1 ≡[T, d] K2.
/2 width=11 by llpx_sn_inv_lift_be/ qed-.
lemma lleq_inv_lift_ge: ∀L1,L2,U,dt. L1 ≡[U, dt] L2 →
- â\88\80K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80T. â\87§[d, e] T ≡ U → yinj d + e ≤ dt → K1 ≡[T, dt-e] K2.
+ â\88\80K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80T. â¬\86[d, e] T ≡ U → yinj d + e ≤ dt → K1 ≡[T, dt-e] K2.
/2 width=9 by llpx_sn_inv_lift_ge/ qed-.
(* Inversion lemmas on negated lazy quivalence for local environments *******)
definition llor: ynat → relation4 term lenv lenv lenv ≝ λd,T,L2,L1,L.
∧∧ |L1| = |L2| & |L1| = |L|
& (∀I1,I2,I,K1,K2,K,V1,V2,V,i.
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 â\89¡ K2.â\93\91{I2}V2 â\86\92 â\87©[i] L ≡ K.ⓑ{I}V → ∨∨
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 â\89¡ K2.â\93\91{I2}V2 â\86\92 â¬\87[i] L ≡ K.ⓑ{I}V → ∨∨
(∧∧ yinj i < d & I1 = I & V1 = V) |
(∧∧ (L1 ⊢ i ϵ 𝐅*[d]⦃T⦄ → ⊥) & I1 = I & V1 = V) |
(∧∧ d ≤ yinj i & L1 ⊢ i ϵ 𝐅*[d]⦃T⦄ & I2 = I & V2 = V)
| llpx_sn_sort: ∀L1,L2,d,k. |L1| = |L2| → llpx_sn R d (⋆k) L1 L2
| llpx_sn_skip: ∀L1,L2,d,i. |L1| = |L2| → yinj i < d → llpx_sn R d (#i) L1 L2
| llpx_sn_lref: ∀I,L1,L2,K1,K2,V1,V2,d,i. d ≤ yinj i →
- â\87©[i] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I}V2 →
llpx_sn R (yinj 0) V1 K1 K2 → R K1 V1 V2 → llpx_sn R d (#i) L1 L2
| llpx_sn_free: ∀L1,L2,d,i. |L1| ≤ i → |L2| ≤ i → |L1| = |L2| → llpx_sn R d (#i) L1 L2
| llpx_sn_gref: ∀L1,L2,d,p. |L1| = |L2| → llpx_sn R d (§p) L1 L2
qed-.
lemma llpx_sn_fwd_drop_sn: ∀R,L1,L2,T,d. llpx_sn R d T L1 L2 →
- â\88\80K1,i. â\87©[i] L1 â\89¡ K1 â\86\92 â\88\83K2. â\87©[i] L2 ≡ K2.
+ â\88\80K1,i. â¬\87[i] L1 â\89¡ K1 â\86\92 â\88\83K2. â¬\87[i] L2 ≡ K2.
#R #L1 #L2 #T #d #H #K1 #i #HLK1 lapply (llpx_sn_fwd_length … H) -H
#HL12 lapply (drop_fwd_length_le2 … HLK1) -HLK1 /2 width=1 by drop_O1_le/
qed-.
lemma llpx_sn_fwd_drop_dx: ∀R,L1,L2,T,d. llpx_sn R d T L1 L2 →
- â\88\80K2,i. â\87©[i] L2 â\89¡ K2 â\86\92 â\88\83K1. â\87©[i] L1 ≡ K1.
+ â\88\80K2,i. â¬\87[i] L2 â\89¡ K2 â\86\92 â\88\83K1. â¬\87[i] L1 ≡ K1.
#R #L1 #L2 #T #d #H #K2 #i #HLK2 lapply (llpx_sn_fwd_length … H) -H
#HL12 lapply (drop_fwd_length_le2 … HLK2) -HLK2 /2 width=1 by drop_O1_le/
qed-.
fact llpx_sn_fwd_lref_aux: ∀R,L1,L2,X,d. llpx_sn R d X L1 L2 → ∀i. X = #i →
∨∨ |L1| ≤ i ∧ |L2| ≤ i
| yinj i < d
- | â\88\83â\88\83I,K1,K2,V1,V2. â\87©[i] L1 ≡ K1.ⓑ{I}V1 &
- â\87©[i] L2 ≡ K2.ⓑ{I}V2 &
+ | â\88\83â\88\83I,K1,K2,V1,V2. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 &
+ â¬\87[i] L2 ≡ K2.ⓑ{I}V2 &
llpx_sn R (yinj 0) V1 K1 K2 &
R K1 V1 V2 & d ≤ yinj i.
#R #L1 #L2 #X #d * -L1 -L2 -X -d
lemma llpx_sn_fwd_lref: ∀R,L1,L2,d,i. llpx_sn R d (#i) L1 L2 →
∨∨ |L1| ≤ i ∧ |L2| ≤ i
| yinj i < d
- | â\88\83â\88\83I,K1,K2,V1,V2. â\87©[i] L1 ≡ K1.ⓑ{I}V1 &
- â\87©[i] L2 ≡ K2.ⓑ{I}V2 &
+ | â\88\83â\88\83I,K1,K2,V1,V2. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 &
+ â¬\87[i] L2 ≡ K2.ⓑ{I}V2 &
llpx_sn R (yinj 0) V1 K1 K2 &
R K1 V1 V2 & d ≤ yinj i.
/2 width=3 by llpx_sn_fwd_lref_aux/ qed-.
@IH -IH // normalize /2 width=1 by eq_f2/
qed-.
-lemma llpx_sn_ge_up: â\88\80R,L1,L2,U,dt. llpx_sn R dt U L1 L2 â\86\92 â\88\80T,d,e. â\87§[d, e] T ≡ U →
+lemma llpx_sn_ge_up: â\88\80R,L1,L2,U,dt. llpx_sn R dt U L1 L2 â\86\92 â\88\80T,d,e. â¬\86[d, e] T ≡ U →
dt ≤ d + e → llpx_sn R d U L1 L2.
#R #L1 #L2 #U #dt #H elim H -L1 -L2 -U -dt
[ #L1 #L2 #dt #k #HL12 #X #d #e #H #_ >(lift_inv_sort2 … H) -H /2 width=1 by llpx_sn_sort/
definition llpx_sn_alt: relation3 lenv term term → relation4 ynat term lenv lenv ≝
λR,d,T,L1,L2. |L1| = |L2| ∧
(∀I1,I2,K1,K2,V1,V2,i. d ≤ yinj i → L1 ⊢ i ϵ 𝐅*[d]⦃T⦄ →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
I1 = I2 ∧ R K1 V1 V2
).
(* alternative definition of llpx_sn (recursive) *)
inductive llpx_sn_alt_r (R:relation3 lenv term term): relation4 ynat term lenv lenv ≝
| llpx_sn_alt_r_intro: ∀L1,L2,T,d.
- (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 → I1 = I2 ∧ R K1 V1 V2
+ (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 → I1 = I2 ∧ R K1 V1 V2
) →
- (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 → llpx_sn_alt_r R 0 V1 K1 K2
+ (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 → llpx_sn_alt_r R 0 V1 K1 K2
) → |L1| = |L2| → llpx_sn_alt_r R d T L1 L2
.
(* Compact definition of llpx_sn_alt_r **************************************)
lemma llpx_sn_alt_r_intro_alt: ∀R,L1,L2,T,d. |L1| = |L2| →
- (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn_alt_r R 0 V1 K1 K2
) → llpx_sn_alt_r R d T L1 L2.
#R #L1 #L2 #T #d #HL12 #IH @llpx_sn_alt_r_intro // -HL12
lemma llpx_sn_alt_r_ind_alt: ∀R. ∀S:relation4 ynat term lenv lenv.
(∀L1,L2,T,d. |L1| = |L2| → (
- â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn_alt_r R 0 V1 K1 K2 & S 0 V1 K1 K2
) → S d T L1 L2) →
∀L1,L2,T,d. llpx_sn_alt_r R d T L1 L2 → S d T L1 L2.
lemma llpx_sn_alt_r_inv_alt: ∀R,L1,L2,T,d. llpx_sn_alt_r R d T L1 L2 →
|L1| = |L2| ∧
- â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn_alt_r R 0 V1 K1 K2.
#R #L1 #L2 #T #d #H @(llpx_sn_alt_r_ind_alt … H) -L1 -L2 -T -d
#L1 #L2 #T #d #HL12 #IH @conj // -HL12
lemma llpx_sn_alt_r_fwd_lref: ∀R,L1,L2,d,i. llpx_sn_alt_r R d (#i) L1 L2 →
∨∨ |L1| ≤ i ∧ |L2| ≤ i
| yinj i < d
- | â\88\83â\88\83I,K1,K2,V1,V2. â\87©[i] L1 ≡ K1.ⓑ{I}V1 &
- â\87©[i] L2 ≡ K2.ⓑ{I}V2 &
+ | â\88\83â\88\83I,K1,K2,V1,V2. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 &
+ â¬\87[i] L2 ≡ K2.ⓑ{I}V2 &
llpx_sn_alt_r R (yinj 0) V1 K1 K2 &
R K1 V1 V2 & d ≤ yinj i.
#R #L1 #L2 #d #i #H elim (llpx_sn_alt_r_inv_alt … H) -H
qed.
lemma llpx_sn_alt_r_lref: ∀R,I,L1,L2,K1,K2,V1,V2,d,i. d ≤ yinj i →
- â\87©[i] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I}V2 →
llpx_sn_alt_r R 0 V1 K1 K2 → R K1 V1 V2 →
llpx_sn_alt_r R d (#i) L1 L2.
#R #I #L1 #L2 #K1 #K2 #V1 #V2 #d #i #Hdi #HLK1 #HLK2 #HK12 #HV12 @llpx_sn_alt_r_intro_alt
(* Alternative definition of llpx_sn (recursive) ****************************)
lemma llpx_sn_intro_alt_r: ∀R,L1,L2,T,d. |L1| = |L2| →
- (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ (â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn R 0 V1 K1 K2
) → llpx_sn R d T L1 L2.
#R #L1 #L2 #T #d #HL12 #IH @llpx_sn_alt_r_inv_lpx_sn
lemma llpx_sn_ind_alt_r: ∀R. ∀S:relation4 ynat term lenv lenv.
(∀L1,L2,T,d. |L1| = |L2| → (
- â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn R 0 V1 K1 K2 & S 0 V1 K1 K2
) → S d T L1 L2) →
∀L1,L2,T,d. llpx_sn R d T L1 L2 → S d T L1 L2.
lemma llpx_sn_inv_alt_r: ∀R,L1,L2,T,d. llpx_sn R d T L1 L2 →
|L1| = |L2| ∧
- â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â\87§[i, 1] U ≡ T → ⊥) →
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â\88\80I1,I2,K1,K2,V1,V2,i. d â\89¤ yinj i â\86\92 (â\88\80U. â¬\86[i, 1] U ≡ T → ⊥) →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & R K1 V1 V2 & llpx_sn R 0 V1 K1 K2.
#R #L1 #L2 #T #d #H lapply (llpx_sn_lpx_sn_alt_r … H) -H
#H elim (llpx_sn_alt_r_inv_alt … H) -H
(* Advanced forward lemmas **************************************************)
lemma llpx_sn_fwd_lref_dx: ∀R,L1,L2,d,i. llpx_sn R d (#i) L1 L2 →
- â\88\80I,K2,V2. â\87©[i] L2 ≡ K2.ⓑ{I}V2 →
+ â\88\80I,K2,V2. â¬\87[i] L2 ≡ K2.ⓑ{I}V2 →
i < d ∨
- â\88\83â\88\83K1,V1. â\87©[i] L1 ≡ K1.ⓑ{I}V1 & llpx_sn R 0 V1 K1 K2 &
+ â\88\83â\88\83K1,V1. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 & llpx_sn R 0 V1 K1 K2 &
R K1 V1 V2 & d ≤ i.
#R #L1 #L2 #d #i #H #I #K2 #V2 #HLK2 elim (llpx_sn_fwd_lref … H) -H [ * || * ]
[ #_ #H elim (lt_refl_false i)
qed-.
lemma llpx_sn_fwd_lref_sn: ∀R,L1,L2,d,i. llpx_sn R d (#i) L1 L2 →
- â\88\80I,K1,V1. â\87©[i] L1 ≡ K1.ⓑ{I}V1 →
+ â\88\80I,K1,V1. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 →
i < d ∨
- â\88\83â\88\83K2,V2. â\87©[i] L2 ≡ K2.ⓑ{I}V2 & llpx_sn R 0 V1 K1 K2 &
+ â\88\83â\88\83K2,V2. â¬\87[i] L2 ≡ K2.ⓑ{I}V2 & llpx_sn R 0 V1 K1 K2 &
R K1 V1 V2 & d ≤ i.
#R #L1 #L2 #d #i #H #I #K1 #V1 #HLK1 elim (llpx_sn_fwd_lref … H) -H [ * || * ]
[ #H #_ elim (lt_refl_false i)
(* Advanced inversion lemmas ************************************************)
lemma llpx_sn_inv_lref_ge_dx: ∀R,L1,L2,d,i. llpx_sn R d (#i) L1 L2 → d ≤ i →
- â\88\80I,K2,V2. â\87©[i] L2 ≡ K2.ⓑ{I}V2 →
- â\88\83â\88\83K1,V1. â\87©[i] L1 ≡ K1.ⓑ{I}V1 &
+ â\88\80I,K2,V2. â¬\87[i] L2 ≡ K2.ⓑ{I}V2 →
+ â\88\83â\88\83K1,V1. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 &
llpx_sn R 0 V1 K1 K2 & R K1 V1 V2.
#R #L1 #L2 #d #i #H #Hdi #I #K2 #V2 #HLK2 elim (llpx_sn_fwd_lref_dx … H … HLK2) -L2
[ #H elim (ylt_yle_false … H Hdi)
qed-.
lemma llpx_sn_inv_lref_ge_sn: ∀R,L1,L2,d,i. llpx_sn R d (#i) L1 L2 → d ≤ i →
- â\88\80I,K1,V1. â\87©[i] L1 ≡ K1.ⓑ{I}V1 →
- â\88\83â\88\83K2,V2. â\87©[i] L2 ≡ K2.ⓑ{I}V2 &
+ â\88\80I,K1,V1. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 →
+ â\88\83â\88\83K2,V2. â¬\87[i] L2 ≡ K2.ⓑ{I}V2 &
llpx_sn R 0 V1 K1 K2 & R K1 V1 V2.
#R #L1 #L2 #d #i #H #Hdi #I #K1 #V1 #HLK1 elim (llpx_sn_fwd_lref_sn … H … HLK1) -L1
[ #H elim (ylt_yle_false … H Hdi)
lemma llpx_sn_inv_lref_ge_bi: ∀R,L1,L2,d,i. llpx_sn R d (#i) L1 L2 → d ≤ i →
∀I1,I2,K1,K2,V1,V2.
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
∧∧ I1 = I2 & llpx_sn R 0 V1 K1 K2 & R K1 V1 V2.
#R #L1 #L2 #d #i #HL12 #Hdi #I1 #I2 #K1 #K2 #V1 #V2 #HLK1 #HLK2
elim (llpx_sn_inv_lref_ge_sn … HL12 … HLK1) // -L1 -d
qed-.
fact llpx_sn_inv_S_aux: ∀R,L1,L2,T,d0. llpx_sn R d0 T L1 L2 → ∀d. d0 = d + 1 →
- â\88\80K1,K2,I,V1,V2. â\87©[d] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â\87©[d] L2 ≡ K2.ⓑ{I}V2 →
+ â\88\80K1,K2,I,V1,V2. â¬\87[d] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â¬\87[d] L2 ≡ K2.ⓑ{I}V2 →
llpx_sn R 0 V1 K1 K2 → R K1 V1 V2 → llpx_sn R d T L1 L2.
#R #L1 #L2 #T #d0 #H elim H -L1 -L2 -T -d0
/2 width=1 by llpx_sn_gref, llpx_sn_free, llpx_sn_sort/
qed-.
lemma llpx_sn_inv_S: ∀R,L1,L2,T,d. llpx_sn R (d + 1) T L1 L2 →
- â\88\80K1,K2,I,V1,V2. â\87©[d] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â\87©[d] L2 ≡ K2.ⓑ{I}V2 →
+ â\88\80K1,K2,I,V1,V2. â¬\87[d] L1 â\89¡ K1.â\93\91{I}V1 â\86\92 â¬\87[d] L2 ≡ K2.ⓑ{I}V2 →
llpx_sn R 0 V1 K1 K2 → R K1 V1 V2 → llpx_sn R d T L1 L2.
/2 width=9 by llpx_sn_inv_S_aux/ qed-.
lemma llpx_sn_lift_le: ∀R. l_liftable R →
∀K1,K2,T,d0. llpx_sn R d0 T K1 K2 →
- â\88\80L1,L2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80U. â\87§[d, e] T ≡ U → d0 ≤ d → llpx_sn R d0 U L1 L2.
+ â\88\80L1,L2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80U. â¬\86[d, e] T ≡ U → d0 ≤ d → llpx_sn R d0 U L1 L2.
#R #HR #K1 #K2 #T #d0 #H elim H -K1 -K2 -T -d0
[ #K1 #K2 #d0 #k #HK12 #L1 #L2 #d #e #HLK1 #HLK2 #X #H #_ >(lift_inv_sort1 … H) -X
lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -d
qed-.
lemma llpx_sn_lift_ge: ∀R,K1,K2,T,d0. llpx_sn R d0 T K1 K2 →
- â\88\80L1,L2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80U. â\87§[d, e] T ≡ U → d ≤ d0 → llpx_sn R (d0+e) U L1 L2.
+ â\88\80L1,L2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80U. â¬\86[d, e] T ≡ U → d ≤ d0 → llpx_sn R (d0+e) U L1 L2.
#R #K1 #K2 #T #d0 #H elim H -K1 -K2 -T -d0
[ #K1 #K2 #d0 #k #HK12 #L1 #L2 #d #e #HLK1 #HLK2 #X #H #_ >(lift_inv_sort1 … H) -X
lapply (drop_fwd_length_eq2 … HLK1 HLK2 HK12) -K1 -K2 -d
lemma llpx_sn_inv_lift_le: ∀R. l_deliftable_sn R →
∀L1,L2,U,d0. llpx_sn R d0 U L1 L2 →
- â\88\80K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80T. â\87§[d, e] T ≡ U → d0 ≤ d → llpx_sn R d0 T K1 K2.
+ â\88\80K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80T. â¬\86[d, e] T ≡ U → d0 ≤ d → llpx_sn R d0 T K1 K2.
#R #HR #L1 #L2 #U #d0 #H elim H -L1 -L2 -U -d0
[ #L1 #L2 #d0 #k #HL12 #K1 #K2 #d #e #HLK1 #HLK2 #X #H #_ >(lift_inv_sort2 … H) -X
lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -d -e
qed-.
lemma llpx_sn_inv_lift_be: ∀R,L1,L2,U,d0. llpx_sn R d0 U L1 L2 →
- â\88\80K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80T. â\87§[d, e] T ≡ U → d ≤ d0 → d0 ≤ yinj d + e → llpx_sn R d T K1 K2.
+ â\88\80K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80T. â¬\86[d, e] T ≡ U → d ≤ d0 → d0 ≤ yinj d + e → llpx_sn R d T K1 K2.
#R #L1 #L2 #U #d0 #H elim H -L1 -L2 -U -d0
[ #L1 #L2 #d0 #k #HL12 #K1 #K2 #d #e #HLK1 #HLK2 #X #H #_ #_ >(lift_inv_sort2 … H) -X
lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -d0 -e
qed-.
lemma llpx_sn_inv_lift_ge: ∀R,L1,L2,U,d0. llpx_sn R d0 U L1 L2 →
- â\88\80K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
- â\88\80T. â\87§[d, e] T ≡ U → yinj d + e ≤ d0 → llpx_sn R (d0-e) T K1 K2.
+ â\88\80K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
+ â\88\80T. â¬\86[d, e] T ≡ U → yinj d + e ≤ d0 → llpx_sn R (d0-e) T K1 K2.
#R #L1 #L2 #U #d0 #H elim H -L1 -L2 -U -d0
[ #L1 #L2 #d0 #k #HL12 #K1 #K2 #d #e #HLK1 #HLK2 #X #H #_ >(lift_inv_sort2 … H) -X
lapply (drop_fwd_length_eq1 … HLK1 HLK2 HL12) -L1 -L2 -d
(* Advanced inversion lemmas on relocation **********************************)
lemma llpx_sn_inv_lift_O: ∀R,L1,L2,U. llpx_sn R 0 U L1 L2 →
- â\88\80K1,K2,e. â\87©[e] L1 â\89¡ K1 â\86\92 â\87©[e] L2 ≡ K2 →
- â\88\80T. â\87§[0, e] T ≡ U → llpx_sn R 0 T K1 K2.
+ â\88\80K1,K2,e. â¬\87[e] L1 â\89¡ K1 â\86\92 â¬\87[e] L2 ≡ K2 →
+ â\88\80T. â¬\86[0, e] T ≡ U → llpx_sn R 0 T K1 K2.
/2 width=11 by llpx_sn_inv_lift_be/ qed-.
lemma llpx_sn_drop_conf_O: ∀R,L1,L2,U. llpx_sn R 0 U L1 L2 →
- â\88\80K1,e. â\87©[e] L1 â\89¡ K1 â\86\92 â\88\80T. â\87§[0, e] T ≡ U →
- â\88\83â\88\83K2. â\87©[e] L2 ≡ K2 & llpx_sn R 0 T K1 K2.
+ â\88\80K1,e. â¬\87[e] L1 â\89¡ K1 â\86\92 â\88\80T. â¬\86[0, e] T ≡ U →
+ â\88\83â\88\83K2. â¬\87[e] L2 ≡ K2 & llpx_sn R 0 T K1 K2.
#R #L1 #L2 #U #HU #K1 #e #HLK1 #T #HTU elim (llpx_sn_fwd_drop_sn … HU … HLK1)
/3 width=10 by llpx_sn_inv_lift_O, ex2_intro/
qed-.
lemma llpx_sn_drop_trans_O: ∀R,L1,L2,U. llpx_sn R 0 U L1 L2 →
- â\88\80K2,e. â\87©[e] L2 â\89¡ K2 â\86\92 â\88\80T. â\87§[0, e] T ≡ U →
- â\88\83â\88\83K1. â\87©[e] L1 ≡ K1 & llpx_sn R 0 T K1 K2.
+ â\88\80K2,e. â¬\87[e] L2 â\89¡ K2 â\86\92 â\88\80T. â¬\86[0, e] T ≡ U →
+ â\88\83â\88\83K1. â¬\87[e] L1 ≡ K1 & llpx_sn R 0 T K1 K2.
#R #L1 #L2 #U #HU #K2 #e #HLK2 #T #HTU elim (llpx_sn_fwd_drop_dx … HU … HLK2)
/3 width=10 by llpx_sn_inv_lift_O, ex2_intro/
qed-.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87© [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
+notation "hvbox( â¬\87 [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
non associative with precedence 45
for @{ 'RDrop $e $L1 $L2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87© [ term 46 d , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
+notation "hvbox( â¬\87 [ term 46 d , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
non associative with precedence 45
for @{ 'RDrop $d $e $L1 $L2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87© [ term 46 s , break term 46 d , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
+notation "hvbox( â¬\87 [ term 46 s , break term 46 d , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
non associative with precedence 45
for @{ 'RDrop $s $d $e $L1 $L2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87© * [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
+notation "hvbox( â¬\87 * [ term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
non associative with precedence 45
for @{ 'RDropStar $e $L1 $L2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87© * [ term 46 s , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
+notation "hvbox( â¬\87 * [ term 46 s , break term 46 e ] break term 46 L1 ≡ break term 46 L2 )"
non associative with precedence 45
for @{ 'RDropStar $s $e $L1 $L2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87§ [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+notation "hvbox( â¬\86 [ term 46 d , break term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
non associative with precedence 45
for @{ 'RLift $d $e $T1 $T2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( â\87§ * [ term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
+notation "hvbox( â¬\86 * [ term 46 e ] break term 46 T1 ≡ break term 46 T2 )"
non associative with precedence 45
for @{ 'RLiftStar $e $T1 $T2 }.
(* Basic inversion lemmas ***************************************************)
-lemma cir_inv_delta: â\88\80G,L,K,V,i. â\87©[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐈⦃#i⦄ → ⊥.
+lemma cir_inv_delta: â\88\80G,L,K,V,i. â¬\87[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐈⦃#i⦄ → ⊥.
/3 width=3 by crr_delta/ qed-.
lemma cir_inv_ri2: ∀I,G,L,V,T. ri2 I → ⦃G, L⦄ ⊢ ➡ 𝐈⦃②{I}V.T⦄ → ⊥.
(* Properties on relocation *************************************************)
-lemma cir_lift: â\88\80G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡ ð\9d\90\88â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U. â\87§[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐈⦃U⦄.
+lemma cir_lift: â\88\80G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡ ð\9d\90\88â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U. â¬\86[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐈⦃U⦄.
/3 width=8 by crr_inv_lift/ qed.
-lemma cir_inv_lift: â\88\80G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡ ð\9d\90\88â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T. â\87§[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐈⦃T⦄.
+lemma cir_inv_lift: â\88\80G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡ ð\9d\90\88â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T. â¬\86[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐈⦃T⦄.
/3 width=8 by crr_lift/ qed-.
lemma cix_inv_sort: ∀h,g,G,L,k,l. deg h g k (l+1) → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃⋆k⦄ → ⊥.
/3 width=2 by crx_sort/ qed-.
-lemma cix_inv_delta: â\88\80h,g,I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃#i⦄ → ⊥.
+lemma cix_inv_delta: â\88\80h,g,I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃#i⦄ → ⊥.
/3 width=4 by crx_delta/ qed-.
lemma cix_inv_ri2: ∀h,g,I,G,L,V,T. ri2 I → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃②{I}V.T⦄ → ⊥.
(* Advanced properties ******************************************************)
-lemma cix_lref: â\88\80h,g,G,L,i. â\87©[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃#i⦄.
+lemma cix_lref: â\88\80h,g,G,L,i. â¬\87[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃#i⦄.
#h #g #G #L #i #HL #H elim (crx_inv_lref … H) -h #I #K #V #HLK
lapply (drop_mono … HLK … HL) -L -i #H destruct
qed.
(* Properties on relocation *************************************************)
-lemma cix_lift: â\88\80h,g,G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\88â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U. â\87§[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃U⦄.
+lemma cix_lift: â\88\80h,g,G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\88â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U. â¬\86[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐈⦃U⦄.
/3 width=8 by crx_inv_lift/ qed.
-lemma cix_inv_lift: â\88\80h,g,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\88â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T. â\87§[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐈⦃T⦄.
+lemma cix_inv_lift: â\88\80h,g,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\88â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T. â¬\86[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐈⦃T⦄.
/3 width=8 by crx_lift/ qed-.
(* Basic inversion lemmas ***************************************************)
-lemma cnr_inv_delta: â\88\80G,L,K,V,i. â\87©[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄ → ⊥.
+lemma cnr_inv_delta: â\88\80G,L,K,V,i. â¬\87[i] L ≡ K.ⓓV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄ → ⊥.
#G #L #K #V #i #HLK #H
elim (lift_total V 0 (i+1)) #W #HVW
lapply (H W ?) -H [ /3 width=6 by cpr_delta/ ] -HLK #H destruct
qed.
(* Basic_1: was only: nf2_csort_lref *)
-lemma cnr_lref_atom: â\88\80G,L,i. â\87©[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
+lemma cnr_lref_atom: â\88\80G,L,i. â¬\87[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
#G #L #i #HL @cnr_lref_free >(drop_fwd_length … HL) -HL //
qed.
(* Advanced properties ******************************************************)
(* Basic_1: was: nf2_lref_abst *)
-lemma cnr_lref_abst: â\88\80G,L,K,V,i. â\87©[i] L ≡ K. ⓛV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
+lemma cnr_lref_abst: â\88\80G,L,K,V,i. â¬\87[i] L ≡ K. ⓛV → ⦃G, L⦄ ⊢ ➡ 𝐍⦃#i⦄.
#G #L #K #V #i #HLK #X #H
elim (cpr_inv_lref1 … H) -H // *
#K0 #V1 #V2 #HLK0 #_ #_
(* Basic_1: was: nf2_lift *)
lemma cnr_lift: ∀G,L0,L,T,T0,s,d,e. ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄ →
- â\87©[s, d, e] L0 â\89¡ L â\86\92 â\87§[d, e] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄.
+ â¬\87[s, d, e] L0 â\89¡ L â\86\92 â¬\86[d, e] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄.
#G #L0 #L #T #T0 #s #d #e #HLT #HL0 #HT0 #X #H
elim (cpr_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1
<(HLT … HT1) in HT0; -L #HT0
(* Note: this was missing in basic_1 *)
lemma cnr_inv_lift: ∀G,L0,L,T,T0,s,d,e. ⦃G, L0⦄ ⊢ ➡ 𝐍⦃T0⦄ →
- â\87©[s, d, e] L0 â\89¡ L â\86\92 â\87§[d, e] T ≡ T0 → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄.
+ â¬\87[s, d, e] L0 â\89¡ L â\86\92 â¬\86[d, e] T ≡ T0 → ⦃G, L⦄ ⊢ ➡ 𝐍⦃T⦄.
#G #L0 #L #T #T0 #s #d #e #HLT0 #HL0 #HT0 #X #H
elim (lift_total X d e) #X0 #HX0
lapply (cpr_lift … H … HL0 … HT0 … HX0) -L #HTX0
lapply (next_lt h k) >e1 -e1 #H elim (lt_refl_false … H)
qed-.
-lemma cnx_inv_delta: â\88\80h,g,I,G,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄ → ⊥.
+lemma cnx_inv_delta: â\88\80h,g,I,G,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄ → ⊥.
#h #g #I #G #L #K #V #i #HLK #H
elim (lift_total V 0 (i+1)) #W #HVW
lapply (H W ?) -H [ /3 width=7 by cpx_delta/ ] -HLK #H destruct
#H elim (lt_refl_false i) /2 width=3 by lt_to_le_to_lt/
qed.
-lemma cnx_lref_atom: â\88\80h,g,G,L,i. â\87©[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄.
+lemma cnx_lref_atom: â\88\80h,g,G,L,i. â¬\87[i] L ≡ ⋆ → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃#i⦄.
#h #g #G #L #i #HL @cnx_lref_free >(drop_fwd_length … HL) -HL //
qed.
(* Relocation properties ****************************************************)
-lemma cnx_lift: â\88\80h,g,G,L0,L,T,T0,s,d,e. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\8dâ¦\83Tâ¦\84 â\86\92 â\87©[s, d, e] L0 ≡ L →
- â\87§[d, e] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡[h, g] 𝐍⦃T0⦄.
+lemma cnx_lift: â\88\80h,g,G,L0,L,T,T0,s,d,e. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\8dâ¦\83Tâ¦\84 â\86\92 â¬\87[s, d, e] L0 ≡ L →
+ â¬\86[d, e] T ≡ T0 → ⦃G, L0⦄ ⊢ ➡[h, g] 𝐍⦃T0⦄.
#h #g #G #L0 #L #T #T0 #s #d #e #HLT #HL0 #HT0 #X #H
elim (cpx_inv_lift1 … H … HL0 … HT0) -L0 #T1 #HT10 #HT1
<(HLT … HT1) in HT0; -L #HT0
>(lift_mono … HT10 … HT0) -T1 -X //
qed.
-lemma cnx_inv_lift: â\88\80h,g,G,L0,L,T,T0,s,d,e. â¦\83G, L0â¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\8dâ¦\83T0â¦\84 â\86\92 â\87©[s, d, e] L0 ≡ L →
- â\87§[d, e] T ≡ T0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄.
+lemma cnx_inv_lift: â\88\80h,g,G,L0,L,T,T0,s,d,e. â¦\83G, L0â¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\8dâ¦\83T0â¦\84 â\86\92 â¬\87[s, d, e] L0 ≡ L →
+ â¬\86[d, e] T ≡ T0 → ⦃G, L⦄ ⊢ ➡[h, g] 𝐍⦃T⦄.
#h #g #G #L0 #L #T #T0 #s #d #e #HLT0 #HL0 #HT0 #X #H
elim (lift_total X d e) #X0 #HX0
lapply (cpx_lift … H … HL0 … HT0 … HX0) -L #HTX0
inductive cpr: relation4 genv lenv term term ≝
| cpr_atom : ∀I,G,L. cpr G L (⓪{I}) (⓪{I})
| cpr_delta: ∀G,L,K,V,V2,W2,i.
- â\87©[i] L ≡ K. ⓓV → cpr G K V V2 →
- â\87§[0, i + 1] V2 ≡ W2 → cpr G L (#i) W2
+ â¬\87[i] L ≡ K. ⓓV → cpr G K V V2 →
+ â¬\86[0, i + 1] V2 ≡ W2 → cpr G L (#i) W2
| cpr_bind : ∀a,I,G,L,V1,V2,T1,T2.
cpr G L V1 V2 → cpr G (L.ⓑ{I}V1) T1 T2 →
cpr G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
cpr G L V1 V2 → cpr G L T1 T2 →
cpr G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
| cpr_zeta : ∀G,L,V,T1,T,T2. cpr G (L.ⓓV) T1 T →
- â\87§[0, 1] T2 ≡ T → cpr G L (+ⓓV.T1) T2
+ â¬\86[0, 1] T2 ≡ T → cpr G L (+ⓓV.T1) T2
| cpr_eps : ∀G,L,V,T1,T2. cpr G L T1 T2 → cpr G L (ⓝV.T1) T2
| cpr_beta : ∀a,G,L,V1,V2,W1,W2,T1,T2.
cpr G L V1 V2 → cpr G L W1 W2 → cpr G (L.ⓛW1) T1 T2 →
cpr G L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2)
| cpr_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2.
- cpr G L V1 V â\86\92 â\87§[0, 1] V ≡ V2 → cpr G L W1 W2 → cpr G (L.ⓓW1) T1 T2 →
+ cpr G L V1 V â\86\92 â¬\86[0, 1] V ≡ V2 → cpr G L W1 W2 → cpr G (L.ⓓW1) T1 T2 →
cpr G L (ⓐV1.ⓓ{a}W1.T1) (ⓓ{a}W2.ⓐV2.T2)
.
∀T. ⦃G, L⦄ ⊢ ②{I}V1.T ➡ ②{I}V2.T.
* /2 width=1 by cpr_bind, cpr_flat/ qed.
-lemma cpr_delift: â\88\80G,K,V,T1,L,d. â\87©[d] L ≡ (K.ⓓV) →
- â\88\83â\88\83T2,T. â¦\83G, Lâ¦\84 â\8a¢ T1 â\9e¡ T2 & â\87§[d, 1] T ≡ T2.
+lemma cpr_delift: â\88\80G,K,V,T1,L,d. â¬\87[d] L ≡ (K.ⓓV) →
+ â\88\83â\88\83T2,T. â¦\83G, Lâ¦\84 â\8a¢ T1 â\9e¡ T2 & â¬\86[d, 1] T ≡ T2.
#G #K #V #T1 elim T1 -T1
[ * /2 width=4 by cpr_atom, lift_sort, lift_gref, ex2_2_intro/
#i #L #d #HLK elim (lt_or_eq_or_gt i d)
fact cpr_inv_atom1_aux: ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 → ∀I. T1 = ⓪{I} →
T2 = ⓪{I} ∨
- â\88\83â\88\83K,V,V2,i. â\87©[i] L ≡ K. ⓓV & ⦃G, K⦄ ⊢ V ➡ V2 &
- â\87§[O, i + 1] V2 ≡ T2 & I = LRef i.
+ â\88\83â\88\83K,V,V2,i. â¬\87[i] L ≡ K. ⓓV & ⦃G, K⦄ ⊢ V ➡ V2 &
+ â¬\86[O, i + 1] V2 ≡ T2 & I = LRef i.
#G #L #T1 #T2 * -G -L -T1 -T2
[ #I #G #L #J #H destruct /2 width=1 by or_introl/
| #L #G #K #V #V2 #T2 #i #HLK #HV2 #HVT2 #J #H destruct /3 width=8 by ex4_4_intro, or_intror/
lemma cpr_inv_atom1: ∀I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ➡ T2 →
T2 = ⓪{I} ∨
- â\88\83â\88\83K,V,V2,i. â\87©[i] L ≡ K. ⓓV & ⦃G, K⦄ ⊢ V ➡ V2 &
- â\87§[O, i + 1] V2 ≡ T2 & I = LRef i.
+ â\88\83â\88\83K,V,V2,i. â¬\87[i] L ≡ K. ⓓV & ⦃G, K⦄ ⊢ V ➡ V2 &
+ â¬\86[O, i + 1] V2 ≡ T2 & I = LRef i.
/2 width=3 by cpr_inv_atom1_aux/ qed-.
(* Basic_1: includes: pr0_gen_sort pr2_gen_sort *)
(* Basic_1: includes: pr0_gen_lref pr2_gen_lref *)
lemma cpr_inv_lref1: ∀G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡ T2 →
T2 = #i ∨
- â\88\83â\88\83K,V,V2. â\87©[i] L ≡ K. ⓓV & ⦃G, K⦄ ⊢ V ➡ V2 &
- â\87§[O, i + 1] V2 ≡ T2.
+ â\88\83â\88\83K,V,V2. â¬\87[i] L ≡ K. ⓓV & ⦃G, K⦄ ⊢ V ➡ V2 &
+ â¬\86[O, i + 1] V2 ≡ T2.
#G #L #T2 #i #H
elim (cpr_inv_atom1 … H) -H /2 width=1 by or_introl/
* #K #V #V2 #j #HLK #HV2 #HVT2 #H destruct /3 width=6 by ex3_3_intro, or_intror/
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡ V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡ T2 &
U2 = ⓑ{a,I}V2.T2
) ∨
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡ T & â\87§[0, 1] U2 ≡ T &
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡ T & â¬\86[0, 1] U2 ≡ T &
a = true & I = Abbr.
#G #L #U1 #U2 * -L -U1 -U2
[ #I #G #L #b #J #W1 #U1 #H destruct
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡ V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡ T2 &
U2 = ⓑ{a,I}V2.T2
) ∨
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡ T & â\87§[0, 1] U2 ≡ T &
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡ T & â¬\86[0, 1] U2 ≡ T &
a = true & I = Abbr.
/2 width=3 by cpr_inv_bind1_aux/ qed-.
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡ V2 & ⦃G, L. ⓓV1⦄ ⊢ T1 ➡ T2 &
U2 = ⓓ{a}V2.T2
) ∨
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡ T & â\87§[0, 1] U2 ≡ T & a = true.
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡ T & â¬\86[0, 1] U2 ≡ T & a = true.
#a #G #L #V1 #T1 #U2 #H
elim (cpr_inv_bind1 … H) -H *
/3 width=5 by ex3_2_intro, ex3_intro, or_introl, or_intror/
| ∃∃a,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡ V2 & ⦃G, L⦄ ⊢ W1 ➡ W2 &
⦃G, L.ⓛW1⦄ ⊢ T1 ➡ T2 & U1 = ⓛ{a}W1.T1 &
U2 = ⓓ{a}ⓝW2.V2.T2 & I = Appl
- | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V & â\87§[0,1] V ≡ V2 &
+ | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V & â¬\86[0,1] V ≡ V2 &
⦃G, L⦄ ⊢ W1 ➡ W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡ T2 &
U1 = ⓓ{a}W1.T1 &
U2 = ⓓ{a}W2.ⓐV2.T2 & I = Appl.
| ∃∃a,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡ V2 & ⦃G, L⦄ ⊢ W1 ➡ W2 &
⦃G, L.ⓛW1⦄ ⊢ T1 ➡ T2 & U1 = ⓛ{a}W1.T1 &
U2 = ⓓ{a}ⓝW2.V2.T2 & I = Appl
- | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V & â\87§[0,1] V ≡ V2 &
+ | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V & â¬\86[0,1] V ≡ V2 &
⦃G, L⦄ ⊢ W1 ➡ W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡ T2 &
U1 = ⓓ{a}W1.T1 &
U2 = ⓓ{a}W2.ⓐV2.T2 & I = Appl.
| ∃∃a,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡ V2 & ⦃G, L⦄ ⊢ W1 ➡ W2 &
⦃G, L.ⓛW1⦄ ⊢ T1 ➡ T2 &
U1 = ⓛ{a}W1.T1 & U2 = ⓓ{a}ⓝW2.V2.T2
- | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V & â\87§[0,1] V ≡ V2 &
+ | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡ V & â¬\86[0,1] V ≡ V2 &
⦃G, L⦄ ⊢ W1 ➡ W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡ T2 &
U1 = ⓓ{a}W1.T1 & U2 = ⓓ{a}W2.ⓐV2.T2.
#G #L #V1 #U1 #U2 #H elim (cpr_inv_flat1 … H) -H *
| cpx_atom : ∀I,G,L. cpx h g G L (⓪{I}) (⓪{I})
| cpx_st : ∀G,L,k,l. deg h g k (l+1) → cpx h g G L (⋆k) (⋆(next h k))
| cpx_delta: ∀I,G,L,K,V,V2,W2,i.
- â\87©[i] L ≡ K.ⓑ{I}V → cpx h g G K V V2 →
- â\87§[0, i+1] V2 ≡ W2 → cpx h g G L (#i) W2
+ â¬\87[i] L ≡ K.ⓑ{I}V → cpx h g G K V V2 →
+ â¬\86[0, i+1] V2 ≡ W2 → cpx h g G L (#i) W2
| cpx_bind : ∀a,I,G,L,V1,V2,T1,T2.
cpx h g G L V1 V2 → cpx h g G (L.ⓑ{I}V1) T1 T2 →
cpx h g G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
cpx h g G L V1 V2 → cpx h g G L T1 T2 →
cpx h g G L (ⓕ{I}V1.T1) (ⓕ{I}V2.T2)
| cpx_zeta : ∀G,L,V,T1,T,T2. cpx h g G (L.ⓓV) T1 T →
- â\87§[0, 1] T2 ≡ T → cpx h g G L (+ⓓV.T1) T2
+ â¬\86[0, 1] T2 ≡ T → cpx h g G L (+ⓓV.T1) T2
| cpx_eps : ∀G,L,V,T1,T2. cpx h g G L T1 T2 → cpx h g G L (ⓝV.T1) T2
| cpx_ct : ∀G,L,V1,V2,T. cpx h g G L V1 V2 → cpx h g G L (ⓝV1.T) V2
| cpx_beta : ∀a,G,L,V1,V2,W1,W2,T1,T2.
cpx h g G L V1 V2 → cpx h g G L W1 W2 → cpx h g G (L.ⓛW1) T1 T2 →
cpx h g G L (ⓐV1.ⓛ{a}W1.T1) (ⓓ{a}ⓝW2.V2.T2)
| cpx_theta: ∀a,G,L,V1,V,V2,W1,W2,T1,T2.
- cpx h g G L V1 V â\86\92 â\87§[0, 1] V ≡ V2 → cpx h g G L W1 W2 →
+ cpx h g G L V1 V â\86\92 â¬\86[0, 1] V ≡ V2 → cpx h g G L W1 W2 →
cpx h g G (L.ⓓW1) T1 T2 →
cpx h g G L (ⓐV1.ⓓ{a}W1.T1) (ⓓ{a}W2.ⓐV2.T2)
.
#h #g * /2 width=1 by cpx_bind, cpx_flat/
qed.
-lemma cpx_delift: â\88\80h,g,I,G,K,V,T1,L,d. â\87©[d] L ≡ (K.ⓑ{I}V) →
- â\88\83â\88\83T2,T. â¦\83G, Lâ¦\84 â\8a¢ T1 â\9e¡[h, g] T2 & â\87§[d, 1] T ≡ T2.
+lemma cpx_delift: â\88\80h,g,I,G,K,V,T1,L,d. â¬\87[d] L ≡ (K.ⓑ{I}V) →
+ â\88\83â\88\83T2,T. â¦\83G, Lâ¦\84 â\8a¢ T1 â\9e¡[h, g] T2 & â¬\86[d, 1] T ≡ T2.
#h #g #I #G #K #V #T1 elim T1 -T1
[ * #i #L #d /2 width=4 by cpx_atom, lift_sort, lift_gref, ex2_2_intro/
elim (lt_or_eq_or_gt i d) #Hid [1,3: /3 width=4 by cpx_atom, lift_lref_ge_minus, lift_lref_lt, ex2_2_intro/ ]
fact cpx_inv_atom1_aux: ∀h,g,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h, g] T2 → ∀J. T1 = ⓪{J} →
∨∨ T2 = ⓪{J}
| ∃∃k,l. deg h g k (l+1) & T2 = ⋆(next h k) & J = Sort k
- | â\88\83â\88\83I,K,V,V2,i. â\87©[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ➡[h, g] V2 &
- â\87§[O, i+1] V2 ≡ T2 & J = LRef i.
+ | â\88\83â\88\83I,K,V,V2,i. â¬\87[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ➡[h, g] V2 &
+ â¬\86[O, i+1] V2 ≡ T2 & J = LRef i.
#G #h #g #L #T1 #T2 * -L -T1 -T2
[ #I #G #L #J #H destruct /2 width=1 by or3_intro0/
| #G #L #k #l #Hkl #J #H destruct /3 width=5 by or3_intro1, ex3_2_intro/
lemma cpx_inv_atom1: ∀h,g,J,G,L,T2. ⦃G, L⦄ ⊢ ⓪{J} ➡[h, g] T2 →
∨∨ T2 = ⓪{J}
| ∃∃k,l. deg h g k (l+1) & T2 = ⋆(next h k) & J = Sort k
- | â\88\83â\88\83I,K,V,V2,i. â\87©[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ➡[h, g] V2 &
- â\87§[O, i+1] V2 ≡ T2 & J = LRef i.
+ | â\88\83â\88\83I,K,V,V2,i. â¬\87[i] L ≡ K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ➡[h, g] V2 &
+ â¬\86[O, i+1] V2 ≡ T2 & J = LRef i.
/2 width=3 by cpx_inv_atom1_aux/ qed-.
lemma cpx_inv_sort1: ∀h,g,G,L,T2,k. ⦃G, L⦄ ⊢ ⋆k ➡[h, g] T2 → T2 = ⋆k ∨
lemma cpx_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡[h, g] T2 →
T2 = #i ∨
- â\88\83â\88\83I,K,V,V2. â\87©[i] L ≡ K. ⓑ{I}V & ⦃G, K⦄ ⊢ V ➡[h, g] V2 &
- â\87§[O, i+1] V2 ≡ T2.
+ â\88\83â\88\83I,K,V,V2. â¬\87[i] L ≡ K. ⓑ{I}V & ⦃G, K⦄ ⊢ V ➡[h, g] V2 &
+ â¬\86[O, i+1] V2 ≡ T2.
#h #g #G #L #T2 #i #H
elim (cpx_inv_atom1 … H) -H /2 width=1 by or_introl/ *
[ #k #l #_ #_ #H destruct
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 & ⦃G, L.ⓑ{J}V1⦄ ⊢ T1 ➡[h, g] T2 &
U2 = ⓑ{a,J}V2.T2
) ∨
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡[h, g] T & â\87§[0, 1] U2 ≡ T &
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡[h, g] T & â¬\86[0, 1] U2 ≡ T &
a = true & J = Abbr.
#h #g #G #L #U1 #U2 * -L -U1 -U2
[ #I #G #L #b #J #W #U1 #H destruct
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ➡[h, g] T2 &
U2 = ⓑ{a,I} V2. T2
) ∨
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡[h, g] T & â\87§[0, 1] U2 ≡ T &
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡[h, g] T & â¬\86[0, 1] U2 ≡ T &
a = true & I = Abbr.
/2 width=3 by cpx_inv_bind1_aux/ qed-.
∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ➡[h, g] T2 &
U2 = ⓓ{a} V2. T2
) ∨
- â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡[h, g] T & â\87§[0, 1] U2 ≡ T & a = true.
+ â\88\83â\88\83T. â¦\83G, L.â\93\93V1â¦\84 â\8a¢ T1 â\9e¡[h, g] T & â¬\86[0, 1] U2 ≡ T & a = true.
#h #g #a #G #L #V1 #T1 #U2 #H
elim (cpx_inv_bind1 … H) -H * /3 width=5 by ex3_2_intro, ex3_intro, or_introl, or_intror/
qed-.
⦃G, L.ⓛW1⦄ ⊢ T1 ➡[h, g] T2 &
U1 = ⓛ{a}W1.T1 &
U2 = ⓓ{a}ⓝW2.V2.T2 & J = Appl
- | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V & â\87§[0,1] V ≡ V2 &
+ | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V & â¬\86[0,1] V ≡ V2 &
⦃G, L⦄ ⊢ W1 ➡[h, g] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[h, g] T2 &
U1 = ⓓ{a}W1.T1 &
U2 = ⓓ{a}W2.ⓐV2.T2 & J = Appl.
⦃G, L.ⓛW1⦄ ⊢ T1 ➡[h, g] T2 &
U1 = ⓛ{a}W1.T1 &
U2 = ⓓ{a}ⓝW2.V2.T2 & I = Appl
- | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V & â\87§[0,1] V ≡ V2 &
+ | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V & â¬\86[0,1] V ≡ V2 &
⦃G, L⦄ ⊢ W1 ➡[h, g] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[h, g] T2 &
U1 = ⓓ{a}W1.T1 &
U2 = ⓓ{a}W2.ⓐV2.T2 & I = Appl.
| ∃∃a,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ➡[h, g] V2 & ⦃G, L⦄ ⊢ W1 ➡[h, g] W2 &
⦃G, L.ⓛW1⦄ ⊢ T1 ➡[h, g] T2 &
U1 = ⓛ{a}W1.T1 & U2 = ⓓ{a}ⓝW2.V2.T2
- | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V & â\87§[0,1] V ≡ V2 &
+ | â\88\83â\88\83a,V,V2,W1,W2,T1,T2. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[h, g] V & â¬\86[0,1] V ≡ V2 &
⦃G, L⦄ ⊢ W1 ➡[h, g] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ➡[h, g] T2 &
U1 = ⓓ{a}W1.T1 & U2 = ⓓ{a}W2. ⓐV2. T2.
#h #g #G #L #V1 #U1 #U2 #H elim (cpx_inv_flat1 … H) -H *
(* activate genv *)
(* reducible terms *)
inductive crr (G:genv): relation2 lenv term ≝
-| crr_delta : â\88\80L,K,V,i. â\87©[i] L ≡ K.ⓓV → crr G L (#i)
+| crr_delta : â\88\80L,K,V,i. â¬\87[i] L ≡ K.ⓓV → crr G L (#i)
| crr_appl_sn: ∀L,V,T. crr G L V → crr G L (ⓐV.T)
| crr_appl_dx: ∀L,V,T. crr G L T → crr G L (ⓐV.T)
| crr_ri2 : ∀I,L,V,T. ri2 I → crr G L (②{I}V.T)
/2 width=6 by crr_inv_sort_aux/ qed-.
fact crr_inv_lref_aux: ∀G,L,T,i. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → T = #i →
- â\88\83â\88\83K,V. â\87©[i] L ≡ K.ⓓV.
+ â\88\83â\88\83K,V. â¬\87[i] L ≡ K.ⓓV.
#G #L #T #j * -L -T
[ #L #K #V #i #HLK #H destruct /2 width=3 by ex1_2_intro/
| #L #V #T #_ #H destruct
]
qed-.
-lemma crr_inv_lref: â\88\80G,L,i. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡ ð\9d\90\91â¦\83#iâ¦\84 â\86\92 â\88\83â\88\83K,V. â\87©[i] L ≡ K.ⓓV.
+lemma crr_inv_lref: â\88\80G,L,i. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡ ð\9d\90\91â¦\83#iâ¦\84 â\86\92 â\88\83â\88\83K,V. â¬\87[i] L ≡ K.ⓓV.
/2 width=4 by crr_inv_lref_aux/ qed-.
fact crr_inv_gref_aux: ∀G,L,T,p. ⦃G, L⦄ ⊢ ➡ 𝐑⦃T⦄ → T = §p → ⊥.
(* Properties on relocation *************************************************)
-lemma crr_lift: â\88\80G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡ ð\9d\90\91â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U. â\87§[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐑⦃U⦄.
+lemma crr_lift: â\88\80G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡ ð\9d\90\91â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U. â¬\86[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐑⦃U⦄.
#G #K #T #H elim H -K -T
[ #K #K0 #V #i #HK0 #L #s #d #e #HLK #X #H
elim (lift_inv_lref1 … H) -H * #Hid #H destruct
]
qed.
-lemma crr_inv_lift: â\88\80G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡ ð\9d\90\91â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T. â\87§[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐑⦃T⦄.
+lemma crr_inv_lift: â\88\80G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡ ð\9d\90\91â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T. â¬\86[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐑⦃T⦄.
#G #L #U #H elim H -L -U
[ #L #L0 #W #i #HK0 #K #s #d #e #HLK #X #H
elim (lift_inv_lref2 … H) -H * #Hid #H destruct
(* extended reducible terms *)
inductive crx (h) (g) (G:genv): relation2 lenv term ≝
| crx_sort : ∀L,k,l. deg h g k (l+1) → crx h g G L (⋆k)
-| crx_delta : â\88\80I,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → crx h g G L (#i)
+| crx_delta : â\88\80I,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → crx h g G L (#i)
| crx_appl_sn: ∀L,V,T. crx h g G L V → crx h g G L (ⓐV.T)
| crx_appl_dx: ∀L,V,T. crx h g G L T → crx h g G L (ⓐV.T)
| crx_ri2 : ∀I,L,V,T. ri2 I → crx h g G L (②{I}V.T)
/2 width=5 by crx_inv_sort_aux/ qed-.
fact crx_inv_lref_aux: ∀h,g,G,L,T,i. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → T = #i →
- â\88\83â\88\83I,K,V. â\87©[i] L ≡ K.ⓑ{I}V.
+ â\88\83â\88\83I,K,V. â¬\87[i] L ≡ K.ⓑ{I}V.
#h #g #G #L #T #j * -L -T
[ #L #k #l #_ #H destruct
| #I #L #K #V #i #HLK #H destruct /2 width=4 by ex1_3_intro/
]
qed-.
-lemma crx_inv_lref: â\88\80h,g,G,L,i. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\91â¦\83#iâ¦\84 â\86\92 â\88\83â\88\83I,K,V. â\87©[i] L ≡ K.ⓑ{I}V.
+lemma crx_inv_lref: â\88\80h,g,G,L,i. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\91â¦\83#iâ¦\84 â\86\92 â\88\83â\88\83I,K,V. â¬\87[i] L ≡ K.ⓑ{I}V.
/2 width=6 by crx_inv_lref_aux/ qed-.
fact crx_inv_gref_aux: ∀h,g,G,L,T,p. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → T = §p → ⊥.
(* Properties on relocation *************************************************)
-lemma crx_lift: â\88\80h,g,G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\91â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U. â\87§[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄.
+lemma crx_lift: â\88\80h,g,G,K,T. â¦\83G, Kâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\91â¦\83Tâ¦\84 â\86\92 â\88\80L,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U. â¬\86[d, e] T ≡ U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄.
#h #g #G #K #T #H elim H -K -T
[ #K #k #l #Hkl #L #s #d #e #_ #X #H
>(lift_inv_sort1 … H) -X /2 width=2 by crx_sort/
]
qed.
-lemma crx_inv_lift: â\88\80h,g,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\91â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T. â\87§[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐑⦃T⦄.
+lemma crx_inv_lift: â\88\80h,g,G,L,U. â¦\83G, Lâ¦\84 â\8a¢ â\9e¡[h, g] ð\9d\90\91â¦\83Uâ¦\84 â\86\92 â\88\80K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T. â¬\86[d, e] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐑⦃T⦄.
#h #g #G #L #U #H elim H -L -U
[ #L #k #l #Hkl #K #s #d #e #_ #X #H
>(lift_inv_sort2 … H) -X /2 width=2 by crx_sort/
∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
) →
- â\88\80K0,V0. â\87©[i] L0 ≡ K0.ⓓV0 →
- â\88\80V2. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡ V2 â\86\92 â\88\80T2. â\87§[O, i + 1] V2 ≡ T2 →
+ â\88\80K0,V0. â¬\87[i] L0 ≡ K0.ⓓV0 →
+ â\88\80V2. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡ V2 â\86\92 â\88\80T2. â¬\86[O, i + 1] V2 ≡ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
∃∃T. ⦃G, L1⦄ ⊢ #i ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
#G #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
) →
- â\88\80K0,V0. â\87©[i] L0 ≡ K0.ⓓV0 →
- â\88\80V1. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡ V1 â\86\92 â\88\80T1. â\87§[O, i + 1] V1 ≡ T1 →
- â\88\80KX,VX. â\87©[i] L0 ≡ KX.ⓓVX →
- â\88\80V2. â¦\83G, KXâ¦\84 â\8a¢ VX â\9e¡ V2 â\86\92 â\88\80T2. â\87§[O, i + 1] V2 ≡ T2 →
+ â\88\80K0,V0. â¬\87[i] L0 ≡ K0.ⓓV0 →
+ â\88\80V1. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡ V1 â\86\92 â\88\80T1. â¬\86[O, i + 1] V1 ≡ T1 →
+ â\88\80KX,VX. â¬\87[i] L0 ≡ KX.ⓓVX →
+ â\88\80V2. â¦\83G, KXâ¦\84 â\8a¢ VX â\9e¡ V2 â\86\92 â\88\80T2. â¬\86[O, i + 1] V2 ≡ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
∃∃T. ⦃G, L1⦄ ⊢ T1 ➡ T & ⦃G, L2⦄ ⊢ T2 ➡ T.
#G #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
) →
∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0.ⓓV0⦄ ⊢ T0 ➡ T1 →
- â\88\80T2. â¦\83G, L0.â\93\93V0â¦\84 â\8a¢ T0 â\9e¡ T2 â\86\92 â\88\80X2. â\87§[O, 1] X2 ≡ T2 →
+ â\88\80T2. â¦\83G, L0.â\93\93V0â¦\84 â\8a¢ T0 â\9e¡ T2 â\86\92 â\88\80X2. â¬\86[O, 1] X2 ≡ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
∃∃T. ⦃G, L1⦄ ⊢ +ⓓV1.T1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T.
#G #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
) →
- â\88\80T1. â¦\83G, L0.â\93\93V0â¦\84 â\8a¢ T0 â\9e¡ T1 â\86\92 â\88\80X1. â\87§[O, 1] X1 ≡ T1 →
- â\88\80T2. â¦\83G, L0.â\93\93V0â¦\84 â\8a¢ T0 â\9e¡ T2 â\86\92 â\88\80X2. â\87§[O, 1] X2 ≡ T2 →
+ â\88\80T1. â¦\83G, L0.â\93\93V0â¦\84 â\8a¢ T0 â\9e¡ T1 â\86\92 â\88\80X1. â¬\86[O, 1] X1 ≡ T1 →
+ â\88\80T2. â¦\83G, L0.â\93\93V0â¦\84 â\8a¢ T0 â\9e¡ T2 â\86\92 â\88\80X2. â¬\86[O, 1] X2 ≡ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
∃∃T. ⦃G, L1⦄ ⊢ X1 ➡ T & ⦃G, L2⦄ ⊢ X2 ➡ T.
#G #L0 #V0 #T0 #IH #T1 #HT01 #X1 #HXT1
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
) →
∀V1. ⦃G, L0⦄ ⊢ V0 ➡ V1 → ∀T1. ⦃G, L0⦄ ⊢ ⓓ{a}W0.T0 ➡ T1 →
- â\88\80V2. â¦\83G, L0â¦\84 â\8a¢ V0 â\9e¡ V2 â\86\92 â\88\80U2. â\87§[O, 1] V2 ≡ U2 →
+ â\88\80V2. â¦\83G, L0â¦\84 â\8a¢ V0 â\9e¡ V2 â\86\92 â\88\80U2. â¬\86[O, 1] V2 ≡ U2 →
∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
∃∃T. ⦃G, L1⦄ ⊢ ⓐV1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
∀L1. ⦃G, L⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L⦄ ⊢ ➡ L2 →
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡ T0 & ⦃G, L2⦄ ⊢ T2 ➡ T0
) →
- â\88\80V1. â¦\83G, L0â¦\84 â\8a¢ V0 â\9e¡ V1 â\86\92 â\88\80U1. â\87§[O, 1] V1 ≡ U1 →
+ â\88\80V1. â¦\83G, L0â¦\84 â\8a¢ V0 â\9e¡ V1 â\86\92 â\88\80U1. â¬\86[O, 1] V1 ≡ U1 →
∀W1. ⦃G, L0⦄ ⊢ W0 ➡ W1 → ∀T1. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T1 →
- â\88\80V2. â¦\83G, L0â¦\84 â\8a¢ V0 â\9e¡ V2 â\86\92 â\88\80U2. â\87§[O, 1] V2 ≡ U2 →
+ â\88\80V2. â¦\83G, L0â¦\84 â\8a¢ V0 â\9e¡ V2 â\86\92 â\88\80U2. â¬\86[O, 1] V2 ≡ U2 →
∀W2. ⦃G, L0⦄ ⊢ W0 ➡ W2 → ∀T2. ⦃G, L0.ⓓW0⦄ ⊢ T0 ➡ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡ L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡ L2 →
∃∃T. ⦃G, L1⦄ ⊢ ⓓ{a}W1.ⓐU1.T1 ➡ T & ⦃G, L2⦄ ⊢ ⓓ{a}W2.ⓐU2.T2 ➡ T.
(* activate genv *)
inductive aaa: relation4 genv lenv term aarity ≝
| aaa_sort: ∀G,L,k. aaa G L (⋆k) (⓪)
-| aaa_lref: â\88\80I,G,L,K,V,B,i. â\87©[i] L ≡ K. ⓑ{I}V → aaa G K V B → aaa G L (#i) B
+| aaa_lref: â\88\80I,G,L,K,V,B,i. â¬\87[i] L ≡ K. ⓑ{I}V → aaa G K V B → aaa G L (#i) B
| aaa_abbr: ∀a,G,L,V,T,B,A.
aaa G L V B → aaa G (L.ⓓV) T A → aaa G L (ⓓ{a}V.T) A
| aaa_abst: ∀a,G,L,V,T,B,A.
/2 width=6 by aaa_inv_sort_aux/ qed-.
fact aaa_inv_lref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀i. T = #i →
- â\88\83â\88\83I,K,V. â\87©[i] L ≡ K.ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A.
+ â\88\83â\88\83I,K,V. â¬\87[i] L ≡ K.ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A.
#G #L #T #A * -G -L -T -A
[ #G #L #k #i #H destruct
| #I #G #L #K #V #B #j #HLK #HB #i #H destruct /2 width=5 by ex2_3_intro/
qed-.
lemma aaa_inv_lref: ∀G,L,A,i. ⦃G, L⦄ ⊢ #i ⁝ A →
- â\88\83â\88\83I,K,V. â\87©[i] L ≡ K. ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A.
+ â\88\83â\88\83I,K,V. â¬\87[i] L ≡ K. ⓑ{I} V & ⦃G, K⦄ ⊢ V ⁝ A.
/2 width=3 by aaa_inv_lref_aux/ qed-.
fact aaa_inv_gref_aux: ∀G,L,T,A. ⦃G, L⦄ ⊢ T ⁝ A → ∀p. T = §p → ⊥.
(* Properties on basic relocation *******************************************)
-lemma aaa_lift: â\88\80G,L1,T1,A. â¦\83G, L1â¦\84 â\8a¢ T1 â\81\9d A â\86\92 â\88\80L2,s,d,e. â\87©[s, d, e] L2 ≡ L1 →
- â\88\80T2. â\87§[d, e] T1 ≡ T2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
+lemma aaa_lift: â\88\80G,L1,T1,A. â¦\83G, L1â¦\84 â\8a¢ T1 â\81\9d A â\86\92 â\88\80L2,s,d,e. â¬\87[s, d, e] L2 ≡ L1 →
+ â\88\80T2. â¬\86[d, e] T1 ≡ T2 → ⦃G, L2⦄ ⊢ T2 ⁝ A.
#G #L1 #T1 #A #H elim H -G -L1 -T1 -A
[ #G #L1 #k #L2 #s #d #e #_ #T2 #H
>(lift_inv_sort1 … H) -H //
]
qed.
-lemma aaa_inv_lift: â\88\80G,L2,T2,A. â¦\83G, L2â¦\84 â\8a¢ T2 â\81\9d A â\86\92 â\88\80L1,s,d,e. â\87©[s, d, e] L2 ≡ L1 →
- â\88\80T1. â\87§[d, e] T1 ≡ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A.
+lemma aaa_inv_lift: â\88\80G,L2,T2,A. â¦\83G, L2â¦\84 â\8a¢ T2 â\81\9d A â\86\92 â\88\80L1,s,d,e. â¬\87[s, d, e] L2 ≡ L1 →
+ â\88\80T1. â¬\86[d, e] T1 ≡ T2 → ⦃G, L1⦄ ⊢ T1 ⁝ A.
#G #L2 #T2 #A #H elim H -G -L2 -T2 -A
[ #G #L2 #k #L1 #s #d #e #_ #T1 #H
>(lift_inv_sort2 … H) -H //
(* Properties concerning generic relocation *********************************)
-lemma aaa_lifts: â\88\80G,L1,L2,T2,A,s,des. â\87©*[s, des] L2 â\89¡ L1 â\86\92 â\88\80T1. â\87§*[des] T1 ≡ T2 →
+lemma aaa_lifts: â\88\80G,L1,L2,T2,A,s,des. â¬\87*[s, des] L2 â\89¡ L1 â\86\92 â\88\80T1. â¬\86*[des] T1 ≡ T2 →
⦃G, L1⦄ ⊢ T1 ⁝ A → ⦃G, L2⦄ ⊢ T2 ⁝ A.
#G #L1 #L2 #T2 #A #s #des #H elim H -L1 -L2 -des
[ #L #T1 #H #HT1
(* activate genv *)
inductive da (h:sh) (g:sd h): relation4 genv lenv term nat ≝
| da_sort: ∀G,L,k,l. deg h g k l → da h g G L (⋆k) l
-| da_ldef: â\88\80G,L,K,V,i,l. â\87©[i] L ≡ K.ⓓV → da h g G K V l → da h g G L (#i) l
-| da_ldec: â\88\80G,L,K,W,i,l. â\87©[i] L ≡ K.ⓛW → da h g G K W l → da h g G L (#i) (l+1)
+| da_ldef: â\88\80G,L,K,V,i,l. â¬\87[i] L ≡ K.ⓓV → da h g G K V l → da h g G L (#i) l
+| da_ldec: â\88\80G,L,K,W,i,l. â¬\87[i] L ≡ K.ⓛW → da h g G K W l → da h g G L (#i) (l+1)
| da_bind: ∀a,I,G,L,V,T,l. da h g G (L.ⓑ{I}V) T l → da h g G L (ⓑ{a,I}V.T) l
| da_flat: ∀I,G,L,V,T,l. da h g G L T l → da h g G L (ⓕ{I}V.T) l
.
/2 width=5 by da_inv_sort_aux/ qed-.
fact da_inv_lref_aux: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ▪[h, g] l → ∀j. T = #j →
- (â\88\83â\88\83K,V. â\87©[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] l) ∨
- (â\88\83â\88\83K,W,l0. â\87©[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] l0 &
+ (â\88\83â\88\83K,V. â¬\87[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] l) ∨
+ (â\88\83â\88\83K,W,l0. â¬\87[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] l0 &
l = l0 + 1
).
#h #g #G #L #T #l * -G -L -T -l
qed-.
lemma da_inv_lref: ∀h,g,G,L,j,l. ⦃G, L⦄ ⊢ #j ▪[h, g] l →
- (â\88\83â\88\83K,V. â\87©[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] l) ∨
- (â\88\83â\88\83K,W,l0. â\87©[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] l0 & l = l0+1).
+ (â\88\83â\88\83K,V. â¬\87[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V ▪[h, g] l) ∨
+ (â\88\83â\88\83K,W,l0. â¬\87[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W ▪[h, g] l0 & l = l0+1).
/2 width=3 by da_inv_lref_aux/ qed-.
fact da_inv_gref_aux: ∀h,g,G,L,T,l. ⦃G, L⦄ ⊢ T ▪[h, g] l → ∀p0. T = §p0 → ⊥.
(* Properties on relocation *************************************************)
lemma da_lift: ∀h,g,G,L1,T1,l. ⦃G, L1⦄ ⊢ T1 ▪[h, g] l →
- â\88\80L2,s,d,e. â\87©[s, d, e] L2 â\89¡ L1 â\86\92 â\88\80T2. â\87§[d, e] T1 ≡ T2 →
+ â\88\80L2,s,d,e. â¬\87[s, d, e] L2 â\89¡ L1 â\86\92 â\88\80T2. â¬\86[d, e] T1 ≡ T2 →
⦃G, L2⦄ ⊢ T2 ▪[h, g] l.
#h #g #G #L1 #T1 #l #H elim H -G -L1 -T1 -l
[ #G #L1 #k #l #Hkl #L2 #s #d #e #_ #X #H
(* Inversion lemmas on relocation *******************************************)
lemma da_inv_lift: ∀h,g,G,L2,T2,l. ⦃G, L2⦄ ⊢ T2 ▪[h, g] l →
- â\88\80L1,s,d,e. â\87©[s, d, e] L2 â\89¡ L1 â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ T2 →
+ â\88\80L1,s,d,e. â¬\87[s, d, e] L2 â\89¡ L1 â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ T2 →
⦃G, L1⦄ ⊢ T1 ▪[h, g] l.
#h #g #G #L2 #T2 #l #H elim H -G -L2 -T2 -l
[ #G #L2 #k #l #Hkl #L1 #s #d #e #_ #X #H
qed.
(* Note: the constant 0 cannot be generalized *)
-lemma lsuba_drop_O1_conf: â\88\80G,L1,L2. G â\8a¢ L1 â«\83â\81\9d L2 â\86\92 â\88\80K1,s,e. â\87©[s, 0, e] L1 ≡ K1 →
- â\88\83â\88\83K2. G â\8a¢ K1 â«\83â\81\9d K2 & â\87©[s, 0, e] L2 ≡ K2.
+lemma lsuba_drop_O1_conf: â\88\80G,L1,L2. G â\8a¢ L1 â«\83â\81\9d L2 â\86\92 â\88\80K1,s,e. â¬\87[s, 0, e] L1 ≡ K1 →
+ â\88\83â\88\83K2. G â\8a¢ K1 â«\83â\81\9d K2 & â¬\87[s, 0, e] L2 ≡ K2.
#G #L1 #L2 #H elim H -L1 -L2
[ /2 width=3 by ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #K1 #s #e #H
qed-.
(* Note: the constant 0 cannot be generalized *)
-lemma lsuba_drop_O1_trans: â\88\80G,L1,L2. G â\8a¢ L1 â«\83â\81\9d L2 â\86\92 â\88\80K2,s,e. â\87©[s, 0, e] L2 ≡ K2 →
- â\88\83â\88\83K1. G â\8a¢ K1 â«\83â\81\9d K2 & â\87©[s, 0, e] L1 ≡ K1.
+lemma lsuba_drop_O1_trans: â\88\80G,L1,L2. G â\8a¢ L1 â«\83â\81\9d L2 â\86\92 â\88\80K2,s,e. â¬\87[s, 0, e] L2 ≡ K2 →
+ â\88\83â\88\83K1. G â\8a¢ K1 â«\83â\81\9d K2 & â¬\87[s, 0, e] L1 ≡ K1.
#G #L1 #L2 #H elim H -L1 -L2
[ /2 width=3 by ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #K2 #s #e #H
(* Note: the constant 0 cannot be generalized *)
lemma lsubd_drop_O1_conf: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 →
- â\88\80K1,s,e. â\87©[s, 0, e] L1 ≡ K1 →
- â\88\83â\88\83K2. G â\8a¢ K1 â«\83â\96ª[h, g] K2 & â\87©[s, 0, e] L2 ≡ K2.
+ â\88\80K1,s,e. â¬\87[s, 0, e] L1 ≡ K1 →
+ â\88\83â\88\83K2. G â\8a¢ K1 â«\83â\96ª[h, g] K2 & â¬\87[s, 0, e] L2 ≡ K2.
#h #g #G #L1 #L2 #H elim H -L1 -L2
[ /2 width=3 by ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #K1 #s #e #H
(* Note: the constant 0 cannot be generalized *)
lemma lsubd_drop_O1_trans: ∀h,g,G,L1,L2. G ⊢ L1 ⫃▪[h, g] L2 →
- â\88\80K2,s,e. â\87©[s, 0, e] L2 ≡ K2 →
- â\88\83â\88\83K1. G â\8a¢ K1 â«\83â\96ª[h, g] K2 & â\87©[s, 0, e] L1 ≡ K1.
+ â\88\80K2,s,e. â¬\87[s, 0, e] L2 ≡ K2 →
+ â\88\83â\88\83K1. G â\8a¢ K1 â«\83â\96ª[h, g] K2 & â¬\87[s, 0, e] L1 ≡ K1.
#h #g #G #L1 #L2 #H elim H -L1 -L2
[ /2 width=3 by ex2_intro/
| #I #L1 #L2 #V #_ #IHL12 #K2 #s #e #H
qed-.
lemma lsubr_fwd_drop2_pair: ∀L1,L2. L1 ⫃ L2 →
- â\88\80I,K2,W,s,i. â\87©[s, 0, i] L2 ≡ K2.ⓑ{I}W →
- (â\88\83â\88\83K1. K1 â«\83 K2 & â\87©[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨
- â\88\83â\88\83K1,V. K1 â«\83 K2 & â\87©[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst.
+ â\88\80I,K2,W,s,i. â¬\87[s, 0, i] L2 ≡ K2.ⓑ{I}W →
+ (â\88\83â\88\83K1. K1 â«\83 K2 & â¬\87[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨
+ â\88\83â\88\83K1,V. K1 â«\83 K2 & â¬\87[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst.
#L1 #L2 #H elim H -L1 -L2
[ #L #I #K2 #W #s #i #H
elim (drop_inv_atom1 … H) -H #H destruct
qed-.
lemma lsubr_fwd_drop2_abbr: ∀L1,L2. L1 ⫃ L2 →
- â\88\80K2,V,s,i. â\87©[s, 0, i] L2 ≡ K2.ⓓV →
- â\88\83â\88\83K1. K1 â«\83 K2 & â\87©[s, 0, i] L1 ≡ K1.ⓓV.
+ â\88\80K2,V,s,i. â¬\87[s, 0, i] L2 ≡ K2.ⓓV →
+ â\88\83â\88\83K1. K1 â«\83 K2 & â¬\87[s, 0, i] L1 ≡ K1.ⓓV.
#L1 #L2 #HL12 #K2 #V #s #i #HLK2 elim (lsubr_fwd_drop2_pair … HL12 … HLK2) -L2 // *
#K1 #W #_ #_ #H destruct
qed-.
inductive cpy: ynat → ynat → relation4 genv lenv term term ≝
| cpy_atom : ∀I,G,L,d,e. cpy d e G L (⓪{I}) (⓪{I})
| cpy_subst: ∀I,G,L,K,V,W,i,d,e. d ≤ yinj i → i < d+e →
- â\87©[i] L â\89¡ K.â\93\91{I}V â\86\92 â\87§[0, i+1] V ≡ W → cpy d e G L (#i) W
+ â¬\87[i] L â\89¡ K.â\93\91{I}V â\86\92 â¬\86[0, i+1] V ≡ W → cpy d e G L (#i) W
| cpy_bind : ∀a,I,G,L,V1,V2,T1,T2,d,e.
cpy d e G L V1 V2 → cpy (⫯d) e G (L.ⓑ{I}V1) T1 T2 →
cpy d e G L (ⓑ{a,I}V1.T1) (ⓑ{a,I}V2.T2)
qed.
(* Basic_1: was: subst1_ex *)
-lemma cpy_full: â\88\80I,G,K,V,T1,L,d. â\87©[d] L ≡ K.ⓑ{I}V →
- â\88\83â\88\83T2,T. â¦\83G, Lâ¦\84 â\8a¢ T1 â\96¶[d, 1] T2 & â\87§[d, 1] T ≡ T2.
+lemma cpy_full: â\88\80I,G,K,V,T1,L,d. â¬\87[d] L ≡ K.ⓑ{I}V →
+ â\88\83â\88\83T2,T. â¦\83G, Lâ¦\84 â\8a¢ T1 â\96¶[d, 1] T2 & â¬\86[d, 1] T ≡ T2.
#I #G #K #V #T1 elim T1 -T1
[ * #i #L #d #HLK
/2 width=4 by lift_sort, lift_gref, ex2_2_intro/
(* Basic forward lemmas *****************************************************)
lemma cpy_fwd_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80T1,d,e. â\87§[d, e] T1 ≡ U1 →
+ â\88\80T1,d,e. â¬\86[d, e] T1 ≡ U1 →
d ≤ dt → d + e ≤ dt + et →
- â\88\83â\88\83T2. â¦\83G, Lâ¦\84 â\8a¢ U1 â\96¶[d+e, dt+et-(d+e)] U2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Lâ¦\84 â\8a¢ U1 â\96¶[d+e, dt+et-(d+e)] U2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
[ * #i #G #L #dt #et #T1 #d #e #H #_
[ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
fact cpy_inv_atom1_aux: ∀G,L,T1,T2,d,e. ⦃G, L⦄ ⊢ T1 ▶[d, e] T2 → ∀J. T1 = ⓪{J} →
T2 = ⓪{J} ∨
∃∃I,K,V,i. d ≤ yinj i & i < d + e &
- â\87©[i] L ≡ K.ⓑ{I}V &
- â\87§[O, i+1] V ≡ T2 &
+ â¬\87[i] L ≡ K.ⓑ{I}V &
+ â¬\86[O, i+1] V ≡ T2 &
J = LRef i.
#G #L #T1 #T2 #d #e * -G -L -T1 -T2 -d -e
[ #I #G #L #d #e #J #H destruct /2 width=1 by or_introl/
lemma cpy_inv_atom1: ∀I,G,L,T2,d,e. ⦃G, L⦄ ⊢ ⓪{I} ▶[d, e] T2 →
T2 = ⓪{I} ∨
∃∃J,K,V,i. d ≤ yinj i & i < d + e &
- â\87©[i] L ≡ K.ⓑ{J}V &
- â\87§[O, i+1] V ≡ T2 &
+ â¬\87[i] L ≡ K.ⓑ{J}V &
+ â¬\86[O, i+1] V ≡ T2 &
I = LRef i.
/2 width=4 by cpy_inv_atom1_aux/ qed-.
lemma cpy_inv_lref1: ∀G,L,T2,i,d,e. ⦃G, L⦄ ⊢ #i ▶[d, e] T2 →
T2 = #i ∨
∃∃I,K,V. d ≤ i & i < d + e &
- â\87©[i] L ≡ K.ⓑ{I}V &
- â\87§[O, i+1] V ≡ T2.
+ â¬\87[i] L ≡ K.ⓑ{I}V &
+ â¬\86[O, i+1] V ≡ T2.
#G #L #T2 #i #d #e #H
elim (cpy_inv_atom1 … H) -H /2 width=1 by or_introl/
* #I #K #V #j #Hdj #Hjde #HLK #HVT2 #H destruct /3 width=5 by ex4_3_intro, or_intror/
/2 width=6 by cpy_inv_refl_O2_aux/ qed-.
(* Basic_1: was: subst1_gen_lift_eq *)
-lemma cpy_inv_lift1_eq: â\88\80G,T1,U1,d,e. â\87§[d, e] T1 ≡ U1 →
+lemma cpy_inv_lift1_eq: â\88\80G,T1,U1,d,e. â¬\86[d, e] T1 ≡ U1 →
∀L,U2. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 → U1 = U2.
#G #T1 #U1 #d #e #HTU1 #L #U2 #HU12 elim (cpy_fwd_up … HU12 … HTU1) -HU12 -HTU1
/2 width=4 by cpy_inv_refl_O2/
(* Basic_1: was: subst1_lift_lt *)
lemma cpy_lift_le: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
- â\88\80L,U1,U2,s,d,e. â\87©[s, d, e] L ≡ K →
- â\87§[d, e] T1 â\89¡ U1 â\86\92 â\87§[d, e] T2 ≡ U2 →
+ â\88\80L,U1,U2,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â¬\86[d, e] T1 â\89¡ U1 â\86\92 â¬\86[d, e] T2 ≡ U2 →
dt + et ≤ d → ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2.
#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_
qed-.
lemma cpy_lift_be: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
- â\88\80L,U1,U2,s,d,e. â\87©[s, d, e] L ≡ K →
- â\87§[d, e] T1 â\89¡ U1 â\86\92 â\87§[d, e] T2 ≡ U2 →
+ â\88\80L,U1,U2,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â¬\86[d, e] T1 â\89¡ U1 â\86\92 â¬\86[d, e] T2 ≡ U2 →
dt ≤ d → d ≤ dt + et → ⦃G, L⦄ ⊢ U1 ▶[dt, et + e] U2.
#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_ #_
(* Basic_1: was: subst1_lift_ge *)
lemma cpy_lift_ge: ∀G,K,T1,T2,dt,et. ⦃G, K⦄ ⊢ T1 ▶[dt, et] T2 →
- â\88\80L,U1,U2,s,d,e. â\87©[s, d, e] L ≡ K →
- â\87§[d, e] T1 â\89¡ U1 â\86\92 â\87§[d, e] T2 ≡ U2 →
+ â\88\80L,U1,U2,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â¬\86[d, e] T1 â\89¡ U1 â\86\92 â¬\86[d, e] T2 ≡ U2 →
d ≤ dt → ⦃G, L⦄ ⊢ U1 ▶[dt+e, et] U2.
#G #K #T1 #T2 #dt #et #H elim H -G -K -T1 -T2 -dt -et
[ #I #G #K #dt #et #L #U1 #U2 #s #d #e #_ #H1 #H2 #_
(* Basic_1: was: subst1_gen_lift_lt *)
lemma cpy_inv_lift1_le: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt + et ≤ d →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, et] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, et] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_
[ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
qed-.
lemma cpy_inv_lift1_be: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt ≤ d → yinj d + e ≤ dt + et →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, et-e] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, et-e] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_ #_
[ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
(* Basic_1: was: subst1_gen_lift_ge *)
lemma cpy_inv_lift1_ge: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
yinj d + e ≤ dt →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt-e, et] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt-e, et] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #H elim H -G -L -U1 -U2 -dt -et
[ * #i #G #L #dt #et #K #s #d #e #_ #T1 #H #_
[ lapply (lift_inv_sort2 … H) -H #H destruct /2 width=3 by ex2_intro/
(* Advanced inversion lemmas on relocation ***********************************)
lemma cpy_inv_lift1_ge_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
d ≤ dt → dt ≤ yinj d + e → yinj d + e ≤ dt + et →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[d, dt + et - (yinj d + e)] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[d, dt + et - (yinj d + e)] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hddt #Hdtde #Hdedet
elim (cpy_split_up … HU12 (d + e)) -HU12 // -Hdedet #U #HU1 #HU2
lapply (cpy_weak … HU1 d e ? ?) -HU1 // [ >ymax_pre_sn_comm // ] -Hddt -Hdtde #HU1
qed-.
lemma cpy_inv_lift1_be_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt ≤ d → dt + et ≤ yinj d + e →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, d-dt] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, d-dt] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hdetde
lapply (cpy_weak … HU12 dt (d+e-dt) ? ?) -HU12 //
[ >ymax_pre_sn_comm /2 width=1 by yle_plus_dx1_trans/ ] -Hdetde #HU12
qed-.
lemma cpy_inv_lift1_le_up: ∀G,L,U1,U2,dt,et. ⦃G, L⦄ ⊢ U1 ▶[dt, et] U2 →
- â\88\80K,s,d,e. â\87©[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â\87§[d, e] T1 ≡ U1 →
+ â\88\80K,s,d,e. â¬\87[s, d, e] L â\89¡ K â\86\92 â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
dt ≤ d → d ≤ dt + et → dt + et ≤ yinj d + e →
- â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, d - dt] T2 & â\87§[d, e] T2 ≡ U2.
+ â\88\83â\88\83T2. â¦\83G, Kâ¦\84 â\8a¢ T1 â\96¶[dt, d - dt] T2 & â¬\86[d, e] T2 ≡ U2.
#G #L #U1 #U2 #dt #et #HU12 #K #s #d #e #HLK #T1 #HTU1 #Hdtd #Hddet #Hdetde
elim (cpy_split_up … HU12 d) -HU12 // #U #HU1 #HU2
elim (cpy_inv_lift1_le … HU1 … HLK … HTU1) -U1
(* Inversion lemmas on negated relocation ***********************************)
lemma cpy_fwd_nlift2_ge: ∀G,L,U1,U2,d,e. ⦃G, L⦄ ⊢ U1 ▶[d, e] U2 →
- â\88\80i. d â\89¤ yinj i â\86\92 (â\88\80T2. â\87§[i, 1] T2 ≡ U2 → ⊥) →
- (â\88\80T1. â\87§[i, 1] T1 ≡ U1 → ⊥) ∨
- â\88\83â\88\83I,K,W,j. d â\89¤ yinj j & j < i & â\87©[j]L ≡ K.ⓑ{I}W &
- (â\88\80V. â\87§[i-j-1, 1] V â\89¡ W â\86\92 â\8a¥) & (â\88\80T1. â\87§[j, 1] T1 ≡ U1 → ⊥).
+ â\88\80i. d â\89¤ yinj i â\86\92 (â\88\80T2. â¬\86[i, 1] T2 ≡ U2 → ⊥) →
+ (â\88\80T1. â¬\86[i, 1] T1 ≡ U1 → ⊥) ∨
+ â\88\83â\88\83I,K,W,j. d â\89¤ yinj j & j < i & â¬\87[j]L ≡ K.ⓑ{I}W &
+ (â\88\80V. â¬\86[i-j-1, 1] V â\89¡ W â\86\92 â\8a¥) & (â\88\80T1. â¬\86[j, 1] T1 ≡ U1 → ⊥).
#G #L #U1 #U2 #d #e #H elim H -G -L -U1 -U2 -d -e
[ /3 width=2 by or_introl/
| #I #G #L #K #V #W #j #d #e #Hdj #Hjde #HLK #HVW #i #Hdi #HnW
| drop_pair: ∀I,L,V. drop s 0 0 (L.ⓑ{I}V) (L.ⓑ{I}V)
| drop_drop: ∀I,L1,L2,V,e. drop s 0 e L1 L2 → drop s 0 (e+1) (L1.ⓑ{I}V) L2
| drop_skip: ∀I,L1,L2,V1,V2,d,e.
- drop s d e L1 L2 â\86\92 â\87§[d, e] V2 ≡ V1 →
+ drop s d e L1 L2 â\86\92 â¬\86[d, e] V2 ≡ V1 →
drop s (d+1) e (L1.ⓑ{I}V1) (L2.ⓑ{I}V2)
.
'RDrop e L1 L2 = (drop false O e L1 L2).
definition l_liftable: predicate (lenv → relation term) ≝
- λR. â\88\80K,T1,T2. R K T1 T2 â\86\92 â\88\80L,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80U1. â\87§[d, e] T1 â\89¡ U1 â\86\92 â\88\80U2. â\87§[d, e] T2 ≡ U2 → R L U1 U2.
+ λR. â\88\80K,T1,T2. R K T1 T2 â\86\92 â\88\80L,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80U1. â¬\86[d, e] T1 â\89¡ U1 â\86\92 â\88\80U2. â¬\86[d, e] T2 ≡ U2 → R L U1 U2.
definition l_deliftable_sn: predicate (lenv → relation term) ≝
- λR. â\88\80L,U1,U2. R L U1 U2 â\86\92 â\88\80K,s,d,e. â\87©[s, d, e] L ≡ K →
- â\88\80T1. â\87§[d, e] T1 ≡ U1 →
- â\88\83â\88\83T2. â\87§[d, e] T2 ≡ U2 & R K T1 T2.
+ λR. â\88\80L,U1,U2. R L U1 U2 â\86\92 â\88\80K,s,d,e. â¬\87[s, d, e] L ≡ K →
+ â\88\80T1. â¬\86[d, e] T1 ≡ U1 →
+ â\88\83â\88\83T2. â¬\86[d, e] T2 ≡ U2 & R K T1 T2.
definition dropable_sn: predicate (relation lenv) ≝
- λR. â\88\80L1,K1,s,d,e. â\87©[s, d, e] L1 ≡ K1 → ∀L2. R L1 L2 →
- â\88\83â\88\83K2. R K1 K2 & â\87©[s, d, e] L2 ≡ K2.
+ λR. â\88\80L1,K1,s,d,e. â¬\87[s, d, e] L1 ≡ K1 → ∀L2. R L1 L2 →
+ â\88\83â\88\83K2. R K1 K2 & â¬\87[s, d, e] L2 ≡ K2.
definition dropable_dx: predicate (relation lenv) ≝
- λR. â\88\80L1,L2. R L1 L2 â\86\92 â\88\80K2,s,e. â\87©[s, 0, e] L2 ≡ K2 →
- â\88\83â\88\83K1. â\87©[s, 0, e] L1 ≡ K1 & R K1 K2.
+ λR. â\88\80L1,L2. R L1 L2 â\86\92 â\88\80K2,s,e. â¬\87[s, 0, e] L2 ≡ K2 →
+ â\88\83â\88\83K1. â¬\87[s, 0, e] L1 ≡ K1 & R K1 K2.
(* Basic inversion lemmas ***************************************************)
-fact drop_inv_atom1_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 → L1 = ⋆ →
+fact drop_inv_atom1_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 → L1 = ⋆ →
L2 = ⋆ ∧ (s = Ⓕ → e = 0).
#L1 #L2 #s #d #e * -L1 -L2 -d -e
[ /3 width=1 by conj/
qed-.
(* Basic_1: was: drop_gen_sort *)
-lemma drop_inv_atom1: â\88\80L2,s,d,e. â\87©[s, d, e] ⋆ ≡ L2 → L2 = ⋆ ∧ (s = Ⓕ → e = 0).
+lemma drop_inv_atom1: â\88\80L2,s,d,e. â¬\87[s, d, e] ⋆ ≡ L2 → L2 = ⋆ ∧ (s = Ⓕ → e = 0).
/2 width=4 by drop_inv_atom1_aux/ qed-.
-fact drop_inv_O1_pair1_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 → d = 0 →
+fact drop_inv_O1_pair1_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 → d = 0 →
∀K,I,V. L1 = K.ⓑ{I}V →
(e = 0 ∧ L2 = K.ⓑ{I}V) ∨
- (0 < e â\88§ â\87©[s, d, e-1] K ≡ L2).
+ (0 < e â\88§ â¬\87[s, d, e-1] K ≡ L2).
#L1 #L2 #s #d #e * -L1 -L2 -d -e
[ #d #e #_ #_ #K #J #W #H destruct
| #I #L #V #_ #K #J #W #HX destruct /3 width=1 by or_introl, conj/
]
qed-.
-lemma drop_inv_O1_pair1: â\88\80I,K,L2,V,s,e. â\87©[s, 0, e] K. ⓑ{I} V ≡ L2 →
+lemma drop_inv_O1_pair1: â\88\80I,K,L2,V,s,e. â¬\87[s, 0, e] K. ⓑ{I} V ≡ L2 →
(e = 0 ∧ L2 = K.ⓑ{I}V) ∨
- (0 < e â\88§ â\87©[s, 0, e-1] K ≡ L2).
+ (0 < e â\88§ â¬\87[s, 0, e-1] K ≡ L2).
/2 width=3 by drop_inv_O1_pair1_aux/ qed-.
-lemma drop_inv_pair1: â\88\80I,K,L2,V,s. â\87©[s, 0, 0] K.ⓑ{I}V ≡ L2 → L2 = K.ⓑ{I}V.
+lemma drop_inv_pair1: â\88\80I,K,L2,V,s. â¬\87[s, 0, 0] K.ⓑ{I}V ≡ L2 → L2 = K.ⓑ{I}V.
#I #K #L2 #V #s #H
elim (drop_inv_O1_pair1 … H) -H * // #H destruct
elim (lt_refl_false … H)
(* Basic_1: was: drop_gen_drop *)
lemma drop_inv_drop1_lt: ∀I,K,L2,V,s,e.
- â\87©[s, 0, e] K.â\93\91{I}V â\89¡ L2 â\86\92 0 < e â\86\92 â\87©[s, 0, e-1] K ≡ L2.
+ â¬\87[s, 0, e] K.â\93\91{I}V â\89¡ L2 â\86\92 0 < e â\86\92 â¬\87[s, 0, e-1] K ≡ L2.
#I #K #L2 #V #s #e #H #He
elim (drop_inv_O1_pair1 … H) -H * // #H destruct
elim (lt_refl_false … He)
qed-.
lemma drop_inv_drop1: ∀I,K,L2,V,s,e.
- â\87©[s, 0, e+1] K.â\93\91{I}V â\89¡ L2 â\86\92 â\87©[s, 0, e] K ≡ L2.
+ â¬\87[s, 0, e+1] K.â\93\91{I}V â\89¡ L2 â\86\92 â¬\87[s, 0, e] K ≡ L2.
#I #K #L2 #V #s #e #H lapply (drop_inv_drop1_lt … H ?) -H //
qed-.
-fact drop_inv_skip1_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 → 0 < d →
+fact drop_inv_skip1_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 → 0 < d →
∀I,K1,V1. L1 = K1.ⓑ{I}V1 →
- â\88\83â\88\83K2,V2. â\87©[s, d-1, e] K1 ≡ K2 &
- â\87§[d-1, e] V2 ≡ V1 &
+ â\88\83â\88\83K2,V2. â¬\87[s, d-1, e] K1 ≡ K2 &
+ â¬\86[d-1, e] V2 ≡ V1 &
L2 = K2.ⓑ{I}V2.
#L1 #L2 #s #d #e * -L1 -L2 -d -e
[ #d #e #_ #_ #J #K1 #W1 #H destruct
qed-.
(* Basic_1: was: drop_gen_skip_l *)
-lemma drop_inv_skip1: â\88\80I,K1,V1,L2,s,d,e. â\87©[s, d, e] K1.ⓑ{I}V1 ≡ L2 → 0 < d →
- â\88\83â\88\83K2,V2. â\87©[s, d-1, e] K1 ≡ K2 &
- â\87§[d-1, e] V2 ≡ V1 &
+lemma drop_inv_skip1: â\88\80I,K1,V1,L2,s,d,e. â¬\87[s, d, e] K1.ⓑ{I}V1 ≡ L2 → 0 < d →
+ â\88\83â\88\83K2,V2. â¬\87[s, d-1, e] K1 ≡ K2 &
+ â¬\86[d-1, e] V2 ≡ V1 &
L2 = K2.ⓑ{I}V2.
/2 width=3 by drop_inv_skip1_aux/ qed-.
-lemma drop_inv_O1_pair2: â\88\80I,K,V,s,e,L1. â\87©[s, 0, e] L1 ≡ K.ⓑ{I}V →
+lemma drop_inv_O1_pair2: â\88\80I,K,V,s,e,L1. â¬\87[s, 0, e] L1 ≡ K.ⓑ{I}V →
(e = 0 ∧ L1 = K.ⓑ{I}V) ∨
- â\88\83â\88\83I1,K1,V1. â\87©[s, 0, e-1] K1 ≡ K.ⓑ{I}V & L1 = K1.ⓑ{I1}V1 & 0 < e.
+ â\88\83â\88\83I1,K1,V1. â¬\87[s, 0, e-1] K1 ≡ K.ⓑ{I}V & L1 = K1.ⓑ{I1}V1 & 0 < e.
#I #K #V #s #e *
[ #H elim (drop_inv_atom1 … H) -H #H destruct
| #L1 #I1 #V1 #H
]
qed-.
-fact drop_inv_skip2_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 → 0 < d →
+fact drop_inv_skip2_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 → 0 < d →
∀I,K2,V2. L2 = K2.ⓑ{I}V2 →
- â\88\83â\88\83K1,V1. â\87©[s, d-1, e] K1 ≡ K2 &
- â\87§[d-1, e] V2 ≡ V1 &
+ â\88\83â\88\83K1,V1. â¬\87[s, d-1, e] K1 ≡ K2 &
+ â¬\86[d-1, e] V2 ≡ V1 &
L1 = K1.ⓑ{I}V1.
#L1 #L2 #s #d #e * -L1 -L2 -d -e
[ #d #e #_ #_ #J #K2 #W2 #H destruct
qed-.
(* Basic_1: was: drop_gen_skip_r *)
-lemma drop_inv_skip2: â\88\80I,L1,K2,V2,s,d,e. â\87©[s, d, e] L1 ≡ K2.ⓑ{I}V2 → 0 < d →
- â\88\83â\88\83K1,V1. â\87©[s, d-1, e] K1 â\89¡ K2 & â\87§[d-1, e] V2 ≡ V1 &
+lemma drop_inv_skip2: â\88\80I,L1,K2,V2,s,d,e. â¬\87[s, d, e] L1 ≡ K2.ⓑ{I}V2 → 0 < d →
+ â\88\83â\88\83K1,V1. â¬\87[s, d-1, e] K1 â\89¡ K2 & â¬\86[d-1, e] V2 ≡ V1 &
L1 = K1.ⓑ{I}V1.
/2 width=3 by drop_inv_skip2_aux/ qed-.
-lemma drop_inv_O1_gt: â\88\80L,K,e,s. â\87©[s, 0, e] L ≡ K → |L| < e →
+lemma drop_inv_O1_gt: â\88\80L,K,e,s. â¬\87[s, 0, e] L ≡ K → |L| < e →
s = Ⓣ ∧ K = ⋆.
#L elim L -L [| #L #Z #X #IHL ] #K #e #s #H normalize in ⊢ (?%?→?); #H1e
[ elim (drop_inv_atom1 … H) -H elim s -s /2 width=1 by conj/
(* Basic properties *********************************************************)
-lemma drop_refl_atom_O2: â\88\80s,d. â\87©[s, d, O] ⋆ ≡ ⋆.
+lemma drop_refl_atom_O2: â\88\80s,d. â¬\87[s, d, O] ⋆ ≡ ⋆.
/2 width=1 by drop_atom/ qed.
(* Basic_1: was by definition: drop_refl *)
-lemma drop_refl: â\88\80L,d,s. â\87©[s, d, 0] L ≡ L.
+lemma drop_refl: â\88\80L,d,s. â¬\87[s, d, 0] L ≡ L.
#L elim L -L //
#L #I #V #IHL #d #s @(nat_ind_plus … d) -d /2 width=1 by drop_pair, drop_skip/
qed.
lemma drop_drop_lt: ∀I,L1,L2,V,s,e.
- â\87©[s, 0, e-1] L1 â\89¡ L2 â\86\92 0 < e â\86\92 â\87©[s, 0, e] L1.ⓑ{I}V ≡ L2.
+ â¬\87[s, 0, e-1] L1 â\89¡ L2 â\86\92 0 < e â\86\92 â¬\87[s, 0, e] L1.ⓑ{I}V ≡ L2.
#I #L1 #L2 #V #s #e #HL12 #He >(plus_minus_m_m e 1) /2 width=1 by drop_drop/
qed.
lemma drop_skip_lt: ∀I,L1,L2,V1,V2,s,d,e.
- â\87©[s, d-1, e] L1 â\89¡ L2 â\86\92 â\87§[d-1, e] V2 ≡ V1 → 0 < d →
- â\87©[s, d, e] L1. ⓑ{I} V1 ≡ L2.ⓑ{I}V2.
+ â¬\87[s, d-1, e] L1 â\89¡ L2 â\86\92 â¬\86[d-1, e] V2 ≡ V1 → 0 < d →
+ â¬\87[s, d, e] L1. ⓑ{I} V1 ≡ L2.ⓑ{I}V2.
#I #L1 #L2 #V1 #V2 #s #d #e #HL12 #HV21 #Hd >(plus_minus_m_m d 1) /2 width=1 by drop_skip/
qed.
-lemma drop_O1_le: â\88\80s,e,L. e â\89¤ |L| â\86\92 â\88\83K. â\87©[s, 0, e] L ≡ K.
+lemma drop_O1_le: â\88\80s,e,L. e â\89¤ |L| â\86\92 â\88\83K. â¬\87[s, 0, e] L ≡ K.
#s #e @(nat_ind_plus … e) -e /2 width=2 by ex_intro/
#e #IHe *
[ #H elim (le_plus_xSy_O_false … H)
]
qed-.
-lemma drop_O1_lt: â\88\80s,L,e. e < |L| â\86\92 â\88\83â\88\83I,K,V. â\87©[s, 0, e] L ≡ K.ⓑ{I}V.
+lemma drop_O1_lt: â\88\80s,L,e. e < |L| â\86\92 â\88\83â\88\83I,K,V. â¬\87[s, 0, e] L ≡ K.ⓑ{I}V.
#s #L elim L -L
[ #e #H elim (lt_zero_false … H)
| #L #I #V #IHL #e @(nat_ind_plus … e) -e /2 width=4 by drop_pair, ex1_3_intro/
]
qed-.
-lemma drop_O1_pair: â\88\80L,K,e,s. â\87©[s, 0, e] L ≡ K → e ≤ |L| → ∀I,V.
- â\88\83â\88\83J,W. â\87©[s, 0, e] L.ⓑ{I}V ≡ K.ⓑ{J}W.
+lemma drop_O1_pair: â\88\80L,K,e,s. â¬\87[s, 0, e] L ≡ K → e ≤ |L| → ∀I,V.
+ â\88\83â\88\83J,W. â¬\87[s, 0, e] L.ⓑ{I}V ≡ K.ⓑ{J}W.
#L elim L -L [| #L #Z #X #IHL ] #K #e #s #H normalize #He #I #V
[ elim (drop_inv_atom1 … H) -H #H <(le_n_O_to_eq … He) -e
#Hs destruct /2 width=3 by ex1_2_intro/
]
qed-.
-lemma drop_O1_ge: â\88\80L,e. |L| â\89¤ e â\86\92 â\87©[Ⓣ, 0, e] L ≡ ⋆.
+lemma drop_O1_ge: â\88\80L,e. |L| â\89¤ e â\86\92 â¬\87[Ⓣ, 0, e] L ≡ ⋆.
#L elim L -L [ #e #_ @drop_atom #H destruct ]
#L #I #V #IHL #e @(nat_ind_plus … e) -e [ #H elim (le_plus_xSy_O_false … H) ]
normalize /4 width=1 by drop_drop, monotonic_pred/
qed.
-lemma drop_O1_eq: â\88\80L,s. â\87©[s, 0, |L|] L ≡ ⋆.
+lemma drop_O1_eq: â\88\80L,s. â¬\87[s, 0, |L|] L ≡ ⋆.
#L elim L -L /2 width=1 by drop_drop, drop_atom/
qed.
-lemma drop_split: â\88\80L1,L2,d,e2,s. â\87©[s, d, e2] L1 ≡ L2 → ∀e1. e1 ≤ e2 →
- â\88\83â\88\83L. â\87©[s, d, e2 - e1] L1 â\89¡ L & â\87©[s, d, e1] L ≡ L2.
+lemma drop_split: â\88\80L1,L2,d,e2,s. â¬\87[s, d, e2] L1 ≡ L2 → ∀e1. e1 ≤ e2 →
+ â\88\83â\88\83L. â¬\87[s, d, e2 - e1] L1 â\89¡ L & â¬\87[s, d, e1] L ≡ L2.
#L1 #L2 #d #e2 #s #H elim H -L1 -L2 -d -e2
[ #d #e2 #Hs #e1 #He12 @(ex2_intro … (⋆))
@drop_atom #H lapply (Hs H) -s #H destruct /2 width=1 by le_n_O_to_eq/
]
qed-.
-lemma drop_FT: â\88\80L1,L2,d,e. â\87©[â\92», d, e] L1 â\89¡ L2 â\86\92 â\87©[Ⓣ, d, e] L1 ≡ L2.
+lemma drop_FT: â\88\80L1,L2,d,e. â¬\87[â\92», d, e] L1 â\89¡ L2 â\86\92 â¬\87[Ⓣ, d, e] L1 ≡ L2.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
/3 width=1 by drop_atom, drop_drop, drop_skip/
qed.
-lemma drop_gen: â\88\80L1,L2,s,d,e. â\87©[â\92», d, e] L1 â\89¡ L2 â\86\92 â\87©[s, d, e] L1 ≡ L2.
+lemma drop_gen: â\88\80L1,L2,s,d,e. â¬\87[â\92», d, e] L1 â\89¡ L2 â\86\92 â¬\87[s, d, e] L1 ≡ L2.
#L1 #L2 * /2 width=1 by drop_FT/
qed-.
-lemma drop_T: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 â\89¡ L2 â\86\92 â\87©[Ⓣ, d, e] L1 ≡ L2.
+lemma drop_T: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 â\89¡ L2 â\86\92 â¬\87[Ⓣ, d, e] L1 ≡ L2.
#L1 #L2 * /2 width=1 by drop_FT/
qed-.
(* Basic forward lemmas *****************************************************)
(* Basic_1: was: drop_S *)
-lemma drop_fwd_drop2: â\88\80L1,I2,K2,V2,s,e. â\87©[s, O, e] L1 ≡ K2. ⓑ{I2} V2 →
- â\87©[s, O, e + 1] L1 ≡ K2.
+lemma drop_fwd_drop2: â\88\80L1,I2,K2,V2,s,e. â¬\87[s, O, e] L1 ≡ K2. ⓑ{I2} V2 →
+ â¬\87[s, O, e + 1] L1 ≡ K2.
#L1 elim L1 -L1
[ #I2 #K2 #V2 #s #e #H lapply (drop_inv_atom1 … H) -H * #H destruct
| #K1 #I1 #V1 #IHL1 #I2 #K2 #V2 #s #e #H
]
qed-.
-lemma drop_fwd_length_ge: â\88\80L1,L2,d,e,s. â\87©[s, d, e] L1 ≡ L2 → |L1| ≤ d → |L2| = |L1|.
+lemma drop_fwd_length_ge: â\88\80L1,L2,d,e,s. â¬\87[s, d, e] L1 ≡ L2 → |L1| ≤ d → |L2| = |L1|.
#L1 #L2 #d #e #s #H elim H -L1 -L2 -d -e // normalize
[ #I #L1 #L2 #V #e #_ #_ #H elim (le_plus_xSy_O_false … H)
| /4 width=2 by le_plus_to_le_r, eq_f/
]
qed-.
-lemma drop_fwd_length_le_le: â\88\80L1,L2,d,e,s. â\87©[s, d, e] L1 ≡ L2 → d ≤ |L1| → e ≤ |L1| - d → |L2| = |L1| - e.
+lemma drop_fwd_length_le_le: â\88\80L1,L2,d,e,s. â¬\87[s, d, e] L1 ≡ L2 → d ≤ |L1| → e ≤ |L1| - d → |L2| = |L1| - e.
#L1 #L2 #d #e #s #H elim H -L1 -L2 -d -e // normalize
[ /3 width=2 by le_plus_to_le_r/
| #I #L1 #L2 #V1 #V2 #d #e #_ #_ #IHL12 >minus_plus_plus_l
]
qed-.
-lemma drop_fwd_length_le_ge: â\88\80L1,L2,d,e,s. â\87©[s, d, e] L1 ≡ L2 → d ≤ |L1| → |L1| - d ≤ e → |L2| = d.
+lemma drop_fwd_length_le_ge: â\88\80L1,L2,d,e,s. â¬\87[s, d, e] L1 ≡ L2 → d ≤ |L1| → |L1| - d ≤ e → |L2| = d.
#L1 #L2 #d #e #s #H elim H -L1 -L2 -d -e normalize
[ /2 width=1 by le_n_O_to_eq/
| #I #L #V #_ <minus_n_O #H elim (le_plus_xSy_O_false … H)
]
qed-.
-lemma drop_fwd_length: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → |L1| = |L2| + e.
+lemma drop_fwd_length: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → |L1| = |L2| + e.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e // normalize /2 width=1 by/
qed-.
-lemma drop_fwd_length_minus2: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → |L2| = |L1| - e.
+lemma drop_fwd_length_minus2: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → |L2| = |L1| - e.
#L1 #L2 #d #e #H lapply (drop_fwd_length … H) -H /2 width=1 by plus_minus, le_n/
qed-.
-lemma drop_fwd_length_minus4: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → e = |L1| - |L2|.
+lemma drop_fwd_length_minus4: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → e = |L1| - |L2|.
#L1 #L2 #d #e #H lapply (drop_fwd_length … H) -H //
qed-.
-lemma drop_fwd_length_le2: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → e ≤ |L1|.
+lemma drop_fwd_length_le2: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → e ≤ |L1|.
#L1 #L2 #d #e #H lapply (drop_fwd_length … H) -H //
qed-.
-lemma drop_fwd_length_le4: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → |L2| ≤ |L1|.
+lemma drop_fwd_length_le4: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → |L2| ≤ |L1|.
#L1 #L2 #d #e #H lapply (drop_fwd_length … H) -H //
qed-.
lemma drop_fwd_length_lt2: ∀L1,I2,K2,V2,d,e.
- â\87©[Ⓕ, d, e] L1 ≡ K2. ⓑ{I2} V2 → e < |L1|.
+ â¬\87[Ⓕ, d, e] L1 ≡ K2. ⓑ{I2} V2 → e < |L1|.
#L1 #I2 #K2 #V2 #d #e #H
lapply (drop_fwd_length … H) normalize in ⊢ (%→?); -I2 -V2 //
qed-.
-lemma drop_fwd_length_lt4: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → 0 < e → |L2| < |L1|.
+lemma drop_fwd_length_lt4: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → 0 < e → |L2| < |L1|.
#L1 #L2 #d #e #H lapply (drop_fwd_length … H) -H /2 width=1 by lt_minus_to_plus_r/
qed-.
-lemma drop_fwd_length_eq1: â\88\80L1,L2,K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
+lemma drop_fwd_length_eq1: â\88\80L1,L2,K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
|L1| = |L2| → |K1| = |K2|.
#L1 #L2 #K1 #K2 #d #e #HLK1 #HLK2 #HL12
lapply (drop_fwd_length … HLK1) -HLK1
/2 width=2 by injective_plus_r/
qed-.
-lemma drop_fwd_length_eq2: â\88\80L1,L2,K1,K2,d,e. â\87©[â\92», d, e] L1 â\89¡ K1 â\86\92 â\87©[Ⓕ, d, e] L2 ≡ K2 →
+lemma drop_fwd_length_eq2: â\88\80L1,L2,K1,K2,d,e. â¬\87[â\92», d, e] L1 â\89¡ K1 â\86\92 â¬\87[Ⓕ, d, e] L2 ≡ K2 →
|K1| = |K2| → |L1| = |L2|.
#L1 #L2 #K1 #K2 #d #e #HLK1 #HLK2 #HL12
lapply (drop_fwd_length … HLK1) -HLK1
lapply (drop_fwd_length … HLK2) -HLK2 //
qed-.
-lemma drop_fwd_lw: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 → ♯{L2} ≤ ♯{L1}.
+lemma drop_fwd_lw: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 → ♯{L2} ≤ ♯{L1}.
#L1 #L2 #s #d #e #H elim H -L1 -L2 -d -e // normalize
[ /2 width=3 by transitive_le/
| #I #L1 #L2 #V1 #V2 #d #e #_ #HV21 #IHL12
]
qed-.
-lemma drop_fwd_lw_lt: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → 0 < e → ♯{L2} < ♯{L1}.
+lemma drop_fwd_lw_lt: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → 0 < e → ♯{L2} < ♯{L1}.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
[ #d #e #H >H -H //
| #I #L #V #H elim (lt_refl_false … H)
]
qed-.
-lemma drop_fwd_rfw: â\88\80I,L,K,V,i. â\87©[i] L ≡ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}.
+lemma drop_fwd_rfw: â\88\80I,L,K,V,i. â¬\87[i] L ≡ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}.
#I #L #K #V #i #HLK lapply (drop_fwd_lw … HLK) -HLK
normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt/
qed-.
(* Advanced inversion lemmas ************************************************)
-fact drop_inv_O2_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 → e = 0 → L1 = L2.
+fact drop_inv_O2_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 → e = 0 → L1 = L2.
#L1 #L2 #s #d #e #H elim H -L1 -L2 -d -e
[ //
| //
qed-.
(* Basic_1: was: drop_gen_refl *)
-lemma drop_inv_O2: â\88\80L1,L2,s,d. â\87©[s, d, 0] L1 ≡ L2 → L1 = L2.
+lemma drop_inv_O2: â\88\80L1,L2,s,d. â¬\87[s, d, 0] L1 ≡ L2 → L1 = L2.
/2 width=5 by drop_inv_O2_aux/ qed-.
-lemma drop_inv_length_eq: â\88\80L1,L2,d,e. â\87©[Ⓕ, d, e] L1 ≡ L2 → |L1| = |L2| → e = 0.
+lemma drop_inv_length_eq: â\88\80L1,L2,d,e. â¬\87[Ⓕ, d, e] L1 ≡ L2 → |L1| = |L2| → e = 0.
#L1 #L2 #d #e #H #HL12 lapply (drop_fwd_length_minus4 … H) //
qed-.
-lemma drop_inv_refl: â\88\80L,d,e. â\87©[Ⓕ, d, e] L ≡ L → e = 0.
+lemma drop_inv_refl: â\88\80L,d,e. â¬\87[Ⓕ, d, e] L ≡ L → e = 0.
/2 width=5 by drop_inv_length_eq/ qed-.
-fact drop_inv_FT_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 →
+fact drop_inv_FT_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 →
∀I,K,V. L2 = K.ⓑ{I}V → s = Ⓣ → d = 0 →
- â\87©[Ⓕ, d, e] L1 ≡ K.ⓑ{I}V.
+ â¬\87[Ⓕ, d, e] L1 ≡ K.ⓑ{I}V.
#L1 #L2 #s #d #e #H elim H -L1 -L2 -d -e
[ #d #e #_ #J #K #W #H destruct
| #I #L #V #J #K #W #H destruct //
]
qed-.
-lemma drop_inv_FT: â\88\80I,L,K,V,e. â\87©[â\93\89, 0, e] L â\89¡ K.â\93\91{I}V â\86\92 â\87©[e] L ≡ K.ⓑ{I}V.
+lemma drop_inv_FT: â\88\80I,L,K,V,e. â¬\87[â\93\89, 0, e] L â\89¡ K.â\93\91{I}V â\86\92 â¬\87[e] L ≡ K.ⓑ{I}V.
/2 width=5 by drop_inv_FT_aux/ qed.
-lemma drop_inv_gen: â\88\80I,L,K,V,s,e. â\87©[s, 0, e] L â\89¡ K.â\93\91{I}V â\86\92 â\87©[e] L ≡ K.ⓑ{I}V.
+lemma drop_inv_gen: â\88\80I,L,K,V,s,e. â¬\87[s, 0, e] L â\89¡ K.â\93\91{I}V â\86\92 â¬\87[e] L ≡ K.ⓑ{I}V.
#I #L #K #V * /2 width=1 by drop_inv_FT/
qed-.
-lemma drop_inv_T: â\88\80I,L,K,V,s,e. â\87©[â\93\89, 0, e] L â\89¡ K.â\93\91{I}V â\86\92 â\87©[s, 0, e] L ≡ K.ⓑ{I}V.
+lemma drop_inv_T: â\88\80I,L,K,V,s,e. â¬\87[â\93\89, 0, e] L â\89¡ K.â\93\91{I}V â\86\92 â¬\87[s, 0, e] L ≡ K.ⓑ{I}V.
#I #L #K #V * /2 width=1 by drop_inv_FT/
qed-.
(* Properties on append for local environments ******************************)
-fact drop_O1_append_sn_le_aux: â\88\80L1,L2,s,d,e. â\87©[s, d, e] L1 ≡ L2 →
+fact drop_O1_append_sn_le_aux: â\88\80L1,L2,s,d,e. â¬\87[s, d, e] L1 ≡ L2 →
d = 0 → e ≤ |L1| →
- â\88\80L. â\87©[s, 0, e] L @@ L1 ≡ L @@ L2.
+ â\88\80L. â¬\87[s, 0, e] L @@ L1 ≡ L @@ L2.
#L1 #L2 #s #d #e #H elim H -L1 -L2 -d -e normalize
[2,3,4: /4 width=1 by drop_skip_lt, drop_drop, arith_b1, lt_minus_to_plus_r, monotonic_pred/ ]
#d #e #_ #_ #H <(le_n_O_to_eq … H) -H //
qed-.
-lemma drop_O1_append_sn_le: â\88\80L1,L2,s,e. â\87©[s, 0, e] L1 ≡ L2 → e ≤ |L1| →
- â\88\80L. â\87©[s, 0, e] L @@ L1 ≡ L @@ L2.
+lemma drop_O1_append_sn_le: â\88\80L1,L2,s,e. â¬\87[s, 0, e] L1 ≡ L2 → e ≤ |L1| →
+ â\88\80L. â¬\87[s, 0, e] L @@ L1 ≡ L @@ L2.
/2 width=3 by drop_O1_append_sn_le_aux/ qed.
(* Inversion lemmas on append for local environments ************************)
-lemma drop_O1_inv_append1_ge: â\88\80K,L1,L2,s,e. â\87©[s, 0, e] L1 @@ L2 ≡ K →
- |L2| â\89¤ e â\86\92 â\87©[s, 0, e - |L2|] L1 ≡ K.
+lemma drop_O1_inv_append1_ge: â\88\80K,L1,L2,s,e. â¬\87[s, 0, e] L1 @@ L2 ≡ K →
+ |L2| â\89¤ e â\86\92 â¬\87[s, 0, e - |L2|] L1 ≡ K.
#K #L1 #L2 elim L2 -L2 normalize //
#L2 #I #V #IHL2 #s #e #H #H1e
elim (drop_inv_O1_pair1 … H) -H * #H2e #HL12 destruct
]
qed-.
-lemma drop_O1_inv_append1_le: â\88\80K,L1,L2,s,e. â\87©[s, 0, e] L1 @@ L2 ≡ K → e ≤ |L2| →
- â\88\80K2. â\87©[s, 0, e] L2 ≡ K2 → K = L1 @@ K2.
+lemma drop_O1_inv_append1_le: â\88\80K,L1,L2,s,e. â¬\87[s, 0, e] L1 @@ L2 ≡ K → e ≤ |L2| →
+ â\88\80K2. â¬\87[s, 0, e] L2 ≡ K2 → K = L1 @@ K2.
#K #L1 #L2 elim L2 -L2 normalize
[ #s #e #H1 #H2 #K2 #H3 lapply (le_n_O_to_eq … H2) -H2
#H2 elim (drop_inv_atom1 … H3) -H3 #H3 #_ destruct
(* Main properties **********************************************************)
(* Basic_1: was: drop_mono *)
-theorem drop_mono: â\88\80L,L1,s1,d,e. â\87©[s1, d, e] L ≡ L1 →
- â\88\80L2,s2. â\87©[s2, d, e] L ≡ L2 → L1 = L2.
+theorem drop_mono: â\88\80L,L1,s1,d,e. â¬\87[s1, d, e] L ≡ L1 →
+ â\88\80L2,s2. â¬\87[s2, d, e] L ≡ L2 → L1 = L2.
#L #L1 #s1 #d #e #H elim H -L -L1 -d -e
[ #d #e #He #L2 #s2 #H elim (drop_inv_atom1 … H) -H //
| #I #K #V #L2 #s2 #HL12 <(drop_inv_O2 … HL12) -L2 //
qed-.
(* Basic_1: was: drop_conf_ge *)
-theorem drop_conf_ge: â\88\80L,L1,s1,d1,e1. â\87©[s1, d1, e1] L ≡ L1 →
- â\88\80L2,s2,e2. â\87©[s2, 0, e2] L ≡ L2 → d1 + e1 ≤ e2 →
- â\87©[s2, 0, e2 - e1] L1 ≡ L2.
+theorem drop_conf_ge: â\88\80L,L1,s1,d1,e1. â¬\87[s1, d1, e1] L ≡ L1 →
+ â\88\80L2,s2,e2. â¬\87[s2, 0, e2] L ≡ L2 → d1 + e1 ≤ e2 →
+ â¬\87[s2, 0, e2 - e1] L1 ≡ L2.
#L #L1 #s1 #d1 #e1 #H elim H -L -L1 -d1 -e1 //
[ #d #e #_ #L2 #s2 #e2 #H #_ elim (drop_inv_atom1 … H) -H
#H #He destruct
qed.
(* Note: apparently this was missing in basic_1 *)
-theorem drop_conf_be: â\88\80L0,L1,s1,d1,e1. â\87©[s1, d1, e1] L0 ≡ L1 →
- â\88\80L2,e2. â\87©[e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
- â\88\83â\88\83L. â\87©[s1, 0, d1 + e1 - e2] L2 â\89¡ L & â\87©[d1] L1 ≡ L.
+theorem drop_conf_be: â\88\80L0,L1,s1,d1,e1. â¬\87[s1, d1, e1] L0 ≡ L1 →
+ â\88\80L2,e2. â¬\87[e2] L0 ≡ L2 → d1 ≤ e2 → e2 ≤ d1 + e1 →
+ â\88\83â\88\83L. â¬\87[s1, 0, d1 + e1 - e2] L2 â\89¡ L & â¬\87[d1] L1 ≡ L.
#L0 #L1 #s1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
[ #d1 #e1 #He1 #L2 #e2 #H #Hd1 #_ elim (drop_inv_atom1 … H) -H #H #He2 destruct
>(He2 ?) in Hd1; // -He2 #Hd1 <(le_n_O_to_eq … Hd1) -d1
qed-.
(* Note: apparently this was missing in basic_1 *)
-theorem drop_conf_le: â\88\80L0,L1,s1,d1,e1. â\87©[s1, d1, e1] L0 ≡ L1 →
- â\88\80L2,s2,e2. â\87©[s2, 0, e2] L0 ≡ L2 → e2 ≤ d1 →
- â\88\83â\88\83L. â\87©[s2, 0, e2] L1 â\89¡ L & â\87©[s1, d1 - e2, e1] L2 ≡ L.
+theorem drop_conf_le: â\88\80L0,L1,s1,d1,e1. â¬\87[s1, d1, e1] L0 ≡ L1 →
+ â\88\80L2,s2,e2. â¬\87[s2, 0, e2] L0 ≡ L2 → e2 ≤ d1 →
+ â\88\83â\88\83L. â¬\87[s2, 0, e2] L1 â\89¡ L & â¬\87[s1, d1 - e2, e1] L2 ≡ L.
#L0 #L1 #s1 #d1 #e1 #H elim H -L0 -L1 -d1 -e1
[ #d1 #e1 #He1 #L2 #s2 #e2 #H elim (drop_inv_atom1 … H) -H
#H #He2 #_ destruct /4 width=3 by drop_atom, ex2_intro/
(* Note: with "s2", the conclusion parameter is "s1 ∨ s2" *)
(* Basic_1: was: drop_trans_ge *)
-theorem drop_trans_ge: â\88\80L1,L,s1,d1,e1. â\87©[s1, d1, e1] L1 ≡ L →
- â\88\80L2,e2. â\87©[e2] L â\89¡ L2 â\86\92 d1 â\89¤ e2 â\86\92 â\87©[s1, 0, e1 + e2] L1 ≡ L2.
+theorem drop_trans_ge: â\88\80L1,L,s1,d1,e1. â¬\87[s1, d1, e1] L1 ≡ L →
+ â\88\80L2,e2. â¬\87[e2] L â\89¡ L2 â\86\92 d1 â\89¤ e2 â\86\92 â¬\87[s1, 0, e1 + e2] L1 ≡ L2.
#L1 #L #s1 #d1 #e1 #H elim H -L1 -L -d1 -e1
[ #d1 #e1 #He1 #L2 #e2 #H #_ elim (drop_inv_atom1 … H) -H
#H #He2 destruct /4 width=1 by drop_atom, eq_f2/
qed.
(* Basic_1: was: drop_trans_le *)
-theorem drop_trans_le: â\88\80L1,L,s1,d1,e1. â\87©[s1, d1, e1] L1 ≡ L →
- â\88\80L2,s2,e2. â\87©[s2, 0, e2] L ≡ L2 → e2 ≤ d1 →
- â\88\83â\88\83L0. â\87©[s2, 0, e2] L1 â\89¡ L0 & â\87©[s1, d1 - e2, e1] L0 ≡ L2.
+theorem drop_trans_le: â\88\80L1,L,s1,d1,e1. â¬\87[s1, d1, e1] L1 ≡ L →
+ â\88\80L2,s2,e2. â¬\87[s2, 0, e2] L ≡ L2 → e2 ≤ d1 →
+ â\88\83â\88\83L0. â¬\87[s2, 0, e2] L1 â\89¡ L0 & â¬\87[s1, d1 - e2, e1] L0 ≡ L2.
#L1 #L #s1 #d1 #e1 #H elim H -L1 -L -d1 -e1
[ #d1 #e1 #He1 #L2 #s2 #e2 #H #_ elim (drop_inv_atom1 … H) -H
#H #He2 destruct /4 width=3 by drop_atom, ex2_intro/
qed-.
(* Basic_1: was: drop_conf_lt *)
-lemma drop_conf_lt: â\88\80L,L1,s1,d1,e1. â\87©[s1, d1, e1] L ≡ L1 →
- â\88\80I,K2,V2,s2,e2. â\87©[s2, 0, e2] L ≡ K2.ⓑ{I}V2 →
+lemma drop_conf_lt: â\88\80L,L1,s1,d1,e1. â¬\87[s1, d1, e1] L ≡ L1 →
+ â\88\80I,K2,V2,s2,e2. â¬\87[s2, 0, e2] L ≡ K2.ⓑ{I}V2 →
e2 < d1 → let d ≝ d1 - e2 - 1 in
- â\88\83â\88\83K1,V1. â\87©[s2, 0, e2] L1 ≡ K1.ⓑ{I}V1 &
- â\87©[s1, d, e1] K2 â\89¡ K1 & â\87§[d, e1] V1 ≡ V2.
+ â\88\83â\88\83K1,V1. â¬\87[s2, 0, e2] L1 ≡ K1.ⓑ{I}V1 &
+ â¬\87[s1, d, e1] K2 â\89¡ K1 & â¬\86[d, e1] V1 ≡ V2.
#L #L1 #s1 #d1 #e1 #H1 #I #K2 #V2 #s2 #e2 #H2 #He2d1
elim (drop_conf_le … H1 … H2) -L /2 width=2 by lt_to_le/ #K #HL1K #HK2
elim (drop_inv_skip1 … HK2) -HK2 /2 width=1 by lt_plus_to_minus_r/
qed-.
(* Note: apparently this was missing in basic_1 *)
-lemma drop_trans_lt: â\88\80L1,L,s1,d1,e1. â\87©[s1, d1, e1] L1 ≡ L →
- â\88\80I,L2,V2,s2,e2. â\87©[s2, 0, e2] L ≡ L2.ⓑ{I}V2 →
+lemma drop_trans_lt: â\88\80L1,L,s1,d1,e1. â¬\87[s1, d1, e1] L1 ≡ L →
+ â\88\80I,L2,V2,s2,e2. â¬\87[s2, 0, e2] L ≡ L2.ⓑ{I}V2 →
e2 < d1 → let d ≝ d1 - e2 - 1 in
- â\88\83â\88\83L0,V0. â\87©[s2, 0, e2] L1 ≡ L0.ⓑ{I}V0 &
- â\87©[s1, d, e1] L0 â\89¡ L2 & â\87§[d, e1] V2 ≡ V0.
+ â\88\83â\88\83L0,V0. â¬\87[s2, 0, e2] L1 ≡ L0.ⓑ{I}V0 &
+ â¬\87[s1, d, e1] L0 â\89¡ L2 & â¬\86[d, e1] V2 ≡ V0.
#L1 #L #s1 #d1 #e1 #HL1 #I #L2 #V2 #s2 #e2 #HL2 #Hd21
elim (drop_trans_le … HL1 … HL2) -L /2 width=1 by lt_to_le/ #L0 #HL10 #HL02
elim (drop_inv_skip2 … HL02) -HL02 /2 width=1 by lt_plus_to_minus_r/ #L #V1 #HL2 #HV21 #H destruct /2 width=5 by ex3_2_intro/
qed-.
lemma drop_trans_ge_comm: ∀L1,L,L2,s1,d1,e1,e2.
- â\87©[s1, d1, e1] L1 â\89¡ L â\86\92 â\87©[e2] L ≡ L2 → d1 ≤ e2 →
- â\87©[s1, 0, e2 + e1] L1 ≡ L2.
+ â¬\87[s1, d1, e1] L1 â\89¡ L â\86\92 â¬\87[e2] L ≡ L2 → d1 ≤ e2 →
+ â¬\87[s1, 0, e2 + e1] L1 ≡ L2.
#L1 #L #L2 #s1 #d1 #e1 #e2
>commutative_plus /2 width=5 by drop_trans_ge/
qed.
-lemma drop_conf_div: â\88\80I1,L,K,V1,e1. â\87©[e1] L ≡ K.ⓑ{I1}V1 →
- â\88\80I2,V2,e2. â\87©[e2] L ≡ K.ⓑ{I2}V2 →
+lemma drop_conf_div: â\88\80I1,L,K,V1,e1. â¬\87[e1] L ≡ K.ⓑ{I1}V1 →
+ â\88\80I2,V2,e2. â¬\87[e2] L ≡ K.ⓑ{I2}V2 →
∧∧ e1 = e2 & I1 = I2 & V1 = V2.
#I1 #L #K #V1 #e1 #HLK1 #I2 #V2 #e2 #HLK2
elim (le_or_ge e1 e2) #He
(* Advanced forward lemmas **************************************************)
-lemma drop_fwd_be: â\88\80L,K,s,d,e,i. â\87©[s, d, e] L ≡ K → |K| ≤ i → i < d → |L| ≤ i.
+lemma drop_fwd_be: â\88\80L,K,s,d,e,i. â¬\87[s, d, e] L ≡ K → |K| ≤ i → i < d → |L| ≤ i.
#L #K #s #d #e #i #HLK #HK #Hd elim (lt_or_ge i (|L|)) //
#HL elim (drop_O1_lt (Ⓕ) … HL) #I #K0 #V #HLK0 -HL
elim (drop_conf_lt … HLK … HLK0) // -HLK -HLK0 -Hd
(* BASIC SLICING FOR LOCAL ENVIRONMENTS *************************************)
definition dedropable_sn: predicate (relation lenv) ≝
- λR. â\88\80L1,K1,s,d,e. â\87©[s, d, e] L1 ≡ K1 → ∀K2. R K1 K2 →
- â\88\83â\88\83L2. R L1 L2 & â\87©[s, d, e] L2 ≡ K2 & L1 ⩬[d, e] L2.
+ λR. â\88\80L1,K1,s,d,e. â¬\87[s, d, e] L1 ≡ K1 → ∀K2. R K1 K2 →
+ â\88\83â\88\83L2. R L1 L2 & â¬\87[s, d, e] L2 ≡ K2 & L1 ⩬[d, e] L2.
(* Properties on equivalence ************************************************)
lemma leq_drop_trans_be: ∀L1,L2,d,e. L1 ⩬[d, e] L2 →
- â\88\80I,K2,W,s,i. â\87©[s, 0, i] L2 ≡ K2.ⓑ{I}W →
+ â\88\80I,K2,W,s,i. â¬\87[s, 0, i] L2 ≡ K2.ⓑ{I}W →
d ≤ i → i < d + e →
- â\88\83â\88\83K1. K1 ⩬[0, â«°(d+e-i)] K2 & â\87©[s, 0, i] L1 ≡ K1.ⓑ{I}W.
+ â\88\83â\88\83K1. K1 ⩬[0, â«°(d+e-i)] K2 & â¬\87[s, 0, i] L1 ≡ K1.ⓑ{I}W.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
[ #d #e #J #K2 #W #s #i #H
elim (drop_inv_atom1 … H) -H #H destruct
qed-.
lemma leq_drop_conf_be: ∀L1,L2,d,e. L1 ⩬[d, e] L2 →
- â\88\80I,K1,W,s,i. â\87©[s, 0, i] L1 ≡ K1.ⓑ{I}W →
+ â\88\80I,K1,W,s,i. â¬\87[s, 0, i] L1 ≡ K1.ⓑ{I}W →
d ≤ i → i < d + e →
- â\88\83â\88\83K2. K1 ⩬[0, â«°(d+e-i)] K2 & â\87©[s, 0, i] L2 ≡ K2.ⓑ{I}W.
+ â\88\83â\88\83K2. K1 ⩬[0, â«°(d+e-i)] K2 & â¬\87[s, 0, i] L2 ≡ K2.ⓑ{I}W.
#L1 #L2 #d #e #HL12 #I #K1 #W #s #i #HLK1 #Hdi #Hide
elim (leq_drop_trans_be … (leq_sym … HL12) … HLK1) // -L1 -Hdi -Hide
/3 width=3 by leq_sym, ex2_intro/
qed-.
lemma drop_O1_ex: ∀K2,i,L1. |L1| = |K2| + i →
- â\88\83â\88\83L2. L1 ⩬[0, i] L2 & â\87©[i] L2 ≡ K2.
+ â\88\83â\88\83L2. L1 ⩬[0, i] L2 & â¬\87[i] L2 ≡ K2.
#K2 #i @(nat_ind_plus … i) -i
[ /3 width=3 by leq_O2, ex2_intro/
| #i #IHi #Y #Hi elim (drop_O1_lt (Ⓕ) Y 0) //
(* Inversion lemmas on equivalence ******************************************)
-lemma drop_O1_inj: â\88\80i,L1,L2,K. â\87©[i] L1 â\89¡ K â\86\92 â\87©[i] L2 ≡ K → L1 ⩬[i, ∞] L2.
+lemma drop_O1_inj: â\88\80i,L1,L2,K. â¬\87[i] L1 â\89¡ K â\86\92 â¬\87[i] L2 ≡ K → L1 ⩬[i, ∞] L2.
#i @(nat_ind_plus … i) -i
[ #L1 #L2 #K #H <(drop_inv_O2 … H) -K #H <(drop_inv_O2 … H) -L1 //
| #i #IHi * [2: #L1 #I1 #V1 ] * [2,4: #L2 #I2 #V2 ] #K #HLK1 #HLK2 //
| fqu_bind_dx: ∀a,I,G,L,V,T. fqu G L (ⓑ{a,I}V.T) G (L.ⓑ{I}V) T
| fqu_flat_dx: ∀I,G,L,V,T. fqu G L (ⓕ{I}V.T) G L T
| fqu_drop : ∀G,L,K,T,U,e.
- â\87©[e+1] L â\89¡ K â\86\92 â\87§[0, e+1] T ≡ U → fqu G L U G K T
+ â¬\87[e+1] L â\89¡ K â\86\92 â¬\86[0, e+1] T ≡ U → fqu G L U G K T
.
interpretation
(* Basic properties *********************************************************)
lemma fqu_drop_lt: ∀G,L,K,T,U,e. 0 < e →
- â\87©[e] L â\89¡ K â\86\92 â\87§[0, e] T ≡ U → ⦃G, L, U⦄ ⊐ ⦃G, K, T⦄.
+ â¬\87[e] L â\89¡ K â\86\92 â¬\86[0, e] T ≡ U → ⦃G, L, U⦄ ⊐ ⦃G, K, T⦄.
#G #L #K #T #U #e #He >(plus_minus_m_m e 1) /2 width=3 by fqu_drop/
qed.
| fquq_bind_dx: ∀a,I,G,L,V,T. fquq G L (ⓑ{a,I}V.T) G (L.ⓑ{I}V) T
| fquq_flat_dx: ∀I,G, L,V,T. fquq G L (ⓕ{I}V.T) G L T
| fquq_drop : ∀G,L,K,T,U,e.
- â\87©[e] L â\89¡ K â\86\92 â\87§[0, e] T ≡ U → fquq G L U G K T
+ â¬\87[e] L â\89¡ K â\86\92 â¬\86[0, e] T ≡ U → fquq G L U G K T
.
interpretation
// qed.
lemma fquqa_drop: ∀G,L,K,T,U,e.
- â\87©[e] L â\89¡ K â\86\92 â\87§[0, e] T ≡ U → ⦃G, L, U⦄ ⊐⊐⸮ ⦃G, K, T⦄.
+ â¬\87[e] L â\89¡ K â\86\92 â¬\86[0, e] T ≡ U → ⦃G, L, U⦄ ⊐⊐⸮ ⦃G, K, T⦄.
#G #L #K #T #U #e #HLK #HTU elim (eq_or_gt e)
/3 width=5 by fqu_drop_lt, or_introl/ #H destruct
>(drop_inv_O2 … HLK) -L >(lift_inv_O2 … HTU) -T //
(* basic inversion lemmas ***************************************************)
-lemma gget_inv_gt: â\88\80G1,G2,e. â\87©[e] G1 ≡ G2 → |G1| ≤ e → G2 = ⋆.
+lemma gget_inv_gt: â\88\80G1,G2,e. â¬\87[e] G1 ≡ G2 → |G1| ≤ e → G2 = ⋆.
#G1 #G2 #e * -G1 -G2 //
[ #G #H >H -H >commutative_plus #H (**) (* lemma needed here *)
lapply (le_plus_to_le_r … 0 H) -H #H
]
qed-.
-lemma gget_inv_eq: â\88\80G1,G2,e. â\87©[e] G1 ≡ G2 → |G1| = e + 1 → G1 = G2.
+lemma gget_inv_eq: â\88\80G1,G2,e. â¬\87[e] G1 ≡ G2 → |G1| = e + 1 → G1 = G2.
#G1 #G2 #e * -G1 -G2 //
[ #G #H1 #H2 >H2 in H1; -H2 >commutative_plus #H (**) (* lemma needed here *)
lapply (le_plus_to_le_r … 0 H) -H #H
]
qed-.
-fact gget_inv_lt_aux: â\88\80I,G,G1,G2,V,e. â\87©[e] G ≡ G2 → G = G1. ⓑ{I} V →
- e < |G1| â\86\92 â\87©[e] G1 ≡ G2.
+fact gget_inv_lt_aux: â\88\80I,G,G1,G2,V,e. â¬\87[e] G ≡ G2 → G = G1. ⓑ{I} V →
+ e < |G1| â\86\92 â¬\87[e] G1 ≡ G2.
#I #G #G1 #G2 #V #e * -G -G2
[ #G #H1 #H destruct #H2
lapply (le_to_lt_to_lt … H1 H2) -H1 -H2 normalize in ⊢ (? % ? → ?); >commutative_plus #H
qed-.
lemma gget_inv_lt: ∀I,G1,G2,V,e.
- â\87©[e] G1. â\93\91{I} V â\89¡ G2 â\86\92 e < |G1| â\86\92 â\87©[e] G1 ≡ G2.
+ â¬\87[e] G1. â\93\91{I} V â\89¡ G2 â\86\92 e < |G1| â\86\92 â¬\87[e] G1 ≡ G2.
/2 width=5 by gget_inv_lt_aux/ qed-.
(* Basic properties *********************************************************)
-lemma gget_total: â\88\80e,G1. â\88\83G2. â\87©[e] G1 ≡ G2.
+lemma gget_total: â\88\80e,G1. â\88\83G2. â¬\87[e] G1 ≡ G2.
#e #G1 elim G1 -G1 /3 width=2/
#I #V #G1 * #G2 #HG12
elim (lt_or_eq_or_gt e (|G1|)) #He
(* Main properties **********************************************************)
-theorem gget_mono: â\88\80G,G1,e. â\87©[e] G â\89¡ G1 â\86\92 â\88\80G2. â\87©[e] G ≡ G2 → G1 = G2.
+theorem gget_mono: â\88\80G,G1,e. â¬\87[e] G â\89¡ G1 â\86\92 â\88\80G2. â¬\87[e] G ≡ G2 → G1 = G2.
#G #G1 #e #H elim H -G -G1
[ #G #He #G2 #H
>(gget_inv_gt … H He) -H -He //
]
qed-.
-lemma gget_dec: â\88\80G1,G2,e. Decidable (â\87©[e] G1 ≡ G2).
+lemma gget_dec: â\88\80G1,G2,e. Decidable (â¬\87[e] G1 ≡ G2).
#G1 #G2 #e
elim (gget_total e G1) #G #HG1
elim (eq_genv_dec G G2) #HG2
(* Basic inversion lemmas ***************************************************)
-fact lift_inv_O2_aux: â\88\80d,e,T1,T2. â\87§[d, e] T1 ≡ T2 → e = 0 → T1 = T2.
+fact lift_inv_O2_aux: â\88\80d,e,T1,T2. â¬\86[d, e] T1 ≡ T2 → e = 0 → T1 = T2.
#d #e #T1 #T2 #H elim H -d -e -T1 -T2 /3 width=1 by eq_f2/
qed-.
-lemma lift_inv_O2: â\88\80d,T1,T2. â\87§[d, 0] T1 ≡ T2 → T1 = T2.
+lemma lift_inv_O2: â\88\80d,T1,T2. â¬\86[d, 0] T1 ≡ T2 → T1 = T2.
/2 width=4 by lift_inv_O2_aux/ qed-.
-fact lift_inv_sort1_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k.
+fact lift_inv_sort1_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 → ∀k. T1 = ⋆k → T2 = ⋆k.
#d #e #T1 #T2 * -d -e -T1 -T2 //
[ #i #d #e #_ #k #H destruct
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
qed-.
-lemma lift_inv_sort1: â\88\80d,e,T2,k. â\87§[d,e] ⋆k ≡ T2 → T2 = ⋆k.
+lemma lift_inv_sort1: â\88\80d,e,T2,k. â¬\86[d,e] ⋆k ≡ T2 → T2 = ⋆k.
/2 width=5 by lift_inv_sort1_aux/ qed-.
-fact lift_inv_lref1_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 → ∀i. T1 = #i →
+fact lift_inv_lref1_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 → ∀i. T1 = #i →
(i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
#d #e #T1 #T2 * -d -e -T1 -T2
[ #k #d #e #i #H destruct
]
qed-.
-lemma lift_inv_lref1: â\88\80d,e,T2,i. â\87§[d,e] #i ≡ T2 →
+lemma lift_inv_lref1: â\88\80d,e,T2,i. â¬\86[d,e] #i ≡ T2 →
(i < d ∧ T2 = #i) ∨ (d ≤ i ∧ T2 = #(i + e)).
/2 width=3 by lift_inv_lref1_aux/ qed-.
-lemma lift_inv_lref1_lt: â\88\80d,e,T2,i. â\87§[d,e] #i ≡ T2 → i < d → T2 = #i.
+lemma lift_inv_lref1_lt: â\88\80d,e,T2,i. â¬\86[d,e] #i ≡ T2 → i < d → T2 = #i.
#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
#Hdi #_ #Hid lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
elim (lt_refl_false … Hdd)
qed-.
-lemma lift_inv_lref1_ge: â\88\80d,e,T2,i. â\87§[d,e] #i ≡ T2 → d ≤ i → T2 = #(i + e).
+lemma lift_inv_lref1_ge: â\88\80d,e,T2,i. â¬\86[d,e] #i ≡ T2 → d ≤ i → T2 = #(i + e).
#d #e #T2 #i #H elim (lift_inv_lref1 … H) -H * //
#Hid #_ #Hdi lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
elim (lt_refl_false … Hdd)
qed-.
-fact lift_inv_gref1_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 → ∀p. T1 = §p → T2 = §p.
+fact lift_inv_gref1_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 → ∀p. T1 = §p → T2 = §p.
#d #e #T1 #T2 * -d -e -T1 -T2 //
[ #i #d #e #_ #k #H destruct
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
qed-.
-lemma lift_inv_gref1: â\88\80d,e,T2,p. â\87§[d,e] §p ≡ T2 → T2 = §p.
+lemma lift_inv_gref1: â\88\80d,e,T2,p. â¬\86[d,e] §p ≡ T2 → T2 = §p.
/2 width=5 by lift_inv_gref1_aux/ qed-.
-fact lift_inv_bind1_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 →
+fact lift_inv_bind1_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 →
∀a,I,V1,U1. T1 = ⓑ{a,I} V1.U1 →
- â\88\83â\88\83V2,U2. â\87§[d,e] V1 â\89¡ V2 & â\87§[d+1,e] U1 ≡ U2 &
+ â\88\83â\88\83V2,U2. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d+1,e] U1 ≡ U2 &
T2 = ⓑ{a,I} V2. U2.
#d #e #T1 #T2 * -d -e -T1 -T2
[ #k #d #e #a #I #V1 #U1 #H destruct
]
qed-.
-lemma lift_inv_bind1: â\88\80d,e,T2,a,I,V1,U1. â\87§[d,e] ⓑ{a,I} V1. U1 ≡ T2 →
- â\88\83â\88\83V2,U2. â\87§[d,e] V1 â\89¡ V2 & â\87§[d+1,e] U1 ≡ U2 &
+lemma lift_inv_bind1: â\88\80d,e,T2,a,I,V1,U1. â¬\86[d,e] ⓑ{a,I} V1. U1 ≡ T2 →
+ â\88\83â\88\83V2,U2. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d+1,e] U1 ≡ U2 &
T2 = ⓑ{a,I} V2. U2.
/2 width=3 by lift_inv_bind1_aux/ qed-.
-fact lift_inv_flat1_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 →
+fact lift_inv_flat1_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 →
∀I,V1,U1. T1 = ⓕ{I} V1.U1 →
- â\88\83â\88\83V2,U2. â\87§[d,e] V1 â\89¡ V2 & â\87§[d,e] U1 ≡ U2 &
+ â\88\83â\88\83V2,U2. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d,e] U1 ≡ U2 &
T2 = ⓕ{I} V2. U2.
#d #e #T1 #T2 * -d -e -T1 -T2
[ #k #d #e #I #V1 #U1 #H destruct
]
qed-.
-lemma lift_inv_flat1: â\88\80d,e,T2,I,V1,U1. â\87§[d,e] ⓕ{I} V1. U1 ≡ T2 →
- â\88\83â\88\83V2,U2. â\87§[d,e] V1 â\89¡ V2 & â\87§[d,e] U1 ≡ U2 &
+lemma lift_inv_flat1: â\88\80d,e,T2,I,V1,U1. â¬\86[d,e] ⓕ{I} V1. U1 ≡ T2 →
+ â\88\83â\88\83V2,U2. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d,e] U1 ≡ U2 &
T2 = ⓕ{I} V2. U2.
/2 width=3 by lift_inv_flat1_aux/ qed-.
-fact lift_inv_sort2_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k.
+fact lift_inv_sort2_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 → ∀k. T2 = ⋆k → T1 = ⋆k.
#d #e #T1 #T2 * -d -e -T1 -T2 //
[ #i #d #e #_ #k #H destruct
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
qed-.
(* Basic_1: was: lift_gen_sort *)
-lemma lift_inv_sort2: â\88\80d,e,T1,k. â\87§[d,e] T1 ≡ ⋆k → T1 = ⋆k.
+lemma lift_inv_sort2: â\88\80d,e,T1,k. â¬\86[d,e] T1 ≡ ⋆k → T1 = ⋆k.
/2 width=5 by lift_inv_sort2_aux/ qed-.
-fact lift_inv_lref2_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 → ∀i. T2 = #i →
+fact lift_inv_lref2_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 → ∀i. T2 = #i →
(i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
#d #e #T1 #T2 * -d -e -T1 -T2
[ #k #d #e #i #H destruct
qed-.
(* Basic_1: was: lift_gen_lref *)
-lemma lift_inv_lref2: â\88\80d,e,T1,i. â\87§[d,e] T1 ≡ #i →
+lemma lift_inv_lref2: â\88\80d,e,T1,i. â¬\86[d,e] T1 ≡ #i →
(i < d ∧ T1 = #i) ∨ (d + e ≤ i ∧ T1 = #(i - e)).
/2 width=3 by lift_inv_lref2_aux/ qed-.
(* Basic_1: was: lift_gen_lref_lt *)
-lemma lift_inv_lref2_lt: â\88\80d,e,T1,i. â\87§[d,e] T1 ≡ #i → i < d → T1 = #i.
+lemma lift_inv_lref2_lt: â\88\80d,e,T1,i. â¬\86[d,e] T1 ≡ #i → i < d → T1 = #i.
#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H * //
#Hdi #_ #Hid lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
elim (lt_inv_plus_l … Hdd) -Hdd #Hdd
qed-.
(* Basic_1: was: lift_gen_lref_false *)
-lemma lift_inv_lref2_be: â\88\80d,e,T1,i. â\87§[d,e] T1 ≡ #i →
+lemma lift_inv_lref2_be: â\88\80d,e,T1,i. â¬\86[d,e] T1 ≡ #i →
d ≤ i → i < d + e → ⊥.
#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H *
[ #H1 #_ #H2 #_ | #H2 #_ #_ #H1 ]
qed-.
(* Basic_1: was: lift_gen_lref_ge *)
-lemma lift_inv_lref2_ge: â\88\80d,e,T1,i. â\87§[d,e] T1 ≡ #i → d + e ≤ i → T1 = #(i - e).
+lemma lift_inv_lref2_ge: â\88\80d,e,T1,i. â¬\86[d,e] T1 ≡ #i → d + e ≤ i → T1 = #(i - e).
#d #e #T1 #i #H elim (lift_inv_lref2 … H) -H * //
#Hid #_ #Hdi lapply (le_to_lt_to_lt … Hdi Hid) -Hdi -Hid #Hdd
elim (lt_inv_plus_l … Hdd) -Hdd #Hdd
elim (lt_refl_false … Hdd)
qed-.
-fact lift_inv_gref2_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 → ∀p. T2 = §p → T1 = §p.
+fact lift_inv_gref2_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 → ∀p. T2 = §p → T1 = §p.
#d #e #T1 #T2 * -d -e -T1 -T2 //
[ #i #d #e #_ #k #H destruct
| #a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #k #H destruct
]
qed-.
-lemma lift_inv_gref2: â\88\80d,e,T1,p. â\87§[d,e] T1 ≡ §p → T1 = §p.
+lemma lift_inv_gref2: â\88\80d,e,T1,p. â¬\86[d,e] T1 ≡ §p → T1 = §p.
/2 width=5 by lift_inv_gref2_aux/ qed-.
-fact lift_inv_bind2_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 →
+fact lift_inv_bind2_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 →
∀a,I,V2,U2. T2 = ⓑ{a,I} V2.U2 →
- â\88\83â\88\83V1,U1. â\87§[d,e] V1 â\89¡ V2 & â\87§[d+1,e] U1 ≡ U2 &
+ â\88\83â\88\83V1,U1. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d+1,e] U1 ≡ U2 &
T1 = ⓑ{a,I} V1. U1.
#d #e #T1 #T2 * -d -e -T1 -T2
[ #k #d #e #a #I #V2 #U2 #H destruct
qed-.
(* Basic_1: was: lift_gen_bind *)
-lemma lift_inv_bind2: â\88\80d,e,T1,a,I,V2,U2. â\87§[d,e] T1 ≡ ⓑ{a,I} V2. U2 →
- â\88\83â\88\83V1,U1. â\87§[d,e] V1 â\89¡ V2 & â\87§[d+1,e] U1 ≡ U2 &
+lemma lift_inv_bind2: â\88\80d,e,T1,a,I,V2,U2. â¬\86[d,e] T1 ≡ ⓑ{a,I} V2. U2 →
+ â\88\83â\88\83V1,U1. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d+1,e] U1 ≡ U2 &
T1 = ⓑ{a,I} V1. U1.
/2 width=3 by lift_inv_bind2_aux/ qed-.
-fact lift_inv_flat2_aux: â\88\80d,e,T1,T2. â\87§[d,e] T1 ≡ T2 →
+fact lift_inv_flat2_aux: â\88\80d,e,T1,T2. â¬\86[d,e] T1 ≡ T2 →
∀I,V2,U2. T2 = ⓕ{I} V2.U2 →
- â\88\83â\88\83V1,U1. â\87§[d,e] V1 â\89¡ V2 & â\87§[d,e] U1 ≡ U2 &
+ â\88\83â\88\83V1,U1. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d,e] U1 ≡ U2 &
T1 = ⓕ{I} V1. U1.
#d #e #T1 #T2 * -d -e -T1 -T2
[ #k #d #e #I #V2 #U2 #H destruct
qed-.
(* Basic_1: was: lift_gen_flat *)
-lemma lift_inv_flat2: â\88\80d,e,T1,I,V2,U2. â\87§[d,e] T1 ≡ ⓕ{I} V2. U2 →
- â\88\83â\88\83V1,U1. â\87§[d,e] V1 â\89¡ V2 & â\87§[d,e] U1 ≡ U2 &
+lemma lift_inv_flat2: â\88\80d,e,T1,I,V2,U2. â¬\86[d,e] T1 ≡ ⓕ{I} V2. U2 →
+ â\88\83â\88\83V1,U1. â¬\86[d,e] V1 â\89¡ V2 & â¬\86[d,e] U1 ≡ U2 &
T1 = ⓕ{I} V1. U1.
/2 width=3 by lift_inv_flat2_aux/ qed-.
-lemma lift_inv_pair_xy_x: â\88\80d,e,I,V,T. â\87§[d, e] ②{I} V. T ≡ V → ⊥.
+lemma lift_inv_pair_xy_x: â\88\80d,e,I,V,T. â¬\86[d, e] ②{I} V. T ≡ V → ⊥.
#d #e #J #V elim V -V
[ * #i #T #H
[ lapply (lift_inv_sort2 … H) -H #H destruct
qed-.
(* Basic_1: was: thead_x_lift_y_y *)
-lemma lift_inv_pair_xy_y: â\88\80I,T,V,d,e. â\87§[d, e] ②{I} V. T ≡ T → ⊥.
+lemma lift_inv_pair_xy_y: â\88\80I,T,V,d,e. â¬\86[d, e] ②{I} V. T ≡ T → ⊥.
#J #T elim T -T
[ * #i #V #d #e #H
[ lapply (lift_inv_sort2 … H) -H #H destruct
(* Basic forward lemmas *****************************************************)
-lemma lift_fwd_pair1: â\88\80I,T2,V1,U1,d,e. â\87§[d,e] ②{I}V1.U1 ≡ T2 →
- â\88\83â\88\83V2,U2. â\87§[d,e] V1 ≡ V2 & T2 = ②{I}V2.U2.
+lemma lift_fwd_pair1: â\88\80I,T2,V1,U1,d,e. â¬\86[d,e] ②{I}V1.U1 ≡ T2 →
+ â\88\83â\88\83V2,U2. â¬\86[d,e] V1 ≡ V2 & T2 = ②{I}V2.U2.
* [ #a ] #I #T2 #V1 #U1 #d #e #H
[ elim (lift_inv_bind1 … H) -H /2 width=4 by ex2_2_intro/
| elim (lift_inv_flat1 … H) -H /2 width=4 by ex2_2_intro/
]
qed-.
-lemma lift_fwd_pair2: â\88\80I,T1,V2,U2,d,e. â\87§[d,e] T1 ≡ ②{I}V2.U2 →
- â\88\83â\88\83V1,U1. â\87§[d,e] V1 ≡ V2 & T1 = ②{I}V1.U1.
+lemma lift_fwd_pair2: â\88\80I,T1,V2,U2,d,e. â¬\86[d,e] T1 ≡ ②{I}V2.U2 →
+ â\88\83â\88\83V1,U1. â¬\86[d,e] V1 ≡ V2 & T1 = ②{I}V1.U1.
* [ #a ] #I #T1 #V2 #U2 #d #e #H
[ elim (lift_inv_bind2 … H) -H /2 width=4 by ex2_2_intro/
| elim (lift_inv_flat2 … H) -H /2 width=4 by ex2_2_intro/
]
qed-.
-lemma lift_fwd_tw: â\88\80d,e,T1,T2. â\87§[d, e] T1 ≡ T2 → ♯{T1} = ♯{T2}.
+lemma lift_fwd_tw: â\88\80d,e,T1,T2. â¬\86[d, e] T1 ≡ T2 → ♯{T1} = ♯{T2}.
#d #e #T1 #T2 #H elim H -d -e -T1 -T2 normalize //
qed-.
-lemma lift_simple_dx: â\88\80d,e,T1,T2. â\87§[d, e] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
+lemma lift_simple_dx: â\88\80d,e,T1,T2. â¬\86[d, e] T1 ≡ T2 → 𝐒⦃T1⦄ → 𝐒⦃T2⦄.
#d #e #T1 #T2 #H elim H -d -e -T1 -T2 //
#a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #_ #_ #H
elim (simple_inv_bind … H)
qed-.
-lemma lift_simple_sn: â\88\80d,e,T1,T2. â\87§[d, e] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
+lemma lift_simple_sn: â\88\80d,e,T1,T2. â¬\86[d, e] T1 ≡ T2 → 𝐒⦃T2⦄ → 𝐒⦃T1⦄.
#d #e #T1 #T2 #H elim H -d -e -T1 -T2 //
#a #I #V1 #V2 #T1 #T2 #d #e #_ #_ #_ #_ #H
elim (simple_inv_bind … H)
(* Basic properties *********************************************************)
(* Basic_1: was: lift_lref_gt *)
-lemma lift_lref_ge_minus: â\88\80d,e,i. d + e â\89¤ i â\86\92 â\87§[d, e] #(i - e) ≡ #i.
+lemma lift_lref_ge_minus: â\88\80d,e,i. d + e â\89¤ i â\86\92 â¬\86[d, e] #(i - e) ≡ #i.
#d #e #i #H >(plus_minus_m_m i e) in ⊢ (? ? ? ? %); /3 width=2 by lift_lref_ge, le_plus_to_minus_r, le_plus_b/
qed.
-lemma lift_lref_ge_minus_eq: â\88\80d,e,i,j. d + e â\89¤ i â\86\92 j = i - e â\86\92 â\87§[d, e] #j ≡ #i.
+lemma lift_lref_ge_minus_eq: â\88\80d,e,i,j. d + e â\89¤ i â\86\92 j = i - e â\86\92 â¬\86[d, e] #j ≡ #i.
/2 width=1/ qed-.
(* Basic_1: was: lift_r *)
-lemma lift_refl: â\88\80T,d. â\87§[d, 0] T ≡ T.
+lemma lift_refl: â\88\80T,d. â¬\86[d, 0] T ≡ T.
#T elim T -T
[ * #i // #d elim (lt_or_ge i d) /2 width=1 by lift_lref_lt, lift_lref_ge/
| * /2 width=1 by lift_bind, lift_flat/
]
qed.
-lemma lift_total: â\88\80T1,d,e. â\88\83T2. â\87§[d,e] T1 ≡ T2.
+lemma lift_total: â\88\80T1,d,e. â\88\83T2. â¬\86[d,e] T1 ≡ T2.
#T1 elim T1 -T1
[ * #i /2 width=2/ #d #e elim (lt_or_ge i d) /3 width=2 by lift_lref_lt, lift_lref_ge, ex_intro/
| * [ #a ] #I #V1 #T1 #IHV1 #IHT1 #d #e
qed.
(* Basic_1: was: lift_free (right to left) *)
-lemma lift_split: â\88\80d1,e2,T1,T2. â\87§[d1, e2] T1 ≡ T2 →
+lemma lift_split: â\88\80d1,e2,T1,T2. â¬\86[d1, e2] T1 ≡ T2 →
∀d2,e1. d1 ≤ d2 → d2 ≤ d1 + e1 → e1 ≤ e2 →
- â\88\83â\88\83T. â\87§[d1, e1] T1 â\89¡ T & â\87§[d2, e2 - e1] T ≡ T2.
+ â\88\83â\88\83T. â¬\86[d1, e1] T1 â\89¡ T & â¬\86[d2, e2 - e1] T ≡ T2.
#d1 #e2 #T1 #T2 #H elim H -d1 -e2 -T1 -T2
[ /3 width=3/
| #i #d1 #e2 #Hid1 #d2 #e1 #Hd12 #_ #_
qed.
(* Basic_1: was only: dnf_dec2 dnf_dec *)
-lemma is_lift_dec: â\88\80T2,d,e. Decidable (â\88\83T1. â\87§[d,e] T1 ≡ T2).
+lemma is_lift_dec: â\88\80T2,d,e. Decidable (â\88\83T1. â¬\86[d,e] T1 ≡ T2).
#T1 elim T1 -T1
[ * [1,3: /3 width=2 by lift_sort, lift_gref, ex_intro, or_introl/ ] #i #d #e
elim (lt_or_ge i d) #Hdi
(* Main properties ***********************************************************)
(* Basic_1: was: lift_inj *)
-theorem lift_inj: â\88\80d,e,T1,U. â\87§[d,e] T1 â\89¡ U â\86\92 â\88\80T2. â\87§[d,e] T2 ≡ U → T1 = T2.
+theorem lift_inj: â\88\80d,e,T1,U. â¬\86[d,e] T1 â\89¡ U â\86\92 â\88\80T2. â¬\86[d,e] T2 ≡ U → T1 = T2.
#d #e #T1 #U #H elim H -d -e -T1 -U
[ #k #d #e #X #HX
lapply (lift_inv_sort2 … HX) -HX //
qed-.
(* Basic_1: was: lift_gen_lift *)
-theorem lift_div_le: â\88\80d1,e1,T1,T. â\87§[d1, e1] T1 ≡ T →
- â\88\80d2,e2,T2. â\87§[d2 + e1, e2] T2 ≡ T →
+theorem lift_div_le: â\88\80d1,e1,T1,T. â¬\86[d1, e1] T1 ≡ T →
+ â\88\80d2,e2,T2. â¬\86[d2 + e1, e2] T2 ≡ T →
d1 ≤ d2 →
- â\88\83â\88\83T0. â\87§[d1, e1] T0 â\89¡ T2 & â\87§[d2, e2] T0 ≡ T1.
+ â\88\83â\88\83T0. â¬\86[d1, e1] T0 â\89¡ T2 & â¬\86[d2, e2] T0 ≡ T1.
#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
[ #k #d1 #e1 #d2 #e2 #T2 #Hk #Hd12
lapply (lift_inv_sort2 … Hk) -Hk #Hk destruct /3 width=3 by lift_sort, ex2_intro/
qed.
(* Note: apparently this was missing in basic_1 *)
-theorem lift_div_be: â\88\80d1,e1,T1,T. â\87§[d1, e1] T1 ≡ T →
- â\88\80e,e2,T2. â\87§[d1 + e, e2] T2 ≡ T →
+theorem lift_div_be: â\88\80d1,e1,T1,T. â¬\86[d1, e1] T1 ≡ T →
+ â\88\80e,e2,T2. â¬\86[d1 + e, e2] T2 ≡ T →
e ≤ e1 → e1 ≤ e + e2 →
- â\88\83â\88\83T0. â\87§[d1, e] T0 â\89¡ T2 & â\87§[d1, e + e2 - e1] T0 ≡ T1.
+ â\88\83â\88\83T0. â¬\86[d1, e] T0 â\89¡ T2 & â¬\86[d1, e + e2 - e1] T0 ≡ T1.
#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
[ #k #d1 #e1 #e #e2 #T2 #H >(lift_inv_sort2 … H) -H /2 width=3 by lift_sort, ex2_intro/
| #i #d1 #e1 #Hid1 #e #e2 #T2 #H #He1 #He1e2
]
qed.
-theorem lift_mono: â\88\80d,e,T,U1. â\87§[d,e] T â\89¡ U1 â\86\92 â\88\80U2. â\87§[d,e] T ≡ U2 → U1 = U2.
+theorem lift_mono: â\88\80d,e,T,U1. â¬\86[d,e] T â\89¡ U1 â\86\92 â\88\80U2. â¬\86[d,e] T ≡ U2 → U1 = U2.
#d #e #T #U1 #H elim H -d -e -T -U1
[ #k #d #e #X #HX
lapply (lift_inv_sort1 … HX) -HX //
qed-.
(* Basic_1: was: lift_free (left to right) *)
-theorem lift_trans_be: â\88\80d1,e1,T1,T. â\87§[d1, e1] T1 ≡ T →
- â\88\80d2,e2,T2. â\87§[d2, e2] T ≡ T2 →
- d1 â\89¤ d2 â\86\92 d2 â\89¤ d1 + e1 â\86\92 â\87§[d1, e1 + e2] T1 ≡ T2.
+theorem lift_trans_be: â\88\80d1,e1,T1,T. â¬\86[d1, e1] T1 ≡ T →
+ â\88\80d2,e2,T2. â¬\86[d2, e2] T ≡ T2 →
+ d1 â\89¤ d2 â\86\92 d2 â\89¤ d1 + e1 â\86\92 â¬\86[d1, e1 + e2] T1 ≡ T2.
#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
[ #k #d1 #e1 #d2 #e2 #T2 #HT2 #_ #_
>(lift_inv_sort1 … HT2) -HT2 //
qed.
(* Basic_1: was: lift_d (right to left) *)
-theorem lift_trans_le: â\88\80d1,e1,T1,T. â\87§[d1, e1] T1 ≡ T →
- â\88\80d2,e2,T2. â\87§[d2, e2] T ≡ T2 → d2 ≤ d1 →
- â\88\83â\88\83T0. â\87§[d2, e2] T1 â\89¡ T0 & â\87§[d1 + e2, e1] T0 ≡ T2.
+theorem lift_trans_le: â\88\80d1,e1,T1,T. â¬\86[d1, e1] T1 ≡ T →
+ â\88\80d2,e2,T2. â¬\86[d2, e2] T ≡ T2 → d2 ≤ d1 →
+ â\88\83â\88\83T0. â¬\86[d2, e2] T1 â\89¡ T0 & â¬\86[d1 + e2, e1] T0 ≡ T2.
#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
[ #k #d1 #e1 #d2 #e2 #X #HX #_
>(lift_inv_sort1 … HX) -HX /2 width=3 by lift_sort, ex2_intro/
qed.
(* Basic_1: was: lift_d (left to right) *)
-theorem lift_trans_ge: â\88\80d1,e1,T1,T. â\87§[d1, e1] T1 ≡ T →
- â\88\80d2,e2,T2. â\87§[d2, e2] T ≡ T2 → d1 + e1 ≤ d2 →
- â\88\83â\88\83T0. â\87§[d2 - e1, e2] T1 â\89¡ T0 & â\87§[d1, e1] T0 ≡ T2.
+theorem lift_trans_ge: â\88\80d1,e1,T1,T. â¬\86[d1, e1] T1 ≡ T →
+ â\88\80d2,e2,T2. â¬\86[d2, e2] T ≡ T2 → d1 + e1 ≤ d2 →
+ â\88\83â\88\83T0. â¬\86[d2 - e1, e2] T1 â\89¡ T0 & â¬\86[d1, e1] T0 ≡ T2.
#d1 #e1 #T1 #T #H elim H -d1 -e1 -T1 -T
[ #k #d1 #e1 #d2 #e2 #X #HX #_
>(lift_inv_sort1 … HX) -HX /2 width=3 by lift_sort, ex2_intro/
(* Advanced properties ******************************************************)
-lemma lift_conf_O1: â\88\80T,T1,d1,e1. â\87§[d1, e1] T â\89¡ T1 â\86\92 â\88\80T2,e2. â\87§[0, e2] T ≡ T2 →
- â\88\83â\88\83T0. â\87§[0, e2] T1 â\89¡ T0 & â\87§[d1 + e2, e1] T2 ≡ T0.
+lemma lift_conf_O1: â\88\80T,T1,d1,e1. â¬\86[d1, e1] T â\89¡ T1 â\86\92 â\88\80T2,e2. â¬\86[0, e2] T ≡ T2 →
+ â\88\83â\88\83T0. â¬\86[0, e2] T1 â\89¡ T0 & â¬\86[d1 + e2, e1] T2 ≡ T0.
#T #T1 #d1 #e1 #HT1 #T2 #e2 #HT2
elim (lift_total T1 0 e2) #T0 #HT10
elim (lift_trans_le … HT1 … HT10) -HT1 // #X #HTX #HT20
lapply (lift_mono … HTX … HT2) -T #H destruct /2 width=3 by ex2_intro/
qed.
-lemma lift_conf_be: â\88\80T,T1,d,e1. â\87§[d, e1] T â\89¡ T1 â\86\92 â\88\80T2,e2. â\87§[d, e2] T ≡ T2 →
- e1 â\89¤ e2 â\86\92 â\87§[d + e1, e2 - e1] T1 ≡ T2.
+lemma lift_conf_be: â\88\80T,T1,d,e1. â¬\86[d, e1] T â\89¡ T1 â\86\92 â\88\80T2,e2. â¬\86[d, e2] T ≡ T2 →
+ e1 â\89¤ e2 â\86\92 â¬\86[d + e1, e2 - e1] T1 ≡ T2.
#T #T1 #d #e1 #HT1 #T2 #e2 #HT2 #He12
elim (lift_split … HT2 (d+e1) e1) -HT2 // #X #H
>(lift_mono … H … HT1) -T //
(* Main properties ***********************************************************)
-theorem liftv_mono: â\88\80Ts,U1s,d,e. â\87§[d,e] Ts ≡ U1s →
- â\88\80U2s:list term. â\87§[d,e] Ts ≡ U2s → U1s = U2s.
+theorem liftv_mono: â\88\80Ts,U1s,d,e. â¬\86[d,e] Ts ≡ U1s →
+ â\88\80U2s:list term. â¬\86[d,e] Ts ≡ U2s → U1s = U2s.
#Ts #U1s #d #e #H elim H -Ts -U1s
[ #U2s #H >(liftv_inv_nil1 … H) -H //
| #Ts #U1s #T #U1 #HTU1 #_ #IHTU1s #X #H destruct
(* Properties on negated basic relocation ***********************************)
-lemma nlift_lref_be_SO: â\88\80X,i. â\87§[i, 1] X ≡ #i → ⊥.
+lemma nlift_lref_be_SO: â\88\80X,i. â¬\86[i, 1] X ≡ #i → ⊥.
/2 width=7 by lift_inv_lref2_be/ qed-.
-lemma nlift_bind_sn: â\88\80W,d,e. (â\88\80V. â\87§[d, e] V ≡ W → ⊥) →
- â\88\80a,I,U. (â\88\80X. â\87§[d, e] X ≡ ⓑ{a,I}W.U → ⊥).
+lemma nlift_bind_sn: â\88\80W,d,e. (â\88\80V. â¬\86[d, e] V ≡ W → ⊥) →
+ â\88\80a,I,U. (â\88\80X. â¬\86[d, e] X ≡ ⓑ{a,I}W.U → ⊥).
#W #d #e #HW #a #I #U #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/
qed-.
-lemma nlift_bind_dx: â\88\80U,d,e. (â\88\80T. â\87§[d+1, e] T ≡ U → ⊥) →
- â\88\80a,I,W. (â\88\80X. â\87§[d, e] X ≡ ⓑ{a,I}W.U → ⊥).
+lemma nlift_bind_dx: â\88\80U,d,e. (â\88\80T. â¬\86[d+1, e] T ≡ U → ⊥) →
+ â\88\80a,I,W. (â\88\80X. â¬\86[d, e] X ≡ ⓑ{a,I}W.U → ⊥).
#U #d #e #HU #a #I #W #X #H elim (lift_inv_bind2 … H) -H /2 width=2 by/
qed-.
-lemma nlift_flat_sn: â\88\80W,d,e. (â\88\80V. â\87§[d, e] V ≡ W → ⊥) →
- â\88\80I,U. (â\88\80X. â\87§[d, e] X ≡ ⓕ{I}W.U → ⊥).
+lemma nlift_flat_sn: â\88\80W,d,e. (â\88\80V. â¬\86[d, e] V ≡ W → ⊥) →
+ â\88\80I,U. (â\88\80X. â¬\86[d, e] X ≡ ⓕ{I}W.U → ⊥).
#W #d #e #HW #I #U #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/
qed-.
-lemma nlift_flat_dx: â\88\80U,d,e. (â\88\80T. â\87§[d, e] T ≡ U → ⊥) →
- â\88\80I,W. (â\88\80X. â\87§[d, e] X ≡ ⓕ{I}W.U → ⊥).
+lemma nlift_flat_dx: â\88\80U,d,e. (â\88\80T. â¬\86[d, e] T ≡ U → ⊥) →
+ â\88\80I,W. (â\88\80X. â¬\86[d, e] X ≡ ⓕ{I}W.U → ⊥).
#U #d #e #HU #I #W #X #H elim (lift_inv_flat2 … H) -H /2 width=2 by/
qed-.
(* Inversion lemmas on negated basic relocation *****************************)
-lemma nlift_inv_lref_be_SO: â\88\80i,j. (â\88\80X. â\87§[i, 1] X ≡ #j → ⊥) → j = i.
+lemma nlift_inv_lref_be_SO: â\88\80i,j. (â\88\80X. â¬\86[i, 1] X ≡ #j → ⊥) → j = i.
#i #j elim (lt_or_eq_or_gt i j) // #Hij #H
[ elim (H (#(j-1))) -H /2 width=1 by lift_lref_ge_minus/
| elim (H (#j)) -H /2 width=1 by lift_lref_lt/
]
qed-.
-lemma nlift_inv_bind: â\88\80a,I,W,U,d,e. (â\88\80X. â\87§[d, e] X ≡ ⓑ{a,I}W.U → ⊥) →
- (â\88\80V. â\87§[d, e] V â\89¡ W â\86\92 â\8a¥) â\88¨ (â\88\80T. â\87§[d+1, e] T ≡ U → ⊥).
+lemma nlift_inv_bind: â\88\80a,I,W,U,d,e. (â\88\80X. â¬\86[d, e] X ≡ ⓑ{a,I}W.U → ⊥) →
+ (â\88\80V. â¬\86[d, e] V â\89¡ W â\86\92 â\8a¥) â\88¨ (â\88\80T. â¬\86[d+1, e] T ≡ U → ⊥).
#a #I #W #U #d #e #H elim (is_lift_dec W d e)
[ * /4 width=2 by lift_bind, or_intror/
| /4 width=2 by ex_intro, or_introl/
]
qed-.
-lemma nlift_inv_flat: â\88\80I,W,U,d,e. (â\88\80X. â\87§[d, e] X ≡ ⓕ{I}W.U → ⊥) →
- (â\88\80V. â\87§[d, e] V â\89¡ W â\86\92 â\8a¥) â\88¨ (â\88\80T. â\87§[d, e] T ≡ U → ⊥).
+lemma nlift_inv_flat: â\88\80I,W,U,d,e. (â\88\80X. â¬\86[d, e] X ≡ ⓕ{I}W.U → ⊥) →
+ (â\88\80V. â¬\86[d, e] V â\89¡ W â\86\92 â\8a¥) â\88¨ (â\88\80T. â¬\86[d, e] T ≡ U → ⊥).
#I #W #U #d #e #H elim (is_lift_dec W d e)
[ * /4 width=2 by lift_flat, or_intror/
| /4 width=2 by ex_intro, or_introl/
inductive liftv (d,e:nat) : relation (list term) ≝
| liftv_nil : liftv d e (◊) (◊)
| liftv_cons: ∀T1s,T2s,T1,T2.
- â\87§[d, e] T1 ≡ T2 → liftv d e T1s T2s →
+ â¬\86[d, e] T1 ≡ T2 → liftv d e T1s T2s →
liftv d e (T1 @ T1s) (T2 @ T2s)
.
(* Basic inversion lemmas ***************************************************)
-fact liftv_inv_nil1_aux: â\88\80T1s,T2s,d,e. â\87§[d, e] T1s ≡ T2s → T1s = ◊ → T2s = ◊.
+fact liftv_inv_nil1_aux: â\88\80T1s,T2s,d,e. â¬\86[d, e] T1s ≡ T2s → T1s = ◊ → T2s = ◊.
#T1s #T2s #d #e * -T1s -T2s //
#T1s #T2s #T1 #T2 #_ #_ #H destruct
qed-.
-lemma liftv_inv_nil1: â\88\80T2s,d,e. â\87§[d, e] ◊ ≡ T2s → T2s = ◊.
+lemma liftv_inv_nil1: â\88\80T2s,d,e. â¬\86[d, e] ◊ ≡ T2s → T2s = ◊.
/2 width=5 by liftv_inv_nil1_aux/ qed-.
-fact liftv_inv_cons1_aux: â\88\80T1s,T2s,d,e. â\87§[d, e] T1s ≡ T2s →
+fact liftv_inv_cons1_aux: â\88\80T1s,T2s,d,e. â¬\86[d, e] T1s ≡ T2s →
∀U1,U1s. T1s = U1 @ U1s →
- â\88\83â\88\83U2,U2s. â\87§[d, e] U1 â\89¡ U2 & â\87§[d, e] U1s ≡ U2s &
+ â\88\83â\88\83U2,U2s. â¬\86[d, e] U1 â\89¡ U2 & â¬\86[d, e] U1s ≡ U2s &
T2s = U2 @ U2s.
#T1s #T2s #d #e * -T1s -T2s
[ #U1 #U1s #H destruct
]
qed-.
-lemma liftv_inv_cons1: â\88\80U1,U1s,T2s,d,e. â\87§[d, e] U1 @ U1s ≡ T2s →
- â\88\83â\88\83U2,U2s. â\87§[d, e] U1 â\89¡ U2 & â\87§[d, e] U1s ≡ U2s &
+lemma liftv_inv_cons1: â\88\80U1,U1s,T2s,d,e. â¬\86[d, e] U1 @ U1s ≡ T2s →
+ â\88\83â\88\83U2,U2s. â¬\86[d, e] U1 â\89¡ U2 & â¬\86[d, e] U1s ≡ U2s &
T2s = U2 @ U2s.
/2 width=3 by liftv_inv_cons1_aux/ qed-.
(* Basic properties *********************************************************)
-lemma liftv_total: â\88\80d,e. â\88\80T1s:list term. â\88\83T2s. â\87§[d, e] T1s ≡ T2s.
+lemma liftv_total: â\88\80d,e. â\88\80T1s:list term. â\88\83T2s. â¬\86[d, e] T1s ≡ T2s.
#d #e #T1s elim T1s -T1s
[ /2 width=2 by liftv_nil, ex_intro/
| #T1 #T1s * #T2s #HT12s
definition lpx_sn_alt: relation3 lenv term term → relation lenv ≝
λR,L1,L2. |L1| = |L2| ∧
(∀I1,I2,K1,K2,V1,V2,i.
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
I1 = I2 ∧ R K1 V1 V2
).
lemma lpx_sn_intro_alt: ∀R,L1,L2. |L1| = |L2| →
(∀I1,I2,K1,K2,V1,V2,i.
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
I1 = I2 ∧ R K1 V1 V2
) → lpx_sn R L1 L2.
/4 width=4 by lpx_sn_alt_inv_lpx_sn, conj/ qed.
lemma lpx_sn_inv_alt: ∀R,L1,L2. lpx_sn R L1 L2 →
|L1| = |L2| ∧
∀I1,I2,K1,K2,V1,V2,i.
- â\87©[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â\87©[i] L2 ≡ K2.ⓑ{I2}V2 →
+ â¬\87[i] L1 â\89¡ K1.â\93\91{I1}V1 â\86\92 â¬\87[i] L2 ≡ K2.ⓑ{I2}V2 →
I1 = I2 ∧ R K1 V1 V2.
#R #L1 #L2 #H lapply (lpx_sn_lpx_sn_alt … H) -H
#H elim H -H /3 width=4 by conj/
(* Properties on dropping ****************************************************)
lemma lpx_sn_drop_conf: ∀R,L1,L2. lpx_sn R L1 L2 →
- â\88\80I,K1,V1,i. â\87©[i] L1 ≡ K1.ⓑ{I}V1 →
- â\88\83â\88\83K2,V2. â\87©[i] L2 ≡ K2.ⓑ{I}V2 & lpx_sn R K1 K2 & R K1 V1 V2.
+ â\88\80I,K1,V1,i. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 →
+ â\88\83â\88\83K2,V2. â¬\87[i] L2 ≡ K2.ⓑ{I}V2 & lpx_sn R K1 K2 & R K1 V1 V2.
#R #L1 #L2 #H elim H -L1 -L2
[ #I0 #K0 #V0 #i #H elim (drop_inv_atom1 … H) -H #H destruct
| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #IHK12 #I0 #K0 #V0 #i #H elim (drop_inv_O1_pair1 … H) * -H
qed-.
lemma lpx_sn_drop_trans: ∀R,L1,L2. lpx_sn R L1 L2 →
- â\88\80I,K2,V2,i. â\87©[i] L2 ≡ K2.ⓑ{I}V2 →
- â\88\83â\88\83K1,V1. â\87©[i] L1 ≡ K1.ⓑ{I}V1 & lpx_sn R K1 K2 & R K1 V1 V2.
+ â\88\80I,K2,V2,i. â¬\87[i] L2 ≡ K2.ⓑ{I}V2 →
+ â\88\83â\88\83K1,V1. â¬\87[i] L1 ≡ K1.ⓑ{I}V1 & lpx_sn R K1 K2 & R K1 V1 V2.
#R #L1 #L2 #H elim H -L1 -L2
[ #I0 #K0 #V0 #i #H elim (drop_inv_atom1 … H) -H #H destruct
| #I #K1 #K2 #V1 #V2 #HK12 #HV12 #IHK12 #I0 #K0 #V0 #i #H elim (drop_inv_O1_pair1 … H) * -H
]
qed-.
-fact lpx_sn_dropable_aux: â\88\80R,L2,K2,s,d,e. â\87©[s, d, e] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 →
- d = 0 â\86\92 â\88\83â\88\83K1. â\87©[s, 0, e] L1 ≡ K1 & lpx_sn R K1 K2.
+fact lpx_sn_dropable_aux: â\88\80R,L2,K2,s,d,e. â¬\87[s, d, e] L2 ≡ K2 → ∀L1. lpx_sn R L1 L2 →
+ d = 0 â\86\92 â\88\83â\88\83K1. â¬\87[s, 0, e] L1 ≡ K1 & lpx_sn R K1 K2.
#R #L2 #K2 #s #d #e #H elim H -L2 -K2 -d -e
[ #d #e #He #X #H >(lpx_sn_inv_atom2 … H) -H
/4 width=3 by drop_atom, lpx_sn_atom, ex2_intro/
(* Properties on basic slicing **********************************************)
lemma lsuby_drop_trans_be: ∀L1,L2,d,e. L1 ⊆[d, e] L2 →
- â\88\80I2,K2,W,s,i. â\87©[s, 0, i] L2 ≡ K2.ⓑ{I2}W →
+ â\88\80I2,K2,W,s,i. â¬\87[s, 0, i] L2 ≡ K2.ⓑ{I2}W →
d ≤ i → i < d + e →
- â\88\83â\88\83I1,K1. K1 â\8a\86[0, â«°(d+e-i)] K2 & â\87©[s, 0, i] L1 ≡ K1.ⓑ{I1}W.
+ â\88\83â\88\83I1,K1. K1 â\8a\86[0, â«°(d+e-i)] K2 & â¬\87[s, 0, i] L1 ≡ K1.ⓑ{I1}W.
#L1 #L2 #d #e #H elim H -L1 -L2 -d -e
[ #L1 #d #e #J2 #K2 #W #s #i #H
elim (drop_inv_atom1 … H) -H #H destruct
(* activate genv *)
inductive lstas (h): nat → relation4 genv lenv term term ≝
| lstas_sort: ∀G,L,l,k. lstas h l G L (⋆k) (⋆((next h)^l k))
-| lstas_ldef: â\88\80G,L,K,V,W,U,i,l. â\87©[i] L ≡ K.ⓓV → lstas h l G K V W →
- â\87§[0, i+1] W ≡ U → lstas h l G L (#i) U
-| lstas_zero: â\88\80G,L,K,W,V,i. â\87©[i] L ≡ K.ⓛW → lstas h 0 G K W V →
+| lstas_ldef: â\88\80G,L,K,V,W,U,i,l. â¬\87[i] L ≡ K.ⓓV → lstas h l G K V W →
+ â¬\86[0, i+1] W ≡ U → lstas h l G L (#i) U
+| lstas_zero: â\88\80G,L,K,W,V,i. â¬\87[i] L ≡ K.ⓛW → lstas h 0 G K W V →
lstas h 0 G L (#i) (#i)
-| lstas_succ: â\88\80G,L,K,W,V,U,i,l. â\87©[i] L ≡ K.ⓛW → lstas h l G K W V →
- â\87§[0, i+1] V ≡ U → lstas h (l+1) G L (#i) U
+| lstas_succ: â\88\80G,L,K,W,V,U,i,l. â¬\87[i] L ≡ K.ⓛW → lstas h l G K W V →
+ â¬\86[0, i+1] V ≡ U → lstas h (l+1) G L (#i) U
| lstas_bind: ∀a,I,G,L,V,T,U,l. lstas h l G (L.ⓑ{I}V) T U →
lstas h l G L (ⓑ{a,I}V.T) (ⓑ{a,I}V.U)
| lstas_appl: ∀G,L,V,T,U,l. lstas h l G L T U → lstas h l G L (ⓐV.T) (ⓐV.U)
qed-.
fact lstas_inv_lref1_aux: ∀h,G,L,T,U,l. ⦃G, L⦄ ⊢ T •*[h, l] U → ∀j. T = #j → ∨∨
- (â\88\83â\88\83K,V,W. â\87©[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l] W &
- â\87§[0, j+1] W ≡ U
+ (â\88\83â\88\83K,V,W. â¬\87[j] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l] W &
+ â¬\86[0, j+1] W ≡ U
) |
- (â\88\83â\88\83K,W,V. â\87©[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V &
+ (â\88\83â\88\83K,W,V. â¬\87[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V &
U = #j & l = 0
) |
- (â\88\83â\88\83K,W,V,l0. â\87©[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l0] V &
- â\87§[0, j+1] V ≡ U & l = l0+1
+ (â\88\83â\88\83K,W,V,l0. â¬\87[j] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l0] V &
+ â¬\86[0, j+1] V ≡ U & l = l0+1
).
#h #G #L #T #U #l * -G -L -T -U -l
[ #G #L #l #k #j #H destruct
qed-.
lemma lstas_inv_lref1: ∀h,G,L,X,i,l. ⦃G, L⦄ ⊢ #i •*[h, l] X → ∨∨
- (â\88\83â\88\83K,V,W. â\87©[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l] W &
- â\87§[0, i+1] W ≡ X
+ (â\88\83â\88\83K,V,W. â¬\87[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l] W &
+ â¬\86[0, i+1] W ≡ X
) |
- (â\88\83â\88\83K,W,V. â\87©[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V &
+ (â\88\83â\88\83K,W,V. â¬\87[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V &
X = #i & l = 0
) |
- (â\88\83â\88\83K,W,V,l0. â\87©[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l0] V &
- â\87§[0, i+1] V ≡ X & l = l0+1
+ (â\88\83â\88\83K,W,V,l0. â¬\87[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l0] V &
+ â¬\86[0, i+1] V ≡ X & l = l0+1
).
/2 width=3 by lstas_inv_lref1_aux/
qed-.
lemma lstas_inv_lref1_O: ∀h,G,L,X,i. ⦃G, L⦄ ⊢ #i •*[h, 0] X →
- (â\88\83â\88\83K,V,W. â\87©[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, 0] W &
- â\87§[0, i+1] W ≡ X
+ (â\88\83â\88\83K,V,W. â¬\87[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, 0] W &
+ â¬\86[0, i+1] W ≡ X
) ∨
- (â\88\83â\88\83K,W,V. â\87©[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V &
+ (â\88\83â\88\83K,W,V. â¬\87[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, 0] V &
X = #i
).
#h #G #L #X #i #H elim (lstas_inv_lref1 … H) -H * /3 width=6 by ex3_3_intro, or_introl, or_intror/
(* Basic_1: was just: sty0_gen_lref *)
lemma lstas_inv_lref1_S: ∀h,G,L,X,i,l. ⦃G, L⦄ ⊢ #i •*[h, l+1] X →
- (â\88\83â\88\83K,V,W. â\87©[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l+1] W &
- â\87§[0, i+1] W ≡ X
+ (â\88\83â\88\83K,V,W. â¬\87[i] L ≡ K.ⓓV & ⦃G, K⦄ ⊢ V •*[h, l+1] W &
+ â¬\86[0, i+1] W ≡ X
) ∨
- (â\88\83â\88\83K,W,V. â\87©[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l] V &
- â\87§[0, i+1] V ≡ X
+ (â\88\83â\88\83K,W,V. â¬\87[i] L ≡ K.ⓛW & ⦃G, K⦄ ⊢ W •*[h, l] V &
+ â¬\86[0, i+1] V ≡ X
).
#h #G #L #X #i #l #H elim (lstas_inv_lref1 … H) -H * /3 width=6 by ex3_3_intro, or_introl, or_intror/
#K #W #V #_ #_ #_ <plus_n_Sm #H destruct
(* activate genv *)
inductive unfold: relation4 genv lenv term lenv ≝
| unfold_sort: ∀G,L,k. unfold G L (⋆k) L
-| unfold_lref: â\88\80I,G,L1,L2,K1,K2,V,i. â\87©[i] L1 ≡ K1. ⓑ{I}V →
- unfold G K1 V K2 â\86\92 â\87©[Ⓣ, |L2|, i] L2 ≡ K2 →
+| unfold_lref: â\88\80I,G,L1,L2,K1,K2,V,i. â¬\87[i] L1 ≡ K1. ⓑ{I}V →
+ unfold G K1 V K2 â\86\92 â¬\87[Ⓣ, |L2|, i] L2 ≡ K2 →
unfold G L1 (#i) (L1@@L2)
| unfold_bind: ∀a,I,G,L1,L2,V,T.
unfold G (L1.ⓑ{I}V) T L2 → unfold G L1 (ⓑ{a,I}V.T) L2
}
]
[ { "iterated local env. slicing" * } {
- [ "drops ( â\87©*[?,?] ? ≡ ? )" "drops_drop" + "drops_drops" * ]
+ [ "drops ( â¬\87*[?,?] ? ≡ ? )" "drops_drop" + "drops_drops" * ]
}
]
[ { "generic term relocation" * } {
- [ "lifts_vector ( â\87§*[?] ? ≡ ? )" "lifts_lift_vector" * ]
- [ "lifts ( â\87§*[?] ? ≡ ? )" "lifts_lift" + "lifts_lifts" * ]
+ [ "lifts_vector ( â¬\86*[?] ? ≡ ? )" "lifts_lift_vector" * ]
+ [ "lifts ( â¬\86*[?] ? ≡ ? )" "lifts_lift" + "lifts_lifts" * ]
}
]
[ { "support for multiple relocation" * } {
}
]
[ { "global env. slicing" * } {
- [ "gget ( â\87©[?] ? ≡ ? )" "gget_gget" * ]
+ [ "gget ( â¬\87[?] ? ≡ ? )" "gget_gget" * ]
}
]
[ { "contxt-sensitive extended ordinary substitution" * } {
}
]
[ { "basic local env. slicing" * } {
- [ "drop ( â\87©[?,?,?] ? ≡ ? )" "drop_append" + "drop_leq" + "drop_drop" * ]
+ [ "drop ( â¬\87[?,?,?] ? ≡ ? )" "drop_append" + "drop_leq" + "drop_drop" * ]
}
]
[ { "basic term relocation" * } {
- [ "lift_vector ( â\87§[?,?] ? ≡ ? )" "lift_lift_vector" * ]
- [ "lift ( â\87§[?,?] ? ≡ ? )" "lift_neq" + "lift_lift" * ]
+ [ "lift_vector ( â¬\86[?,?] ? ≡ ? )" "lift_lift_vector" * ]
+ [ "lift ( â¬\86[?,?] ? ≡ ? )" "lift_neq" + "lift_lift" * ]
}
]
}