+ generic equivalence generalizes syntactic equivalence and sort-irrelevant equivalence
+ minor corrections
(* *)
(**************************************************************************)
-include "static_2/static/reqx_fqup.ma".
+include "static_2/static/reqg_fqup.ma".
+include "static_2/static/reqx.ma".
include "basic_2/rt_transition/lpx.ma".
include "basic_2/rt_transition/rpx.ma".
/3 width=1 by lpx_pair, lpx_bind_refl_dx, cpx_eps/ qed.
lemma ex_rpx_fwd_2 (K) (s1) (s0) (i1) (i0):
- L K s1 s0 â\89\9b[T] L2 K i1 i0.
-/3 width=1 by reqx_pair, reqx_sort/ qed.
+ L K s1 s0 â\89\85[T] L2 K i1 i0.
+/4 width=1 by reqg_refl, reqg_pair, reqg_sort, teqg_sort/ qed.
lemma ex_rpx_fwd_3 (G) (K) (s1) (s0) (i1) (i0):
❪G,L1 K s1 s0❫ ⊢ ⬈[T] L2 K i1 i0 → ⊥.
(* Main properties **********************************************************)
theorem ex_rpx_fwd (G) (K) (s1) (s0) (i1) (i0):
- (â\9dªG,L1 K s1 s0â\9d« â\8a¢ â¬\88 L K s1 s0 â\86\92 L K s1 s0 â\89\9b[T] L2 K i1 i0 → ❪G,L1 K s1 s0❫ ⊢ ⬈[T] L2 K i1 i0) → ⊥.
+ (â\9dªG,L1 K s1 s0â\9d« â\8a¢ â¬\88 L K s1 s0 â\86\92 L K s1 s0 â\89\85[T] L2 K i1 i0 → ❪G,L1 K s1 s0❫ ⊢ ⬈[T] L2 K i1 i0) → ⊥.
/3 width=7 by ex_rpx_fwd_3, ex_rpx_fwd_2, ex_rpx_fwd_1/ qed-.
(* Inversion lemmas with restricted rt-transition for terms *****************)
lemma cnv_cpr_teqx_fwd_refl (h) (a) (G) (L):
- â\88\80T1,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,0] T2 â\86\92 T1 â\89\9b T2 → ❪G,L❫ ⊢ T1 ![h,a] → T1 = T2.
+ â\88\80T1,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,0] T2 â\86\92 T1 â\89\85 T2 → ❪G,L❫ ⊢ T1 ![h,a] → T1 = T2.
#h #a #G #L #T1 #T2 #H @(cpr_ind … H) -G -L -T1 -T2
[ //
| #G #K #V1 #V2 #X2 #_ #_ #_ #H1 #_ -a -G -K -V1 -V2
- lapply (teqx_inv_lref1 … H1) -H1 #H destruct //
+ lapply (teqg_inv_lref1 … H1) -H1 #H destruct //
| #I #G #K #T2 #X2 #i #_ #_ #_ #H1 #_ -a -I -G -K -T2
- lapply (teqx_inv_lref1 … H1) -H1 #H destruct //
+ lapply (teqg_inv_lref1 … H1) -H1 #H destruct //
| #p #I #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #H1 #H2
elim (teqx_inv_pair1 … H1) -H1 #V0 #T0 #HV0 #HT0 #H destruct
elim (cnv_inv_bind … H2) -H2 #HV1 #HT1
| #G #L #U #T1 #T2 #HT12 #_ #H1 #H2
elim (cnv_fpbg_refl_false … H2) -a
@(fpbg_teqx_div … H1) -H1
- /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqx_inv_pair_xy_y/
+ /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqg_inv_pair_xy_y/
| #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #H1 #_
elim (teqx_inv_pair … H1) -H1 #H #_ #_ destruct
| #p #G #L #V1 #V2 #X2 #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H1 #_
lemma cpm_teqx_inv_bind_sn (h) (a) (n) (p) (I) (G) (L):
∀V,T1. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ![h,a] →
- â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\91[p,I]V.T1 â\9e¡[h,n] X â\86\92 â\93\91[p,I]V.T1 â\89\9b X →
- â\88\83â\88\83T2. â\9dªG,Lâ\9d« â\8a¢ V ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\9b T2 & X = ⓑ[p,I]V.T2.
+ â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\91[p,I]V.T1 â\9e¡[h,n] X â\86\92 â\93\91[p,I]V.T1 â\89\85 X →
+ â\88\83â\88\83T2. â\9dªG,Lâ\9d« â\8a¢ V ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\85 T2 & X = ⓑ[p,I]V.T2.
#h #a #n #p #I #G #L #V #T1 #H0 #X #H1 #H2
elim (cpm_inv_bind1 … H1) -H1 *
[ #XV #T2 #HXV #HT12 #H destruct
lemma cpm_teqx_inv_appl_sn (h) (a) (n) (G) (L):
∀V,T1. ❪G,L❫ ⊢ ⓐV.T1 ![h,a] →
- â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\90V.T1 â\9e¡[h,n] X â\86\92 â\93\90V.T1 â\89\9b X →
+ â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\90V.T1 â\9e¡[h,n] X â\86\92 â\93\90V.T1 â\89\85 X →
∃∃m,q,W,U1,T2. ad a m & ❪G,L❫ ⊢ V ![h,a] & ❪G,L❫ ⊢ V ➡*[h,1] W & ❪G,L❫ ⊢ T1 ➡*[h,m] ⓛ[q]W.U1
- & â\9dªG,Lâ\9d«â\8a¢ T1 ![h,a] & â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\9b T2 & X = ⓐV.T2.
+ & â\9dªG,Lâ\9d«â\8a¢ T1 ![h,a] & â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\85 T2 & X = ⓐV.T2.
#h #a #n #G #L #V #T1 #H0 #X #H1 #H2
elim (cpm_inv_appl1 … H1) -H1 *
[ #XV #T2 #HXV #HT12 #H destruct
lemma cpm_teqx_inv_cast_sn (h) (a) (n) (G) (L):
∀U1,T1. ❪G,L❫ ⊢ ⓝU1.T1 ![h,a] →
- â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\9dU1.T1 â\9e¡[h,n] X â\86\92 â\93\9dU1.T1 â\89\9b X →
+ â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\9dU1.T1 â\9e¡[h,n] X â\86\92 â\93\9dU1.T1 â\89\85 X →
∃∃U0,U2,T2. ❪G,L❫ ⊢ U1 ➡*[h,0] U0 & ❪G,L❫ ⊢ T1 ➡*[h,1] U0
- & â\9dªG,Lâ\9d« â\8a¢ U1 ![h,a] & â\9dªG,Lâ\9d« â\8a¢ U1 â\9e¡[h,n] U2 & U1 â\89\9b U2
- & â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\9b T2 & X = ⓝU2.T2.
+ & â\9dªG,Lâ\9d« â\8a¢ U1 ![h,a] & â\9dªG,Lâ\9d« â\8a¢ U1 â\9e¡[h,n] U2 & U1 â\89\85 U2
+ & â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\85 T2 & X = ⓝU2.T2.
#h #a #n #G #L #U1 #T1 #H0 #X #H1 #H2
elim (cpm_inv_cast1 … H1) -H1 [ * || * ]
[ #U2 #T2 #HU12 #HT12 #H destruct
| #HT1X
elim (cnv_fpbg_refl_false … H0) -a
@(fpbg_teqx_div … H2) -H2
- /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqx_inv_pair_xy_y/
+ /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_eps, teqg_inv_pair_xy_y/
| #m #HU1X #H destruct
elim (cnv_fpbg_refl_false … H0) -a
@(fpbg_teqx_div … H2) -H2
- /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_ee, teqx_inv_pair_xy_x/
+ /3 width=7 by cpm_tneqx_cpm_fpbg, cpm_ee, teqg_inv_pair_xy_x/
]
qed-.
lemma cpm_teqx_inv_bind_dx (h) (a) (n) (p) (I) (G) (L):
∀X. ❪G,L❫ ⊢ X ![h,a] →
- â\88\80V,T2. â\9dªG,Lâ\9d« â\8a¢ X â\9e¡[h,n] â\93\91[p,I]V.T2 â\86\92 X â\89\9b ⓑ[p,I]V.T2 →
- â\88\83â\88\83T1. â\9dªG,Lâ\9d« â\8a¢ V ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\9b T2 & X = ⓑ[p,I]V.T1.
+ â\88\80V,T2. â\9dªG,Lâ\9d« â\8a¢ X â\9e¡[h,n] â\93\91[p,I]V.T2 â\86\92 X â\89\85 ⓑ[p,I]V.T2 →
+ â\88\83â\88\83T1. â\9dªG,Lâ\9d« â\8a¢ V ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\85 T2 & X = ⓑ[p,I]V.T1.
#h #a #n #p #I #G #L #X #H0 #V #T2 #H1 #H2
elim (teqx_inv_pair2 … H2) #V0 #T1 #_ #_ #H destruct
elim (cpm_teqx_inv_bind_sn … H0 … H1 H2) -H0 -H1 -H2 #T0 #HV #HT1 #H1T12 #H2T12 #H destruct
(∀I,L. n = 0 → Q L (⓪[I]) (⓪[I])) →
(∀L,s. n = 1 → Q L (⋆s) (⋆(⫯[h]s))) →
(∀p,I,L,V,T1. ❪G,L❫⊢ V![h,a] → ❪G,L.ⓑ[I]V❫⊢T1![h,a] →
- â\88\80T2. â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\9b T2 →
+ â\88\80T2. â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\85 T2 →
Q (L.ⓑ[I]V) T1 T2 → Q L (ⓑ[p,I]V.T1) (ⓑ[p,I]V.T2)
) →
(∀m. ad a m →
∀L,V. ❪G,L❫ ⊢ V ![h,a] → ∀W. ❪G,L❫ ⊢ V ➡*[h,1] W →
∀p,T1,U1. ❪G,L❫ ⊢ T1 ➡*[h,m] ⓛ[p]W.U1 → ❪G,L❫⊢ T1 ![h,a] →
- â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\9b T2 →
+ â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\85 T2 →
Q L T1 T2 → Q L (ⓐV.T1) (ⓐV.T2)
) →
(∀L,U0,U1,T1. ❪G,L❫ ⊢ U1 ➡*[h,0] U0 → ❪G,L❫ ⊢ T1 ➡*[h,1] U0 →
- â\88\80U2. â\9dªG,Lâ\9d« â\8a¢ U1 ![h,a] â\86\92 â\9dªG,Lâ\9d« â\8a¢ U1 â\9e¡[h,n] U2 â\86\92 U1 â\89\9b U2 →
- â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\9b T2 →
+ â\88\80U2. â\9dªG,Lâ\9d« â\8a¢ U1 ![h,a] â\86\92 â\9dªG,Lâ\9d« â\8a¢ U1 â\9e¡[h,n] U2 â\86\92 U1 â\89\85 U2 →
+ â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\85 T2 →
Q L U1 U2 → Q L T1 T2 → Q L (ⓝU1.T1) (ⓝU2.T2)
) →
∀L,T1. ❪G,L❫ ⊢ T1 ![h,a] →
- â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\9b T2 → Q L T1 T2.
+ â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\85 T2 → Q L T1 T2.
#h #a #n #G #Q #IH1 #IH2 #IH3 #IH4 #IH5 #L #T1
@(insert_eq_0 … G) #F
@(fqup_wf_ind_eq (Ⓣ) … F L T1) -L -T1 -F
lemma cpm_teqx_free (h) (a) (n) (G) (L):
∀T1. ❪G,L❫ ⊢ T1 ![h,a] →
- â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\9b T2 →
+ â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 T1 â\89\85 T2 →
∀F,K. ❪F,K❫ ⊢ T1 ➡[h,n] T2.
#h #a #n #G #L #T1 #H0 #T2 #H1 #H2
@(cpm_teqx_ind … H0 … H1 H2) -L -T1 -T2
lemma cpm_teqx_inv_bind_sn_void (h) (a) (n) (p) (I) (G) (L):
∀V,T1. ❪G,L❫ ⊢ ⓑ[p,I]V.T1 ![h,a] →
- â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\91[p,I]V.T1 â\9e¡[h,n] X â\86\92 â\93\91[p,I]V.T1 â\89\9b X →
- â\88\83â\88\83T2. â\9dªG,Lâ\9d« â\8a¢ V ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,L.â\93§â\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\9b T2 & X = ⓑ[p,I]V.T2.
+ â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93\91[p,I]V.T1 â\9e¡[h,n] X â\86\92 â\93\91[p,I]V.T1 â\89\85 X →
+ â\88\83â\88\83T2. â\9dªG,Lâ\9d« â\8a¢ V ![h,a] & â\9dªG,L.â\93\91[I]Vâ\9d« â\8a¢ T1 ![h,a] & â\9dªG,L.â\93§â\9d« â\8a¢ T1 â\9e¡[h,n] T2 & T1 â\89\85 T2 & X = ⓑ[p,I]V.T2.
#h #a #n #p #I #G #L #V #T1 #H0 #X #H1 #H2
elim (cpm_teqx_inv_bind_sn … H0 … H1 H2) -H0 -H1 -H2 #T2 #HV #HT1 #H1T12 #H2T12 #H
/3 width=5 by ex5_intro, cpm_teqx_free/
definition IH_cnv_cpm_teqx_conf_lpr (h) (a): relation3 genv lenv term ≝
λG,L0,T0. ❪G,L0❫ ⊢ T0 ![h,a] →
- â\88\80n1,T1. â\9dªG,L0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\9b T1 →
- â\88\80n2,T2. â\9dªG,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,T1. â\9dªG,L0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\85 T1 →
+ â\88\80n2,T2. â\9dªG,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G,L0❫ ⊢ ➡[h,0] L2 →
- â\88\83â\88\83T. â\9dªG,L1â\9d« â\8a¢ T1 â\9e¡[h,n2-n1] T & T1 â\89\9b T & â\9dªG,L2â\9d« â\8a¢ T2 â\9e¡[h,n1-n2] T & T2 â\89\9b T.
+ â\88\83â\88\83T. â\9dªG,L1â\9d« â\8a¢ T1 â\9e¡[h,n2-n1] T & T1 â\89\85 T & â\9dªG,L2â\9d« â\8a¢ T2 â\9e¡[h,n1-n2] T & T2 â\89\85 T.
(* Diamond propery with restricted rt-transition for terms ******************)
fact cnv_cpm_teqx_conf_lpr_atom_atom_aux (h) (G0) (L1) (L2) (I):
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93ª[I] â\9e¡[h,0] T & â\93ª[I] â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ â\93ª[I] â\9e¡[h,0] T & â\93ª[I] â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93ª[I] â\9e¡[h,0] T & â\93ª[I] â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ â\93ª[I] â\9e¡[h,0] T & â\93ª[I] â\89\85 T.
#h #G0 #L1 #L2 #I
/2 width=5 by ex4_intro/
qed-.
fact cnv_cpm_teqx_conf_lpr_atom_ess_aux (h) (G0) (L1) (L2) (s):
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\8b\86s â\9e¡[h,1] T & â\8b\86s â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ â\8b\86(⫯[h]s) â\9e¡[h,0] T & â\8b\86(⫯[h]s) â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\8b\86s â\9e¡[h,1] T & â\8b\86s â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ â\8b\86(⫯[h]s) â\9e¡[h,0] T & â\8b\86(⫯[h]s) â\89\85 T.
#h #G0 #L1 #L2 #s
-/3 width=5 by teqx_sort, ex4_intro/
+/3 width=5 by teqg_sort, ex4_intro/
qed-.
fact cnv_cpm_teqx_conf_lpr_bind_bind_aux (h) (a) (p) (I) (G0) (L0) (V0) (T0):
(∀G,L,T. ❪G0,L0,ⓑ[p,I]V0.T0❫ ⬂+ ❪G,L,T❫ → IH_cnv_cpm_teqx_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ ⓑ[p,I]V0.T0 ![h,a] →
- â\88\80n1,T1. â\9dªG0,L0.â\93\91[I]V0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\9b T1 →
- â\88\80n2,T2. â\9dªG0,L0.â\93\91[I]V0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,T1. â\9dªG0,L0.â\93\91[I]V0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\85 T1 →
+ â\88\80n2,T2. â\9dªG0,L0.â\93\91[I]V0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93\91[p,I]V0.T1 â\9e¡[h,n2-n1] T & â\93\91[p,I]V0.T1 â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ â\93\91[p,I]V0.T2 â\9e¡[h,n1-n2] T & â\93\91[p,I]V0.T2 â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93\91[p,I]V0.T1 â\9e¡[h,n2-n1] T & â\93\91[p,I]V0.T1 â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ â\93\91[p,I]V0.T2 â\9e¡[h,n1-n2] T & â\93\91[p,I]V0.T2 â\89\85 T.
#h #a #p #I #G0 #L0 #V0 #T0 #IH #H0
#n1 #T1 #H1T01 #H2T01 #n2 #T2 #H1T02 #H2T02
#L1 #HL01 #L2 #HL02
fact cnv_cpm_teqx_conf_lpr_appl_appl_aux (h) (a) (G0) (L0) (V0) (T0):
(∀G,L,T. ❪G0,L0,ⓐV0.T0❫ ⬂+ ❪G,L,T❫ → IH_cnv_cpm_teqx_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ ⓐV0.T0 ![h,a] →
- â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\9b T1 →
- â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\85 T1 →
+ â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93\90V0.T1 â\9e¡[h,n2-n1] T & â\93\90V0.T1 â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ â\93\90V0.T2 â\9e¡[h,n1-n2] T & â\93\90V0.T2 â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93\90V0.T1 â\9e¡[h,n2-n1] T & â\93\90V0.T1 â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ â\93\90V0.T2 â\9e¡[h,n1-n2] T & â\93\90V0.T2 â\89\85 T.
#h #a #G0 #L0 #V0 #T0 #IH #H0
#n1 #T1 #H1T01 #H2T01 #n2 #T2 #H1T02 #H2T02
#L1 #HL01 #L2 #HL02
fact cnv_cpm_teqx_conf_lpr_cast_cast_aux (h) (a) (G0) (L0) (V0) (T0):
(∀G,L,T. ❪G0,L0,ⓝV0.T0❫ ⬂+ ❪G,L,T❫ → IH_cnv_cpm_teqx_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ ⓝV0.T0 ![h,a] →
- â\88\80n1,V1. â\9dªG0,L0â\9d« â\8a¢ V0 â\9e¡[h,n1] V1 â\86\92 V0 â\89\9b V1 →
- â\88\80n2,V2. â\9dªG0,L0â\9d« â\8a¢ V0 â\9e¡[h,n2] V2 â\86\92 V0 â\89\9b V2 →
- â\88\80T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\9b T1 →
- â\88\80T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,V1. â\9dªG0,L0â\9d« â\8a¢ V0 â\9e¡[h,n1] V1 â\86\92 V0 â\89\85 V1 →
+ â\88\80n2,V2. â\9dªG0,L0â\9d« â\8a¢ V0 â\9e¡[h,n2] V2 â\86\92 V0 â\89\85 V2 →
+ â\88\80T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n1] T1 â\86\92 T0 â\89\85 T1 →
+ â\88\80T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93\9dV1.T1 â\9e¡[h,n2-n1] T & â\93\9dV1.T1 â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ â\93\9dV2.T2 â\9e¡[h,n1-n2] T & â\93\9dV2.T2 â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ â\93\9dV1.T1 â\9e¡[h,n2-n1] T & â\93\9dV1.T1 â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ â\93\9dV2.T2 â\9e¡[h,n1-n2] T & â\93\9dV2.T2 â\89\85 T.
#h #a #G0 #L0 #V0 #T0 #IH #H0
#n1 #V1 #H1V01 #H2V01 #n2 #V2 #H1V02 #H2V02 #T1 #H1T01 #H2T01 #T2 #H1T02 #H2T02
#L1 #HL01 #L2 #HL02
definition IH_cnv_cpm_teqx_cpm_trans (h) (a): relation3 genv lenv term ≝
λG,L,T1. ❪G,L❫ ⊢ T1 ![h,a] →
- â\88\80n1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 T1 â\89\9b T →
+ â\88\80n1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 T1 â\89\85 T →
∀n2,T2. ❪G,L❫ ⊢ T ➡[h,n2] T2 →
- â\88\83â\88\83T0. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n2] T0 & â\9dªG,Lâ\9d« â\8a¢ T0 â\9e¡[h,n1] T2 & T0 â\89\9b T2.
+ â\88\83â\88\83T0. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n2] T0 & â\9dªG,Lâ\9d« â\8a¢ T0 â\9e¡[h,n1] T2 & T0 â\89\85 T2.
(* Transitive properties restricted rt-transition for terms *****************)
[ #H1 #H2 destruct /2 width=4 by ex3_intro/
| #s #H1 #H2 #H3 destruct
elim (cpm_inv_sort1 … HX2) -HX2 #H #Hn2 destruct >iter_n_Sm
- /3 width=4 by cpm_sort, teqx_sort, ex3_intro/
+ /3 width=4 by cpm_sort, teqg_sort, ex3_intro/
]
| #p #I #V1 #T1 #HG #HL #HT #H0 #n1 #X1 #H1X #H2X #n2 #X2 #HX2 destruct
elim (cpm_teqx_inv_bind_sn … H0 … H1X H2X) -H0 -H1X -H2X #T #_ #H0T1 #H1T1 #H2T1 #H destruct
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ T0 ![h,a] →
- â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 T0 â\89\9b T1 →
- â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 T0 â\89\85 T1 →
+ â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,n2-n1] T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-n2] T.
#h #a #G #L0 #T0 #IH2 #IH1 #HT0
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ T0 ![h,a] →
- â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\9b X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
+ â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\85 X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
∃∃T. ❪G0,L1❫ ⊢ T0 ➡*[h,m21+m22] T& ❪G0,L2❫ ⊢ T2 ➡*[h,0] T.
#h #a #G0 #L0 #T0 #m21 #m22 #IH2 #IH1 #H0
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ T0 ![h,a] →
- â\88\80X1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m11] X1 â\86\92 T0 â\89\9b X1 â\86\92 â\88\80T1. â\9dªG0,L0â\9d« â\8a¢ X1 â\9e¡*[h,m12] T1 â\86\92 X1 â\89\9b T1 →
- â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\9b X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
+ â\88\80X1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m11] X1 â\86\92 T0 â\89\85 X1 â\86\92 â\88\80T1. â\9dªG0,L0â\9d« â\8a¢ X1 â\9e¡*[h,m12] T1 â\86\92 X1 â\89\85 T1 →
+ â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\85 X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
((∀G,L,T. ❪G0,L0,X1❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,X1❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
∀m21,m22.
- â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ X1 â\9e¡[h,m21] X2 â\86\92 (X1 â\89\9b X2 → ⊥) →
+ â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ X1 â\9e¡[h,m21] X2 â\86\92 (X1 â\89\85 X2 → ⊥) →
∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,m21+m22-m12] T & ❪G0,L2❫ ⊢ T2 ➡*[h,m12-(m21+m22)]T
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ T0 ![h,a] →
- â\88\80T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 T0 â\89\9b T1 →
- â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\9b X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
+ â\88\80T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 T0 â\89\85 T1 →
+ â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\85 X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,m21+m22-n1] T & ❪G0,L2❫ ⊢ T2 ➡*[h,n1-(m21+m22)] T.
#h #a #G0 #L0 #T0 #n1 #m21 #m22 #IH2 #IH1 #HT0
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
❪G0,L0❫ ⊢ T0 ![h,a] →
- â\88\80X1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m11] X1 â\86\92 (T0 â\89\9b X1 → ⊥) → ∀T1. ❪G0,L0❫ ⊢ X1 ➡*[h,m12] T1 →
- â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\9b X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
+ â\88\80X1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m11] X1 â\86\92 (T0 â\89\85 X1 → ⊥) → ∀T1. ❪G0,L0❫ ⊢ X1 ➡*[h,m12] T1 →
+ â\88\80X2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,m21] X2 â\86\92 (T0 â\89\85 X2 → ⊥) → ∀T2. ❪G0,L0❫ ⊢ X2 ➡*[h,m22] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
∃∃T. ❪G0,L1❫ ⊢ T1 ➡*[h,m21+m22-(m11+m12)] T & ❪G0,L2❫ ⊢ T2 ➡*[h,m11+m12-(m21+m22)] T.
#h #a #G0 #L0 #T0 #m11 #m12 #m21 #m22 #IH2 #IH1 #H0
(* Properties with restricted rt-computation for terms **********************)
fact cpms_tneqx_fwd_step_sn_aux (h) (a) (n) (G) (L) (T1):
- â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 (T1 â\89\9b T2 → ⊥) →
+ â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 (T1 â\89\85 T2 → ⊥) →
(∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
(∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) →
- â\88\83â\88\83n1,n2,T0. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T0 & T1 â\89\9b T0 → ⊥ & ❪G,L❫ ⊢ T0 ➡*[h,n2] T2 & n1+n2 = n.
+ â\88\83â\88\83n1,n2,T0. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T0 & T1 â\89\85 T0 → ⊥ & ❪G,L❫ ⊢ T0 ➡*[h,n2] T2 & n1+n2 = n.
#h #a #n #G #L #T1 #T2 #H
@(cpms_ind_sn … H) -n -T1
[ #_ #H2T2 elim H2T2 -H2T2 //
fact cpms_teqx_ind_sn (h) (a) (G) (L) (T2) (Q:relation2 …):
(❪G,L❫ ⊢ T2 ![h,a] → Q 0 T2) →
- (â\88\80n1,n2,T1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 T1 â\89\9b T â\86\92 â\9dªG,Lâ\9d« â\8a¢ T â\9e¡*[h,n2] T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ T ![h,a] â\86\92 T â\89\9b T2 → Q n2 T → Q (n1+n2) T1) →
- â\88\80n,T1. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 T1 â\89\9b T2 →
+ (â\88\80n1,n2,T1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 T1 â\89\85 T â\86\92 â\9dªG,Lâ\9d« â\8a¢ T â\9e¡*[h,n2] T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ T ![h,a] â\86\92 T â\89\85 T2 → Q n2 T → Q (n1+n2) T1) →
+ â\88\80n,T1. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ T1 ![h,a] â\86\92 T1 â\89\85 T2 →
(∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
(∀G0,L0,T0. ❪G,L,T1❫ > ❪G0,L0,T0❫ → IH_cnv_cpm_trans_lpr h a G0 L0 T0) →
Q n T1.
fact cnv_cpms_teqx_strip_lpr_aux (h) (a) (G0) (L0) (T0):
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
- â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 â\9dªG0,L0â\9d« â\8a¢ T0 ![h,a] â\86\92 T0 â\89\9b T1 →
- â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 â\9dªG0,L0â\9d« â\8a¢ T0 ![h,a] â\86\92 T0 â\89\85 T1 →
+ â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ T1 â\9e¡[h,n2-n1] T & T1 â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ T2 â\9e¡*[h,n1-n2] T & T2 â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ T1 â\9e¡[h,n2-n1] T & T1 â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ T2 â\9e¡*[h,n1-n2] T & T2 â\89\85 T.
#h #a #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01
@(cpms_teqx_ind_sn … H1T01 H0T0 H2T01 IH1 IH2) -n1 -T0
[ #H0T1 #n2 #T2 #H1T12 #H2T12 #L1 #HL01 #L2 #HL02
fact cnv_cpms_teqx_conf_lpr_aux (h) (a) (G0) (L0) (T0):
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpm_trans_lpr h a G L T) →
(∀G,L,T. ❪G0,L0,T0❫ > ❪G,L,T❫ → IH_cnv_cpms_conf_lpr h a G L T) →
- â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 â\9dªG0,L0â\9d« â\8a¢ T0 ![h,a] â\86\92 T0 â\89\9b T1 →
- â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n2] T2 â\86\92 T0 â\89\9b T2 →
+ â\88\80n1,T1. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n1] T1 â\86\92 â\9dªG0,L0â\9d« â\8a¢ T0 ![h,a] â\86\92 T0 â\89\85 T1 →
+ â\88\80n2,T2. â\9dªG0,L0â\9d« â\8a¢ T0 â\9e¡*[h,n2] T2 â\86\92 T0 â\89\85 T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h,0] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h,0] L2 →
- â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ T1 â\9e¡*[h,n2-n1] T & T1 â\89\9b T & â\9dªG0,L2â\9d« â\8a¢ T2 â\9e¡*[h,n1-n2] T & T2 â\89\9b T.
+ â\88\83â\88\83T. â\9dªG0,L1â\9d« â\8a¢ T1 â\9e¡*[h,n2-n1] T & T1 â\89\85 T & â\9dªG0,L2â\9d« â\8a¢ T2 â\9e¡*[h,n1-n2] T & T2 â\89\85 T.
#h #a #G #L0 #T0 #IH2 #IH1 #n1 #T1 #H1T01 #H0T0 #H2T01
generalize in match IH1; generalize in match IH2;
@(cpms_teqx_ind_sn … H1T01 H0T0 H2T01 IH1 IH2) -n1 -T0
∀T0. ❪G,L❫ ⊢ T0 ![h,a] →
∀n1,T1. ❪G,L❫ ⊢ T0 ➡*𝐍𝐖*[h,n1] T1 →
∀n2,T2. ❪G,L❫ ⊢ T0 ➡*𝐍𝐖*[h,n2] T2 →
- â\88§â\88§ â\9dªG,Lâ\9d« â\8a¢ T1 â¬\8c*[h,n2-n1,n1-n2] T2 & T1 â\89\85 T2.
+ â\88§â\88§ â\9dªG,Lâ\9d« â\8a¢ T1 â¬\8c*[h,n2-n1,n1-n2] T2 & T1 â\89\83 T2.
#h #a #G #L #T0 #HT0 #n1 #T1 * #HT01 #HT1 #n2 #T2 * #HT02 #HT2
elim (cnv_cpms_conf … HT0 … HT01 … HT02) -T0 #T0 #HT10 #HT20
-/4 width=4 by cpms_div, tweq_canc_dx, conj/
+/4 width=4 by cpms_div, teqw_canc_dx, conj/
qed-.
elim (cnv_inv_appl_cpes … H) -H #m0 #q #W0 #U0 #_ #_ #_ #_ #HTU0
lapply (cpmuwe_abst … HTU0) -HTU0 #HTU0
elim (cnv_cpmuwe_mono … HT … HTU0 … HX0) -T #_ #H
- elim (tweq_inv_abst_sn … H) -W0 -U0 #W0 #U0 #H destruct
+ elim (teqw_inv_abst_sn … H) -W0 -U0 #W0 #U0 #H destruct
/2 width=4 by/
]
(* Note: failed applicability *)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpxs_reqx.ma".
+include "basic_2/rt_computation/cpms_cpxs.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Properties with sort-irrelevant equivalence for local environments *******)
+
+lemma cpms_reqx_conf_sn (h) (n) (G) (L1) (L2):
+ ∀T1,T2. ❪G,L1❫ ⊢ T1 ➡*[h,n] T2 →
+ L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/3 width=5 by cpms_fwd_cpxs, cpxs_reqx_conf_sn/ qed-.
+
+lemma cpms_reqx_conf_dx (h) (n) (G) (L1) (L2):
+ ∀T1,T2. ❪G,L2❫ ⊢ T1 ➡*[h,n] T2 →
+ L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/3 width=5 by cpms_fwd_cpxs, cpxs_reqx_conf_dx/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqx.ma".
+include "basic_2/rt_transition/cpr_drops_basic.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
+
+(* Properties with context-free sort-irrelevant equivalence *****************)
+
+lemma cpr_abbr_pos_tneqx (h) (G) (L) (V) (T1):
+ ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡[h,0] T2 & (+ⓓV.T1 ≛ T2 → ⊥).
+#h #G #L #V #U1
+elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2
+elim (teqx_dec U1 U2) [ -HU12 #HU12 | -HTU2 #HnU12 ]
+[ elim (teqx_inv_lifts_dx … HU12 … HTU2) -U2 #T1 #HTU1 #_ -T2
+ /3 width=9 by cpm_zeta, teqx_lifts_inv_pair_sn, ex2_intro/
+| @(ex2_intro … (+ⓓV.U2)) [ /2 width=1 by cpm_bind/ ] -HU12 #H
+ elim (teqx_inv_pair … H) -H #_ #_ /2 width=1 by/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqx.ma".
+include "basic_2/rt_transition/cpx_reqx.ma".
+include "basic_2/rt_transition/rpx_reqx.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
+
+(* Properties with sort-irrelevant equivalence for closures *****************)
+
+(**) (* to update *)
+lemma feqx_cpx_trans:
+ ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛ ❪G2,L2,T❫ →
+ ∀T2. ❪G2,L2❫ ⊢ T ⬈ T2 →
+ ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈ T0 & ❪G1,L1,T0❫ ≛ ❪G2,L2,T2❫.
+#G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
+elim (feqx_inv_gen_dx … H) -H #H #HL12 #HT1 destruct
+lapply (reqx_cpx_trans … HL12 … HT2) #H
+lapply (cpx_reqx_conf_dx … HT2 … HL12) -HT2 -HL12 #HL12
+lapply (teqx_cpx_trans … HT1 … H) -T #HT12
+/3 width=3 by feqx_intro_dx, ex2_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/req_length.ma".
+include "static_2/static/req_drops.ma".
+include "basic_2/rt_transition/rpx_fsle.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
+
+(* Properties with syntactic equivalence for lenvs on referred entries ******)
+
+(* Basic_2A1: was: lleq_cpx_trans *)
+lemma req_cpx_trans (G): R_transitive_req (cpx G).
+#G #L2 #T1 #T2 #H @(cpx_ind … H) -G -L2 -T1 -T2 /2 width=2 by cpx_qu/
+[ #I #G #K2 #V1 #V2 #W2 #_ #IH #HVW2 #L1 #H
+ elim (req_inv_zero_pair_dx … H) -H #K1 #HK12 #H destruct
+ /3 width=3 by cpx_delta/
+| #I2 #G #K2 #T #U #i #_ #IH #HTU #L1 #H
+ elim (req_inv_lref_bind_dx … H) -H #I1 #K1 #HK12 #H destruct
+ /3 width=3 by cpx_lref/
+| #p #I #G #L2 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #H
+ elim (req_inv_bind … H) -H /3 width=1 by cpx_bind/
+| #I #G #L2 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #H
+ elim (req_inv_flat … H) -H /3 width=1 by cpx_flat/
+| #G #L2 #V2 #T1 #T #T2 #HT1 #_ #IH #L1 #H
+ elim (req_inv_bind … H) -H #HV2 #H
+ lapply (req_inv_lifts_bi … H (Ⓣ) … HT1) -H [6:|*: /3 width=2 by drops_refl, drops_drop/ ] #HT
+ /3 width=3 by cpx_zeta/
+| #G #L2 #W1 #T1 #T2 #_ #IH #L1 #H
+ elim (req_inv_flat … H) -H /3 width=1 by cpx_eps/
+| #G #L2 #W1 #W2 #T1 #_ #IH #L1 #H
+ elim (req_inv_flat … H) -H /3 width=1 by cpx_ee/
+| #p #G #L2 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L1 #H
+ elim (req_inv_flat … H) -H #HV1 #H
+ elim (req_inv_bind … H) -H /3 width=1 by cpx_beta/
+| #p #G #L2 #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV1 #IHW12 #IHT12 #HV2 #L1 #H
+ elim (req_inv_flat … H) -H #HV1 #H
+ elim (req_inv_bind … H) -H /3 width=3 by cpx_theta/
+]
+qed-.
+
+lemma cpx_req_conf (G): R_confluent1_rex (cpx G) ceq.
+/3 width=3 by req_cpx_trans, req_sym/ qed-.
+
+(* Basic_2A1: was: cpx_lleq_conf_sn *)
+lemma cpx_req_conf_sn (G): s_r_confluent1 … (cpx G) req.
+/2 width=5 by cpx_rex_conf_sn/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_reqx.ma".
+include "basic_2/rt_transition/rpx_fsle.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
+
+(* Properties with sort-irrelevant equivalence for local environments *******)
+
+(* Basic_2A1: was just: cpx_lleq_conf_sn *)
+lemma cpx_reqx_conf_sn (G):
+ s_r_confluent1 … (cpx G) reqx.
+/3 width=6 by cpx_rex_conf_sn/ qed-.
+
+(* Basic_2A1: was just: cpx_lleq_conf_dx *)
+lemma cpx_reqx_conf_dx (G) (L2):
+ ∀T1,T2. ❪G,L2❫ ⊢ T1 ⬈ T2 →
+ ∀L1. L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/4 width=5 by cpx_reqx_conf_sn, reqx_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqx.ma".
+include "basic_2/rt_computation/cpxs_reqx.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
+
+(* Properties with sort-irrelevant equivalence for closures *****************)
+
+(* to be updated *)
+lemma feqx_cpxs_trans:
+ ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛ ❪G2,L2,T❫ →
+ ∀T2. ❪G2,L2❫ ⊢ T ⬈* T2 →
+ ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈* T0 & ❪G1,L1,T0❫ ≛ ❪G2,L2,T2❫.
+#G1 #G2 #L1 #L2 #T1 #T #H #T2 #H2T2
+elim (feqx_inv_gen_dx … H) -H #H #HL12 #HT1 destruct
+lapply (reqx_cpxs_trans … H2T2 … HL12) #H1T2
+lapply (cpxs_reqx_conf_dx … H2T2 … HL12) -HL12 #HL12
+lapply (teqx_cpxs_trans … HT1 … H1T2) -T #HT12
+/3 width=3 by feqx_intro_dx, ex2_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpx_reqx.ma".
+include "basic_2/rt_computation/cpxs_teqx.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
+
+(* Properties with sort-irrelevant equivalence for local environments *******)
+
+(* Basic_2A1: was just: lleq_cpxs_trans *)
+lemma reqx_cpxs_trans (G):
+ ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L2 ≛[T0] L0 → ❪G,L2❫ ⊢ T0 ⬈* T1.
+#G #L0 #T0 #T1 #H @(cpxs_ind_dx … H) -T0 //
+#T0 #T #H0T0 #_ #IH #L2 #HL2
+lapply (reqx_cpx_trans … HL2 … H0T0) #H2T0
+lapply (IH L2 ?) -IH /2 width=5 by cpx_reqx_conf_dx/ -L0 #H2T1
+/2 width=3 by cpxs_strap2/
+qed-.
+
+(* Basic_2A1: was just: cpxs_lleq_conf *)
+lemma cpxs_reqx_conf (G):
+ ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L0 ≛[T0] L2 → ❪G,L2❫ ⊢ T0 ⬈* T1.
+/3 width=3 by reqx_cpxs_trans, reqx_sym/ qed-.
+
+(* Basic_2A1: was just: cpxs_lleq_conf_dx *)
+lemma cpxs_reqx_conf_dx (G):
+ ∀L2,T1,T2. ❪G,L2❫ ⊢ T1 ⬈* T2 →
+ ∀L1. L1 ≛[T1] L2 → L1 ≛[T2] L2.
+#G #L2 #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=6 by cpx_reqx_conf_dx/
+qed-.
+
+(* Basic_2A1: was just: lleq_conf_sn *)
+lemma cpxs_reqx_conf_sn (G):
+ ∀L1,T1,T2. ❪G,L1❫ ⊢ T1 ⬈* T2 →
+ ∀L2. L1 ≛[T1] L2 → L1 ≛[T2] L2.
+/4 width=6 by cpxs_reqx_conf_dx, reqx_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/rpx_reqx.ma".
+include "basic_2/rt_computation/cpxs.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
+
+(* Properties with sort-irrelevant equivalence for terms ********************)
+
+lemma teqx_cpxs_trans (G) (L) (T):
+ ∀T1. T1 ≛ T → ∀T2. ❪G,L❫ ⊢ T ⬈* T2 → ❪G,L❫ ⊢ T1 ⬈* T2.
+#G #L #T #T1 #HT1 #T2 #HT2 @(cpxs_ind … HT2) -T2
+[ /3 width=1 by teqx_cpx, cpx_cpxs/
+| /2 width=3 by cpxs_strap1/
+]
+qed-.
+
+(* Note: this requires teqx to be symmetric *)
+(* Nasic_2A1: uses: cpxs_neq_inv_step_sn *)
+lemma cpxs_tneqx_fwd_step_sn (G) (L):
+ ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) →
+ ∃∃T. ❪G,L❫ ⊢ T1 ⬈ T & T1 ≛ T → ⊥ & ❪G,L❫ ⊢ T ⬈* T2.
+#G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
+[ #H elim H -H //
+| #T1 #T0 #HT10 #HT02 #IH #HnT12
+ elim (teqx_dec T1 T0) [ -HT10 -HT02 #HT10 | -IH #HnT10 ]
+ [ elim IH -IH /3 width=3 by teqx_trans/ -HnT12
+ #T #HT0 #HnT0 #HT2
+ lapply (teqx_cpx_trans … HT10 … HT0) -HT0 #HT1
+ /4 width=4 by teqx_canc_sn, ex3_intro/
+ | /3 width=4 by ex3_intro/
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqx.ma".
+include "basic_2/rt_computation/csx_reqx.ma".
+
+(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
+
+(* Properties with sort-irrelevant equivalence for closures *****************)
+
+lemma csx_feqx_conf:
+ ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
+ ∀G2,L2,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ❪G2,L2❫ ⊢ ⬈*𝐒 T2.
+#G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
+/3 width=3 by csx_reqx_conf, csx_teqx_trans/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpx_reqx.ma".
+include "basic_2/rt_computation/csx_csx.ma".
+
+(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
+
+(* Properties with sort-irrelevant equivalence for local environments *******)
+
+(* Basic_2A1: uses: csx_lleq_conf *)
+lemma csx_reqx_conf (G) (L1):
+ ∀T. ❪G,L1❫ ⊢ ⬈*𝐒 T →
+ ∀L2. L1 ≛[T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T.
+#G #L1 #T #H
+@(csx_ind … H) -T #T1 #_ #IH #L2 #HL12
+@csx_intro #T2 #HT12 #HnT12
+lapply (reqx_cpx_trans … HL12 … HT12) -HT12
+/3 width=4 by cpx_reqx_conf_sn/
+qed-.
+
+(* Basic_2A1: uses: csx_lleq_trans *)
+lemma csx_reqx_trans (G) (L2):
+ ∀L1,T. L1 ≛[T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T → ❪G,L1❫ ⊢ ⬈*𝐒 T.
+/3 width=3 by csx_reqx_conf, reqx_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/s_transition/fqu_teqx.ma".
+include "static_2/static/feqx.ma".
+include "basic_2/rt_transition/fpb_reqx.ma".
+
+(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
+
+(* Properties with degree-based equivalence for closures ********************)
+
+(* Basic_2A1: uses: fleq_fpb_trans *)
+lemma feqx_fpb_trans:
+ ∀F1,F2,K1,K2,T1,T2. ❪F1,K1,T1❫ ≛ ❪F2,K2,T2❫ →
+ ∀G2,L2,U2. ❪F2,K2,T2❫ ≻ ❪G2,L2,U2❫ →
+ ∃∃G1,L1,U1. ❪F1,K1,T1❫ ≻ ❪G1,L1,U1❫ & ❪G1,L1,U1❫ ≛ ❪G2,L2,U2❫.
+#F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2
+#K2 #T2 #HK12 #HT12 #G2 #L2 #U2 #H12
+elim (teqx_fpb_trans … HT12 … H12) -T2 #K0 #T0 #H #HT0 #HK0
+elim (reqx_fpb_trans … HK12 … H) -K2 #L0 #U0 #H #HUT0 #HLK0
+@(ex2_3_intro … H) -H (**) (* full auto too slow *)
+/4 width=3 by feqx_intro_dx, reqx_trans, teqx_reqx_conf_sn, teqx_trans/
+qed-.
+
+(* Inversion lemmas with degree-based equivalence for closures **************)
+
+(* Basic_2A1: uses: fpb_inv_fleq *)
+lemma fpb_inv_feqx:
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ →
+ ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ⊥.
+#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+[ #G2 #L2 #T2 #H12 #H elim (feqx_inv_gen_sn … H) -H
+ /3 width=11 by reqx_fwd_length, fqu_inv_teqx/
+| #T2 #_ #HnT #H elim (feqx_inv_gen_sn … H) -H /2 width=1 by/
+| #L2 #_ #HnL #H elim (feqx_inv_gen_sn … H) -H /2 width=1 by/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_fqus.ma".
+include "basic_2/rt_transition/cpx_reqx.ma".
+include "basic_2/rt_transition/lpx_reqx.ma".
+include "basic_2/rt_transition/fpb.ma".
+
+(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
+
+(* Properties with sort-irrelevant equivalence for local environments *******)
+
+lemma teqx_fpb_trans:
+ ∀U2,U1. U2 ≛ U1 →
+ ∀G1,G2,L1,L2,T1. ❪G1,L1,U1❫ ≻ ❪G2,L2,T1❫ →
+ ∃∃L,T2. ❪G1,L1,U2❫ ≻ ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
+#U2 #U1 #HU21 #G1 #G2 #L1 #L2 #T1 * -G2 -L2 -T1
+[ #G2 #L2 #T1 #H
+ elim (teqx_fqu_trans … H … HU21) -H
+ /3 width=5 by fpb_fqu, ex3_2_intro/
+| #T1 #HUT1 #HnUT1
+ lapply (teqx_cpx_trans … HU21 … HUT1) -HUT1
+ /6 width=5 by fpb_cpx, teqx_canc_sn, teqx_trans, ex3_2_intro/
+| /6 width=5 by fpb_lpx, rpx_teqx_div, teqx_reqx_conf_sn, ex3_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was just: lleq_fpb_trans *)
+lemma reqx_fpb_trans:
+ ∀F,K1,K2,T. K1 ≛[T] K2 →
+ ∀G,L2,U. ❪F,K2,T❫ ≻ ❪G,L2,U❫ →
+ ∃∃L1,U0. ❪F,K1,T❫ ≻ ❪G,L1,U0❫ & U0 ≛ U & L1 ≛[U] L2.
+#F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U
+[ #G #L2 #U #H2 elim (reqx_fqu_trans … H2 … HT) -K2
+ /3 width=5 by fpb_fqu, ex3_2_intro/
+| #U #HTU #HnTU lapply (reqx_cpx_trans … HT … HTU) -HTU
+ /5 width=11 by fpb_cpx, cpx_reqx_conf_sn, teqx_trans, teqx_reqx_conf_sn, ex3_2_intro/ (**) (* time: 36s on dev *)
+| #L2 #HKL2 #HnKL2 elim (reqx_lpx_trans … HKL2 … HT) -HKL2
+ /6 width=5 by fpb_lpx, (* 2x *) reqx_canc_sn, ex3_2_intro/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/fpb_feqx.ma".
+include "basic_2/rt_computation/fsb.ma".
+
+(* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
+
+(* Properties with sort-irrelevant equivalence for closures *****************)
+
+lemma fsb_feqx_trans:
+ ∀G1,L1,T1. ≥𝐒 ❪G1,L1,T1❫ →
+ ∀G2,L2,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ≥𝐒 ❪G2,L2,T2❫.
+#G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
+#G1 #L1 #T1 #_ #IH #G2 #L2 #T2 #H12
+@fsb_intro #G #L #T #H2
+elim (feqx_fpb_trans … H12 … H2) -G2 -L2 -T2
+/2 width=5 by/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_req.ma".
+include "basic_2/rt_transition/rpx_reqx.ma".
+include "basic_2/rt_transition/rpx_lpx.ma".
+
+(* EXTENDED PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS **************)
+
+(* Properties with sort-irrelevant equivalence for local environments *******)
+
+lemma reqx_lpx_trans_rpx (G) (L) (T:term):
+ ∀L1. L1 ≛[T] L → ∀L2. ❪G,L❫ ⊢ ⬈ L2 → ❪G,L❫ ⊢ ⬈[T] L2.
+/3 width=1 by lpx_rpx, reqx_rpx_trans/ qed.
+
+(* Basic_2A1: uses: lleq_lpx_trans *)
+lemma reqx_lpx_trans (G):
+ ∀L2,K2. ❪G,L2❫ ⊢ ⬈ K2 → ∀L1. ∀T:term. L1 ≛[T] L2 →
+ ∃∃K1. ❪G,L1❫ ⊢ ⬈ K1 & K1 ≛[T] K2.
+#G #L2 #K2 #HLK2 #L1 #T #HL12
+lapply (lpx_rpx … T … HLK2) -HLK2 #HLK2
+lapply (reqx_rpx_trans … HL12 … HLK2) -L2 #H
+elim (rpx_fwd_lpx_req … H) -H #K1 #HLK1 #HK12
+/3 width=3 by req_reqx, ex2_intro/
+qed-.
+
+(* Inversion lemmas with sort-irrelevant equivalence for local environments *)
+
+lemma rpx_inv_reqx_lpx (G) (T):
+ ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
+ ∃∃L. L1 ≛[T] L & ❪G,L❫ ⊢ ⬈ L2.
+#G #T #L1 #L2 #H
+elim (rpx_inv_req_lpx … H) -H #L #HL1 #HL2
+/3 width=3 by req_reqx, ex2_intro/
+qed-.
+
+(* Forward lemmas with sort-irrelevant equivalence for local environments ***)
+
+lemma rpx_fwd_lpx_reqx (G) (T):
+ ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
+ ∃∃L. ❪G,L1❫ ⊢ ⬈ L & L ≛[T] L2.
+#G #T #L1 #L2 #H
+elim (rpx_fwd_lpx_req … H) -H #L #HL1 #HL2
+/3 width=3 by req_reqx, ex2_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqx.ma".
+include "basic_2/rt_computation/lpxs_reqx.ma".
+
+(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************)
+
+(* Properties with sort-irrelevant equivalence on closures ******************)
+
+lemma feqx_lpxs_trans:
+ ∀G1,G2,L1,L0,T1,T2. ❪G1,L1,T1❫ ≛ ❪G2,L0,T2❫ →
+ ∀L2. ❪G2,L0❫ ⊢⬈* L2 →
+ ∃∃L. ❪G1,L1❫ ⊢⬈* L & ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫.
+#G1 #G2 #L1 #L0 #T1 #T2 #H1 #L2 #HL02
+elim (feqx_inv_gen_dx … H1) -H1 #HG #HL10 #HT12 destruct
+elim (reqx_lpxs_trans … HL02 … HL10) -L0 #L0 #HL10 #HL02
+/3 width=3 by feqx_intro_dx, ex2_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/lpx_reqx.ma".
+include "basic_2/rt_computation/lpxs_lpx.ma".
+
+(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS *************)
+
+(* Properties with sort-irrelevant equivalence on referred entries **********)
+
+(* Basic_2A1: uses: lleq_lpxs_trans *)
+lemma reqx_lpxs_trans (G) (T:term):
+ ∀L2,K2. ❪G,L2❫ ⊢ ⬈* K2 → ∀L1. L1 ≛[T] L2 →
+ ∃∃K1. ❪G,L1❫ ⊢ ⬈* K1 & K1 ≛[T] K2.
+#G #T #L2 #K2 #H @(lpxs_ind_sn … H) -L2 /2 width=3 by ex2_intro/
+#L #L2 #HL2 #_ #IH #L1 #HT
+elim (reqx_lpx_trans … HL2 … HT) -L #L #HL1 #HT
+elim (IH … HT) -L2 #K #HLK #HT
+/3 width=3 by lpxs_step_sn, ex2_intro/
+qed-.
+
+(* Basic_2A1: uses: lpxs_nlleq_inv_step_sn *)
+lemma lpxs_rneqx_inv_step_sn (G) (T:term):
+ ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[T] L2 → ⊥) →
+ ∃∃L,L0. ❪G,L1❫ ⊢ ⬈ L & L1 ≛[T] L → ⊥ & ❪G,L❫ ⊢ ⬈* L0 & L0 ≛[T] L2.
+#G #T #L1 #L2 #H @(lpxs_ind_sn … H) -L1
+[ #H elim H -H //
+| #L1 #L #H1 #H2 #IH2 #H12 elim (reqx_dec L1 L T) #H
+ [ -H1 -H2 elim IH2 -IH2 /3 width=3 by reqx_trans/ -H12
+ #L0 #L3 #H1 #H2 #H3 #H4 lapply (reqx_rneqx_trans … H … H2) -H2
+ #H2 elim (reqx_lpx_trans … H1 … H) -L
+ #L #H1 #H lapply (rneqx_reqx_div … H … H2) -H2
+ #H2 elim (reqx_lpxs_trans … H3 … H) -L0
+ /3 width=8 by reqx_trans, ex4_2_intro/
+ | -H12 -IH2 /3 width=6 by ex4_2_intro/
+ ]
+]
+qed-.
(**************************************************************************)
include "basic_2/notation/relations/preditnormal_4.ma".
-include "static_2/syntax/tweq.ma".
+include "static_2/syntax/teqw.ma".
include "basic_2/rt_computation/cpms.ma".
(* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************)
definition cnuw (h) (G) (L): predicate term ≝
- λT1. â\88\80n,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 â\86\92 T1 â\89\85 T2.
+ λT1. â\88\80n,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 â\86\92 T1 â\89\83 T2.
interpretation
"normality for t-unbound weak head context-sensitive parallel rt-transition (term)"
[ lapply (H 0 W ?) [ /3 width=3 by cpm_cpms, cpm_delta/ ]
| lapply (H 1 W ?) [ /3 width=3 by cpm_cpms, cpm_ell/ ]
] -H #HW
-lapply (tweq_inv_lref_sn … HW) -HW #H destruct
+lapply (teqw_inv_lref_sn … HW) -HW #H destruct
/2 width=5 by lifts_inv_lref2_uni_lt/
qed-.
∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] ⓝV.T → ⊥.
#h #G #L #V #T #H
lapply (H 0 T ?) [ /3 width=1 by cpm_cpms, cpm_eps/ ] -H #H
-/2 width=3 by tweq_inv_cast_xy_y/
+/2 width=3 by teqw_inv_cast_xy_y/
qed-.
(* Basic forward lemmas *****************************************************)
∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] ⓐV.T → ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T.
#h #G #L #V #T1 #HT1 #n #T2 #HT12
lapply (HT1 n (ⓐV.T2) ?) -HT1
-/2 width=3 by cpms_appl_dx, tweq_inv_appl_bi/
+/2 width=3 by cpms_appl_dx, teqw_inv_appl_bi/
qed-.
include "basic_2/rt_computation/cnuw_simple.ma".
include "basic_2/rt_computation/cnuw_drops.ma".
-include "basic_2/rt_computation/cprs_tweq.ma".
+include "basic_2/rt_computation/cprs_teqw.ma".
include "basic_2/rt_computation/lprs_cpms.ma".
(* NORMAL TERMS FOR T-UNUNBOUND WHD RT-TRANSITION ***************************)
lemma cnuw_inv_abbr_pos (h) (G) (L):
∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] +ⓓV.T → ⊥.
#h #G #L #V #T1 #H
-elim (cprs_abbr_pos_twneq h G L V T1) #T2 #HT12 #HnT12
+elim (cprs_abbr_pos_tneqw h G L V T1) #T2 #HT12 #HnT12
/3 width=2 by/
qed-.
lemma cnuw_abbr_neg (h) (G) (L): ∀V,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] -ⓓV.T.
#h #G #L #V1 #T1 #n #X #H
elim (cpms_inv_abbr_sn_dx … H) -H *
-[ #V2 #T2 #_ #_ #H destruct /1 width=1 by tweq_abbr_neg/
+[ #V2 #T2 #_ #_ #H destruct /1 width=1 by teqw_abbr_neg/
| #X1 #_ #_ #H destruct
]
qed.
lemma cnuw_abst (h) (p) (G) (L): ∀W,T. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] ⓛ[p]W.T.
#h #p #G #L #W1 #T1 #n #X #H
elim (cpms_inv_abst_sn … H) -H #W2 #T2 #_ #_ #H destruct
-/1 width=1 by tweq_abst/
+/1 width=1 by teqw_abst/
qed.
lemma cnuw_cpms_trans (h) (n) (G) (L):
∀T1. ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T1 →
∀T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 → ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T2.
#h #n1 #G #L #T1 #HT1 #T2 #HT12 #n2 #T3 #HT23
-/4 width=5 by cpms_trans, tweq_canc_sn/
+/4 width=5 by cpms_trans, teqw_canc_sn/
qed-.
lemma cnuw_dec_ex (h) (G) (L):
∀T1. ∨∨ ❪G,L❫ ⊢ ➡𝐍𝐖*[h] T1
- | â\88\83â\88\83n,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 & (T1 â\89\85 T2 → ⊥).
+ | â\88\83â\88\83n,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡*[h,n] T2 & (T1 â\89\83 T2 → ⊥).
#h #G #L #T1 elim T1 -T1 *
[ #s /3 width=5 by cnuw_sort, or_introl/
| #i elim (drops_F_uni L i)
[ /3 width=8 by cnuw_unit_drops, or_introl/
| elim (lifts_total V 𝐔❨↑i❩) #W #HVW
@or_intror @(ex2_2_intro … W) [1,2: /2 width=7 by cpms_delta_drops/ ] #H
- lapply (tweq_inv_lref_sn … H) -H #H destruct
+ lapply (teqw_inv_lref_sn … H) -H #H destruct
/2 width=5 by lifts_inv_lref2_uni_lt/
| elim (lifts_total V 𝐔❨↑i❩) #W #HVW
@or_intror @(ex2_2_intro … W) [1,2: /2 width=7 by cpms_ell_drops/ ] #H
- lapply (tweq_inv_lref_sn … H) -H #H destruct
+ lapply (teqw_inv_lref_sn … H) -H #H destruct
/2 width=5 by lifts_inv_lref2_uni_lt/
]
]
| #l /3 width=5 by cnuw_gref, or_introl/
| #p * [ cases p ] #V1 #T1 #_ #_
- [ elim (cprs_abbr_pos_twneq h G L V1 T1) #T2 #HT12 #HnT12
+ [ elim (cprs_abbr_pos_tneqw h G L V1 T1) #T2 #HT12 #HnT12
/4 width=4 by ex2_2_intro, or_intror/
| /3 width=5 by cnuw_abbr_neg, or_introl/
| /3 width=5 by cnuw_abst, or_introl/
[ /3 width=6 by cnuw_appl_simple, or_introl/
| * #n #T2 #HT12 #HnT12 -HT1
@or_intror @(ex2_2_intro … n (ⓐV1.T2)) [ /2 width=1 by cpms_appl_dx/ ] #H
- lapply (tweq_inv_appl_bi … H) -H /2 width=1 by/
+ lapply (teqw_inv_appl_bi … H) -H /2 width=1 by/
]
| elim (lifts_total V1 𝐔❨1❩) #X1 #HVX1
@or_intror @(ex2_2_intro … (ⓓ[p]W1.ⓐX1.U1)) [1,2: /2 width=3 by cpms_theta/ ] #H
- elim (tweq_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct
+ elim (teqw_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct
| @or_intror @(ex2_2_intro … (ⓓ[p]ⓝW1.V1.U1)) [1,2: /2 width=2 by cpms_beta/ ] #H
- elim (tweq_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct
+ elim (teqw_inv_appl_sn … H) -H #X1 #X2 #_ #H destruct
]
| @or_intror @(ex2_2_intro … T1) [1,2: /2 width=2 by cpms_eps/ ] #H
- /2 width=4 by tweq_inv_cast_xy_y/
+ /2 width=4 by teqw_inv_cast_xy_y/
]
]
qed-.
(* *)
(**************************************************************************)
-include "static_2/relocation/lifts_tweq.ma".
+include "static_2/relocation/lifts_teqw.ma".
include "basic_2/rt_computation/cpms_drops.ma".
include "basic_2/rt_computation/cnuw.ma".
lemma cnuw_lifts (h) (G): d_liftable1 … (cnuw h G).
#h #G #K #T #HT #b #f #L #HLK #U #HTU #n #U0 #H
elim (cpms_inv_lifts_sn … H … HLK … HTU) -b -L #T0 #HTU0 #HT0
-lapply (HT … HT0) -G -K /2 width=6 by tweq_lifts_bi/
+lapply (HT … HT0) -G -K /2 width=6 by teqw_lifts_bi/
qed-.
(* Inversion lemmas with generic relocation *********************************)
lemma cnuw_inv_lifts (h) (G): d_deliftable1 … (cnuw h G).
#h #G #L #U #HU #b #f #K #HLK #T #HTU #n #T0 #H
elim (cpms_lifts_sn … H … HLK … HTU) -b -K #U0 #HTU0 #HU0
-lapply (HU … HU0) -G -L /2 width=6 by tweq_inv_lifts_bi/
+lapply (HU … HU0) -G -L /2 width=6 by teqw_inv_lifts_bi/
qed-.
(* Advanced properties ******************************************************)
[ #H #_ destruct //
| #T2 #HT2 #HTX2
lapply (Hi … HT2) -Hi -HT2 #H
- lapply (tweq_inv_lref_sn … H) -H #H destruct
+ lapply (teqw_inv_lref_sn … H) -H #H destruct
lapply (lifts_inv_lref1_uni … HTX2) -HTX2 #H destruct //
]
qed.
(* *)
(**************************************************************************)
-include "static_2/syntax/tweq_simple.ma".
+include "static_2/syntax/teqw_simple.ma".
include "basic_2/rt_computation/cpms_cpms.ma".
include "basic_2/rt_computation/cnuw.ma".
#h #G #L #V1 #T1 #H1T1 #H2T1 #n #X #H
elim (cpms_inv_appl_sn … H) -H *
[ #V2 #T2 #_ #HT12 #H destruct -H1T1
- /3 width=2 by tweq_appl/
+ /3 width=2 by teqw_appl/
| #n1 #n2 #p #V2 #T2 #HT12 #_ #_ -n -n2
lapply (H2T1 … HT12) -H2T1 -n1 #H
- lapply (tweq_simple_trans … H H1T1) -H -H1T1 #H
+ lapply (teqw_simple_trans … H H1T1) -H -H1T1 #H
elim (simple_inv_bind … H)
| #n1 #n2 #p #V2 #W2 #W #T2 #_ #_ #HT12 #_ #_ -n -n2 -V2 -W2
lapply (H2T1 … HT12) -H2T1 -n1 #H
- lapply (tweq_simple_trans … H H1T1) -H -H1T1 #H
+ lapply (teqw_simple_trans … H H1T1) -H -H1T1 #H
elim (simple_inv_bind … H)
]
qed.
lemma cpms_tneqx_fwd_fpbg (h) (n):
∀G,L,T1,T2. ❪G,L❫ ⊢ T1 ➡*[h,n] T2 →
- (T1 â\89\9b T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫.
+ (T1 â\89\85 T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫.
/3 width=3 by cpms_fwd_cpxs, cpxs_tneqx_fpbg/ qed-.
lemma fpbg_cpms_trans (h) (n):
/3 width=5 by cpms_fwd_fpbs, fqup_fpbg, fpbg_fpbs_trans/ qed-.
lemma cpm_tneqx_cpm_cpms_teqx_sym_fwd_fpbg (h) (G) (L) (T1):
- â\88\80n1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 (T1 â\89\9b T → ⊥) →
- â\88\80n2,T2. â\9dªG,Lâ\9d«â\8a¢ T â\9e¡*[h,n2] T2 â\86\92 T1 â\89\9b T2 → ❪G,L,T1❫ > ❪G,L,T1❫.
+ â\88\80n1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 (T1 â\89\85 T → ⊥) →
+ â\88\80n2,T2. â\9dªG,Lâ\9d«â\8a¢ T â\9e¡*[h,n2] T2 â\86\92 T1 â\89\85 T2 → ❪G,L,T1❫ > ❪G,L,T1❫.
#h #G #L #T1 #n1 #T #H1T1 #H2T1 #n2 #T2 #H1T2 #H2T12
/4 width=7 by cpms_fwd_fpbs, cpm_fpb, fpbs_teqx_trans, teqx_sym, ex2_3_intro/
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_computation/cpxs_reqg.ma".
+include "basic_2/rt_computation/cpms_cpxs.ma".
+
+(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
+
+(* Properties with generic equivalence for local environments ***************)
+
+lemma cpms_reqg_conf_sn (S) (h) (n) (G) (L1) (L2):
+ ∀T1,T2. ❪G,L1❫ ⊢ T1 ➡*[h,n] T2 →
+ L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2.
+/3 width=5 by cpms_fwd_cpxs, cpxs_reqg_conf_sn/ qed-.
+
+lemma cpms_reqg_conf_dx (S) (h) (n) (G) (L1) (L2):
+ reflexive … S → symmetric … S →
+ ∀T1,T2. ❪G,L2❫ ⊢ T1 ➡*[h,n] T2 →
+ L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2.
+/3 width=5 by cpms_fwd_cpxs, cpxs_reqg_conf_dx/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/rt_computation/cpxs_reqx.ma".
-include "basic_2/rt_computation/cpms_cpxs.ma".
-
-(* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
-
-(* Properties with sort-irrelevant equivalence for local environments *******)
-
-lemma cpms_reqx_conf_sn (h) (n) (G) (L1) (L2):
- ∀T1,T2. ❪G,L1❫ ⊢ T1 ➡*[h,n] T2 →
- L1 ≛[T1] L2 → L1 ≛[T2] L2.
-/3 width=5 by cpms_fwd_cpxs, cpxs_reqx_conf_sn/ qed-.
-
-lemma cpms_reqx_conf_dx (h) (n) (G) (L1) (L2):
- ∀T1,T2. ❪G,L2❫ ⊢ T1 ➡*[h,n] T2 →
- L1 ≛[T1] L2 → L1 ≛[T2] L2.
-/3 width=5 by cpms_fwd_cpxs, cpxs_reqx_conf_dx/ qed-.
(* *)
(**************************************************************************)
-include "static_2/syntax/tweq_teqx.ma".
+include "static_2/syntax/teqw_teqg.ma".
include "basic_2/rt_computation/csx_cpxs.ma".
include "basic_2/rt_computation/cpms_cpxs.ma".
include "basic_2/rt_computation/cnuw_cnuw.ma".
| * #n1 #T0 #HT10 #HnT10
elim (IHT1 … T0) -IHT1
[ #T2 #n2 * #HT02 #HT2 /4 width=5 by cpms_trans, cpmuwe_intro, ex1_2_intro/
- | /3 width=1 by teqx_tweq/
+ | /3 width=2 by teqg_teqw/
| /2 width=3 by cpms_fwd_cpxs/
]
]
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqw_teqw.ma".
+include "static_2/relocation/lifts_teqw.ma".
+include "basic_2/rt_transition/cpr_drops_basic.ma".
+include "basic_2/rt_computation/cpms.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
+
+(* Properties with sort-irrelevant whd equivalence on terms *****************)
+
+lemma cprs_abbr_pos_tneqw (h) (G) (L) (V) (T1):
+ ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡*[h,0] T2 & (+ⓓV.T1 ≃ T2 → ⊥).
+#h #G #L #V #U1
+elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2
+elim (teqw_dec U1 U2) [ #HpU12 | -HTU2 #HnU12 ]
+[ @(ex2_intro … T2) (**) (* full auto not tried *)
+ [ /3 width=6 by cpms_zeta, cpms_step_sn, cpm_bind/
+ | /4 width=6 by teqw_inv_abbr_pos_x_lifts_y_y, teqw_canc_sn, teqw_abbr_pos/
+ ]
+| /4 width=3 by cpm_cpms, cpm_bind, teqw_inv_abbr_pos_bi, ex2_intro/
+]
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/tweq_tweq.ma".
-include "static_2/relocation/lifts_tweq.ma".
-include "basic_2/rt_transition/cpr_drops_basic.ma".
-include "basic_2/rt_computation/cpms.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
-
-(* Properties with sort-irrelevant whd equivalence on terms *****************)
-
-lemma cprs_abbr_pos_twneq (h) (G) (L) (V) (T1):
- ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡*[h,0] T2 & (+ⓓV.T1 ≅ T2 → ⊥).
-#h #G #L #V #U1
-elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2
-elim (tweq_dec U1 U2) [ #HpU12 | -HTU2 #HnU12 ]
-[ @(ex2_intro … T2) (**) (* full auto not tried *)
- [ /3 width=6 by cpms_zeta, cpms_step_sn, cpm_bind/
- | /4 width=6 by tweq_inv_abbr_pos_x_lifts_y_y, tweq_canc_sn, tweq_abbr_pos/
- ]
-| /4 width=3 by cpm_cpms, cpm_bind, tweq_inv_abbr_pos_bi, ex2_intro/
-]
-qed-.
(* Properties with normal forms *********************************************)
lemma cpxs_cnx (G) (L) (T1):
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 T1 â\89\9b T2) → ❪G,L❫ ⊢ ⬈𝐍 T1.
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 T1 â\89\85 T2) → ❪G,L❫ ⊢ ⬈𝐍 T1.
/3 width=1 by cpx_cpxs/ qed.
(* Inversion lemmas with normal terms ***************************************)
lemma cpxs_inv_cnx1 (G) (L):
- â\88\80T1,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ â¬\88ð\9d\90\8d T1 â\86\92 T1 â\89\9b T2.
+ â\88\80T1,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 â\9dªG,Lâ\9d« â\8a¢ â¬\88ð\9d\90\8d T1 â\86\92 T1 â\89\85 T2.
#G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
/5 width=9 by cnx_teqx_trans, teqx_trans/
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqg.ma".
+include "basic_2/rt_computation/cpxs_reqg.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
+
+(* Properties with generic equivalence for closures *************************)
+
+(* to be updated *)
+lemma feqg_cpxs_trans (S):
+ reflexive … S → symmetric … S →
+ ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T❫ →
+ ∀T2. ❪G2,L2❫ ⊢ T ⬈* T2 →
+ ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈* T0 & ❪G1,L1,T0❫ ≛[S] ❪G2,L2,T2❫.
+#S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T #H #T2 #H2T2
+elim (feqg_inv_gen_dx … H) -H // #H #HL12 #HT1 destruct
+lapply (reqg_cpxs_trans … H2T2 … HL12) // #H1T2
+lapply (cpxs_reqg_conf_dx … H2T2 … HL12) -HL12 // #HL12
+lapply (teqg_cpxs_trans … HT1 … H1T2) -T // #HT12
+/4 width=3 by feqg_intro_dx, teqg_refl, ex2_intro/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/feqx.ma".
-include "basic_2/rt_computation/cpxs_reqx.ma".
-
-(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
-
-(* Properties with sort-irrelevant equivalence for closures *****************)
-
-(* to be updated *)
-lemma feqx_cpxs_trans:
- ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛ ❪G2,L2,T❫ →
- ∀T2. ❪G2,L2❫ ⊢ T ⬈* T2 →
- ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈* T0 & ❪G1,L1,T0❫ ≛ ❪G2,L2,T2❫.
-#G1 #G2 #L1 #L2 #T1 #T #H #T2 #H2T2
-elim (feqx_inv_gen_dx … H) -H #H #HL12 #HT1 destruct
-lapply (reqx_cpxs_trans … H2T2 … HL12) #H1T2
-lapply (cpxs_reqx_conf_dx … H2T2 … HL12) -HL12 #HL12
-lapply (teqx_cpxs_trans … HT1 … H1T2) -T #HT12
-/3 width=3 by feqx_intro_dx, ex2_intro/
-qed-.
(* Basic_2A1: uses: fqu_cpxs_trans_neq *)
lemma fqu_cpxs_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
[ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❨1❩)
#U2 #HVU2 @(ex3_intro … U2)
[1,3: /3 width=7 by cpxs_delta, fqu_drop/
- | #H lapply (teqx_inv_lref1 … H) -H
+ | #H lapply (teqg_inv_lref1 … H) -H
#H destruct /2 width=5 by lifts_inv_lref2_uni_lt/
]
| #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②[I]V2.T))
(* Basic_2A1: uses: fquq_cpxs_trans_neq *)
lemma fquq_cpxs_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
[ #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tneqx … H12 … HTU2 H) -T2
/3 width=4 by fqu_fquq, ex3_intro/
(* Basic_2A1: uses: fqup_cpxs_trans_neq *)
lemma fqup_cpxs_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
[ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpxs_trans_tneqx … H12 … HTU2 H) -T2
/3 width=4 by fqu_fqup, ex3_intro/
(* Basic_2A1: uses: fqus_cpxs_trans_neq *)
lemma fqus_cpxs_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88* U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
[ #H12 elim (fqup_cpxs_trans_tneqx … H12 … HTU2 H) -T2
/3 width=4 by fqup_fqus, ex3_intro/
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpx_reqg.ma".
+include "basic_2/rt_computation/cpxs_teqg.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
+
+(* Properties with generic equivalence for local environments ***************)
+
+(* Basic_2A1: was just: lleq_cpxs_trans *)
+lemma reqg_cpxs_trans (S) (G):
+ reflexive … S → symmetric … S →
+ ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L2 ≛[S,T0] L0 → ❪G,L2❫ ⊢ T0 ⬈* T1.
+#S #G #H1S #H2S #L0 #T0 #T1 #H @(cpxs_ind_dx … H) -T0 //
+#T0 #T #H0T0 #_ #IH #L2 #HL2
+lapply (reqg_cpx_trans … HL2 … H0T0) // #H2T0
+lapply (IH L2 ?) -IH /2 width=5 by cpx_reqg_conf_dx/ -L0 #H2T1
+/2 width=3 by cpxs_strap2/
+qed-.
+
+(* Basic_2A1: was just: cpxs_lleq_conf *)
+lemma cpxs_reqg_conf (S) (G):
+ reflexive … S → symmetric … S →
+ ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L0 ≛[S,T0] L2 → ❪G,L2❫ ⊢ T0 ⬈* T1.
+/3 width=8 by reqg_cpxs_trans, reqg_sym/ qed-.
+
+(* Basic_2A1: was just: lleq_conf_sn *)
+lemma cpxs_reqg_conf_sn (S) (G):
+ ∀L1,T1,T2. ❪G,L1❫ ⊢ T1 ⬈* T2 →
+ ∀L2. L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2.
+#S #G #L1 #T1 #T2 #H @(cpxs_ind … H) -T2
+/3 width=6 by cpx_reqg_conf_sn/
+qed-.
+
+(* Basic_2A1: was just: cpxs_lleq_conf_dx *)
+lemma cpxs_reqg_conf_dx (S) (G):
+ reflexive … S → symmetric … S →
+ ∀L2,T1,T2. ❪G,L2❫ ⊢ T1 ⬈* T2 →
+ ∀L1. L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2.
+/4 width=4 by cpxs_reqg_conf_sn, reqg_sym/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/rt_transition/cpx_reqx.ma".
-include "basic_2/rt_computation/cpxs_teqx.ma".
-
-(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
-
-(* Properties with sort-irrelevant equivalence for local environments *******)
-
-(* Basic_2A1: was just: lleq_cpxs_trans *)
-lemma reqx_cpxs_trans (G):
- ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L2 ≛[T0] L0 → ❪G,L2❫ ⊢ T0 ⬈* T1.
-#G #L0 #T0 #T1 #H @(cpxs_ind_dx … H) -T0 //
-#T0 #T #H0T0 #_ #IH #L2 #HL2
-lapply (reqx_cpx_trans … HL2 … H0T0) #H2T0
-lapply (IH L2 ?) -IH /2 width=5 by cpx_reqx_conf_dx/ -L0 #H2T1
-/2 width=3 by cpxs_strap2/
-qed-.
-
-(* Basic_2A1: was just: cpxs_lleq_conf *)
-lemma cpxs_reqx_conf (G):
- ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈* T1 → ∀L2. L0 ≛[T0] L2 → ❪G,L2❫ ⊢ T0 ⬈* T1.
-/3 width=3 by reqx_cpxs_trans, reqx_sym/ qed-.
-
-(* Basic_2A1: was just: cpxs_lleq_conf_dx *)
-lemma cpxs_reqx_conf_dx (G):
- ∀L2,T1,T2. ❪G,L2❫ ⊢ T1 ⬈* T2 →
- ∀L1. L1 ≛[T1] L2 → L1 ≛[T2] L2.
-#G #L2 #T1 #T2 #H @(cpxs_ind … H) -T2 /3 width=6 by cpx_reqx_conf_dx/
-qed-.
-
-(* Basic_2A1: was just: lleq_conf_sn *)
-lemma cpxs_reqx_conf_sn (G):
- ∀L1,T1,T2. ❪G,L1❫ ⊢ T1 ⬈* T2 →
- ∀L2. L1 ≛[T1] L2 → L1 ≛[T2] L2.
-/4 width=6 by cpxs_reqx_conf_dx, reqx_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/rpx_reqg.ma".
+include "basic_2/rt_computation/cpxs.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
+
+(* Properties with generic equivalence for terms ****************************)
+
+lemma teqg_cpxs_trans (S) (G) (L) (T):
+ reflexive … S → symmetric … S →
+ ∀T1. T1 ≛[S] T → ∀T2. ❪G,L❫ ⊢ T ⬈* T2 → ❪G,L❫ ⊢ T1 ⬈* T2.
+#S #H1S #H2S #G #L #T #T1 #HT1 #T2 #HT2 @(cpxs_ind … HT2) -T2
+[ /3 width=4 by teqg_cpx, cpx_cpxs/
+| /2 width=3 by cpxs_strap1/
+]
+qed-.
+
+(* Note: this requires teqg to be symmetric *)
+(* Nasic_2A1: uses: cpxs_neq_inv_step_sn *)
+lemma cpxs_tneqg_fwd_step_sn (S) (G) (L):
+ reflexive … S → symmetric … S → Transitive … S →
+ (∀s1,s2. Decidable (S s1 s2)) →
+ ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛[S] T2 → ⊥) →
+ ∃∃T. ❪G,L❫ ⊢ T1 ⬈ T & T1 ≛[S] T → ⊥ & ❪G,L❫ ⊢ T ⬈* T2.
+#S #G #L #H1S #H2S #H3S #H4S #T1 #T2 #H @(cpxs_ind_dx … H) -T1
+[ #H elim H -H /2 width=1 by teqg_refl/
+| #T1 #T0 #HT10 #HT02 #IH #HnT12
+ elim (teqg_dec S … T1 T0) // [ -HT10 -HT02 #HT10 | -IH #HnT10 ]
+ [ elim IH -IH /3 width=3 by teqg_trans/ -HnT12
+ #T #HT0 #HnT0 #HT2
+ lapply (teqg_cpx_trans … HT10 … HT0) // -HT0 #HT1
+ /4 width=4 by teqg_canc_sn, ex3_intro/
+ | /3 width=4 by ex3_intro/
+ ]
+]
+qed-.
(* *)
(**************************************************************************)
-include "static_2/syntax/teqo_teqx.ma".
+include "static_2/syntax/teqo_teqg.ma".
include "basic_2/rt_computation/cpxs_lsubr.ma".
include "basic_2/rt_computation/cpxs_cnx.ma".
include "basic_2/rt_computation/lpxs_cpxs.ma".
(* Forward lemmas with sort-irrelevant outer equivalence for terms **********)
lemma cpxs_fwd_sort (G) (L):
- ∀X2,s1. ❪G,L❫ ⊢ ⋆s1 ⬈* X2 → ⋆s1 ⩳ X2.
+ ∀X2,s1. ❪G,L❫ ⊢ ⋆s1 ⬈* X2 → ⋆s1 ~ X2.
#G #L #X2 #s1 #H
elim (cpxs_inv_sort1 … H) -H #s2 #H destruct //
qed-.
∀V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 →
∀V2. ⇧[↑i] V1 ≘ V2 →
∀X2. ❪G,L❫ ⊢ #i ⬈* X2 →
- ∨∨ #i ⩳ X2 | ❪G,L❫ ⊢ V2 ⬈* X2.
+ ∨∨ #i ~ X2 | ❪G,L❫ ⊢ V2 ⬈* X2.
#I #G #L #K #V1 #i #HLK #V2 #HV12 #X2 #H
elim (cpxs_inv_lref1_drops … H) -H /2 width=1 by or_introl/
* #I0 #K0 #V0 #U0 #HLK0 #HVU0 #HU0
(* Basic_1: was just: pr3_iso_beta *)
lemma cpxs_fwd_beta (p) (G) (L):
∀V,W,T,X2. ❪G,L❫ ⊢ ⓐV.ⓛ[p]W.T ⬈* X2 →
- ∨∨ ⓐV.ⓛ[p]W.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]ⓝW.V.T ⬈* X2.
+ ∨∨ ⓐV.ⓛ[p]W.T ~ X2 | ❪G,L❫ ⊢ ⓓ[p]ⓝW.V.T ⬈* X2.
#p #G #L #V #W #T #X2 #H elim (cpxs_inv_appl1 … H) -H *
[ #V0 #T0 #_ #_ #H destruct /2 width=1 by teqo_pair, or_introl/
| #b #W0 #T0 #HT0 #HU
lemma cpxs_fwd_theta (p) (G) (L):
∀V1,V,T,X2. ❪G,L❫ ⊢ ⓐV1.ⓓ[p]V.T ⬈* X2 →
∀V2. ⇧[1] V1 ≘ V2 →
- ∨∨ ⓐV1.ⓓ[p]V.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ⬈* X2.
+ ∨∨ ⓐV1.ⓓ[p]V.T ~ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ⬈* X2.
#p #G #L #V1 #V #T #X2 #H #V2 #HV12
elim (cpxs_inv_appl1 … H) -H *
[ -HV12 #V0 #T0 #_ #_ #H destruct /2 width=1 by teqo_pair, or_introl/
lemma cpxs_fwd_cast (G) (L):
∀W,T,X2. ❪G,L❫ ⊢ ⓝW.T ⬈* X2 →
- ∨∨ ⓝW. T ⩳ X2 | ❪G,L❫ ⊢ T ⬈* X2 | ❪G,L❫ ⊢ W ⬈* X2.
+ ∨∨ ⓝW. T ~ X2 | ❪G,L❫ ⊢ T ⬈* X2 | ❪G,L❫ ⊢ W ⬈* X2.
#G #L #W #T #X2 #H
elim (cpxs_inv_cast1 … H) -H /2 width=1 by or3_intro1, or3_intro2/ *
#W0 #T0 #_ #_ #H destruct /2 width=1 by teqo_pair, or3_intro0/
lemma cpxs_fwd_cnx (G) (L):
∀T1. ❪G,L❫ ⊢ ⬈𝐍 T1 →
- ∀X2. ❪G,L❫ ⊢ T1 ⬈* X2 → T1 ⩳ X2.
-/3 width=5 by cpxs_inv_cnx1, teqx_teqo/ qed-.
+ ∀X2. ❪G,L❫ ⊢ T1 ⬈* X2 → T1 ~ X2.
+/3 width=5 by cpxs_inv_cnx1, teqg_teqo/ qed-.
(* Vector form of forward lemmas with outer equivalence for terms ***********)
lemma cpxs_fwd_sort_vector (G) (L):
- ∀s,Vs,X2. ❪G,L❫ ⊢ ⒶVs.⋆s ⬈* X2 → ⒶVs.⋆s ⩳ X2.
+ ∀s,Vs,X2. ❪G,L❫ ⊢ ⒶVs.⋆s ⬈* X2 → ⒶVs.⋆s ~ X2.
#G #L #s #Vs elim Vs -Vs /2 width=4 by cpxs_fwd_sort/
#V #Vs #IHVs #X2 #H
elim (cpxs_inv_appl1 … H) -H *
∀V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 →
∀V2. ⇧[↑i] V1 ≘ V2 →
∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.#i ⬈* X2 →
- ∨∨ ⒶVs.#i ⩳ X2 | ❪G,L❫ ⊢ ⒶVs.V2 ⬈* X2.
+ ∨∨ ⒶVs.#i ~ X2 | ❪G,L❫ ⊢ ⒶVs.V2 ⬈* X2.
#I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs
elim Vs -Vs /2 width=5 by cpxs_fwd_delta_drops/
#V #Vs #IHVs #X2 #H -K -V1
(* Basic_1: was just: pr3_iso_appls_beta *)
lemma cpxs_fwd_beta_vector (p) (G) (L):
∀Vs,V,W,T,X2. ❪G,L❫ ⊢ ⒶVs.ⓐV.ⓛ[p]W.T ⬈* X2 →
- ∨∨ ⒶVs.ⓐV.ⓛ[p]W. T ⩳ X2 | ❪G,L❫ ⊢ ⒶVs.ⓓ[p]ⓝW.V.T ⬈* X2.
+ ∨∨ ⒶVs.ⓐV.ⓛ[p]W. T ~ X2 | ❪G,L❫ ⊢ ⒶVs.ⓓ[p]ⓝW.V.T ⬈* X2.
#p #G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_beta/
#V0 #Vs #IHVs #V #W #T #X2 #H
elim (cpxs_inv_appl1 … H) -H *
lemma cpxs_fwd_theta_vector (G) (L):
∀V1b,V2b. ⇧[1] V1b ≘ V2b →
∀p,V,T,X2. ❪G,L❫ ⊢ ⒶV1b.ⓓ[p]V.T ⬈* X2 →
- ∨∨ ⒶV1b.ⓓ[p]V.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⒶV2b.T ⬈* X2.
+ ∨∨ ⒶV1b.ⓓ[p]V.T ~ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⒶV2b.T ⬈* X2.
#G #L #V1b #V2b * -V1b -V2b /3 width=1 by or_intror/
#V1b #V2b #V1a #V2a #HV12a #HV12b #p
generalize in match HV12a; -HV12a
(* Basic_1: was just: pr3_iso_appls_cast *)
lemma cpxs_fwd_cast_vector (G) (L):
∀Vs,W,T,X2. ❪G,L❫ ⊢ ⒶVs.ⓝW.T ⬈* X2 →
- ∨∨ ⒶVs. ⓝW. T ⩳ X2
+ ∨∨ ⒶVs. ⓝW. T ~ X2
| ❪G,L❫ ⊢ ⒶVs.T ⬈* X2
| ❪G,L❫ ⊢ ⒶVs.W ⬈* X2.
#G #L #Vs elim Vs -Vs /2 width=1 by cpxs_fwd_cast/
(* Basic_1: was just: nf2_iso_appls_lref *)
lemma cpxs_fwd_cnx_vector (G) (L):
∀T. 𝐒❪T❫ → ❪G,L❫ ⊢ ⬈𝐍 T →
- ∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.T ⬈* X2 → ⒶVs.T ⩳ X2.
+ ∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.T ⬈* X2 → ⒶVs.T ~ X2.
#G #L #T #H1T #H2T #Vs elim Vs -Vs [ @(cpxs_fwd_cnx … H2T) ] (**) (* /2 width=3 by cpxs_fwd_cnx/ does not work *)
#V #Vs #IHVs #X2 #H
elim (cpxs_inv_appl1 … H) -H *
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/rt_transition/rpx_reqx.ma".
-include "basic_2/rt_computation/cpxs.ma".
-
-(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
-
-(* Properties with sort-irrelevant equivalence for terms ********************)
-
-lemma teqx_cpxs_trans (G) (L) (T):
- ∀T1. T1 ≛ T → ∀T2. ❪G,L❫ ⊢ T ⬈* T2 → ❪G,L❫ ⊢ T1 ⬈* T2.
-#G #L #T #T1 #HT1 #T2 #HT2 @(cpxs_ind … HT2) -T2
-[ /3 width=1 by teqx_cpx, cpx_cpxs/
-| /2 width=3 by cpxs_strap1/
-]
-qed-.
-
-(* Note: this requires teqx to be symmetric *)
-(* Nasic_2A1: uses: cpxs_neq_inv_step_sn *)
-lemma cpxs_tneqx_fwd_step_sn (G) (L):
- ∀T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ≛ T2 → ⊥) →
- ∃∃T. ❪G,L❫ ⊢ T1 ⬈ T & T1 ≛ T → ⊥ & ❪G,L❫ ⊢ T ⬈* T2.
-#G #L #T1 #T2 #H @(cpxs_ind_dx … H) -T1
-[ #H elim H -H //
-| #T1 #T0 #HT10 #HT02 #IH #HnT12
- elim (teqx_dec T1 T0) [ -HT10 -HT02 #HT10 | -IH #HnT10 ]
- [ elim IH -IH /3 width=3 by teqx_trans/ -HnT12
- #T #HT0 #HnT0 #HT2
- lapply (teqx_cpx_trans … HT10 … HT0) -HT0 #HT1
- /4 width=4 by teqx_canc_sn, ex3_intro/
- | /3 width=4 by ex3_intro/
- ]
-]
-qed-.
lemma csx_ind (G) (L) (Q:predicate …):
(∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) →
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) →
Q T1
) →
∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q T.
(* Basic_1: was just: sn3_pr2_intro *)
lemma csx_intro (G) (L):
- â\88\80T1. (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\9b T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) →
+ â\88\80T1. (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\85 T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) →
❪G,L❫ ⊢ ⬈*𝐒 T1.
/4 width=1 by SN_intro/ qed.
fact aaa_ind_csx_aux (G) (L):
∀A. ∀Q:predicate ….
(∀T1. ❪G,L❫ ⊢ T1 ⁝ A →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) → Q T1
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) → Q T1
) →
∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → ❪G,L❫ ⊢ T ⁝ A → Q T.
#G #L #A #Q #IH #T #H @(csx_ind … H) -T /4 width=5 by cpx_aaa_conf/
lemma aaa_ind_csx (G) (L):
∀A. ∀Q:predicate ….
(∀T1. ❪G,L❫ ⊢ T1 ⁝ A →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) → Q T1
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) → Q T1
) →
∀T. ❪G,L❫ ⊢ T ⁝ A → Q T.
/5 width=9 by aaa_ind_csx_aux, aaa_csx/ qed-.
fact aaa_ind_csx_cpxs_aux (G) (L):
∀A. ∀Q:predicate ….
(∀T1. ❪G,L❫ ⊢ T1 ⁝ A →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) → Q T1
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) → Q T1
) →
∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → ❪G,L❫ ⊢ T ⁝ A → Q T.
#G #L #A #Q #IH #T #H @(csx_ind_cpxs … H) -T /4 width=5 by cpxs_aaa_conf/
lemma aaa_ind_csx_cpxs (G) (L):
∀A. ∀Q:predicate ….
(∀T1. ❪G,L❫ ⊢ T1 ⁝ A →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) → Q T1
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) → Q T1
) →
∀T. ❪G,L❫ ⊢ T ⁝ A → Q T.
/5 width=9 by aaa_ind_csx_cpxs_aux, aaa_csx/ qed-.
(* *)
(**************************************************************************)
-include "basic_2/rt_computation/cpxs_teqx.ma".
+include "basic_2/rt_computation/cpxs_teqg.ma".
include "basic_2/rt_computation/cpxs_cpxs.ma".
include "basic_2/rt_computation/csx_csx.ma".
(* Basic_1: was just: sn3_intro *)
lemma csx_intro_cpxs (G) (L):
- â\88\80T1. (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\9b T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) →
+ â\88\80T1. (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\85 T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 T2) →
❪G,L❫ ⊢ ⬈*𝐒 T1.
/4 width=1 by cpx_cpxs, csx_intro/ qed-.
fact csx_ind_cpxs_aux (G) (L):
∀Q:predicate term.
(∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) → Q T1
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) → Q T1
) →
∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → Q T2.
#T1 #HT1 #IH1 #T2 #HT12
@IH -IH /2 width=3 by csx_cpxs_trans/ -HT1 #V2 #HTV2 #HnTV2
elim (teqx_dec T1 T2) #H
-[ lapply (teqx_tneqx_trans … H … HnTV2) -H -HnTV2 #Hn12
+[ lapply (teqg_tneqg_trans … H … HnTV2) // -H -HnTV2 #Hn12
lapply (cpxs_trans … HT12 … HTV2) -T2 #H12
- elim (cpxs_tneqx_fwd_step_sn … H12 … Hn12) -H12 -Hn12
+ elim (cpxs_tneqg_fwd_step_sn … H12 … Hn12) // -H12 -Hn12
/3 width=4 by/
-| elim (cpxs_tneqx_fwd_step_sn … HT12 … H) -HT12 -H
+| elim (cpxs_tneqg_fwd_step_sn … HT12 … H) -HT12 -H
/3 width=6 by cpxs_trans/
]
qed-.
(* Basic_2A1: was: csx_ind_alt *)
lemma csx_ind_cpxs (G) (L) (Q:predicate …):
(∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\9b T2 → ⊥) → Q T2) → Q T1
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88* T2 â\86\92 (T1 â\89\85 T2 → ⊥) → Q T2) → Q T1
) →
∀T. ❪G,L❫ ⊢ ⬈*𝐒 T → Q T.
#G #L #Q #IH #T #HT
(* *)
(**************************************************************************)
-include "basic_2/rt_transition/lpx_reqx.ma".
+include "basic_2/rt_transition/lpx_reqg.ma".
include "basic_2/rt_computation/csx_drops.ma".
(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
(* Advanced properties ******************************************************)
-lemma csx_teqx_trans (G) (L):
+lemma csx_teqg_trans (S) (G) (L):
+ reflexive … S → symmetric … S →
∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
- ∀T2. T1 ≛ T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2.
-#G #L #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2
+ ∀T2. T1 ≛[S] T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2.
+#S #G #L #H1S #H2S #T1 #H @(csx_ind … H) -T1 #T #_ #IH #T2 #HT2
@csx_intro #T1 #HT21 #HnT21
-lapply (teqx_cpx_trans … HT2 … HT21) -HT21 #HT1
-/4 width=5 by teqx_repl/
+lapply (teqg_cpx_trans … HT2 … HT21) // -HT21 #HT1
+/5 width=4 by teqg_teqx, teqg_canc_sn, teqg_refl/
qed-.
lemma csx_cpx_trans (G) (L):
∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
∀T2. ❪G,L❫ ⊢ T1 ⬈ T2 → ❪G,L❫ ⊢ ⬈*𝐒 T2.
#G #L #T1 #H @(csx_ind … H) -T1 #T1 #HT1 #IHT1 #T2 #HLT12
-elim (teqx_dec T1 T2) /3 width=4 by csx_teqx_trans/
+elim (teqx_dec T1 T2) /3 width=6 by csx_teqg_trans/
qed-.
(* Basic_1: was just: sn3_cast *)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqg.ma".
+include "basic_2/rt_computation/csx_reqg.ma".
+
+(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
+
+(* Properties with generic equivalence for closures *************************)
+
+lemma csx_feqg_conf (S):
+ reflexive … S → symmetric … S →
+ ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
+ ∀G2,L2,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ❪G2,L2❫ ⊢ ⬈*𝐒 T2.
+#S #H1S #H2S #G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
+/3 width=6 by csx_reqg_conf, csx_teqg_trans/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/feqx.ma".
-include "basic_2/rt_computation/csx_reqx.ma".
-
-(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
-
-(* Properties with sort-irrelevant equivalence for closures *****************)
-
-lemma csx_feqx_conf:
- ∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
- ∀G2,L2,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ❪G2,L2❫ ⊢ ⬈*𝐒 T2.
-#G1 #L1 #T1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
-/3 width=3 by csx_reqx_conf, csx_teqx_trans/
-qed-.
include "basic_2/rt_transition/fpbq.ma".
include "basic_2/rt_computation/csx_fqus.ma".
-include "basic_2/rt_computation/csx_feqx.ma".
+include "basic_2/rt_computation/csx_feqg.ma".
include "basic_2/rt_computation/csx_lpx.ma".
(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
∀G1,L1,T1. ❪G1,L1❫ ⊢ ⬈*𝐒 T1 →
∀G2,L2,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ → ❪G2,L2❫ ⊢ ⬈*𝐒 T2.
#G1 #L1 #T1 #HT1 #G2 #L2 #T2 *
-/2 width=6 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_feqx_conf/
+/2 width=8 by csx_cpx_trans, csx_fquq_conf, csx_lpx_conf, csx_feqg_conf/
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/cpx_reqg.ma".
+include "basic_2/rt_computation/csx_csx.ma".
+
+(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
+
+(* Properties with generic equivalence for local environments ***************)
+
+(* Basic_2A1: uses: csx_lleq_conf *)
+lemma csx_reqg_conf (S) (G) (T):
+ reflexive … S → symmetric … S →
+ ∀L1. ❪G,L1❫ ⊢ ⬈*𝐒 T →
+ ∀L2. L1 ≛[S,T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T.
+#S #G #T #H1S #H2S #L1 #H
+@(csx_ind … H) -T #T1 #_ #IH #L2 #HL12
+@csx_intro #T2 #HT12 #HnT12
+lapply (reqg_cpx_trans … HL12 … HT12) -HT12
+/3 width=4 by cpx_reqg_conf_sn/
+qed-.
+
+(* Basic_2A1: uses: csx_lleq_trans *)
+lemma csx_reqg_trans (S) (G) (T):
+ reflexive … S → symmetric … S →
+ ∀L1,L2. L1 ≛[S,T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T → ❪G,L1❫ ⊢ ⬈*𝐒 T.
+/3 width=8 by csx_reqg_conf, reqg_sym/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/rt_transition/cpx_reqx.ma".
-include "basic_2/rt_computation/csx_csx.ma".
-
-(* STRONGLY NORMALIZING TERMS FOR EXTENDED PARALLEL RT-TRANSITION ***********)
-
-(* Properties with sort-irrelevant equivalence for local environments *******)
-
-(* Basic_2A1: uses: csx_lleq_conf *)
-lemma csx_reqx_conf (G) (L1):
- ∀T. ❪G,L1❫ ⊢ ⬈*𝐒 T →
- ∀L2. L1 ≛[T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T.
-#G #L1 #T #H
-@(csx_ind … H) -T #T1 #_ #IH #L2 #HL12
-@csx_intro #T2 #HT12 #HnT12
-lapply (reqx_cpx_trans … HL12 … HT12) -HT12
-/3 width=4 by cpx_reqx_conf_sn/
-qed-.
-
-(* Basic_2A1: uses: csx_lleq_trans *)
-lemma csx_reqx_trans (G) (L2):
- ∀L1,T. L1 ≛[T] L2 → ❪G,L2❫ ⊢ ⬈*𝐒 T → ❪G,L1❫ ⊢ ⬈*𝐒 T.
-/3 width=3 by csx_reqx_conf, reqx_sym/ qed-.
lemma csx_appl_simple (G) (L):
∀V. ❪G,L❫ ⊢ ⬈*𝐒 V → ∀T1.
- (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\9b T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) →
+ (â\88\80T2. â\9dªG,Lâ\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\85 T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) →
𝐒❪T1❫ → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T1.
#G #L #V #H @(csx_ind … H) -V
#V #_ #IHV #T1 #IHT1 #HT1
(* Basic_2A1: was: csx_appl_simple_tsts *)
lemma csx_appl_simple_teqo (G) (L):
∀V. ❪G,L❫ ⊢ ⬈*𝐒 V → ∀T1. ❪G,L❫ ⊢ ⬈*𝐒 T1 →
- (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ⩳ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) →
+ (∀T2. ❪G,L❫ ⊢ T1 ⬈* T2 → (T1 ~ T2 → ⊥) → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T2) →
𝐒❪T1❫ → ❪G,L❫ ⊢ ⬈*𝐒 ⓐV.T1.
#G #L #V #H @(csx_ind … H) -V
#V #_ #IHV #T1 #H @(csx_ind … H) -T1
(* Basic_2A1: uses: fpbg_fleq_trans *)
lemma fpbg_feqx_trans:
∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ > ❪G,L,T❫ →
- â\88\80G2,L2,T2. â\9dªG,L,Tâ\9d« â\89\9b ❪G2,L2,T2❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
+ â\88\80G2,L2,T2. â\9dªG,L,Tâ\9d« â\89\85 ❪G2,L2,T2❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
/3 width=5 by fpbg_fpbq_trans, fpbq_feqx/ qed-.
(* Properties with t-bound rt-transition for terms **************************)
lemma cpm_tneqx_cpm_fpbg (h) (G) (L):
- â\88\80n1,T1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 (T1 â\89\9b T → ⊥) →
+ â\88\80n1,T1,T. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n1] T â\86\92 (T1 â\89\85 T → ⊥) →
∀n2,T2. ❪G,L❫ ⊢ T ➡[h,n2] T2 → ❪G,L,T1❫ > ❪G,L,T2❫.
/4 width=5 by fpbq_fpbs, cpm_fpbq, cpm_fpb, ex2_3_intro/ qed.
(* *)
(**************************************************************************)
-include "basic_2/rt_computation/cpxs_teqx.ma".
+include "basic_2/rt_computation/cpxs_teqg.ma".
include "basic_2/rt_computation/fpbs_cpxs.ma".
include "basic_2/rt_computation/fpbg_fpbs.ma".
(* Basic_2A1: was: cpxs_fpbg *)
lemma cpxs_tneqx_fpbg:
∀G,L,T1,T2. ❪G,L❫ ⊢ T1 ⬈* T2 →
- (T1 â\89\9b T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫.
+ (T1 â\89\85 T2 → ⊥) → ❪G,L,T1❫ > ❪G,L,T2❫.
#G #L #T1 #T2 #H #H0
-elim (cpxs_tneqx_fwd_step_sn … H … H0) -H -H0
+elim (cpxs_tneqg_fwd_step_sn … H … H0) -H -H0
/4 width=5 by cpxs_teqx_fpbs, fpb_cpx, ex2_3_intro/
qed.
(* *)
(**************************************************************************)
-include "static_2/static/feqx_feqx.ma".
+include "static_2/static/feqg_fqup.ma".
+include "static_2/static/feqg_feqg.ma".
include "basic_2/rt_transition/fpbq_fpb.ma".
include "basic_2/rt_computation/fpbs_fqup.ma".
include "basic_2/rt_computation/fpbg.ma".
(* Basic_2A1: uses: fleq_fpbg_trans *)
lemma feqx_fpbg_trans:
∀G,G2,L,L2,T,T2. ❪G,L,T❫ > ❪G2,L2,T2❫ →
- â\88\80G1,L1,T1. â\9dªG1,L1,T1â\9d« â\89\9b ❪G,L,T❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
+ â\88\80G1,L1,T1. â\9dªG1,L1,T1â\9d« â\89\85 ❪G,L,T❫ → ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
#G #G2 #L #L2 #T #T2 * #G0 #L0 #T0 #H0 #H02 #G1 #L1 #T1 #H1
-elim (feqx_fpb_trans … H1 … H0) -G -L -T
+elim (feqg_fpb_trans … H1 … H0) -G -L -T
/4 width=9 by fpbs_strap2, fpbq_feqx, ex2_3_intro/
qed-.
(* Basic_2A1: was: fpbs_fpbg *)
lemma fpbs_inv_fpbg:
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ →
- â\88¨â\88¨ â\9dªG1,L1,T1â\9d« â\89\9b ❪G2,L2,T2❫
+ â\88¨â\88¨ â\9dªG1,L1,T1â\9d« â\89\85 ❪G2,L2,T2❫
| ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
#G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind … H) -G2 -L2 -T2
-[ /2 width=1 by or_introl/
+[ /3 width=1 by feqg_refl, or_introl/
| #G #G2 #L #L2 #T #T2 #_ #H2 * #H1
elim (fpbq_inv_fpb … H2) -H2 #H2
- [ /3 width=5 by feqx_trans, or_introl/
- | elim (feqx_fpb_trans … H1 … H2) -G -L -T
+ [ /3 width=5 by feqg_trans, or_introl/
+ | elim (feqg_fpb_trans … H1 … H2) -G -L -T
/4 width=5 by ex2_3_intro, or_intror, feqx_fpbs/
| /3 width=5 by fpbg_feqx_trans, or_intror/
| /4 width=5 by fpbg_fpbq_trans, fpb_fpbq, or_intror/
∀G2,L2,U2. ❪F2,K2,T2❫ ≻ ❪G2,L2,U2❫ →
∃∃G1,L1,U1. ❪F1,K1,T1❫ ≻ ❪G1,L1,U1❫ & ❪G1,L1,U1❫ ≥ ❪G2,L2,U2❫.
#F1 #F2 #K1 #K2 #T1 #T2 #H elim (fpbs_inv_fpbg … H) -H
-[ #H12 #G2 #L2 #U2 #H2 elim (feqx_fpb_trans … H12 … H2) -F2 -K2 -T2
+[ #H12 #G2 #L2 #U2 #H2 elim (feqg_fpb_trans … H12 … H2) -F2 -K2 -T2
/3 width=5 by feqx_fpbs, ex2_3_intro/
| * #H1 #H2 #H3 #H4 #H5 #H6 #H7 #H8 #H9
@(ex2_3_intro … H4) -H4 /3 width=5 by fpbs_strap1, fpb_fpbq/
lemma fpbg_teqx_div:
∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ > ❪G2,L2,T❫ →
- â\88\80T2. T2 â\89\9b T → ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
-/4 width=5 by fpbg_feqx_trans, teqx_feqx, teqx_sym/ qed-.
+ â\88\80T2. T2 â\89\85 T → ❪G1,L1,T1❫ > ❪G2,L2,T2❫.
+/4 width=5 by fpbg_feqx_trans, teqg_feqg, teqx_sym/ qed-.
(* Properties with plus-iterated structural successor for closures **********)
(* Basic_2A1: uses: lpxs_fpbg *)
lemma lpxs_rneqx_fpbg:
∀G,L1,L2,T. ❪G,L1❫ ⊢ ⬈* L2 →
- (L1 â\89\9b[T] L2 → ⊥) → ❪G,L1,T❫ > ❪G,L2,T❫.
+ (L1 â\89\85[T] L2 → ⊥) → ❪G,L1,T❫ > ❪G,L2,T❫.
#G #L1 #L2 #T #H #H0
-elim (lpxs_rneqx_inv_step_sn … H … H0) -H -H0
-/4 width=7 by fpb_lpx, lpxs_feqx_fpbs, feqx_intro_sn, ex2_3_intro/
+elim (lpxs_rneqg_inv_step_sn … H … H0) -H -H0
+/4 width=7 by fpb_lpx, lpxs_feqx_fpbs, feqg_intro_sn, ex2_3_intro/
qed.
include "ground/lib/star.ma".
include "basic_2/notation/relations/predsubtystar_6.ma".
+include "static_2/static/reqx.ma".
include "basic_2/rt_transition/fpbq.ma".
(* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************)
(* Basic_2A1: uses: lleq_fpbs fleq_fpbs *)
lemma feqx_fpbs:
- â\88\80G1,G2,L1,L2,T1,T2. â\9dªG1,L1,T1â\9d« â\89\9b ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
+ â\88\80G1,G2,L1,L2,T1,T2. â\9dªG1,L1,T1â\9d« â\89\85 ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
/3 width=1 by fpbq_fpbs, fpbq_feqx/ qed.
(* Basic_2A1: uses: fpbs_lleq_trans *)
lemma fpbs_feqx_trans:
∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≥ ❪G,L,T❫ →
- â\88\80G2,L2,T2. â\9dªG,L,Tâ\9d« â\89\9b ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
+ â\88\80G2,L2,T2. â\9dªG,L,Tâ\9d« â\89\85 ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
/3 width=9 by fpbs_strap1, fpbq_feqx/ qed-.
(* Basic_2A1: uses: lleq_fpbs_trans *)
lemma feqx_fpbs_trans:
∀G,G2,L,L2,T,T2. ❪G,L,T❫ ≥ ❪G2,L2,T2❫ →
- â\88\80G1,L1,T1. â\9dªG1,L1,T1â\9d« â\89\9b ❪G,L,T❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
+ â\88\80G1,L1,T1. â\9dªG1,L1,T1â\9d« â\89\85 ❪G,L,T❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
/3 width=5 by fpbs_strap2, fpbq_feqx/ qed-.
lemma teqx_reqx_lpx_fpbs:
- â\88\80T1,T2. T1 â\89\9b T2 â\86\92 â\88\80L1,L0. L1 â\89\9b[T2] L0 →
+ â\88\80T1,T2. T1 â\89\85 T2 â\86\92 â\88\80L1,L0. L1 â\89\85[T2] L0 →
∀G,L2. ❪G,L0❫ ⊢ ⬈ L2 → ❪G,L1,T1❫ ≥ ❪G,L2,T2❫.
-/4 width=5 by feqx_fpbs, fpbs_strap1, fpbq_lpx, feqx_intro_dx/ qed.
+/4 width=5 by feqx_fpbs, fpbs_strap1, fpbq_lpx, feqg_intro_dx/ qed.
(* Basic_2A1: removed theorems 3:
fpb_fpbsa_trans fpbs_fpbsa fpbsa_inv_fpbs
(* *)
(**************************************************************************)
-include "basic_2/rt_transition/cpx_feqx.ma".
+include "basic_2/rt_transition/cpx_feqg.ma".
include "basic_2/rt_computation/lpxs_cpxs.ma".
include "basic_2/rt_computation/fpbs_lpxs.ma".
(* Basic_2A1: uses: fpbs_cpx_trans_neq *)
lemma fpbs_cpx_tneqx_trans:
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ≥ ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ≥ ❪G2,L2,U2❫.
#G1 #G2 #L1 #L2 #T1 #T2 #H #U2 #HTU2 #HnTU2
elim (fpbs_inv_star … H) -H #G0 #L0 #L3 #T0 #T3 #HT10 #H10 #HL03 #H32
-elim (feqx_cpx_trans … H32 … HTU2) -HTU2 #T4 #HT34 #H42
-lapply (feqx_tneqx_repl_dx … H32 … H42 … HnTU2) -T2 #HnT34
+elim (feqg_cpx_trans … H32 … HTU2) -HTU2 // #T4 #HT34 #H42
+lapply (feqg_tneqg_repl_dx … H32 … H42 … HnTU2) -T2 // #HnT34
lapply (lpxs_cpx_trans … HT34 … HL03) -HT34 #HT34
elim (fqus_cpxs_trans_tneqx … H10 … HT34 HnT34) -T3 #T2 #HT02 #HnT02 #H24
elim (teqx_dec T1 T0) [ #H10 | -HnT02 #HnT10 ]
[ lapply (cpxs_trans … HT10 … HT02) -HT10 -HT02 #HT12
- elim (cpxs_tneqx_fwd_step_sn … HT12) [2: /3 width=3 by teqx_canc_sn/ ] -T0 -HT12
-| elim (cpxs_tneqx_fwd_step_sn … HT10 … HnT10) -HT10 -HnT10
+ elim (cpxs_tneqg_fwd_step_sn … HT12)
+ [2,7: /3 width=3 by teqg_canc_sn/ ] -T0 -HT12 //
+| elim (cpxs_tneqg_fwd_step_sn … HT10 … HnT10) -HT10 -HnT10 //
]
/4 width=16 by fpbs_intro_star, cpxs_teqx_fpbs_trans, ex3_intro/
qed-.
qed-.
lemma cpxs_teqx_fpbs_trans:
- â\88\80G1,L1,T1,T. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* T â\86\92 â\88\80T0. T â\89\9b T0 →
+ â\88\80G1,L1,T1,T. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* T â\86\92 â\88\80T0. T â\89\85 T0 →
∀G2,L2,T2. ❪G1,L1,T0❫ ≥ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
/3 width=3 by cpxs_fpbs_trans, teqx_fpbs_trans/ qed-.
lemma cpxs_teqx_fpbs:
∀G,L,T1,T. ❪G,L❫ ⊢ T1 ⬈* T →
- â\88\80T2. T â\89\9b T2 → ❪G,L,T1❫ ≥ ❪G,L,T2❫.
-/4 width=3 by cpxs_fpbs_trans, feqx_fpbs, teqx_feqx/ qed.
+ â\88\80T2. T â\89\85 T2 → ❪G,L,T1❫ ≥ ❪G,L,T2❫.
+/4 width=3 by cpxs_fpbs_trans, feqx_fpbs, teqg_feqg/ qed.
(* Properties with star-iterated structural successor for closures **********)
(**************************************************************************)
include "static_2/s_computation/fqus_fqup.ma".
-include "static_2/static/feqx_fqup.ma".
+include "static_2/static/feqg_fqup.ma".
include "basic_2/rt_computation/fpbs_fqus.ma".
(* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************)
(* Advanced properties ******************************************************)
lemma teqx_fpbs_trans:
- â\88\80T1,T. T1 â\89\9b T →
+ â\88\80T1,T. T1 â\89\85 T →
∀G1,G2,L1,L2,T2. ❪G1,L1,T❫ ≥ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
-/3 width=5 by feqx_fpbs_trans, teqx_feqx/ qed-.
+/3 width=5 by feqx_fpbs_trans, teqg_feqg/ qed-.
lemma fpbs_teqx_trans:
∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≥ ❪G2,L2,T❫ →
- â\88\80T2. T â\89\9b T2 → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
-/3 width=5 by fpbs_feqx_trans, teqx_feqx/ qed-.
+ â\88\80T2. T â\89\85 T2 → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
+/3 width=5 by fpbs_feqx_trans, teqg_feqg/ qed-.
(* Properties with plus-iterated structural successor for closures **********)
(* *)
(**************************************************************************)
-include "static_2/static/feqx_fqus.ma".
-include "static_2/static/feqx_feqx.ma".
+include "static_2/static/feqg_fqus.ma".
+include "static_2/static/feqg_feqg.ma".
include "basic_2/rt_computation/cpxs_fqus.ma".
-include "basic_2/rt_computation/cpxs_feqx.ma".
-include "basic_2/rt_computation/lpxs_feqx.ma".
+include "basic_2/rt_computation/cpxs_feqg.ma".
+include "basic_2/rt_computation/lpxs_feqg.ma".
include "basic_2/rt_computation/fpbs_cpxs.ma".
(* PARALLEL RST-COMPUTATION FOR CLOSURES ************************************)
(* Basic_2A1: uses: lpxs_lleq_fpbs *)
lemma lpxs_feqx_fpbs:
∀G1,L1,L,T1. ❪G1,L1❫ ⊢ ⬈* L →
- â\88\80G2,L2,T2. â\9dªG1,L,T1â\9d« â\89\9b ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
+ â\88\80G2,L2,T2. â\9dªG1,L,T1â\9d« â\89\85 ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
/3 width=3 by lpxs_fpbs_trans, feqx_fpbs/ qed.
lemma fpbs_lpx_trans:
lemma fpbs_cpxs_teqx_fqup_lpx_trans:
∀G1,G3,L1,L3,T1,T3. ❪G1,L1,T1❫ ≥ ❪G3,L3,T3❫ →
- â\88\80T4. â\9dªG3,L3â\9d« â\8a¢ T3 â¬\88* T4 â\86\92 â\88\80T5. T4 â\89\9b T5 →
+ â\88\80T4. â\9dªG3,L3â\9d« â\8a¢ T3 â¬\88* T4 â\86\92 â\88\80T5. T4 â\89\85 T5 →
∀G2,L4,T2. ❪G3,L3,T5❫ ⬂+ ❪G2,L4,T2❫ →
∀L2. ❪G2,L4❫ ⊢ ⬈ L2 → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫.
#G1 #G3 #L1 #L3 #T1 #T3 #H13 #T4 #HT34 #T5 #HT45 #G2 #L4 #T2 #H34 #L2 #HL42
∀G1,L1,T1,T. ❪G1,L1❫ ⊢ T1 ⬈* T →
∀G,L,T0. ❪G1,L1,T❫ ⬂* ❪G,L,T0❫ →
∀L0. ❪G,L❫ ⊢ ⬈* L0 →
- â\88\80G2,L2,T2. â\9dªG,L0,T0â\9d« â\89\9b ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ .
+ â\88\80G2,L2,T2. â\9dªG,L0,T0â\9d« â\89\85 ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ .
/3 width=5 by cpxs_fqus_lpxs_fpbs, fpbs_strap1, fpbq_feqx/ qed.
(* Advanced inversion lemmas *************************************************)
(* Basic_2A1: uses: fpbs_inv_alt *)
lemma fpbs_inv_star:
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≥ ❪G2,L2,T2❫ →
- â\88\83â\88\83G,L,L0,T,T0. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* T & â\9dªG1,L1,Tâ\9d« â¬\82* â\9dªG,L,T0â\9d« & â\9dªG,Lâ\9d« â\8a¢ â¬\88* L0 & â\9dªG,L0,T0â\9d« â\89\9b ❪G2,L2,T2❫.
+ â\88\83â\88\83G,L,L0,T,T0. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88* T & â\9dªG1,L1,Tâ\9d« â¬\82* â\9dªG,L,T0â\9d« & â\9dªG,Lâ\9d« â\8a¢ â¬\88* L0 & â\9dªG,L0,T0â\9d« â\89\85 ❪G2,L2,T2❫.
#G1 #G2 #L1 #L2 #T1 #T2 #H @(fpbs_ind_dx … H) -G1 -L1 -T1
-[ /2 width=9 by ex4_5_intro/
+[ /3 width=9 by feqg_refl, ex4_5_intro/
| #G1 #G0 #L1 #L0 #T1 #T0 * -G0 -L0 -T0
[ #G0 #L0 #T0 #H10 #_ * #G3 #L3 #L4 #T3 #T4 #HT03 #H34 #HL34 #H42
elim (fquq_cpxs_trans … HT03 … H10) -T0
elim (lpx_fqus_trans … H34 … HL10) -L0
/3 width=9 by lpxs_step_sn, cpxs_trans, ex4_5_intro/
| #G0 #L0 #T0 #H10 #_ * #G3 #L3 #L4 #T3 #T4 #HT03 #H34 #HL34 #H42
- elim (feqx_cpxs_trans … H10 … HT03) -T0 #T0 #HT10 #H03
- elim (feqx_fqus_trans … H03 … H34) -G0 -L0 -T3 #G0 #L0 #T3 #H03 #H34
- elim (feqx_lpxs_trans … H34 … HL34) -L3 #L3 #HL03 #H34
- /3 width=13 by feqx_trans, ex4_5_intro/
+ elim (feqg_cpxs_trans … H10 … HT03) -T0 // #T0 #HT10 #H03
+ elim (feqg_fqus_trans … H03 … H34) -G0 -L0 -T3 // #G0 #L0 #T3 #H03 #H34
+ elim (feqg_lpxs_trans … H34 … HL34) -L3 // #L3 #HL03 #H34
+ /3 width=13 by feqg_trans, ex4_5_intro/
]
]
qed-.
| #G3 #L3 #T3 #H03 #_
elim (lpx_fqup_trans … H03 … HL02) -L2 #L4 #T4 #HT04 #H43 #HL43
elim (teqx_dec T0 T4) [ -IHc -HT04 #HT04 | -IHu #HnT04 ]
- [ elim (teqx_fqup_trans … H43 … HT04) -T4 #L2 #T4 #H04 #HT43 #HL24
+ [ elim (teqg_fqup_trans … H43 … HT04) -T4 // #L2 #T4 #H04 #HT43 #HL24
/4 width=7 by fsb_fpbs_trans, teqx_reqx_lpx_fpbs, fpbs_fqup_trans/
- | elim (cpxs_tneqx_fwd_step_sn … HT04 HnT04) -HT04 -HnT04 #T2 #HT02 #HnT02 #HT24
+ | elim (cpxs_tneqg_fwd_step_sn … HT04 HnT04) -HT04 -HnT04 // #T2 #HT02 #HnT02 #HT24
elim (fpbs_cpx_tneqx_trans … H10 … HT02 HnT02) -T0 #T0 #HT10 #HnT10 #H02
/3 width=14 by fpbs_cpxs_teqx_fqup_lpx_trans/
]
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/fpb_feqg.ma".
+include "basic_2/rt_computation/fsb.ma".
+
+(* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
+
+(* Properties with generic equivalence for closures *************************)
+
+lemma fsb_feqg_trans (S):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,L1,T1. ≥𝐒 ❪G1,L1,T1❫ →
+ ∀G2,L2,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ≥𝐒 ❪G2,L2,T2❫.
+#S #H1S #H2S #H3S #G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
+#G1 #L1 #T1 #_ #IH #G2 #L2 #T2 #H12
+@fsb_intro #G #L #T #H2
+elim (feqg_fpb_trans … H12 … H2) -G2 -L2 -T2
+/2 width=5 by/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/rt_transition/fpb_feqx.ma".
-include "basic_2/rt_computation/fsb.ma".
-
-(* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
-
-(* Properties with sort-irrelevant equivalence for closures *****************)
-
-lemma fsb_feqx_trans:
- ∀G1,L1,T1. ≥𝐒 ❪G1,L1,T1❫ →
- ∀G2,L2,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ≥𝐒 ❪G2,L2,T2❫.
-#G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
-#G1 #L1 #T1 #_ #IH #G2 #L2 #T2 #H12
-@fsb_intro #G #L #T #H2
-elim (feqx_fpb_trans … H12 … H2) -G2 -L2 -T2
-/2 width=5 by/
-qed-.
(**************************************************************************)
include "basic_2/rt_computation/fpbg_fpbs.ma".
-include "basic_2/rt_computation/fsb_feqx.ma".
+include "basic_2/rt_computation/fsb_feqg.ma".
(* STRONGLY NORMALIZING CLOSURES FOR PARALLEL RST-TRANSITION ****************)
#G1 #L1 #T1 #H @(fsb_ind_alt … H) -G1 -L1 -T1
#G1 #L1 #T1 #H1 #IH #G2 #L2 #T2 #H12
elim (fpbs_inv_fpbg … H12) -H12
-[ -IH /2 width=5 by fsb_feqx_trans/
+[ -IH /2 width=9 by fsb_feqg_trans/
| -H1 * /2 width=5 by/
]
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqg.ma".
+include "basic_2/rt_computation/lpxs_reqg.ma".
+
+(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************)
+
+(* Properties with generic equivalence on closures ***************************)
+
+lemma feqg_lpxs_trans (S):
+ reflexive … S → symmetric … S →
+ ∀G1,G2,L1,L0,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L0,T2❫ →
+ ∀L2. ❪G2,L0❫ ⊢⬈* L2 →
+ ∃∃L. ❪G1,L1❫ ⊢⬈* L & ❪G1,L,T1❫ ≛[S] ❪G2,L2,T2❫.
+#S #H1S #H2S #G1 #G2 #L1 #L0 #T1 #T2 #H1 #L2 #HL02
+elim (feqg_inv_gen_dx … H1) -H1 // #HG #HL10 #HT12 destruct
+elim (reqg_lpxs_trans … HL02 … HL10) -L0 // #L0 #HL10 #HL02
+/3 width=3 by feqg_intro_dx, ex2_intro/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/feqx.ma".
-include "basic_2/rt_computation/lpxs_reqx.ma".
-
-(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS **************)
-
-(* Properties with sort-irrelevant equivalence on closures ******************)
-
-lemma feqx_lpxs_trans:
- ∀G1,G2,L1,L0,T1,T2. ❪G1,L1,T1❫ ≛ ❪G2,L0,T2❫ →
- ∀L2. ❪G2,L0❫ ⊢⬈* L2 →
- ∃∃L. ❪G1,L1❫ ⊢⬈* L & ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫.
-#G1 #G2 #L1 #L0 #T1 #T2 #H1 #L2 #HL02
-elim (feqx_inv_gen_dx … H1) -H1 #HG #HL10 #HT12 destruct
-elim (reqx_lpxs_trans … HL02 … HL10) -L0 #L0 #HL10 #HL02
-/3 width=3 by feqx_intro_dx, ex2_intro/
-qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "basic_2/rt_transition/lpx_reqg.ma".
+include "basic_2/rt_computation/lpxs_lpx.ma".
+
+(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS *************)
+
+(* Properties with generic equivalence on referred entries ******************)
+
+(* Basic_2A1: uses: lleq_lpxs_trans *)
+lemma reqg_lpxs_trans (S) (G) (T:term):
+ reflexive … S → symmetric … S →
+ ∀L2,K2. ❪G,L2❫ ⊢ ⬈* K2 → ∀L1. L1 ≛[S,T] L2 →
+ ∃∃K1. ❪G,L1❫ ⊢ ⬈* K1 & K1 ≛[S,T] K2.
+#S #G #T #H1S #H2S #L2 #K2 #H @(lpxs_ind_sn … H) -L2 /2 width=3 by ex2_intro/
+#L #L2 #HL2 #_ #IH #L1 #HT
+elim (reqg_lpx_trans … HL2 … HT) // -L #L #HL1 #HT
+elim (IH … HT) -L2 #K #HLK #HT
+/3 width=3 by lpxs_step_sn, ex2_intro/
+qed-.
+
+(* Basic_2A1: uses: lpxs_nlleq_inv_step_sn *)
+lemma lpxs_rneqg_inv_step_sn (S) (G) (T:term):
+ reflexive … S → symmetric … S → Transitive … S →
+ (∀s1,s2. Decidable (S s1 s2)) →
+ ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[S,T] L2 → ⊥) →
+ ∃∃L,L0. ❪G,L1❫ ⊢ ⬈ L & L1 ≛[S,T] L → ⊥ & ❪G,L❫ ⊢ ⬈* L0 & L0 ≛[S,T] L2.
+#S #G #T #H1S #H2S #H3S #H4S #L1 #L2 #H @(lpxs_ind_sn … H) -L1
+[ #H elim H -H /2 width=1 by reqg_refl/
+| #L1 #L #H1 #H2 #IH2 #H12 elim (reqg_dec S … L1 L T) // #H
+ [ -H1 -H2 elim IH2 -IH2 /3 width=3 by reqg_trans/ -H12
+ #L0 #L3 #H1 #H2 #H3 #H4 lapply (reqg_rneqg_trans … H … H2) -H2 //
+ #H2 elim (reqg_lpx_trans … H1 … H) -L //
+ #L #H1 #H lapply (rneqg_reqg_div … H … H2) -H2 //
+ #H2 elim (reqg_lpxs_trans … H3 … H) -L0
+ /3 width=8 by reqg_trans, ex4_2_intro/
+ | -H12 -IH2 /3 width=6 by reqg_refl, ex4_2_intro/
+ ]
+]
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "basic_2/rt_transition/lpx_reqx.ma".
-include "basic_2/rt_computation/lpxs_lpx.ma".
-
-(* EXTENDED PARALLEL RT-COMPUTATION FOR FULL LOCAL ENVIRONMENTS *************)
-
-(* Properties with sort-irrelevant equivalence on referred entries **********)
-
-(* Basic_2A1: uses: lleq_lpxs_trans *)
-lemma reqx_lpxs_trans (G) (T:term):
- ∀L2,K2. ❪G,L2❫ ⊢ ⬈* K2 → ∀L1. L1 ≛[T] L2 →
- ∃∃K1. ❪G,L1❫ ⊢ ⬈* K1 & K1 ≛[T] K2.
-#G #T #L2 #K2 #H @(lpxs_ind_sn … H) -L2 /2 width=3 by ex2_intro/
-#L #L2 #HL2 #_ #IH #L1 #HT
-elim (reqx_lpx_trans … HL2 … HT) -L #L #HL1 #HT
-elim (IH … HT) -L2 #K #HLK #HT
-/3 width=3 by lpxs_step_sn, ex2_intro/
-qed-.
-
-(* Basic_2A1: uses: lpxs_nlleq_inv_step_sn *)
-lemma lpxs_rneqx_inv_step_sn (G) (T:term):
- ∀L1,L2. ❪G,L1❫ ⊢ ⬈* L2 → (L1 ≛[T] L2 → ⊥) →
- ∃∃L,L0. ❪G,L1❫ ⊢ ⬈ L & L1 ≛[T] L → ⊥ & ❪G,L❫ ⊢ ⬈* L0 & L0 ≛[T] L2.
-#G #T #L1 #L2 #H @(lpxs_ind_sn … H) -L1
-[ #H elim H -H //
-| #L1 #L #H1 #H2 #IH2 #H12 elim (reqx_dec L1 L T) #H
- [ -H1 -H2 elim IH2 -IH2 /3 width=3 by reqx_trans/ -H12
- #L0 #L3 #H1 #H2 #H3 #H4 lapply (reqx_rneqx_trans … H … H2) -H2
- #H2 elim (reqx_lpx_trans … H1 … H) -L
- #L #H1 #H lapply (rneqx_reqx_div … H … H2) -H2
- #H2 elim (reqx_lpxs_trans … H3 … H) -L0
- /3 width=8 by reqx_trans, ex4_2_intro/
- | -H12 -IH2 /3 width=6 by ex4_2_intro/
- ]
-]
-qed-.
(* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******)
definition rsx (G) (T): predicate lenv ≝
- SN … (lpx G) (reqx T).
+ SN … (lpx G) (λL1,L2. L1 ≅[T] L2).
interpretation
"strong normalization for extended context-sensitive parallel rt-transition on referred entries (local environment)"
(* Basic_2A1: uses: lsx_ind *)
lemma rsx_ind (G) (T) (Q:predicate …):
(∀L1. G ⊢ ⬈*𝐒[T] L1 →
- (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88 L2 â\86\92 (L1 â\89\9b[T] L2 → ⊥) → Q L2) →
+ (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88 L2 â\86\92 (L1 â\89\85[T] L2 → ⊥) → Q L2) →
Q L1
) →
∀L. G ⊢ ⬈*𝐒[T] L → Q L.
(* Basic_2A1: uses: lsx_intro *)
lemma rsx_intro (G) (T):
∀L1.
- (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88 L2 â\86\92 (L1 â\89\9b[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) →
+ (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88 L2 â\86\92 (L1 â\89\85[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) →
G ⊢ ⬈*𝐒[T] L1.
/5 width=1 by SN_intro/ qed.
#G #I #L #V #T #H
@(rsx_ind … H) -L #L1 #_ #IHL1
@rsx_intro #L2 #HL12 #HnL12
-/4 width=3 by reqx_fwd_pair_sn/
+/4 width=3 by reqg_fwd_pair_sn/
qed-.
(* Basic_2A1: uses: lsx_fwd_flat_dx *)
#G #I #L #V #T #H
@(rsx_ind … H) -L #L1 #_ #IHL1
@rsx_intro #L2 #HL12 #HnL12
-/4 width=3 by reqx_fwd_flat_dx/
+/4 width=3 by reqg_fwd_flat_dx/
qed-.
fact rsx_fwd_pair_aux (G):
∀I,K,V. L = K.ⓑ[I]V → G ⊢ ⬈*𝐒[V] K.
#G #L #H
@(rsx_ind … H) -L #L1 #_ #IH #I #K1 #V #H destruct
-/5 width=5 by lpx_pair, rsx_intro, reqx_fwd_zero_pair/
+/5 width=5 by lpx_pair, rsx_intro, reqg_fwd_zero_pair/
qed-.
lemma rsx_fwd_pair (G):
@csx_intro #V2 #HV12 #HnV12
@(IH … I) -IH [1,4: // | -HnV12 | -G #H ]
[ /2 width=1 by lpx_pair/
-| elim (reqx_inv_zero_pair_sn … H) -H #Y #X #_ #H1 #H2 destruct -I
+| elim (reqg_inv_zero_pair_sn … H) -H #Y #X #_ #H1 #H2 destruct -I
/2 width=1 by/
]
qed-.
@rsx_intro #Y #HY #HnY
elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
elim (teqx_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
-[ /5 width=5 by rsx_reqx_trans, lpxs_step_dx, reqx_pair/
+[ /5 width=5 by rsx_reqx_trans, lpxs_step_dx, reqg_pair, reqg_refl/
| @(IHV0 … HnV02) -IHV0 -HnV02
[ /2 width=3 by lpxs_cpx_trans/
| /3 width=3 by rsx_lpx_trans, rsx_cpx_trans/
(* *)
(**************************************************************************)
-include "static_2/static/reqx_drops.ma".
+include "static_2/static/reqg_drops.ma".
include "basic_2/rt_transition/lpx_drops.ma".
include "basic_2/rt_computation/rsx_length.ma".
include "basic_2/rt_computation/rsx_fqup.ma".
#G #K #T #H @(rsx_ind … H) -K
#K1 #_ #IH #b #f #L1 #HLK1 #Hf #U #HTU @rsx_intro
#L2 #HL12 #HnL12 elim (lpx_drops_conf … HLK1 … HL12)
-/5 width=9 by reqx_lifts_bi, lpx_fwd_length/
+/5 width=9 by reqg_lifts_bi, lpx_fwd_length/
qed-.
(* Inversion lemmas on relocation *******************************************)
#G #L #U #H @(rsx_ind … H) -L
#L1 #_ #IH #b #f #K1 #HLK1 #Hf #T #HTU @rsx_intro
#K2 #HK12 #HnK12 elim (drops_lpx_trans … HLK1 … HK12) -HK12
-/4 width=10 by reqx_inv_lifts_bi/
+/4 width=10 by reqg_inv_lifts_bi/
qed-.
(* Advanced properties ******************************************************)
(* *)
(**************************************************************************)
-include "static_2/static/reqx_fqup.ma".
+include "static_2/static/reqg_fqup.ma".
include "basic_2/rt_computation/rsx.ma".
(* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******)
#G #T
@rsx_intro #Y #H #HnT
lapply (lpx_inv_atom_sn … H) -H #H destruct
-elim HnT -HnT //
+elim HnT -HnT /2 width=1 by rex_refl/
qed.
(* Advanced forward lemmas **************************************************)
@(rsx_ind … H) -L #L1 #_ #IH
@rsx_intro #Y #H #HT
elim (lpx_inv_unit_sn … H) -H #L2 #HL12 #H destruct
-/4 width=4 by reqx_fwd_bind_dx_void/
+/4 width=4 by reqg_fwd_bind_dx_void/
qed-.
(* Advanced inversion lemmas ************************************************)
(* *)
(**************************************************************************)
-include "static_2/static/reqx_length.ma".
+include "static_2/static/reqg_length.ma".
include "basic_2/rt_transition/lpx_length.ma".
include "basic_2/rt_computation/rsx.ma".
(* Basic_2A1: uses: lsx_sort *)
lemma rsx_sort (G): ∀L,s. G ⊢ ⬈*𝐒[⋆s] L.
#G #L1 #s @rsx_intro #L2 #H #Hs
-elim Hs -Hs /3 width=3 by lpx_fwd_length, reqx_sort_length/
+elim Hs -Hs /3 width=3 by lpx_fwd_length, reqg_sort_length/
qed.
(* Basic_2A1: uses: lsx_gref *)
lemma rsx_gref (G): ∀L,l. G ⊢ ⬈*𝐒[§l] L.
#G #L1 #s @rsx_intro #L2 #H #Hs
-elim Hs -Hs /3 width=3 by lpx_fwd_length, reqx_gref_length/
+elim Hs -Hs /3 width=3 by lpx_fwd_length, reqg_gref_length/
qed.
lemma rsx_unit (G): ∀I,L. G ⊢ ⬈*𝐒[#0] L.ⓤ[I].
#G #I #L1 @rsx_intro
#Y #HY #HnY elim HnY -HnY
elim (lpx_inv_unit_sn … HY) -HY #L2 #HL12 #H destruct
-/3 width=3 by lpx_fwd_length, reqx_unit_length/
+/3 width=3 by lpx_fwd_length, reqg_unit_length/
qed.
(* *)
(**************************************************************************)
-include "basic_2/rt_computation/lpxs_reqx.ma".
+include "basic_2/rt_computation/lpxs_reqg.ma".
include "basic_2/rt_computation/lpxs_lpxs.ma".
include "basic_2/rt_computation/rsx_rsx.ma".
(* Basic_2A1: uses: lsx_intro_alt *)
lemma rsx_intro_lpxs (G):
- â\88\80L1,T. (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88* L2 â\86\92 (L1 â\89\9b[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) →
+ â\88\80L1,T. (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88* L2 â\86\92 (L1 â\89\85[T] L2 → ⊥) → G ⊢ ⬈*𝐒[T] L2) →
G ⊢ ⬈*𝐒[T] L1.
/4 width=1 by lpx_lpxs, rsx_intro/ qed-.
lemma rsx_ind_lpxs_reqx (G) (T) (Q:predicate lenv):
(∀L1. G ⊢ ⬈*𝐒[T] L1 →
- (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88* L2 â\86\92 (L1 â\89\9b[T] L2 → ⊥) → Q L2) →
+ (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88* L2 â\86\92 (L1 â\89\85[T] L2 → ⊥) → Q L2) →
Q L1
) →
∀L1. G ⊢ ⬈*𝐒[T] L1 →
- â\88\80L0. â\9dªG,L1â\9d« â\8a¢ â¬\88* L0 â\86\92 â\88\80L2. L0 â\89\9b[T] L2 → Q L2.
+ â\88\80L0. â\9dªG,L1â\9d« â\8a¢ â¬\88* L0 â\86\92 â\88\80L2. L0 â\89\85[T] L2 → Q L2.
#G #T #Q #IH #L1 #H @(rsx_ind … H) -L1
#L1 #HL1 #IH1 #L0 #HL10 #L2 #HL02
@IH -IH /3 width=3 by rsx_lpxs_trans, rsx_reqx_trans/ -HL1 #K2 #HLK2 #HnLK2
-lapply (reqx_rneqx_trans … HL02 … HnLK2) -HnLK2 #H
-elim (reqx_lpxs_trans … HLK2 … HL02) -L2 #K0 #HLK0 #HK02
-lapply (rneqx_reqx_canc_dx … H … HK02) -H #HnLK0
+lapply (reqg_rneqg_trans … HL02 … HnLK2) -HnLK2 // #H
+elim (reqg_lpxs_trans … HLK2 … HL02) -L2 // #K0 #HLK0 #HK02
+lapply (rneqg_reqg_canc_dx … H … HK02) -H // #HnLK0
elim (reqx_dec L1 L0 T) #H
-[ lapply (reqx_rneqx_trans … H … HnLK0) -H -HnLK0 #Hn10
+[ lapply (reqg_rneqg_trans … H … HnLK0) -H -HnLK0 // #Hn10
lapply (lpxs_trans … HL10 … HLK0) -L0 #H10
- elim (lpxs_rneqx_inv_step_sn … H10 … Hn10) -H10 -Hn10
- /3 width=8 by reqx_trans/
-| elim (lpxs_rneqx_inv_step_sn … HL10 … H) -HL10 -H #L #K #HL1 #HnL1 #HLK #HKL0
- elim (reqx_lpxs_trans … HLK0 … HKL0) -L0
- /3 width=8 by lpxs_trans, reqx_trans/
+ elim (lpxs_rneqg_inv_step_sn … H10 … Hn10) -H10 -Hn10
+ /3 width=8 by reqg_trans/
+| elim (lpxs_rneqg_inv_step_sn … HL10 … H) -HL10 -H // #L #K #HL1 #HnL1 #HLK #HKL0
+ elim (reqg_lpxs_trans … HLK0 … HKL0) -L0
+ /3 width=8 by lpxs_trans, reqg_trans/
]
qed-.
(* Basic_2A1: uses: lsx_ind_alt *)
lemma rsx_ind_lpxs (G) (T) (Q:predicate lenv):
(∀L1. G ⊢ ⬈*𝐒[T] L1 →
- (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88* L2 â\86\92 (L1 â\89\9b[T] L2 → ⊥) → Q L2) →
+ (â\88\80L2. â\9dªG,L1â\9d« â\8a¢ â¬\88* L2 â\86\92 (L1 â\89\85[T] L2 → ⊥) → Q L2) →
Q L1
) →
∀L. G ⊢ ⬈*𝐒[T] L → Q L.
#G #T #Q #IH #L #HL
-@(rsx_ind_lpxs_reqx … IH … HL) -IH -HL // (**) (* full auto fails *)
+@(rsx_ind_lpxs_reqx … IH … HL) -IH -HL
+/2 width=3 by rex_refl/ (**) (* full auto fails *)
qed-.
(* Advanced properties ******************************************************)
#Y #HY #IHY #L2 #H #HL12 destruct
@rsx_intro_lpxs #L0 #HL20
lapply (lpxs_trans … HL12 … HL20) #HL10 #H
-elim (rneqx_inv_bind … H) -H [ -IHY | -HY -IHL1 -HL12 ]
+elim (rneqg_inv_bind … H) -H // [ -IHY | -HY -IHL1 -HL12 ]
[ #HnV elim (reqx_dec L1 L2 V)
[ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
- /3 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqx_canc_sn/ (**) (* full auto too slow *)
+ /3 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqg_canc_sn/ (**) (* full auto too slow *)
| -HnV -HL10 /4 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx/
]
| /3 width=4 by lpxs_bind_refl_dx/
#L1 #HL1 #IHL1 #L2 #T #H @(rsx_ind_lpxs … H) -L2
#L2 #HL2 #IHL2 #HL12 @rsx_intro_lpxs
#L0 #HL20 lapply (lpxs_trans … HL12 … HL20)
-#HL10 #H elim (rneqx_inv_flat … H) -H [ -HL1 -IHL2 | -HL2 -IHL1 ]
+#HL10 #H elim (rneqg_inv_flat … H) -H // [ -HL1 -IHL2 | -HL2 -IHL1 ]
[ #HnV elim (reqx_dec L1 L2 V)
[ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
- /3 width=5 by rsx_lpxs_trans, reqx_canc_sn/ (**) (* full auto too slow: 47s *)
+ /3 width=5 by rsx_lpxs_trans, reqg_canc_sn/ (**) (* full auto too slow: 47s *)
| -HnV -HL10 /3 width=4 by rsx_lpxs_trans/
]
| /3 width=3 by/
#Y #HY #IHY #L2 #H #HL12 destruct
@rsx_intro_lpxs #L0 #HL20
lapply (lpxs_trans … HL12 … HL20) #HL10 #H
-elim (rneqx_inv_bind_void … H) -H [ -IHY | -HY -IHL1 -HL12 ]
+elim (rneqg_inv_bind_void … H) -H // [ -IHY | -HY -IHL1 -HL12 ]
[ #HnV elim (reqx_dec L1 L2 V)
[ #HV @(IHL1 … HL10) -IHL1 -HL12 -HL10
- /3 width=6 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqx_canc_sn/ (**) (* full auto too slow *)
+ /3 width=6 by rsx_lpxs_trans, lpxs_bind_refl_dx, reqg_canc_sn/ (**) (* full auto too slow *)
| -HnV -HL10 /4 width=4 by rsx_lpxs_trans, lpxs_bind_refl_dx/
]
| /3 width=4 by lpxs_bind_refl_dx/
(* *)
(**************************************************************************)
-include "basic_2/rt_transition/lpx_reqx.ma".
+include "static_2/static/reqx_reqx.ma".
+include "basic_2/rt_transition/lpx_reqg.ma".
include "basic_2/rt_computation/rsx.ma".
(* STRONGLY NORMALIZING REFERRED LOCAL ENVS FOR EXTENDED RT-TRANSITION ******)
(* Basic_2A1: uses: lsx_lleq_trans *)
lemma rsx_reqx_trans (G):
∀L1,T. G ⊢ ⬈*𝐒[T] L1 →
- â\88\80L2. L1 â\89\9b[T] L2 → G ⊢ ⬈*𝐒[T] L2.
+ â\88\80L2. L1 â\89\85[T] L2 → G ⊢ ⬈*𝐒[T] L2.
#G #L1 #T #H @(rsx_ind … H) -L1
#L1 #_ #IHL1 #L2 #HL12 @rsx_intro
-#L #HL2 #HnL2 elim (reqx_lpx_trans … HL2 … HL12) -HL2
-/4 width=5 by reqx_repl/
+#L #HL2 #HnL2 elim (reqg_lpx_trans … HL2 … HL12) -HL2 //
+/4 width=5 by reqg_repl/
qed-.
(* Basic_2A1: uses: lsx_lpx_trans *)
∀L1,T. G ⊢ ⬈*𝐒[T] L1 →
∀L2. ❪G,L1❫ ⊢ ⬈ L2 → G ⊢ ⬈*𝐒[T] L2.
#G #L1 #T #H @(rsx_ind … H) -L1 #L1 #HL1 #IHL1 #L2 #HL12
-elim (reqx_dec L1 L2 T) /3 width=4 by rsx_reqx_trans/
+elim (reqx_dec … L1 L2 T) /3 width=4 by rsx_reqx_trans/
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqx.ma".
+include "basic_2/rt_transition/cpr_drops_basic.ma".
+include "basic_2/rt_transition/cnr_simple.ma".
+include "basic_2/rt_transition/cnr_drops.ma".
+
+(* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
+
+(* Properties with context-free generic equivalence for terms ***************)
+
+(* Basic_1: was: nf2_dec *)
+(* Basic_2A1: uses: cnr_dec *)
+lemma cnr_dec_teqg (S) (h) (G) (L):
+ ∀T1. ∨∨ ❪G,L❫ ⊢ ➡𝐍[h,0] T1
+ | ∃∃T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 & (T1 ≛[S] T2 → ⊥).
+#S #h #G #L #T1
+@(fqup_wf_ind_eq (Ⓣ) … G L T1) -G -L -T1 #G0 #L0 #T0 #IH #G #L * *
+[ #s #HG #HL #HT destruct -IH
+ /3 width=4 by cnr_sort, or_introl/
+| #i #HG #HL #HT destruct -IH
+ elim (drops_F_uni L i)
+ [ /3 width=6 by cnr_lref_atom, or_introl/
+ | * * [ #I | * #V ] #K #HLK
+ [ /3 width=7 by cnr_lref_unit, or_introl/
+ | elim (lifts_total V 𝐔❨↑i❩) #W #HVW
+ @or_intror @(ex2_intro … W) [ /2 width=6 by cpm_delta_drops/ ] #H
+ lapply (teqg_inv_lref1 … H) -H #H destruct
+ /2 width=5 by lifts_inv_lref2_uni_lt/
+ | /3 width=7 by cnr_lref_abst, or_introl/
+ ]
+ ]
+| #l #HG #HL #HT destruct -IH
+ /3 width=4 by cnr_gref, or_introl/
+| #p * [ cases p ] #V1 #T1 #HG #HL #HT destruct
+ [ elim (cpr_subst h G (L.ⓓV1) T1 0 L V1) [| /2 width=1 by drops_refl/ ] #T2 #X2 #HT12 #HXT2 -IH
+ elim (teqx_dec T1 T2) [ -HT12 #HT12 | #HnT12 ]
+ [ elim (teqx_inv_lifts_dx … HT12 … HXT2) -T2 #X1 #HXT1 #_ -X2
+ @or_intror @(ex2_intro … X1) [ /2 width=3 by cpm_zeta/ ] #H
+ /2 width=8 by teqg_lifts_inv_pair_sn/
+ | @or_intror @(ex2_intro … (+ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H
+ elim (teqg_inv_pair … H) -H /3 width=2 by teqg_teqx/
+ ]
+ | elim (IH G L V1) [ elim (IH G (L.ⓓV1) T1) [| * | // ] | * | // ] -IH
+ [ #HT1 #HV1 /3 width=6 by cnr_abbr_neg, or_introl/
+ | #T2 #HT12 #HnT12 #_
+ @or_intror @(ex2_intro … (-ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+ | #V2 #HV12 #HnV12
+ @or_intror @(ex2_intro … (-ⓓV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+ ]
+ | elim (IH G L V1) [ elim (IH G (L.ⓛV1) T1) [| * | // ] | * | // ] -IH
+ [ #HT1 #HV1 /3 width=6 by cnr_abst, or_introl/
+ | #T2 #HT12 #HnT12 #_
+ @or_intror @(ex2_intro … (ⓛ[p]V1.T2)) [ /2 width=1 by cpm_bind/ ] #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+ | #V2 #HV12 #HnV12
+ @or_intror @(ex2_intro … (ⓛ[p]V2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+ ]
+ ]
+| * #V1 #T1 #HG #HL #HT destruct [| -IH ]
+ [ elim (IH G L V1) [ elim (IH G L T1) [| * | // ] | * | // ] -IH
+ [ #HT1 #HV1
+ elim (simple_dec_ex T1) [| * #p * #W1 #U1 #H destruct ]
+ [ /3 width=6 by cnr_appl_simple, or_introl/
+ | elim (lifts_total V1 𝐔❨1❩) #X1 #HVX1
+ @or_intror @(ex2_intro … (ⓓ[p]W1.ⓐX1.U1)) [ /2 width=3 by cpm_theta/ ] #H
+ elim (teqg_inv_pair … H) -H #H destruct
+ | @or_intror @(ex2_intro … (ⓓ[p]ⓝW1.V1.U1)) [ /2 width=1 by cpm_beta/ ] #H
+ elim (teqg_inv_pair … H) -H #H destruct
+ ]
+ | #T2 #HT12 #HnT12 #_
+ @or_intror @(ex2_intro … (ⓐV1.T2)) [ /2 width=1 by cpm_appl/ ] #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+ | #V2 #HV12 #HnV12
+ @or_intror @(ex2_intro … (ⓐV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+ ]
+ | @or_intror @(ex2_intro … T1) [ /2 width=1 by cpm_eps/ ] #H
+ /2 width=5 by teqg_inv_pair_xy_y/
+ ]
+]
+qed-.
(* *)
(**************************************************************************)
-include "static_2/relocation/lifts_teqx.ma".
-include "basic_2/rt_transition/cpr_drops_basic.ma".
-include "basic_2/rt_transition/cnr_simple.ma".
-include "basic_2/rt_transition/cnr_drops.ma".
+include "static_2/syntax/teqx.ma".
+include "basic_2/rt_transition/cnr_teqg.ma".
(* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
(* Basic_2A1: uses: cnr_dec *)
lemma cnr_dec_teqx (h) (G) (L):
∀T1. ∨∨ ❪G,L❫ ⊢ ➡𝐍[h,0] T1
- | ∃∃T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 & (T1 ≛ T2 → ⊥).
-#h #G #L #T1
-@(fqup_wf_ind_eq (Ⓣ) … G L T1) -G -L -T1 #G0 #L0 #T0 #IH #G #L * *
-[ #s #HG #HL #HT destruct -IH
- /3 width=4 by cnr_sort, or_introl/
-| #i #HG #HL #HT destruct -IH
- elim (drops_F_uni L i)
- [ /3 width=6 by cnr_lref_atom, or_introl/
- | * * [ #I | * #V ] #K #HLK
- [ /3 width=7 by cnr_lref_unit, or_introl/
- | elim (lifts_total V 𝐔❨↑i❩) #W #HVW
- @or_intror @(ex2_intro … W) [ /2 width=6 by cpm_delta_drops/ ] #H
- lapply (teqx_inv_lref1 … H) -H #H destruct
- /2 width=5 by lifts_inv_lref2_uni_lt/
- | /3 width=7 by cnr_lref_abst, or_introl/
- ]
- ]
-| #l #HG #HL #HT destruct -IH
- /3 width=4 by cnr_gref, or_introl/
-| #p * [ cases p ] #V1 #T1 #HG #HL #HT destruct
- [ elim (cpr_subst h G (L.ⓓV1) T1 0 L V1) [| /2 width=1 by drops_refl/ ] #T2 #X2 #HT12 #HXT2 -IH
- elim (teqx_dec T1 T2) [ -HT12 #HT12 | #HnT12 ]
- [ elim (teqx_inv_lifts_dx … HT12 … HXT2) -T2 #X1 #HXT1 #_ -X2
- @or_intror @(ex2_intro … X1) [ /2 width=3 by cpm_zeta/ ] #H
- /2 width=7 by teqx_lifts_inv_pair_sn/
- | @or_intror @(ex2_intro … (+ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- ]
- | elim (IH G L V1) [ elim (IH G (L.ⓓV1) T1) [| * | // ] | * | // ] -IH
- [ #HT1 #HV1 /3 width=6 by cnr_abbr_neg, or_introl/
- | #T2 #HT12 #HnT12 #_
- @or_intror @(ex2_intro … (-ⓓV1.T2)) [ /2 width=1 by cpm_bind/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- | #V2 #HV12 #HnV12
- @or_intror @(ex2_intro … (-ⓓV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- ]
- | elim (IH G L V1) [ elim (IH G (L.ⓛV1) T1) [| * | // ] | * | // ] -IH
- [ #HT1 #HV1 /3 width=6 by cnr_abst, or_introl/
- | #T2 #HT12 #HnT12 #_
- @or_intror @(ex2_intro … (ⓛ[p]V1.T2)) [ /2 width=1 by cpm_bind/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- | #V2 #HV12 #HnV12
- @or_intror @(ex2_intro … (ⓛ[p]V2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- ]
- ]
-| * #V1 #T1 #HG #HL #HT destruct [| -IH ]
- [ elim (IH G L V1) [ elim (IH G L T1) [| * | // ] | * | // ] -IH
- [ #HT1 #HV1
- elim (simple_dec_ex T1) [| * #p * #W1 #U1 #H destruct ]
- [ /3 width=6 by cnr_appl_simple, or_introl/
- | elim (lifts_total V1 𝐔❨1❩) #X1 #HVX1
- @or_intror @(ex2_intro … (ⓓ[p]W1.ⓐX1.U1)) [ /2 width=3 by cpm_theta/ ] #H
- elim (teqx_inv_pair … H) -H #H destruct
- | @or_intror @(ex2_intro … (ⓓ[p]ⓝW1.V1.U1)) [ /2 width=1 by cpm_beta/ ] #H
- elim (teqx_inv_pair … H) -H #H destruct
- ]
- | #T2 #HT12 #HnT12 #_
- @or_intror @(ex2_intro … (ⓐV1.T2)) [ /2 width=1 by cpm_appl/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- | #V2 #HV12 #HnV12
- @or_intror @(ex2_intro … (ⓐV2.T1)) [ /2 width=1 by cpr_pair_sn/ ] #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
- ]
- | @or_intror @(ex2_intro … T1) [ /2 width=1 by cpm_eps/ ] #H
- /2 width=4 by teqx_inv_pair_xy_y/
- ]
-]
-qed-.
+ | ∃∃T2. ❪G,L❫ ⊢ T1 ➡[h,0] T2 & (T1 ≅ T2 → ⊥).
+/2 width=1 by cnr_dec_teqg/ qed-.
lemma cnx_inv_cast (G) (L):
∀V,T. ❪G,L❫ ⊢ ⬈𝐍 ⓝV.T → ⊥.
#G #L #V #T #H lapply (H T ?) -H
-/2 width=6 by cpx_eps, teqx_inv_pair_xy_y/
+/2 width=6 by cpx_eps, teqg_inv_pair_xy_y/
qed-.
(* Basic properties *********************************************************)
lemma cnx_sort (G) (L):
∀s. ❪G,L❫ ⊢ ⬈𝐍 ⋆s.
#G #L #s #X #H elim (cpx_inv_sort1 … H) -H
-/2 width=1 by teqx_sort/
+/2 width=1 by teqg_sort/
qed.
lemma cnx_abst (G) (L):
(* *)
(**************************************************************************)
+include "static_2/syntax/teqx_teqx.ma".
include "basic_2/rt_transition/rpx_reqx.ma".
include "basic_2/rt_transition/cnx.ma".
(* Advanced properties ******************************************************)
lemma cnx_teqx_trans (G) (L):
- â\88\80T1. â\9dªG,Lâ\9d« â\8a¢ â¬\88ð\9d\90\8d T1 â\86\92 â\88\80T2. T1 â\89\9b T2 → ❪G,L❫ ⊢ ⬈𝐍 T2.
+ â\88\80T1. â\9dªG,Lâ\9d« â\8a¢ â¬\88ð\9d\90\8d T1 â\86\92 â\88\80T2. T1 â\89\85 T2 → ❪G,L❫ ⊢ ⬈𝐍 T2.
#G #L #T1 #HT1 #T2 #HT12 #T #HT2
lapply (teqx_cpx_trans … HT12 … HT2) -HT2 #H
lapply (HT1 … H) -HT1 -H /2 width=5 by teqx_canc_sn/ (**) (* full auto fails *)
#G #L #I #K #V #i #HLK #H
elim (lifts_total V (𝐔❨↑i❩)) #W #HVW
lapply (H W ?) -H /2 width=7 by cpx_delta_drops/ -HLK
-#H lapply (teqx_inv_lref1 … H) -H #H destruct
+#H lapply (teqg_inv_lref1 … H) -H #H destruct
/2 width=5 by lifts_inv_lref2_uni_lt/
qed-.
(* Inversion lemmas with sort-irrelevant equivalence for terms **************)
lemma cpm_teqx_inv_lref_sn (h) (n) (G) (L) (i):
- â\88\80X. â\9dªG,Lâ\9d« â\8a¢ #i â\9e¡[h,n] X â\86\92 #i â\89\9b X →
+ â\88\80X. â\9dªG,Lâ\9d« â\8a¢ #i â\9e¡[h,n] X â\86\92 #i â\89\85 X →
∧∧ X = #i & n = 0.
#h #n #G #L #i #X #H1 #H2
-lapply (teqx_inv_lref1 … H2) -H2 #H destruct
+lapply (teqg_inv_lref1 … H2) -H2 #H destruct
elim (cpm_inv_lref1_drops … H1) -H1 // * [| #m ]
#K #V1 #V2 #_ #_ #H -V1
elim (lifts_inv_lref2_uni_lt … H) -H //
qed-.
lemma cpm_teqx_inv_atom_sn (h) (n) (I) (G) (L):
- â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93ª[I] â\9e¡[h,n] X â\86\92 â\93ª[I] â\89\9b X →
+ â\88\80X. â\9dªG,Lâ\9d« â\8a¢ â\93ª[I] â\9e¡[h,n] X â\86\92 â\93ª[I] â\89\85 X →
∨∨ ∧∧ X = ⓪[I] & n = 0
| ∃∃s. X = ⋆(⫯[h]s) & I = Sort s & n = 1.
#h #n * #s #G #L #X #H1 #H2
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqg.ma".
+include "basic_2/rt_transition/cpr_drops_basic.ma".
+
+(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
+
+(* Properties with context-free generic equivalence *************************)
+
+lemma cpr_abbr_pos_tneqx (S) (h) (G) (L) (V) (T1):
+ symmetric … S → (∀s1,s2. Decidable (S s1 s2)) →
+ ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡[h,0] T2 & (+ⓓV.T1 ≛[S] T2 → ⊥).
+#S #h #G #L #V #U1 #H1S #H2S
+elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2
+elim (teqg_dec … H2S U1 U2) [ -HU12 #HU12 | -HTU2 #HnU12 ]
+[ elim (teqg_inv_lifts_dx … HU12 … HTU2) -U2 // #T1 #HTU1 #_ -T2
+ /3 width=9 by cpm_zeta, teqg_lifts_inv_pair_sn, ex2_intro/
+| @(ex2_intro … (+ⓓV.U2)) [ /2 width=1 by cpm_bind/ ] -HU12 #H
+ elim (teqg_inv_pair … H) -H #_ #_ /2 width=1 by/
+]
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/relocation/lifts_teqx.ma".
-include "basic_2/rt_transition/cpr_drops_basic.ma".
-
-(* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
-
-(* Properties with context-free sort-irrelevant equivalence *****************)
-
-lemma cpr_abbr_pos_tneqx (h) (G) (L) (V) (T1):
- ∃∃T2. ❪G,L❫ ⊢ +ⓓV.T1 ➡[h,0] T2 & (+ⓓV.T1 ≛ T2 → ⊥).
-#h #G #L #V #U1
-elim (cpr_subst h G (L.ⓓV) U1 … 0) [|*: /2 width=4 by drops_refl/ ] #U2 #T2 #HU12 #HTU2
-elim (teqx_dec U1 U2) [ -HU12 #HU12 | -HTU2 #HnU12 ]
-[ elim (teqx_inv_lifts_dx … HU12 … HTU2) -U2 #T1 #HTU1 #_ -T2
- /3 width=9 by cpm_zeta, teqx_lifts_inv_pair_sn, ex2_intro/
-| @(ex2_intro … (+ⓓV.U2)) [ /2 width=1 by cpm_bind/ ] -HU12 #H
- elim (teqx_inv_pair … H) -H #_ #_ /2 width=1 by/
-]
-qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqg.ma".
+include "basic_2/rt_transition/cpx_reqg.ma".
+include "basic_2/rt_transition/rpx_reqg.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
+
+(* Properties with generic equivalence for closures *************************)
+
+(**) (* to update *)
+lemma feqg_cpx_trans (S):
+ reflexive … S → symmetric … S →
+ ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T❫ →
+ ∀T2. ❪G2,L2❫ ⊢ T ⬈ T2 →
+ ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈ T0 & ❪G1,L1,T0❫ ≛[S] ❪G2,L2,T2❫.
+#S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
+elim (feqg_inv_gen_dx … H) -H // #H #HL12 #HT1 destruct
+lapply (reqg_cpx_trans … HL12 … HT2) // #H
+lapply (cpx_reqg_conf_dx … HT2 … HL12) -HT2 -HL12 // #HL12
+lapply (teqg_cpx_trans … HT1 … H) -T // #HT12
+/4 width=4 by feqg_intro_sn, teqg_refl, ex2_intro/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/feqx.ma".
-include "basic_2/rt_transition/cpx_reqx.ma".
-include "basic_2/rt_transition/rpx_reqx.ma".
-
-(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
-
-(* Properties with sort-irrelevant equivalence for closures *****************)
-
-(**) (* to update *)
-lemma feqx_cpx_trans:
- ∀G1,G2,L1,L2,T1,T. ❪G1,L1,T1❫ ≛ ❪G2,L2,T❫ →
- ∀T2. ❪G2,L2❫ ⊢ T ⬈ T2 →
- ∃∃T0. ❪G1,L1❫ ⊢ T1 ⬈ T0 & ❪G1,L1,T0❫ ≛ ❪G2,L2,T2❫.
-#G1 #G2 #L1 #L2 #T1 #T #H #T2 #HT2
-elim (feqx_inv_gen_dx … H) -H #H #HL12 #HT1 destruct
-lapply (reqx_cpx_trans … HL12 … HT2) #H
-lapply (cpx_reqx_conf_dx … HT2 … HL12) -HT2 -HL12 #HL12
-lapply (teqx_cpx_trans … HT1 … H) -T #HT12
-/3 width=3 by feqx_intro_dx, ex2_intro/
-qed-.
lemma fqu_cpx_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
[ #I #G #L #V1 #V2 #HV12 #_ elim (lifts_total V2 𝐔❨1❩)
#U2 #HVU2 @(ex3_intro … U2)
[1,3: /3 width=7 by cpx_delta, fqu_drop/
- | #H lapply (teqx_inv_lref1 … H) -H
+ | #H lapply (teqg_inv_lref1 … H) -H
#H destruct /2 width=5 by lifts_inv_lref2_uni_lt/
]
| #I #G #L #V1 #T #V2 #HV12 #H0 @(ex3_intro … (②[I]V2.T))
lemma fquq_cpx_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂⸮[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H12 elim H12 -H12
[ #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tneqx … H12 … HTU2 H) -T2
/3 width=4 by fqu_fquq, ex3_intro/
lemma fqup_cpx_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind_dx … H) -G1 -L1 -T1
[ #G1 #L1 #T1 #H12 #U2 #HTU2 #H elim (fqu_cpx_trans_tneqx … H12 … HTU2 H) -T2
/3 width=4 by fqu_fqup, ex3_intro/
lemma fqus_cpx_trans_tneqx (b):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
- â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\9b U2 → ⊥) →
- â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\9b U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
+ â\88\80U2. â\9dªG2,L2â\9d« â\8a¢ T2 â¬\88 U2 â\86\92 (T2 â\89\85 U2 → ⊥) →
+ â\88\83â\88\83U1. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 U1 & T1 â\89\85 U1 → ⊥ & ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,U2❫.
#b #G1 #G2 #L1 #L2 #T1 #T2 #H12 #U2 #HTU2 #H elim (fqus_inv_fqup … H12) -H12
[ #H12 elim (fqup_cpx_trans_tneqx … H12 … HTU2 H) -T2
/3 width=4 by fqup_fqus, ex3_intro/
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/req_length.ma".
-include "static_2/static/req_drops.ma".
-include "basic_2/rt_transition/rpx_fsle.ma".
-
-(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
-
-(* Properties with syntactic equivalence for lenvs on referred entries ******)
-
-(* Basic_2A1: was: lleq_cpx_trans *)
-lemma req_cpx_trans (G): R_transitive_req (cpx G).
-#G #L2 #T1 #T2 #H @(cpx_ind … H) -G -L2 -T1 -T2 /2 width=2 by cpx_qu/
-[ #I #G #K2 #V1 #V2 #W2 #_ #IH #HVW2 #L1 #H
- elim (req_inv_zero_pair_dx … H) -H #K1 #HK12 #H destruct
- /3 width=3 by cpx_delta/
-| #I2 #G #K2 #T #U #i #_ #IH #HTU #L1 #H
- elim (req_inv_lref_bind_dx … H) -H #I1 #K1 #HK12 #H destruct
- /3 width=3 by cpx_lref/
-| #p #I #G #L2 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #H
- elim (req_inv_bind … H) -H /3 width=1 by cpx_bind/
-| #I #G #L2 #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #L1 #H
- elim (req_inv_flat … H) -H /3 width=1 by cpx_flat/
-| #G #L2 #V2 #T1 #T #T2 #HT1 #_ #IH #L1 #H
- elim (req_inv_bind … H) -H #HV2 #H
- lapply (req_inv_lifts_bi … H (Ⓣ) … HT1) -H [6:|*: /3 width=2 by drops_refl, drops_drop/ ] #HT
- /3 width=3 by cpx_zeta/
-| #G #L2 #W1 #T1 #T2 #_ #IH #L1 #H
- elim (req_inv_flat … H) -H /3 width=1 by cpx_eps/
-| #G #L2 #W1 #W2 #T1 #_ #IH #L1 #H
- elim (req_inv_flat … H) -H /3 width=1 by cpx_ee/
-| #p #G #L2 #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #L1 #H
- elim (req_inv_flat … H) -H #HV1 #H
- elim (req_inv_bind … H) -H /3 width=1 by cpx_beta/
-| #p #G #L2 #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV1 #IHW12 #IHT12 #HV2 #L1 #H
- elim (req_inv_flat … H) -H #HV1 #H
- elim (req_inv_bind … H) -H /3 width=3 by cpx_theta/
-]
-qed-.
-
-lemma cpx_req_conf (G): R_confluent1_rex (cpx G) ceq.
-/3 width=3 by req_cpx_trans, req_sym/ qed-.
-
-(* Basic_2A1: was: cpx_lleq_conf_sn *)
-lemma cpx_req_conf_sn (G): s_r_confluent1 … (cpx G) req.
-/2 width=5 by cpx_rex_conf_sn/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_reqg.ma".
+include "basic_2/rt_transition/rpx_fsle.ma".
+
+(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
+
+(* Properties with generic equivalence for local environments ***************)
+
+(* Basic_2A1: was just: cpx_lleq_conf_sn *)
+lemma cpx_reqg_conf_sn (S) (G):
+ s_r_confluent1 … (cpx G) (reqg S).
+/3 width=6 by cpx_rex_conf_sn/ qed-.
+
+(* Basic_2A1: was just: cpx_lleq_conf_dx *)
+lemma cpx_reqg_conf_dx (S) (G) (L2):
+ reflexive … S → symmetric … S →
+ ∀T1,T2. ❪G,L2❫ ⊢ T1 ⬈ T2 →
+ ∀L1. L1 ≛[S,T1] L2 → L1 ≛[S,T2] L2.
+/4 width=4 by cpx_reqg_conf_sn, reqg_sym/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_reqx.ma".
-include "basic_2/rt_transition/rpx_fsle.ma".
-
-(* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS **************)
-
-(* Properties with sort-irrelevant equivalence for local environments *******)
-
-(* Basic_2A1: was just: cpx_lleq_conf_sn *)
-lemma cpx_reqx_conf_sn (G):
- s_r_confluent1 … (cpx G) reqx.
-/3 width=6 by cpx_rex_conf_sn/ qed-.
-
-(* Basic_2A1: was just: cpx_lleq_conf_dx *)
-lemma cpx_reqx_conf_dx (G) (L2):
- ∀T1,T2. ❪G,L2❫ ⊢ T1 ⬈ T2 →
- ∀L1. L1 ≛[T1] L2 → L1 ≛[T2] L2.
-/4 width=5 by cpx_reqx_conf_sn, reqx_sym/ qed-.
inductive fpb (G1) (L1) (T1): relation3 genv lenv term ≝
| fpb_fqu: ∀G2,L2,T2. ❪G1,L1,T1❫ ⬂ ❪G2,L2,T2❫ → fpb G1 L1 T1 G2 L2 T2
-| fpb_cpx: â\88\80T2. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\9b T2 → ⊥) → fpb G1 L1 T1 G1 L1 T2
-| fpb_lpx: â\88\80L2. â\9dªG1,L1â\9d« â\8a¢ â¬\88 L2 â\86\92 (L1 â\89\9b[T1] L2 → ⊥) → fpb G1 L1 T1 G1 L2 T1
+| fpb_cpx: â\88\80T2. â\9dªG1,L1â\9d« â\8a¢ T1 â¬\88 T2 â\86\92 (T1 â\89\85 T2 → ⊥) → fpb G1 L1 T1 G1 L1 T2
+| fpb_lpx: â\88\80L2. â\9dªG1,L1â\9d« â\8a¢ â¬\88 L2 â\86\92 (L1 â\89\85[T1] L2 → ⊥) → fpb G1 L1 T1 G1 L2 T1
.
interpretation
(* Basic_2A1: includes: cpr_fpb *)
lemma cpm_fpb (h) (n) (G) (L):
- â\88\80T1,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 (T1 â\89\9b T2 → ⊥) → ❪G,L,T1❫ ≻ ❪G,L,T2❫.
+ â\88\80T1,T2. â\9dªG,Lâ\9d« â\8a¢ T1 â\9e¡[h,n] T2 â\86\92 (T1 â\89\85 T2 → ⊥) → ❪G,L,T1❫ ≻ ❪G,L,T2❫.
/3 width=3 by fpb_cpx, cpm_fwd_cpx/ qed.
lemma lpr_fpb (h) (G) (T):
- â\88\80L1,L2. â\9dªG,L1â\9d« â\8a¢ â\9e¡[h,0] L2 â\86\92 (L1 â\89\9b[T] L2 → ⊥) → ❪G,L1,T❫ ≻ ❪G,L2,T❫.
+ â\88\80L1,L2. â\9dªG,L1â\9d« â\8a¢ â\9e¡[h,0] L2 â\86\92 (L1 â\89\85[T] L2 → ⊥) → ❪G,L1,T❫ ≻ ❪G,L2,T❫.
/3 width=2 by fpb_lpx, lpr_fwd_lpx/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/s_transition/fqu_teqg.ma".
+include "static_2/static/feqg.ma".
+include "basic_2/rt_transition/fpb_reqg.ma".
+
+(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
+
+(* Properties with generic equivalence for closures *************************)
+
+(* Basic_2A1: uses: fleq_fpb_trans *)
+lemma feqg_fpb_trans (S):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀F1,F2,K1,K2,T1,T2. ❪F1,K1,T1❫ ≛[S] ❪F2,K2,T2❫ →
+ ∀G2,L2,U2. ❪F2,K2,T2❫ ≻ ❪G2,L2,U2❫ →
+ ∃∃G1,L1,U1. ❪F1,K1,T1❫ ≻ ❪G1,L1,U1❫ & ❪G1,L1,U1❫ ≛[S] ❪G2,L2,U2❫.
+#S #H1S #H2S #H3S #F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2
+#K2 #T2 #HK12 #HT12 #G2 #L2 #U2 #H12
+elim (teqg_fpb_trans … HT12 … H12) -T2 // #K0 #T0 #H #HT0 #HK0
+elim (reqg_fpb_trans … HK12 … H) -K2 // #L0 #U0 #H #HUT0 #HLK0
+@(ex2_3_intro … H) -H (**) (* full auto too slow *)
+/4 width=5 by feqg_intro_dx, reqg_trans, teqg_reqg_conf_sn, teqg_trans/
+qed-.
+
+(* Inversion lemmas with generic equivalence for closures *******************)
+
+(* Basic_2A1: uses: fpb_inv_fleq *)
+lemma fpb_inv_feqg (S):
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ →
+ ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ⊥.
+#S #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+[ #G2 #L2 #T2 #H12 #H elim (feqg_inv_gen_sn … H) -H
+ /3 width=11 by reqg_fwd_length, fqu_inv_teqg/
+| #T2 #_ #HnT #H elim (feqg_inv_gen_sn … H) -H /3 width=2 by teqg_teqx/
+| #L2 #_ #HnL #H elim (feqg_inv_gen_sn … H) -H /3 width=2 by reqg_reqx/
+]
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/s_transition/fqu_teqx.ma".
-include "static_2/static/feqx.ma".
-include "basic_2/rt_transition/fpb_reqx.ma".
-
-(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
-
-(* Properties with degree-based equivalence for closures ********************)
-
-(* Basic_2A1: uses: fleq_fpb_trans *)
-lemma feqx_fpb_trans:
- ∀F1,F2,K1,K2,T1,T2. ❪F1,K1,T1❫ ≛ ❪F2,K2,T2❫ →
- ∀G2,L2,U2. ❪F2,K2,T2❫ ≻ ❪G2,L2,U2❫ →
- ∃∃G1,L1,U1. ❪F1,K1,T1❫ ≻ ❪G1,L1,U1❫ & ❪G1,L1,U1❫ ≛ ❪G2,L2,U2❫.
-#F1 #F2 #K1 #K2 #T1 #T2 * -F2 -K2 -T2
-#K2 #T2 #HK12 #HT12 #G2 #L2 #U2 #H12
-elim (teqx_fpb_trans … HT12 … H12) -T2 #K0 #T0 #H #HT0 #HK0
-elim (reqx_fpb_trans … HK12 … H) -K2 #L0 #U0 #H #HUT0 #HLK0
-@(ex2_3_intro … H) -H (**) (* full auto too slow *)
-/4 width=3 by feqx_intro_dx, reqx_trans, teqx_reqx_conf_sn, teqx_trans/
-qed-.
-
-(* Inversion lemmas with degree-based equivalence for closures **************)
-
-(* Basic_2A1: uses: fpb_inv_fleq *)
-lemma fpb_inv_feqx:
- ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ →
- ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ⊥.
-#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
-[ #G2 #L2 #T2 #H12 #H elim (feqx_inv_gen_sn … H) -H
- /3 width=11 by reqx_fwd_length, fqu_inv_teqx/
-| #T2 #_ #HnT #H elim (feqx_inv_gen_sn … H) -H /2 width=1 by/
-| #L2 #_ #HnL #H elim (feqx_inv_gen_sn … H) -H /2 width=1 by/
-]
-qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_fqus.ma".
+include "basic_2/rt_transition/cpx_reqg.ma".
+include "basic_2/rt_transition/lpx_reqg.ma".
+include "basic_2/rt_transition/fpb.ma".
+
+(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
+
+(* Properties with generic equivalence for local environments ***************)
+
+lemma teqg_fpb_trans (S):
+ reflexive … S → symmetric … S →
+ ∀U2,U1. U2 ≛[S] U1 →
+ ∀G1,G2,L1,L2,T1. ❪G1,L1,U1❫ ≻ ❪G2,L2,T1❫ →
+ ∃∃L,T2. ❪G1,L1,U2❫ ≻ ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2.
+#S #H1S #H2S #U2 #U1 #HU21 #G1 #G2 #L1 #L2 #T1 * -G2 -L2 -T1
+[ #G2 #L2 #T1 #H
+ elim (teqg_fqu_trans … H … HU21) -H
+ /3 width=5 by fpb_fqu, ex3_2_intro/
+| #T1 #HUT1 #HnUT1
+ lapply (teqg_cpx_trans … HU21 … HUT1) -HUT1
+ /6 width=5 by fpb_cpx, reqg_refl, teqg_teqx, teqg_canc_sn, teqg_refl, ex3_2_intro/
+| /5 width=5 by fpb_lpx, teqg_reqg_conf_sn, reqg_refl, ex3_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was just: lleq_fpb_trans *)
+lemma reqg_fpb_trans (S):
+ reflexive … S → symmetric … S →
+ ∀F,K1,K2,T. K1 ≛[S,T] K2 →
+ ∀G,L2,U. ❪F,K2,T❫ ≻ ❪G,L2,U❫ →
+ ∃∃L1,U0. ❪F,K1,T❫ ≻ ❪G,L1,U0❫ & U0 ≛[S] U & L1 ≛[S,U] L2.
+#S #H1S #H2S #F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U
+[ #G #L2 #U #H2 elim (reqg_fqu_trans … H2 … HT) -K2
+ /3 width=5 by fpb_fqu, ex3_2_intro/
+| #U #HTU #HnTU lapply (reqg_cpx_trans … HT … HTU) -HTU //
+ /4 width=8 by fpb_cpx, cpx_reqg_conf_sn, teqg_refl, ex3_2_intro/
+| #L2 #HKL2 #HnKL2 elim (reqg_lpx_trans … HKL2 … HT) -HKL2 //
+ /6 width=9 by fpb_lpx, reqg_reqx, reqg_repl, teqg_refl, ex3_2_intro/
+]
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_fqus.ma".
-include "basic_2/rt_transition/cpx_reqx.ma".
-include "basic_2/rt_transition/lpx_reqx.ma".
-include "basic_2/rt_transition/fpb.ma".
-
-(* PROPER PARALLEL RST-TRANSITION FOR CLOSURES ******************************)
-
-(* Properties with sort-irrelevant equivalence for local environments *******)
-
-lemma teqx_fpb_trans:
- ∀U2,U1. U2 ≛ U1 →
- ∀G1,G2,L1,L2,T1. ❪G1,L1,U1❫ ≻ ❪G2,L2,T1❫ →
- ∃∃L,T2. ❪G1,L1,U2❫ ≻ ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
-#U2 #U1 #HU21 #G1 #G2 #L1 #L2 #T1 * -G2 -L2 -T1
-[ #G2 #L2 #T1 #H
- elim (teqx_fqu_trans … H … HU21) -H
- /3 width=5 by fpb_fqu, ex3_2_intro/
-| #T1 #HUT1 #HnUT1
- lapply (teqx_cpx_trans … HU21 … HUT1) -HUT1
- /6 width=5 by fpb_cpx, teqx_canc_sn, teqx_trans, ex3_2_intro/
-| /6 width=5 by fpb_lpx, rpx_teqx_div, teqx_reqx_conf_sn, ex3_2_intro/
-]
-qed-.
-
-(* Basic_2A1: was just: lleq_fpb_trans *)
-lemma reqx_fpb_trans:
- ∀F,K1,K2,T. K1 ≛[T] K2 →
- ∀G,L2,U. ❪F,K2,T❫ ≻ ❪G,L2,U❫ →
- ∃∃L1,U0. ❪F,K1,T❫ ≻ ❪G,L1,U0❫ & U0 ≛ U & L1 ≛[U] L2.
-#F #K1 #K2 #T #HT #G #L2 #U * -G -L2 -U
-[ #G #L2 #U #H2 elim (reqx_fqu_trans … H2 … HT) -K2
- /3 width=5 by fpb_fqu, ex3_2_intro/
-| #U #HTU #HnTU lapply (reqx_cpx_trans … HT … HTU) -HTU
- /5 width=11 by fpb_cpx, cpx_reqx_conf_sn, teqx_trans, teqx_reqx_conf_sn, ex3_2_intro/ (**) (* time: 36s on dev *)
-| #L2 #HKL2 #HnKL2 elim (reqx_lpx_trans … HKL2 … HT) -HKL2
- /6 width=5 by fpb_lpx, (* 2x *) reqx_canc_sn, ex3_2_intro/
-]
-qed-.
| fpbq_fquq: ∀G2,L2,T2. ❪G1,L1,T1❫ ⬂⸮ ❪G2,L2,T2❫ → fpbq G1 L1 T1 G2 L2 T2
| fpbq_cpx : ∀T2. ❪G1,L1❫ ⊢ T1 ⬈ T2 → fpbq G1 L1 T1 G1 L1 T2
| fpbq_lpx : ∀L2. ❪G1,L1❫ ⊢ ⬈ L2 → fpbq G1 L1 T1 G1 L2 T1
-| fpbq_feqx: â\88\80G2,L2,T2. â\9dªG1,L1,T1â\9d« â\89\9b ❪G2,L2,T2❫ → fpbq G1 L1 T1 G2 L2 T2
+| fpbq_feqx: â\88\80G2,L2,T2. â\9dªG1,L1,T1â\9d« â\89\85 ❪G2,L2,T2❫ → fpbq G1 L1 T1 G2 L2 T2
.
interpretation
(**************************************************************************)
include "static_2/static/aaa_fqus.ma".
-include "static_2/static/aaa_feqx.ma".
+include "static_2/static/aaa_feqg.ma".
include "basic_2/rt_transition/lpx_aaa.ma".
include "basic_2/rt_transition/fpbq.ma".
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ →
∀A1. ❪G1,L1❫ ⊢ T1 ⁝ A1 → ∃A2. ❪G2,L2❫ ⊢ T2 ⁝ A2.
#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
-/3 width=8 by lpx_aaa_conf, cpx_aaa_conf, aaa_feqx_conf, aaa_fquq_conf, ex_intro/
+/3 width=8 by lpx_aaa_conf, cpx_aaa_conf, aaa_feqg_conf, aaa_fquq_conf, ex_intro/
qed-.
(* *)
(**************************************************************************)
-include "basic_2/rt_transition/fpb_feqx.ma".
+include "static_2/static/feqg_fqup.ma".
+include "static_2/static/feqg_feqg.ma".
+include "basic_2/rt_transition/fpb_feqg.ma".
include "basic_2/rt_transition/fpbq.ma".
(* PARALLEL RST-TRANSITION FOR CLOSURES *************************************)
qed.
(* Basic_2A1: fpb_fpbq_alt *)
-lemma fpb_fpbq_fneqx:
+lemma fpb_fpbq_fneqx (S):
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫ →
- ∧∧ ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ & (❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ⊥).
-/3 width=10 by fpb_fpbq, fpb_inv_feqx, conj/ qed-.
+ ∧∧ ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ & (❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ → ⊥).
+/3 width=10 by fpb_fpbq, fpb_inv_feqg, conj/ qed-.
(* Inversrion lemmas with proper parallel rst-transition for closures *******)
-(* Basic_2A1: uses: fpbq_ind_alt *)
-lemma fpbq_inv_fpb:
+(* Basic_2A1: fpbq_inv_fpb_alt *)
+lemma fpbq_fneqx_inv_fpb:
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ →
- ∨∨ ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫
- | ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫.
+ (❪G1,L1,T1❫ ≅ ❪G2,L2,T2❫ → ⊥) → ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫.
#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
[ #G2 #L2 #T2 * [2: * #H1 #H2 #H3 destruct ]
- /3 width=1 by fpb_fqu, feqx_intro_sn, or_intror, or_introl/
-| #T2 #H elim (teqx_dec T1 T2)
- /4 width=1 by fpb_cpx, feqx_intro_sn, or_intror, or_introl/
-| #L2 elim (reqx_dec L1 L2 T1)
- /4 width=1 by fpb_lpx, feqx_intro_sn, or_intror, or_introl/
-| /2 width=1 by or_introl/
+ [ #H elim H -H /2 width=1 by feqg_refl/
+ | /2 width=1 by fpb_fqu/
+ ]
+| /4 width=1 by fpb_cpx, teqg_feqg/
+| /4 width=1 by fpb_lpx, feqg_intro_sn/
+| #G2 #L2 #T2 #H12 #Hn12
+ elim Hn12 -Hn12 //
]
qed-.
-(* Basic_2A1: fpbq_inv_fpb_alt *)
-lemma fpbq_fneqx_inv_fpb:
+(* Basic_2A1: uses: fpbq_ind_alt *)
+lemma fpbq_inv_fpb:
∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≽ ❪G2,L2,T2❫ →
- (❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ → ⊥) → ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫.
-#G1 #G2 #L1 #L2 #T1 #T2 #H #H0
-elim (fpbq_inv_fpb … H) -H // #H elim H0 -H0 //
+ ∨∨ ❪G1,L1,T1❫ ≅ ❪G2,L2,T2❫
+ | ❪G1,L1,T1❫ ≻ ❪G2,L2,T2❫.
+#G1 #G2 #L1 #L2 #T1 #T2 #H
+elim (feqg_dec sfull … G1 G2 L1 L2 T1 T2) //
+[ /2 width=1 by or_introl/
+| /4 width=1 by fpbq_fneqx_inv_fpb, or_intror/
+]
qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/req.ma".
+include "basic_2/rt_transition/rpx_lpx.ma".
+
+(* EXTENDED PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS **************)
+
+(* Properties with generic equivalence for local environments ***************)
+
+lemma reqg_lpx_trans_rpx (S) (G) (L) (T:term):
+ ∀L1. L1 ≛[S,T] L → ∀L2. ❪G,L❫ ⊢ ⬈ L2 → ❪G,L❫ ⊢ ⬈[T] L2.
+/3 width=1 by lpx_rpx, reqg_rpx_trans/ qed.
+
+(* Basic_2A1: uses: lleq_lpx_trans *)
+lemma reqg_lpx_trans (S) (G) (T:term):
+ reflexive … S → symmetric … S →
+ ∀L2,K2. ❪G,L2❫ ⊢ ⬈ K2 → ∀L1. L1 ≛[S,T] L2 →
+ ∃∃K1. ❪G,L1❫ ⊢ ⬈ K1 & K1 ≛[S,T] K2.
+#S #G #T #H1S #H2S #L2 #K2 #HLK2 #L1 #HL12
+lapply (lpx_rpx … T … HLK2) -HLK2 #HLK2
+lapply (reqg_rpx_trans … HL12 … HLK2) -L2 // #H
+elim (rpx_fwd_lpx_req … H) -H #K1 #HLK1 #HK12
+/3 width=3 by req_fwd_reqg, ex2_intro/
+qed-.
+
+(* Inversion lemmas with sort-irrelevant equivalence for local environments *)
+
+lemma rpx_inv_reqg_lpx (S) (G) (T):
+ reflexive … S →
+ ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
+ ∃∃L. L1 ≛[S,T] L & ❪G,L❫ ⊢ ⬈ L2.
+#S #G #T #HS #L1 #L2 #H
+elim (rpx_inv_req_lpx … H) -H #L #HL1 #HL2
+/3 width=3 by req_fwd_reqg, ex2_intro/
+qed-.
+
+(* Forward lemmas with sort-irrelevant equivalence for local environments ***)
+
+lemma rpx_fwd_lpx_reqg (S) (G) (T):
+ reflexive … S →
+ ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
+ ∃∃L. ❪G,L1❫ ⊢ ⬈ L & L ≛[S,T] L2.
+#S #G #T #HS #L1 #L2 #H
+elim (rpx_fwd_lpx_req … H) -H #L #HL1 #HL2
+/3 width=3 by req_fwd_reqg, ex2_intro/
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_req.ma".
-include "basic_2/rt_transition/rpx_reqx.ma".
-include "basic_2/rt_transition/rpx_lpx.ma".
-
-(* EXTENDED PARALLEL RT-TRANSITION FOR FULL LOCAL ENVIRONMENTS **************)
-
-(* Properties with sort-irrelevant equivalence for local environments *******)
-
-lemma reqx_lpx_trans_rpx (G) (L) (T:term):
- ∀L1. L1 ≛[T] L → ∀L2. ❪G,L❫ ⊢ ⬈ L2 → ❪G,L❫ ⊢ ⬈[T] L2.
-/3 width=1 by lpx_rpx, reqx_rpx_trans/ qed.
-
-(* Basic_2A1: uses: lleq_lpx_trans *)
-lemma reqx_lpx_trans (G):
- ∀L2,K2. ❪G,L2❫ ⊢ ⬈ K2 → ∀L1. ∀T:term. L1 ≛[T] L2 →
- ∃∃K1. ❪G,L1❫ ⊢ ⬈ K1 & K1 ≛[T] K2.
-#G #L2 #K2 #HLK2 #L1 #T #HL12
-lapply (lpx_rpx … T … HLK2) -HLK2 #HLK2
-lapply (reqx_rpx_trans … HL12 … HLK2) -L2 #H
-elim (rpx_fwd_lpx_req … H) -H #K1 #HLK1 #HK12
-/3 width=3 by req_reqx, ex2_intro/
-qed-.
-
-(* Inversion lemmas with sort-irrelevant equivalence for local environments *)
-
-lemma rpx_inv_reqx_lpx (G) (T):
- ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
- ∃∃L. L1 ≛[T] L & ❪G,L❫ ⊢ ⬈ L2.
-#G #T #L1 #L2 #H
-elim (rpx_inv_req_lpx … H) -H #L #HL1 #HL2
-/3 width=3 by req_reqx, ex2_intro/
-qed-.
-
-(* Forward lemmas with sort-irrelevant equivalence for local environments ***)
-
-lemma rpx_fwd_lpx_reqx (G) (T):
- ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
- ∃∃L. ❪G,L1❫ ⊢ ⬈ L & L ≛[T] L2.
-#G #T #L1 #L2 #H
-elim (rpx_fwd_lpx_req … H) -H #L #HL1 #HL2
-/3 width=3 by req_reqx, ex2_intro/
-qed-.
(**************************************************************************)
include "static_2/static/rex_lex.ma".
-include "basic_2/rt_transition/cpx_req.ma".
+include "basic_2/rt_transition/rpx_reqg.ma".
include "basic_2/rt_transition/lpx.ma".
(* EXTENDED PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS **********)
lemma rpx_inv_req_lpx (G) (T):
∀L1,L2. ❪G,L1❫ ⊢ ⬈[T] L2 →
∃∃L. L1 ≡[T] L & ❪G,L❫ ⊢ ⬈ L2.
-/4 width=13 by cpx_req_conf, rex_inv_req_lex, rex_conf1_next/ qed-.
+/4 width=13 by cpx_reqg_conf, rex_inv_req_lex, rex_conf1_next/ qed-.
(* Forward lemmas with extended rt-transition for full local envs ***********)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_drops.ma".
+include "static_2/static/reqg_fqup.ma".
+include "static_2/static/reqg_reqg.ma".
+include "basic_2/rt_transition/rpx_fsle.ma".
+
+(* EXTENDED PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS **********)
+
+(* Properties with generic equivalence for local environments ***************)
+
+lemma rpx_pair_sn_split (S) (G):
+ reflexive … S →
+ ∀L1,L2,V. ❪G,L1❫ ⊢ ⬈[V] L2 → ∀I,T.
+ ∃∃L. ❪G,L1❫ ⊢ ⬈[②[I]V.T] L & L ≛[S,V] L2.
+/3 width=5 by rpx_fsge_comp, rex_pair_sn_split, teqg_refl/ qed-.
+
+lemma rpx_flat_dx_split (S) (G):
+ reflexive … S →
+ ∀L1,L2,T. ❪G,L1❫ ⊢ ⬈[T] L2 → ∀I,V.
+ ∃∃L. ❪G,L1❫ ⊢ ⬈[ⓕ[I]V.T] L & L ≛[S,T] L2.
+/3 width=5 by rpx_fsge_comp, rex_flat_dx_split, teqg_refl/ qed-.
+
+lemma rpx_bind_dx_split (S) (G):
+ reflexive … S →
+ ∀I,L1,L2,V1,T. ❪G,L1.ⓑ[I]V1❫ ⊢ ⬈[T] L2 → ∀p.
+ ∃∃L,V. ❪G,L1❫ ⊢ ⬈[ⓑ[p,I]V1.T] L & L.ⓑ[I]V ≛[S,T] L2 & ❪G,L1❫ ⊢ V1 ⬈ V.
+/3 width=5 by rpx_fsge_comp, rex_bind_dx_split, teqg_refl/ qed-.
+
+lemma rpx_bind_dx_split_void (S) (G):
+ reflexive … S →
+ ∀K1,L2,T. ❪G,K1.ⓧ❫ ⊢ ⬈[T] L2 → ∀p,I,V.
+ ∃∃K2. ❪G,K1❫ ⊢ ⬈[ⓑ[p,I]V.T] K2 & K2.ⓧ ≛[S,T] L2.
+/3 width=5 by rpx_fsge_comp, rex_bind_dx_split_void, teqg_refl/ qed-.
+
+lemma rpx_teqg_conf_sn (S) (G):
+ reflexive … S →
+ s_r_confluent1 … (ceqg S) (rpx G).
+/2 width=5 by teqg_rex_conf_sn/ qed-.
+
+lemma rpx_teqg_div (S) (G):
+ reflexive … S → symmetric … S →
+ ∀T1,T2. T1 ≛[S] T2 → ∀L1,L2. ❪G,L1❫ ⊢ ⬈[T2] L2 → ❪G,L1❫ ⊢ ⬈[T1] L2.
+/2 width=6 by teqg_rex_div/ qed-.
+
+lemma cpx_teqg_repl_reqg (S) (G) (L0) (T0):
+ reflexive … S →
+ ∀T1. ❪G,L0❫ ⊢ T0 ⬈ T1 → ∀T2. T0 ≛[S] T2 → ∀T3. T1 ≛[S] T3 →
+ ∀L2. L0 ≛[S,T0] L2 → ❪G,L2❫ ⊢ T2 ⬈ T3.
+#S #G #L0 #T0 #HS #T1 #H @(cpx_ind … H) -G -L0 -T0 -T1
+[ * #x0 #G #L0 #X2 #HX2 #X3 #HX3 #L2 #_
+ [ elim (teqg_inv_sort1 … HX2) -HX2 #x2 #Hx02 #H destruct
+ elim (teqg_inv_sort1 … HX3) -HX3 #x3 #Hx03 #H destruct //
+ | lapply (teqg_inv_lref1 … HX2) -HX2 #H destruct
+ lapply (teqg_inv_lref1 … HX3) -HX3 #H destruct //
+ | lapply (teqg_inv_gref1 … HX2) -HX2 #H destruct
+ lapply (teqg_inv_gref1 … HX3) -HX3 #H destruct //
+ ]
+| #G #L0 #s0 #s1 #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_sort1 … HX2) -HX2 #s2 #H destruct
+ elim (teqg_inv_sort1 … HX3) -HX3 #s3 #H destruct //
+| #I #G #K0 #V0 #V1 #W1 #_ #IH #HVW1 #X2 #HX2 #X3 #HX3 #L2 #HL2
+ lapply (teqg_inv_lref1 … HX2) -HX2 #H destruct
+ elim (reqg_inv_zero_pair_sn … HL2) -HL2 #K2 #V2 #HK02 #HV02 #H destruct
+ elim (teqg_inv_lifts_sn … HX3 … HVW1) -W1 #V3 #HVX3 #HV13
+ /3 width=3 by cpx_delta/
+| #I0 #G #K0 #V1 #W1 #i #_ #IH #HVW1 #X2 #HX2 #X3 #HX3 #L2 #HL2
+ lapply (teqg_inv_lref1 … HX2) -HX2 #H destruct
+ elim (reqg_inv_lref_bind_sn … HL2) -HL2 #I2 #K2 #HK02 #H destruct
+ elim (teqg_inv_lifts_sn … HX3 … HVW1) -W1 #V3 #HVX3 #HV13
+ /3 width=3 by cpx_lref/
+| #p #I #G #L0 #V0 #V1 #T0 #T1 #_ #_ #IHV #IHT #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #HV02 #HT02 #H destruct
+ elim (teqg_inv_pair1 … HX3) -HX3 #V3 #T3 #HV13 #HT13 #H destruct
+ elim (reqg_inv_bind_refl … HL02) -HL02 // #HV0 #HT0
+ lapply (reqg_bind_repl_dx … HT0 (BPair I V2) ?) -HT0
+ /2 width=1 by ext2_pair/ #HT0
+ /3 width=1 by cpx_bind/
+| #I #G #L0 #V0 #V1 #T0 #T1 #_ #_ #IHV #IHT #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #HV02 #HT02 #H destruct
+ elim (teqg_inv_pair1 … HX3) -HX3 #V3 #T3 #HV13 #HT13 #H destruct
+ elim (reqg_inv_flat … HL02) -HL02 #HV0 #HT0
+ /3 width=1 by cpx_flat/
+| #G #L0 #V0 #U0 #T0 #T1 #HTU0 #_ #IH #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #U2 #HV02 #HU02 #H destruct
+ elim (reqg_inv_bind_refl … HL02) -HL02 // #HV0 #HU0
+ lapply (reqg_inv_lifts_bi … HU0 (Ⓣ) … HTU0) -HU0
+ [6:|*: /3 width=2 by drops_refl, drops_drop/ ] #HT0
+ elim (teqg_inv_lifts_sn … HU02 … HTU0) -U0 #T2 #HTU2 #HT02
+ /3 width=3 by cpx_zeta/
+| #G #L0 #V0 #T0 #T1 #_ #IH #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #_ #HT02 #H destruct
+ elim (reqg_inv_flat … HL02) -HL02 #HV0 #HT0
+ /3 width=1 by cpx_eps/
+| #G #L0 #V0 #T0 #T1 #_ #IH #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #T2 #HV02 #_ #H destruct
+ elim (reqg_inv_flat … HL02) -HL02 #HV0 #HT1
+ /3 width=1 by cpx_ee/
+| #p #G #L0 #V0 #V1 #W0 #W1 #T0 #T1 #_ #_ #_ #IHV #IHW #IHT #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #X #HV02 #HX #H destruct
+ elim (teqg_inv_pair1 … HX) -HX #W2 #T2 #HW02 #HT02 #H destruct
+ elim (teqg_inv_pair1 … HX3) -HX3 #X #T3 #HX #HT13 #H destruct
+ elim (teqg_inv_pair1 … HX) -HX #W3 #V3 #HW13 #HV13 #H destruct
+ elim (reqg_inv_flat … HL02) -HL02 #HV0 #HL02
+ elim (reqg_inv_bind_refl … HL02) -HL02 // #HW0 #HT0
+ lapply (reqg_bind_repl_dx … HT0 (BPair Abst W2) ?) -HT0
+ /2 width=1 by ext2_pair/ #H2T0
+ /3 width=1 by cpx_beta/
+| #p #G #L0 #V0 #V1 #U1 #W0 #W1 #T0 #T1 #_ #_ #_ #IHV #IHW #IHT #HVU1 #X2 #HX2 #X3 #HX3 #L2 #HL02
+ elim (teqg_inv_pair1 … HX2) -HX2 #V2 #X #HV02 #HX #H destruct
+ elim (teqg_inv_pair1 … HX) -HX #W2 #T2 #HW02 #HT02 #H destruct
+ elim (teqg_inv_pair1 … HX3) -HX3 #W3 #X #HW13 #HX #H destruct
+ elim (teqg_inv_pair1 … HX) -HX #U3 #T3 #HU13 #HT13 #H destruct
+ elim (reqg_inv_flat … HL02) -HL02 #HV0 #HL02
+ elim (reqg_inv_bind_refl … HL02) -HL02 // #HW0 #HT0
+ lapply (reqg_bind_repl_dx … HT0 (BPair Abbr W2) ?) -HT0
+ /2 width=1 by ext2_pair/ #HT0
+ elim (teqg_inv_lifts_sn … HU13 … HVU1) -U1 #V3 #HVU3 #HV13
+ /3 width=3 by cpx_theta/
+]
+qed-.
+
+lemma cpx_teqg_conf (S) (G) (L):
+ reflexive … S →
+ ∀T0:term. ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ∀T2. T0 ≛[S] T2 → ❪G,L❫ ⊢ T2 ⬈ T1.
+/3 width=9 by cpx_teqg_repl_reqg, reqg_refl, teqg_refl/ qed-.
+
+lemma teqg_cpx_trans (S) (G) (L):
+ reflexive … S → symmetric … S →
+ ∀T2. ∀T0:term. T2 ≛[S] T0 → ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ❪G,L❫ ⊢ T2 ⬈ T1.
+/3 width=6 by cpx_teqg_conf, teqg_sym/
+qed-.
+
+lemma teqg_cpx (S) (G) (L):
+ reflexive … S → symmetric … S →
+ ∀T1,T2:term. T1 ≛[S] T2 → ❪G,L❫ ⊢ T1 ⬈ T2.
+/2 width=6 by teqg_cpx_trans/ qed.
+
+(* Basic_2A1: uses: cpx_lleq_conf *)
+lemma cpx_reqg_conf (S) (G):
+ reflexive … S →
+ R_confluent1_rex (cpx G) (ceqg S).
+/3 width=9 by cpx_teqg_repl_reqg, teqg_refl/ qed-.
+
+(* Basic_2A1: uses: lleq_cpx_trans *)
+lemma reqg_cpx_trans (S) (G):
+ reflexive … S → symmetric … S →
+ ∀L2,L0,T0. L2 ≛[S,T0] L0 → ∀T1. ❪G,L0❫ ⊢ T0 ⬈ T1 → ❪G,L2❫ ⊢ T0 ⬈ T1.
+/3 width=7 by cpx_reqg_conf, reqg_sym/
+qed-.
+
+lemma rpx_reqg_conf (S) (G) (T):
+ reflexive … S →
+ confluent1 … (rpx G T) (reqg S T).
+/3 width=9 by reqg_fsge_comp, cpx_teqg_repl_reqg, rex_conf1, teqg_refl/ qed-.
+
+lemma reqg_rpx_trans (S) (G) (T) (L):
+ reflexive … S → symmetric … S →
+ ∀L1. L1 ≛[S,T] L → ∀L2. ❪G,L❫ ⊢ ⬈[T] L2 → ❪G,L1❫ ⊢ ⬈[T] L2.
+/3 width=7 by rpx_reqg_conf, reqg_sym/ qed-.
+
+lemma reqg_rpx (S) (G) (T):
+ reflexive … S → symmetric … S →
+ ∀L1,L2. L1 ≛[S,T] L2 → ❪G,L1❫ ⊢ ⬈[T] L2.
+/2 width=6 by reqg_rpx_trans/ qed.
(* *)
(**************************************************************************)
-include "static_2/static/reqx_drops.ma".
-include "static_2/static/reqx_fqup.ma".
-include "static_2/static/reqx_reqx.ma".
-include "basic_2/rt_transition/rpx_fsle.ma".
+include "static_2/syntax/teqx.ma".
+include "basic_2/rt_transition/rpx_reqg.ma".
(* EXTENDED PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS **********)
-
+(*
(* Properties with sort-irrelevant equivalence for local environments *******)
lemma rpx_pair_sn_split (G):
lemma cpx_teqx_conf (G) (L):
∀T0:term. ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ∀T2. T0 ≛ T2 → ❪G,L❫ ⊢ T2 ⬈ T1.
/2 width=7 by cpx_teqx_repl_reqx/ qed-.
-
+*)
lemma teqx_cpx_trans (G) (L):
- ∀T2. ∀T0:term. T2 ≛ T0 → ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ❪G,L❫ ⊢ T2 ⬈ T1.
-/3 width=3 by cpx_teqx_conf, teqx_sym/
-qed-.
-
+ ∀T2. ∀T0:term. T2 ≅ T0 → ∀T1. ❪G,L❫ ⊢ T0 ⬈ T1 → ❪G,L❫ ⊢ T2 ⬈ T1.
+/2 width=6 by teqg_cpx_trans/ qed-.
+(*
lemma teqx_cpx (G) (L):
∀T1,T2:term. T1 ≛ T2 → ❪G,L❫ ⊢ T1 ⬈ T2.
/2 width=3 by teqx_cpx_trans/ qed.
lemma reqx_rpx (G) (T):
∀L1,L2. L1 ≛[T] L2 → ❪G,L1❫ ⊢ ⬈[T] L2.
/2 width=3 by reqx_rpx_trans/ qed.
+*)
[ [ "evaluation for terms" ] "cprre" "cprre_csx" + "cprre_cpms" + "cprre_cprre" * ]
[ [ "for lenvs on all entries" ] "lprs ( ❪?,?❫ ⊢ ➡*[?,?] ? )" "lprs_tc" + "lprs_ctc" + "lprs_length" + "lprs_drops" + "lprs_aaa" + "lprs_lpr" + "lprs_lpxs" + "lprs_cpms" + "lprs_cprs" + "lprs_lprs" * ]
[ [ "for binders" ] "cprs_ext" + "( ❪?,?❫ ⊢ ? ➡*[?,?] ?)" * ]
- [ [ "for terms" ] "cprs" "cprs_ctc" + "cprs_tweq" + "cprs_drops" + "cprs_cpr" + "cprs_lpr" + "cprs_cnr" + "cprs_cprs" * ]
+ [ [ "for terms" ] "cprs" "cprs_ctc" + "cprs_teqw" + "cprs_drops" + "cprs_cpr" + "cprs_lpr" + "cprs_cnr" + "cprs_cprs" * ]
}
]
[ { "t-bound context-sensitive parallel rt-computation" * } {
[ [ "t-unbound whd evaluation for terms" ] "cpmuwe ( ❪?,?❫ ⊢ ? ➡*𝐍𝐖*[?,?] ? )" "cpmuwe_csx" + "cpmuwe_cpmuwe" * ]
[ [ "t-unbound whd normal form for terms" ] "cnuw ( ❪?,?❫ ⊢ ➡𝐍𝐖*[?] ? )" "cnuw_drops" + "cnuw_simple" + "cnuw_cnuw" * ]
[ [ "t-bpund evaluation for terms" ] "cpmre ( ❪?,?❫ ⊢ ? ➡*𝐍[?,?] ? )" "cpmre_aaa" * ]
- [ [ "for terms" ] "cpms" + "( ❪?,?❫ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_reqx" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ]
+ [ [ "for terms" ] "cpms" + "( ❪?,?❫ ⊢ ? ➡*[?,?] ? )" "cpms_drops" + "cpms_lsubr" + "cpms_reqg" + "cpms_aaa" + "cpms_lpr" + "cpms_cpxs" + "cpms_fpbs" + "cpms_fpbg" + "cpms_cpms" * ]
}
]
[ { "extended context-sensitive parallel rst-computation" * } {
- [ [ "strongly normalizing for closures" ] "fsb" + "( ≥𝐒 ❪?,?,?❫ )" "fsb_feqx" + "fsb_aaa" + "fsb_csx" + "fsb_fpbg" * ]
+ [ [ "strongly normalizing for closures" ] "fsb" + "( ≥𝐒 ❪?,?,?❫ )" "fsb_feqg" + "fsb_aaa" + "fsb_csx" + "fsb_fpbg" * ]
[ [ "proper for closures" ] "fpbg" + "( ❪?,?,?❫ > ❪?,?,?❫ )" "fpbg_fqup" + "fpbg_cpxs" + "fpbg_lpxs" + "fpbg_fpbs" + "fpbg_fpbg" * ]
[ [ "for closures" ] "fpbs" + "( ❪?,?,?❫ ≥ ❪?,?,?❫ )" "fpbs_fqup" + "fpbs_fqus" + "fpbs_aaa" + "fpbs_cpx" + "fpbs_fpb" + "fpbs_cpxs" + "fpbs_lpxs" + "fpbs_csx" + "fpbs_fpbs" * ]
}
[ [ "compatibility for lenvs" ] "jsx" + "( ? ⊢ ? ⊒ ? )" "jsx_drops" + "jsx_lsubr" + "jsx_csx" + "jsx_rsx" + "jsx_jsx" * ]
[ [ "strongly normalizing for lenvs on referred entries" ] "rsx" + "( ? ⊢ ⬈*𝐒[?] ? )" "rsx_length" + "rsx_drops" + "rsx_fqup" + "rsx_cpxs" + "rsx_csx" + "rsx_rsx" * ]
[ [ "strongly normalizing for term vectors" ] "csx_vector" + "( ❪?,?❫ ⊢ ⬈*𝐒 ? )" "csx_cnx_vector" + "csx_csx_vector" * ]
- [ [ "strongly normalizing for terms" ] "csx" + "( ❪?,?❫ ⊢ ⬈*𝐒 ? )" "csx_simple" + "csx_simple_teqo" + "csx_drops" + "csx_fqus" + "csx_lsubr" + "csx_reqx" + "csx_feqx" + "csx_aaa" + "csx_gcp" + "csx_gcr" + "csx_lpx" + "csx_cnx" + "csx_fpbq" + "csx_cpxs" + "csx_lpxs" + "csx_csx" * ]
- [ [ "for lenvs on all entries" ] "lpxs" + "( ❪?,?❫ ⊢ ⬈* ? )" "lpxs_length" + "lpxs_drops" + "lpxs_reqx" + "lpxs_feqx" + "lpxs_aaa" + "lpxs_lpx" + "lpxs_cpxs" + "lpxs_lpxs" * ]
+ [ [ "strongly normalizing for terms" ] "csx" + "( ❪?,?❫ ⊢ ⬈*𝐒 ? )" "csx_simple" + "csx_simple_teqo" + "csx_drops" + "csx_fqus" + "csx_lsubr" + "csx_reqg" + "csx_feqg" + "csx_aaa" + "csx_gcp" + "csx_gcr" + "csx_lpx" + "csx_cnx" + "csx_fpbq" + "csx_cpxs" + "csx_lpxs" + "csx_csx" * ]
+ [ [ "for lenvs on all entries" ] "lpxs" + "( ❪?,?❫ ⊢ ⬈* ? )" "lpxs_length" + "lpxs_drops" + "lpxs_reqg" + "lpxs_feqg" + "lpxs_aaa" + "lpxs_lpx" + "lpxs_cpxs" + "lpxs_lpxs" * ]
[ [ "for binders" ] "cpxs_ext" + "( ❪?,?❫ ⊢ ? ⬈* ? )" * ]
- [ [ "for terms" ] "cpxs" + "( ❪?,?❫ ⊢ ? ⬈* ? )" "cpxs_teqx" + "cpxs_teqo" + "cpxs_teqo_vector" + "cpxs_drops" + "cpxs_fqus" + "cpxs_lsubr" + "cpxs_reqx" + "cpxs_feqx" + "cpxs_aaa" + "cpxs_lpx" + "cpxs_cnx" + "cpxs_cpxs" * ]
+ [ [ "for terms" ] "cpxs" + "( ❪?,?❫ ⊢ ? ⬈* ? )" "cpxs_teqg" + "cpxs_teqo" + "cpxs_teqo_vector" + "cpxs_drops" + "cpxs_fqus" + "cpxs_lsubr" + "cpxs_reqg" + "cpxs_feqg" + "cpxs_aaa" + "cpxs_lpx" + "cpxs_cnx" + "cpxs_cpxs" * ]
}
]
}
}
]
[ { "context-sensitive parallel r-transition" * } {
- [ [ "normal form for terms" ] "cnr ( ❪?,?❫ ⊢ ➡𝐍[?,?] ? )" "cnr_simple" + "cnr_teqx" + "cnr_drops" * ]
+ [ [ "normal form for terms" ] "cnr ( ❪?,?❫ ⊢ ➡𝐍[?,?] ? )" "cnr_simple" + "cnr_teqg" + "cnr_teqx" + "cnr_drops" * ]
[ [ "for lenvs on all entries" ] "lpr" + "( ❪?,?❫ ⊢ ➡[?,?] ? )" "lpr_length" + "lpr_drops" + "lpr_fquq" + "lpr_aaa" + "lpr_lpx" + "lpr_lpr" * ]
[ [ "for binders" ] "cpr_ext" * ]
- [ [ "for terms" ] "cpr" "cpr_drops" + "cpr_drops_basic" + "cpr_teqx" + "cpr_cpr" * ]
+ [ [ "for terms" ] "cpr" "cpr_drops" + "cpr_drops_basic" + "cpr_teqg" + "cpr_cpr" * ]
}
]
[ { "t-bound context-sensitive parallel rt-transition" * } {
]
[ { "extended parallel rst-transition" * } {
[ [ "for closures" ] "fpbq" + "( ❪?,?,?❫ ≽ ❪?,?,?❫ )" "fpbq_aaa" + "fpbq_fpb" * ]
- [ [ "proper for closures" ] "fpb" + "( ❪?,?,?❫ ≻ ❪?,?,?❫ )" "fpb_reqx" + "fpb_feqx" * ]
+ [ [ "proper for closures" ] "fpb" + "( ❪?,?,?❫ ≻ ❪?,?,?❫ )" "fpb_reqg" + "fpb_feqg" * ]
}
]
[ { "extended context-sensitive parallel rt-transition" * } {
[ [ "normal form for terms" ] "cnx" + "( ❪?,?❫ ⊢ ⬈𝐍 ? )" "cnx_simple" + "cnx_drops" + "cnx_basic" + "cnx_cnx" * ]
- [ [ "for lenvs on referred entries" ] "rpx" + "( ❪?,?❫ ⊢ ⬈[?] ? )" "rpx_length" + "rpx_drops" + "rpx_fqup" + "rpx_fsle" + "rpx_reqx" + "rpx_lpx" + "rpx_rpx" * ]
- [ [ "for lenvs on all entries" ] "lpx" + "( ❪?,?❫ ⊢ ⬈ ? )" "lpx_length" + "lpx_drops" + "lpx_fquq" + "lpx_fsle" + "lpx_reqx" + "lpx_aaa" * ]
+ [ [ "for lenvs on referred entries" ] "rpx" + "( ❪?,?❫ ⊢ ⬈[?] ? )" "rpx_length" + "rpx_drops" + "rpx_fqup" + "rpx_fsle" + "rpx_reqg" + "rpx_reqx" + "rpx_lpx" + "rpx_rpx" * ]
+ [ [ "for lenvs on all entries" ] "lpx" + "( ❪?,?❫ ⊢ ⬈ ? )" "lpx_length" + "lpx_drops" + "lpx_fquq" + "lpx_fsle" + "lpx_reqg" + "lpx_aaa" * ]
[ [ "for binders" ] "cpx_ext" + "( ❪?,?❫ ⊢ ? ⬈ ? )" * ]
- [ [ "for terms" ] "cpx" + "( ❪?,?❫ ⊢ ? ⬈ ? )" "cpx_simple" + "cpx_drops" + "cpx_drops_basic" + "cpx_fqus" + "cpx_lsubr" + "cpx_req" + "cpx_reqx" + "cpx_feqx" * ]
+ [ [ "for terms" ] "cpx" + "( ❪?,?❫ ⊢ ? ⬈ ? )" "cpx_simple" + "cpx_drops" + "cpx_drops_basic" + "cpx_fqus" + "cpx_lsubr" + "cpx_req" + "cpx_reqg" + "cpx_feqg" * ]
}
]
[ { "bound context-sensitive parallel rt-transition" * } {
#!/bin/sh
-for SRC in `find ground_2 static_2 basic_2 apps_2 -name "*.ma"`; do
+for SRC in `find ground static_2 basic_2 apps_2 -name "*.ma"`; do
if [ ! -e ${SRC//$1/$2} ];
then echo ${SRC//$1/$2}; git mv $SRC ${SRC//$1/$2};
fi
#!/bin/sh
-for SRC in `find ground_2 static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do
+for SRC in `find ground static_2 basic_2 apps_2 -name "*.ma" -or -name "*.tbl"`; do
sed "/$1/s!$2!$3!g" ${SRC} > ${SRC}.new
if [ ! -s ${SRC}.new ] || diff ${SRC} ${SRC}.new > /dev/null;
then rm -f ${SRC}.new;
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_reqx.ma".
+include "static_2/static/feqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
+
+(* Advanced properties ******************************************************)
+
+lemma feqx_sym: tri_symmetric … feqx.
+#G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1
+/3 width=1 by feqx_intro_dx, reqx_sym, teqx_sym/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem feqx_trans: tri_transitive … feqx.
+#G1 #G #L1 #L #T1 #T * -G -L -T
+#L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
+/4 width=5 by feqx_intro_sn, reqx_trans, teqx_reqx_div, teqx_trans/
+qed-.
+
+theorem feqx_canc_sn: ∀G,G1,L,L1,T,T1. ❪G,L,T❫ ≛ ❪G1,L1,T1❫→
+ ∀G2,L2,T2. ❪G,L,T❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
+/3 width=5 by feqx_trans, feqx_sym/ qed-.
+
+theorem feqx_canc_dx: ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛ ❪G,L,T❫ →
+ ∀G2,L2,T2. ❪G2,L2,T2❫ ≛ ❪G,L,T❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
+/3 width=5 by feqx_trans, feqx_sym/ qed-.
+
+(* Main inversion lemmas with degree-based equivalence on terms *************)
+
+theorem feqx_tneqx_repl_dx: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ →
+ ∀U1,U2. ❪G1,L1,U1❫ ≛ ❪G2,L2,U2❫ →
+ (T2 ≛ U2 → ⊥) → (T1 ≛ U1 → ⊥).
+#G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1
+elim (feqx_inv_gen_sn … HT) -HT #_ #_ #HT
+elim (feqx_inv_gen_sn … HU) -HU #_ #_ #HU
+/3 width=5 by teqx_repl/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_fqup.ma".
+include "static_2/static/feqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
+
+(* Properties with sort-irrelevant equivalence for terms ********************)
+
+lemma teqx_feqx: ∀T1,T2. T1 ≛ T2 →
+ ∀G,L. ❪G,L,T1❫ ≛ ❪G,L,T2❫.
+/2 width=1 by feqx_intro_sn/ qed.
+
+(* Advanced properties ******************************************************)
+
+lemma feqx_refl: tri_reflexive … feqx.
+/2 width=1 by feqx_intro_sn/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_fqus.ma".
+include "static_2/static/feqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
+
+(* Properties with star-iterated structural successor for closures **********)
+
+lemma feqx_fqus_trans (b):
+ ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛ ❪G,L,T❫ →
+ ∀G2,L2,T2. ❪G,L,T❫ ⬂*[b] ❪G2,L2,T2❫ →
+ ∃∃G,L0,T0. ❪G1,L1,T1❫ ⬂*[b] ❪G,L0,T0❫ & ❪G,L0,T0❫ ≛ ❪G2,L2,T2❫.
+#b #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2
+elim(feqx_inv_gen_dx … H1) -H1 #HG #HL1 #HT1 destruct
+elim (reqx_fqus_trans … H2 … HL1) -L #L #T0 #H2 #HT02 #HL2
+elim (teqx_fqus_trans … H2 … HT1) -T #L0 #T #H2 #HT0 #HL0
+lapply (teqx_reqx_conf_sn … HT02 … HL0) -HL0 #HL0
+/4 width=7 by feqx_intro_dx, reqx_trans, teqx_trans, ex2_3_intro/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_req.ma".
+include "static_2/static/feqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
+
+(* Properties with syntactic equivalence on referred entries ****************)
+
+lemma req_feqx_trans: ∀L1,L,T1. L1 ≡[T1] L →
+ ∀G1,G2,L2,T2. ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
+#L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H
+elim (feqx_inv_gen_sn … H) -H #H #HL2 #T12 destruct
+/3 width=3 by feqx_intro_sn, req_reqx_trans/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/notation/relations/ideqsn_3.ma".
+include "static_2/static/rex.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Basic_2A1: was: lleq *)
+definition req: relation3 term lenv lenv ≝
+ rex ceq.
+
+interpretation
+ "syntactic equivalence on referred entries (local environment)"
+ 'IdEqSn T L1 L2 = (req T L1 L2).
+
+(* Note: "R_transitive_req R" is equivalent to "R_transitive_rex ceq R R" *)
+(* Basic_2A1: uses: lleq_transitive *)
+definition R_transitive_req: predicate (relation3 lenv term term) ≝
+ λR. ∀L2,T1,T2. R L2 T1 T2 → ∀L1. L1 ≡[T1] L2 → R L1 T1 T2.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma req_inv_bind:
+ ∀p,I,L1,L2,V,T. L1 ≡[ⓑ[p,I]V.T] L2 →
+ ∧∧ L1 ≡[V] L2 & L1.ⓑ[I]V ≡[T] L2.ⓑ[I]V.
+/2 width=2 by rex_inv_bind/ qed-.
+
+lemma req_inv_flat:
+ ∀I,L1,L2,V,T. L1 ≡[ⓕ[I]V.T] L2 →
+ ∧∧ L1 ≡[V] L2 & L1 ≡[T] L2.
+/2 width=2 by rex_inv_flat/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma req_inv_zero_pair_sn:
+ ∀I,L2,K1,V. K1.ⓑ[I]V ≡[#0] L2 →
+ ∃∃K2. K1 ≡[V] K2 & L2 = K2.ⓑ[I]V.
+#I #L2 #K1 #V #H
+elim (rex_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma req_inv_zero_pair_dx:
+ ∀I,L1,K2,V. L1 ≡[#0] K2.ⓑ[I]V →
+ ∃∃K1. K1 ≡[V] K2 & L1 = K1.ⓑ[I]V.
+#I #L1 #K2 #V #H
+elim (rex_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct
+/2 width=3 by ex2_intro/
+qed-.
+
+lemma req_inv_lref_bind_sn:
+ ∀I1,K1,L2,i. K1.ⓘ[I1] ≡[#↑i] L2 →
+ ∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ[I2].
+/2 width=2 by rex_inv_lref_bind_sn/ qed-.
+
+lemma req_inv_lref_bind_dx:
+ ∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ[I2] →
+ ∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ[I1].
+/2 width=2 by rex_inv_lref_bind_dx/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+(* Basic_2A1: was: llpx_sn_lrefl *)
+(* Basic_2A1: this should have been lleq_fwd_llpx_sn *)
+lemma req_fwd_rex (R):
+ c_reflexive … R →
+ ∀L1,L2,T. L1 ≡[T] L2 → L1 ⪤[R,T] L2.
+#R #HR #L1 #L2 #T * #f #Hf #HL12
+/4 width=7 by sex_co, cext2_co, ex2_intro/
+qed-.
+
+(* Basic_properties *********************************************************)
+
+lemma frees_req_conf:
+ ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f →
+ ∀L2. L1 ≡[T] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f.
+#f #L1 #T #H elim H -f -L1 -T
+[ /2 width=3 by frees_sort/
+| #f #i #Hf #L2 #H2
+ >(rex_inv_atom_sn … H2) -L2
+ /2 width=1 by frees_atom/
+| #f #I #L1 #V1 #_ #IH #Y #H2
+ elim (req_inv_zero_pair_sn … H2) -H2 #L2 #HL12 #H destruct
+ /3 width=1 by frees_pair/
+| #f #I #L1 #Hf #Y #H2
+ elim (rex_inv_zero_unit_sn … H2) -H2 #g #L2 #_ #_ #H destruct
+ /2 width=1 by frees_unit/
+| #f #I #L1 #i #_ #IH #Y #H2
+ elim (req_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct
+ /3 width=1 by frees_lref/
+| /2 width=1 by frees_gref/
+| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2
+ elim (req_inv_bind … H2) -H2 /3 width=5 by frees_bind/
+| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2
+ elim (req_inv_flat … H2) -H2 /3 width=5 by frees_flat/
+]
+qed-.
+
+(* Basic_2A1: removed theorems 10:
+ lleq_ind lleq_fwd_lref
+ lleq_fwd_drop_sn lleq_fwd_drop_dx
+ lleq_skip lleq_lref lleq_free
+ lleq_Y lleq_ge_up lleq_ge
+
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_drops.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Note: req_inv_lifts_dx missing in basic_2A1 *)
+
+(* Basic_2A1: uses: lleq_inv_lift_le lleq_inv_lift_be lleq_inv_lift_ge *)
+lemma req_inv_lifts_bi: ∀L1,L2,U. L1 ≡[U] L2 → ∀b,f. 𝐔❪f❫ →
+ ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
+ ∀T. ⇧*[f] T ≘ U → K1 ≡[T] K2.
+/2 width=10 by rex_inv_lifts_bi/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_fqup.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: was: lleq_refl *)
+lemma req_refl: ∀T. reflexive … (req T).
+/2 width=1 by rex_refl/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_length.ma".
+include "static_2/static/rex_fsle.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Advanved properties with free variables inclusion ************************)
+
+lemma req_fsge_comp:
+ rex_fsge_compatible ceq.
+#L1 #L2 #T #H elim H #f1 #Hf1 #HL12
+lapply (frees_req_conf … Hf1 … H) -H
+lapply (sex_fwd_length … HL12)
+/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lleq_sym *)
+lemma req_sym (T):
+ symmetric … (req T).
+/3 width=1 by req_fsge_comp, rex_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqx.ma".
+include "static_2/static/rex_drops.ma".
+include "static_2/static/reqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
+
+(* Properties with generic slicing for local environments *******************)
+
+lemma reqx_lifts_sn: f_dedropable_sn cdeq.
+/3 width=5 by rex_liftable_dedropable_sn, teqx_lifts_sn/ qed-.
+
+(* Inversion lemmas with generic slicing for local environments *************)
+
+lemma reqx_inv_lifts_sn: f_dropable_sn cdeq.
+/2 width=5 by rex_dropable_sn/ qed-.
+
+lemma reqx_inv_lifts_dx: f_dropable_dx cdeq.
+/2 width=5 by rex_dropable_dx/ qed-.
+
+lemma reqx_inv_lifts_bi: ∀L1,L2,U. L1 ≛[U] L2 → ∀b,f. 𝐔❪f❫ →
+ ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
+ ∀T. ⇧*[f] T ≘ U → K1 ≛[T] K2.
+/2 width=10 by rex_inv_lifts_bi/ qed-.
+
+lemma reqx_inv_lref_pair_sn: ∀L1,L2,i. L1 ≛[#i] L2 → ∀I,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 →
+ ∃∃K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 & K1 ≛[V1] K2 & V1 ≛ V2.
+/2 width=3 by rex_inv_lref_pair_sn/ qed-.
+
+lemma reqx_inv_lref_pair_dx: ∀L1,L2,i. L1 ≛[#i] L2 → ∀I,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 →
+ ∃∃K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 & K1 ≛[V1] K2 & V1 ≛ V2.
+/2 width=3 by rex_inv_lref_pair_dx/ qed-.
+
+lemma reqx_inv_lref_pair_bi (L1) (L2) (i):
+ L1 ≛[#i] L2 →
+ ∀I1,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I1]V1 →
+ ∀I2,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I2]V2 →
+ ∧∧ K1 ≛[V1] K2 & V1 ≛ V2 & I1 = I2.
+/2 width=6 by rex_inv_lref_pair_bi/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_fqup.ma".
+include "static_2/static/reqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
+
+(* Advanced properties ******************************************************)
+
+lemma reqx_refl: ∀T. reflexive … (reqx T).
+/2 width=1 by rex_refl/ qed.
+
+lemma reqx_pair_refl: ∀V1,V2. V1 ≛ V2 →
+ ∀I,L. ∀T:term. L.ⓑ[I]V1 ≛[T] L.ⓑ[I]V2.
+/2 width=1 by rex_pair_refl/ qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma reqx_inv_bind_void: ∀p,I,L1,L2,V,T. L1 ≛[ⓑ[p,I]V.T] L2 →
+ L1 ≛[V] L2 ∧ L1.ⓧ ≛[T] L2.ⓧ.
+/2 width=3 by rex_inv_bind_void/ qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma reqx_fwd_bind_dx_void: ∀p,I,L1,L2,V,T.
+ L1 ≛[ⓑ[p,I]V.T] L2 → L1.ⓧ ≛[T] L2.ⓧ.
+/2 width=4 by rex_fwd_bind_dx_void/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/s_computation/fqus_fqup.ma".
+include "static_2/static/reqx_drops.ma".
+include "static_2/static/reqx_fqup.ma".
+include "static_2/static/reqx_reqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
+
+(* Properties with extended structural successor for closures ***************)
+
+lemma fqu_teqx_conf (b):
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ →
+ ∀U2. U1 ≛ U2 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & L2 ≛[T1] L & T1 ≛ T2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1
+[ #I #G #L #W #X #H >(teqx_inv_lref1 … H) -X
+ /2 width=5 by fqu_lref_O, ex3_2_intro/
+| #I #G #L #W1 #U1 #X #H
+ elim (teqx_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct
+ /2 width=5 by fqu_pair_sn, ex3_2_intro/
+| #p #I #G #L #W1 #U1 #Hb #X #H
+ elim (teqx_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
+ /3 width=5 by reqx_pair_refl, fqu_bind_dx, ex3_2_intro/
+| #p #I #G #L #W1 #U1 #Hb #X #H
+ elim (teqx_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
+ /3 width=5 by fqu_clear, ex3_2_intro/
+| #I #G #L #W1 #U1 #X #H
+ elim (teqx_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct
+ /2 width=5 by fqu_flat_dx, ex3_2_intro/
+| #I #G #L #T1 #U1 #HTU1 #U2 #HU12
+ elim (teqx_inv_lifts_sn … HU12 … HTU1) -U1
+ /3 width=5 by fqu_drop, ex3_2_intro/
+]
+qed-.
+
+lemma teqx_fqu_trans (b):
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛ U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21
+elim (fqu_teqx_conf … H12 U2) -H12
+/3 width=5 by reqx_sym, teqx_sym, ex3_2_intro/
+qed-.
+
+(* Basic_2A1: uses: lleq_fqu_trans *)
+lemma reqx_fqu_trans (b):
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U
+[ #I #G #L2 #V2 #L1 #H elim (reqx_inv_zero_pair_dx … H) -H
+ #K1 #V1 #HV1 #HV12 #H destruct
+ /3 width=7 by teqx_reqx_conf_sn, fqu_lref_O, ex3_2_intro/
+| * [ #p ] #I #G #L2 #V #T #L1 #H
+ [ elim (reqx_inv_bind … H)
+ | elim (reqx_inv_flat … H)
+ ] -H
+ /2 width=5 by fqu_pair_sn, ex3_2_intro/
+| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqx_inv_bind … H) -H
+ /3 width=5 by fqu_bind_dx, ex3_2_intro/
+| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqx_inv_bind_void … H) -H
+ /3 width=5 by fqu_clear, ex3_2_intro/
+| #I #G #L2 #V #T #L1 #H elim (reqx_inv_flat … H) -H
+ /2 width=5 by fqu_flat_dx, ex3_2_intro/
+| #I #G #L2 #T #U #HTU #Y #HU
+ elim (reqx_fwd_dx … HU) #L1 #V1 #H destruct
+ /5 width=14 by reqx_inv_lifts_bi, fqu_drop, drops_refl, drops_drop, ex3_2_intro/
+]
+qed-.
+
+(* Properties with optional structural successor for closures ***************)
+
+lemma teqx_fquq_trans (b):
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛ U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂⸮[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H
+[ #H #U2 #HU21 elim (teqx_fqu_trans … H … HU21) -U1
+ /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was just: lleq_fquq_trans *)
+lemma reqx_fquq_trans (b):
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂⸮[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂⸮[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H elim H -H
+[ #H #L1 #HL12 elim (reqx_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+(* Properties with plus-iterated structural successor for closures **********)
+
+(* Basic_2A1: was just: lleq_fqup_trans *)
+lemma reqx_fqup_trans (b):
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂+[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂+[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U
+[ #G2 #K2 #U #HTU #L1 #HL12 elim (reqx_fqu_trans … HTU … HL12) -L2
+ /3 width=5 by fqu_fqup, ex3_2_intro/
+| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12
+ elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0
+ elim (reqx_fqu_trans … HU2 … HK0) -K #K1 #U1 #HU1 #HU12 #HK12
+ elim (teqx_fqu_trans … HU1 … HU0) -U #K3 #U3 #HU03 #HU31 #HK31
+ @(ex3_2_intro … K3 U3) (**) (* full auto too slow *)
+ /3 width=5 by reqx_trans, teqx_reqx_conf_sn, fqup_strap1, teqx_trans/
+]
+qed-.
+
+lemma teqx_fqup_trans (b):
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛ U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂+[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1
+[ #G1 #L1 #U1 #H #U2 #HU21 elim (teqx_fqu_trans … H … HU21) -U1
+ /3 width=5 by fqu_fqup, ex3_2_intro/
+| #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21
+ elim (teqx_fqu_trans … H … HU21) -U1 #L0 #T #H1 #HTU #HL0
+ lapply (teqx_reqx_div … HTU … HL0) -HL0 #HL0
+ elim (IH … HTU) -U #K2 #U1 #H2 #HUT1 #HKL2
+ elim (reqx_fqup_trans … H2 … HL0) -L #K #U #H2 #HU1 #HK2
+ lapply (teqx_reqx_conf_sn … HUT1 … HK2) -HK2 #HK2
+ /3 width=7 by reqx_trans, fqup_strap2, teqx_trans, ex3_2_intro/
+]
+qed-.
+
+(* Properties with star-iterated structural successor for closures **********)
+
+lemma teqx_fqus_trans (b):
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛ U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂*[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
+#b #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H
+[ #H elim (teqx_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/
+| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was just: lleq_fqus_trans *)
+lemma reqx_fqus_trans (b):
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂*[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂*[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
+#b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H
+[ #H elim (reqx_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/
+| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqx.ma".
+include "static_2/static/rex_length.ma".
+include "static_2/static/rex_fsle.ma".
+include "static_2/static/reqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
+
+(* Advanved properties with free variables inclusion ************************)
+
+lemma reqx_fsge_comp: rex_fsge_compatible cdeq.
+#L1 #L2 #T * #f1 #Hf1 #HL12
+lapply (frees_reqx_conf … Hf1 … HL12)
+lapply (sex_fwd_length … HL12)
+/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
+qed-.
+
+(* Properties with length for local environments ****************************)
+
+(* Basic_2A1: uses: lleq_sort *)
+lemma reqx_sort_length: ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[⋆s] L2.
+/2 width=1 by rex_sort_length/ qed.
+
+(* Basic_2A1: uses: lleq_gref *)
+lemma reqx_gref_length: ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[§l] L2.
+/2 width=1 by rex_gref_length/ qed.
+
+lemma reqx_unit_length: ∀L1,L2. |L1| = |L2| →
+ ∀I. L1.ⓤ[I] ≛[#0] L2.ⓤ[I].
+/2 width=1 by rex_unit_length/ qed.
+
+(* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *)
+lemma reqx_lifts_bi: ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[T] K2 →
+ ∀b,f. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
+ ∀U. ⇧*[f] T ≘ U → L1 ≛[U] L2.
+/3 width=9 by rex_lifts_bi, teqx_lifts_sn/ qed-.
+
+(* Forward lemmas with length for local environments ************************)
+
+(* Basic_2A1: lleq_fwd_length *)
+lemma reqx_fwd_length: ∀L1,L2. ∀T:term. L1 ≛[T] L2 → |L1| = |L2|.
+/2 width=3 by rex_fwd_length/ qed-.
(**************************************************************************)
include "static_2/relocation/lex_tc.ma".
-include "static_2/static/req_fqup.ma".
-include "static_2/static/req_fsle.ma".
+include "static_2/static/reqg_fqup.ma".
+include "static_2/static/req_req.ma".
include "static_2/i_static/rexs_fqup.ma".
(* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***)
#R #H1R #H2R #H3R #H4R #L1 #L2 #T #H
lapply (s_rs_transitive_lex_inv_isid … H3R) -H3R #H3R
@(rexs_ind_sn … H1R … H) -H -L2
-[ /4 width=3 by req_refl, lex_refl, inj, ex2_intro/
+[ /4 width=3 by reqg_refl, lex_refl, inj, ex2_intro/
| #L0 #L2 #_ #HL02 * #L * #f0 #Hf0 #HL1 #HL0
lapply (req_rex_trans … HL0 … HL02) -L0 // * #f1 #Hf1 #HL2
elim (sex_sdj_split_sn … ceq_ext … HL2 f0 ?) -HL2
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( L1 ≅[ break term 46 T ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'ApproxEqSn $T $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ❪ term 46 G1, break term 46 L1, break term 46 T1 ❫ ≅ ❪ break term 46 G2, break term 46 L2, break term 46 T2 ❫ )"
+ non associative with precedence 45
+ for @{ 'ApproxEqSn $G1 $L1 $T1 $G2 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( L ⊢ break term 46 T1 ≡ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'IdEq $L $T1 $T2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( T1 ≛ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'StarEq $T1 $T2 }.
(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-notation "hvbox( L ⊢ break term 46 T1 ≛ break term 46 T2 )"
+notation "hvbox( T1 ≛[ break term 46 S ] break term 46 T2 )"
non associative with precedence 45
- for @{ 'StarEq $L $T1 $T2 }.
+ for @{ 'StarEq $S $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( L ⊢ break term 46 T1 ≛[ break term 46 S ] break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'StarEq $S $L $T1 $T2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( L1 ≛[ break term 46 T ] break term 46 L2 )"
- non associative with precedence 45
- for @{ 'StarEqSn $T $L1 $L2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( L1 ≛[ break term 46 S, break term 46 T ] break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'StarEqSn $S $T $L1 $L2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( ❪ term 46 G1, break term 46 L1, break term 46 T1 ❫ ≛ ❪ break term 46 G2, break term 46 L2, break term 46 T2 ❫ )"
- non associative with precedence 45
- for @{ 'StarEqSn $G1 $L1 $T1 $G2 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( ❪ term 46 G1, break term 46 L1, break term 46 T1 ❫ ≛[ break term 46 S ] ❪ break term 46 G2, break term 46 L2, break term 46 T2 ❫ )"
+ non associative with precedence 45
+ for @{ 'StarEqSn $S $G1 $L1 $T1 $G2 $L2 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( T1 ~ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'Tilde $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
+
+notation "hvbox( T1 ≃ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'TildeMinus $T1 $T2 }.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-(* NOTATION FOR THE FORMAL SYSTEM λδ ****************************************)
-
-notation "hvbox( T1 ⩳ break term 46 T2 )"
- non associative with precedence 45
- for @{ 'TopIso $T1 $T2 }.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqg.ma".
+include "static_2/relocation/lifts_lifts.ma".
+
+(* GENERIC RELOCATION FOR TERMS *********************************************)
+
+(* Properties with generic equivalence for terms ****************************)
+
+lemma teqg_lifts_sn (S):
+ liftable2_sn (teqg S).
+#S #T1 #T2 #H elim H -T1 -T2 [||| * ]
+[ #s1 #s2 #Hs #f #X #H >(lifts_inv_sort1 … H) -H
+ /3 width=3 by lifts_sort, teqg_sort, ex2_intro/
+| #i #f #X #H elim (lifts_inv_lref1 … H) -H
+ /3 width=3 by lifts_lref, teqg_lref, ex2_intro/
+| #l #f #X #H >(lifts_inv_gref1 … H) -H
+ /2 width=3 by lifts_gref, teqg_gref, ex2_intro/
+| #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H
+ #W1 #U1 #HVW1 #HTU1 #H destruct
+ elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1
+ /3 width=5 by lifts_bind, teqg_pair, ex2_intro/
+| #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H
+ #W1 #U1 #HVW1 #HTU1 #H destruct
+ elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1
+ /3 width=5 by lifts_flat, teqg_pair, ex2_intro/
+]
+qed-.
+
+(**) (* symmetry not needed *)
+lemma teqg_lifts_dx (S):
+ symmetric … S → liftable2_dx (teqg S).
+/3 width=3 by teqg_lifts_sn, liftable2_sn_dx, teqg_sym/ qed-.
+
+lemma teqg_lifts_bi (S):
+ liftable2_bi (teqg S).
+/3 width=6 by teqg_lifts_sn, liftable2_sn_bi/ qed-.
+
+(* Inversion lemmas with sort-irrelevant equivalence for terms **************)
+
+lemma teqg_inv_lifts_sn (S):
+ deliftable2_sn (teqg S).
+#S #U1 #U2 #H elim H -U1 -U2 [||| * ]
+[ #s1 #s2 #Hs #f #X #H >(lifts_inv_sort2 … H) -H
+ /3 width=3 by lifts_sort, teqg_sort, ex2_intro/
+| #i #f #X #H elim (lifts_inv_lref2 … H) -H
+ /3 width=3 by lifts_lref, teqg_lref, ex2_intro/
+| #l #f #X #H >(lifts_inv_gref2 … H) -H
+ /2 width=3 by lifts_gref, teqg_gref, ex2_intro/
+| #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H
+ #V1 #T1 #HVW1 #HTU1 #H destruct
+ elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1
+ /3 width=5 by lifts_bind, teqg_pair, ex2_intro/
+| #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H
+ #V1 #T1 #HVW1 #HTU1 #H destruct
+ elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1
+ /3 width=5 by lifts_flat, teqg_pair, ex2_intro/
+]
+qed-.
+
+(**) (* symmetry not needed *)
+lemma teqg_inv_lifts_dx (S):
+ symmetric … S → deliftable2_dx (teqg S).
+/3 width=3 by teqg_inv_lifts_sn, deliftable2_sn_dx, teqg_sym/ qed-.
+
+lemma teqg_inv_lifts_bi (S):
+ deliftable2_bi (teqg S).
+/3 width=6 by teqg_inv_lifts_sn, deliftable2_sn_bi/ qed-.
+
+lemma teqg_lifts_inv_pair_sn (S) (I) (f):
+ ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≛[S] X → ⊥.
+#S #I #f #X #T #H elim H -f -X -T
+[ #f #s #V #H
+ elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
+| #f #i #j #_ #V #H
+ elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
+| #f #l #V #H
+ elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
+| #f #p #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H
+ elim (teqg_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct
+ /2 width=2 by/
+| #f #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H
+ elim (teqg_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct
+ /2 width=2 by/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqw.ma".
+include "static_2/relocation/lifts_lifts.ma".
+
+(* GENERIC RELOCATION FOR TERMS *********************************************)
+
+(* Properties with sort-irrelevant whd equivalence for terms ****************)
+
+lemma teqw_lifts_sn: liftable2_sn teqw.
+#T1 #T2 #H elim H -T1 -T2
+[ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H
+ /3 width=3 by lifts_sort, teqw_sort, ex2_intro/
+| #i #f #X #H elim (lifts_inv_lref1 … H) -H
+ /3 width=3 by lifts_lref, teqw_lref, ex2_intro/
+| #l #f #X #H >(lifts_inv_gref1 … H) -H
+ /2 width=3 by lifts_gref, teqw_gref, ex2_intro/
+| #p #V1 #V2 #T1 #T2 #_ #IHT #f #X #H
+ elim (lifts_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
+ elim (lifts_total V2 f) #W2 #HVW2
+ elim (true_or_false p) #H destruct
+ [ elim (IHT … HTU1) -T1 [| // ] #U2 #HTU2 #HU12
+ | elim (lifts_total T2 (⫯f)) #U2 #HTU2
+ ]
+ /3 width=4 by teqw_abbr_pos, lifts_bind, ex2_intro/
+| #p #V1 #V2 #T1 #T2 #f #X #H
+ elim (lifts_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
+ elim (lifts_total V2 f) #W2 #HVW2
+ elim (lifts_total T2 (⫯f)) #U2 #HTU2
+ /3 width=3 by lifts_bind, ex2_intro/
+| #V1 #V2 #T1 #T2 #_ #IHT #f #X #H
+ elim (lifts_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
+ elim (lifts_total V2 f) #W2 #HVW2
+ elim (IHT … HTU1) -T1 #U2 #HTU2 #HU12
+ /3 width=4 by lifts_flat, teqw_appl, ex2_intro/
+| #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H
+ elim (lifts_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
+ elim (IHV … HVW1) -V1 #W2 #HVW2 #HW12
+ elim (IHT … HTU1) -T1 #U2 #HTU2 #HU12
+ /3 width=5 by lifts_flat, teqw_cast, ex2_intro/
+]
+qed-.
+
+lemma teqw_lifts_dx: liftable2_dx teqw.
+/3 width=3 by teqw_lifts_sn, liftable2_sn_dx, teqw_sym/ qed-.
+
+lemma teqw_lifts_bi: liftable2_bi teqw.
+/3 width=6 by teqw_lifts_sn, liftable2_sn_bi/ qed-.
+
+(* Inversion lemmas with sort-irrelevant whd equivalence for terms **********)
+
+lemma teqw_inv_lifts_bi: deliftable2_bi teqw.
+#U1 #U2 #H elim H -U1 -U2
+[ #s1 #s2 #f #X1 #H1 #X2 #H2
+ >(lifts_inv_sort2 … H1) -H1 >(lifts_inv_sort2 … H2) -H2
+ /1 width=1 by teqw_sort/
+| #j #f #X1 #H1 #X2 #H2
+ elim (lifts_inv_lref2 … H1) -H1 #i1 #Hj1 #H destruct
+ elim (lifts_inv_lref2 … H2) -H2 #i2 #Hj2 #H destruct
+ <(at_inj … Hj2 … Hj1) -j -f -i1
+ /1 width=1 by teqw_lref/
+| #l #f #X1 #H1 #X2 #H2
+ >(lifts_inv_gref2 … H1) -H1 >(lifts_inv_gref2 … H2) -H2
+ /1 width=1 by teqw_gref/
+| #p #W1 #W2 #U1 #U2 #_ #IH #f #X1 #H1 #X2 #H2
+ elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #HTU1 #H destruct -W1
+ elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #HTU2 #H destruct -W2
+ elim (true_or_false p) #H destruct
+ [ /3 width=3 by teqw_abbr_pos/
+ | /1 width=1 by teqw_abbr_neg/
+ ]
+| #p #W1 #W2 #U1 #U2 #f #X1 #H1 #X2 #H2
+ elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #_ #H destruct -W1 -U1
+ elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #_ #H destruct -W2 -U2
+ /1 width=1 by teqw_abst/
+| #W1 #W2 #U1 #U2 #_ #IH #f #X1 #H1 #X2 #H2
+ elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #_ #HTU1 #H destruct -W1
+ elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #_ #HTU2 #H destruct -W2
+ /3 width=3 by teqw_appl/
+| #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X1 #H1 #X2 #H2
+ elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #HVW1 #HTU1 #H destruct
+ elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #HVW2 #HTU2 #H destruct
+ /3 width=3 by teqw_cast/
+]
+qed-.
+
+lemma teqw_inv_abbr_pos_x_lifts_y_y (T) (f):
+ ∀V,U. +ⓓV.U ≃ T → ⇧*[f]T ≘ U → ⊥.
+@(f_ind … tw) #n #IH #T #Hn #f #V #U #H1 #H2 destruct
+elim (teqw_inv_abbr_pos_sn … H1) -H1 #X1 #X2 #HX2 #H destruct -V
+elim (lifts_inv_bind1 … H2) -H2 #Y1 #Y2 #_ #HXY2 #H destruct
+/2 width=7 by/
+qed-.
(* *)
(**************************************************************************)
+include "static_2/relocation/lifts_teqg.ma".
include "static_2/syntax/teqx.ma".
-include "static_2/relocation/lifts_lifts.ma".
(* GENERIC RELOCATION FOR TERMS *********************************************)
(* Properties with sort-irrelevant equivalence for terms ********************)
lemma teqx_lifts_sn: liftable2_sn teqx.
-#T1 #T2 #H elim H -T1 -T2 [||| * ]
-[ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H
- /3 width=3 by lifts_sort, teqx_sort, ex2_intro/
-| #i #f #X #H elim (lifts_inv_lref1 … H) -H
- /3 width=3 by lifts_lref, teqx_lref, ex2_intro/
-| #l #f #X #H >(lifts_inv_gref1 … H) -H
- /2 width=3 by lifts_gref, teqx_gref, ex2_intro/
-| #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_bind1 … H) -H
- #W1 #U1 #HVW1 #HTU1 #H destruct
- elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1
- /3 width=5 by lifts_bind, teqx_pair, ex2_intro/
-| #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H elim (lifts_inv_flat1 … H) -H
- #W1 #U1 #HVW1 #HTU1 #H destruct
- elim (IHV … HVW1) -V1 elim (IHT … HTU1) -T1
- /3 width=5 by lifts_flat, teqx_pair, ex2_intro/
-]
-qed-.
+/2 width=3 by teqg_lifts_sn/ qed-.
lemma teqx_lifts_dx: liftable2_dx teqx.
-/3 width=3 by teqx_lifts_sn, liftable2_sn_dx, teqx_sym/ qed-.
+/2 width=3 by teqg_lifts_dx/ qed-.
lemma teqx_lifts_bi: liftable2_bi teqx.
-/3 width=6 by teqx_lifts_sn, liftable2_sn_bi/ qed-.
+/2 width=6 by teqg_lifts_bi/ qed-.
(* Inversion lemmas with sort-irrelevant equivalence for terms **************)
lemma teqx_inv_lifts_sn: deliftable2_sn teqx.
-#U1 #U2 #H elim H -U1 -U2 [||| * ]
-[ #s1 #s2 #f #X #H >(lifts_inv_sort2 … H) -H
- /3 width=3 by lifts_sort, teqx_sort, ex2_intro/
-| #i #f #X #H elim (lifts_inv_lref2 … H) -H
- /3 width=3 by lifts_lref, teqx_lref, ex2_intro/
-| #l #f #X #H >(lifts_inv_gref2 … H) -H
- /2 width=3 by lifts_gref, teqx_gref, ex2_intro/
-| #p #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_bind2 … H) -H
- #V1 #T1 #HVW1 #HTU1 #H destruct
- elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1
- /3 width=5 by lifts_bind, teqx_pair, ex2_intro/
-| #I #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X #H elim (lifts_inv_flat2 … H) -H
- #V1 #T1 #HVW1 #HTU1 #H destruct
- elim (IHW … HVW1) -W1 elim (IHU … HTU1) -U1
- /3 width=5 by lifts_flat, teqx_pair, ex2_intro/
-]
-qed-.
+/2 width=3 by teqg_inv_lifts_sn/ qed-.
lemma teqx_inv_lifts_dx: deliftable2_dx teqx.
-/3 width=3 by teqx_inv_lifts_sn, deliftable2_sn_dx, teqx_sym/ qed-.
+/2 width=3 by teqg_inv_lifts_dx/ qed-.
lemma teqx_inv_lifts_bi: deliftable2_bi teqx.
-/3 width=6 by teqx_inv_lifts_sn, deliftable2_sn_bi/ qed-.
+/2 width=6 by teqg_inv_lifts_bi/ qed-.
lemma teqx_lifts_inv_pair_sn (I) (f):
- ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≛ X → ⊥.
-#I #f #X #T #H elim H -f -X -T
-[ #f #s #V #H
- elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
-| #f #i #j #_ #V #H
- elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
-| #f #l #V #H
- elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
-| #f #p #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H
- elim (teqx_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct
- /2 width=2 by/
-| #f #J #X1 #T1 #X2 #T2 #_ #_ #_ #IH2 #V #H
- elim (teqx_inv_pair1 … H) -H #Z1 #Z2 #_ #HZ2 #H destruct
- /2 width=2 by/
-]
-qed-.
+ ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≅ X → ⊥.
+/2 width=8 by teqg_lifts_inv_pair_sn/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/tweq.ma".
-include "static_2/relocation/lifts_lifts.ma".
-
-(* GENERIC RELOCATION FOR TERMS *********************************************)
-
-(* Properties with sort-irrelevant whd equivalence for terms ****************)
-
-lemma tweq_lifts_sn: liftable2_sn tweq.
-#T1 #T2 #H elim H -T1 -T2
-[ #s1 #s2 #f #X #H >(lifts_inv_sort1 … H) -H
- /3 width=3 by lifts_sort, tweq_sort, ex2_intro/
-| #i #f #X #H elim (lifts_inv_lref1 … H) -H
- /3 width=3 by lifts_lref, tweq_lref, ex2_intro/
-| #l #f #X #H >(lifts_inv_gref1 … H) -H
- /2 width=3 by lifts_gref, tweq_gref, ex2_intro/
-| #p #V1 #V2 #T1 #T2 #_ #IHT #f #X #H
- elim (lifts_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
- elim (lifts_total V2 f) #W2 #HVW2
- elim (true_or_false p) #H destruct
- [ elim (IHT … HTU1) -T1 [| // ] #U2 #HTU2 #HU12
- | elim (lifts_total T2 (⫯f)) #U2 #HTU2
- ]
- /3 width=4 by tweq_abbr_pos, lifts_bind, ex2_intro/
-| #p #V1 #V2 #T1 #T2 #f #X #H
- elim (lifts_inv_bind1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
- elim (lifts_total V2 f) #W2 #HVW2
- elim (lifts_total T2 (⫯f)) #U2 #HTU2
- /3 width=3 by lifts_bind, ex2_intro/
-| #V1 #V2 #T1 #T2 #_ #IHT #f #X #H
- elim (lifts_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
- elim (lifts_total V2 f) #W2 #HVW2
- elim (IHT … HTU1) -T1 #U2 #HTU2 #HU12
- /3 width=4 by lifts_flat, tweq_appl, ex2_intro/
-| #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f #X #H
- elim (lifts_inv_flat1 … H) -H #W1 #U1 #HVW1 #HTU1 #H destruct
- elim (IHV … HVW1) -V1 #W2 #HVW2 #HW12
- elim (IHT … HTU1) -T1 #U2 #HTU2 #HU12
- /3 width=5 by lifts_flat, tweq_cast, ex2_intro/
-]
-qed-.
-
-lemma tweq_lifts_dx: liftable2_dx tweq.
-/3 width=3 by tweq_lifts_sn, liftable2_sn_dx, tweq_sym/ qed-.
-
-lemma tweq_lifts_bi: liftable2_bi tweq.
-/3 width=6 by tweq_lifts_sn, liftable2_sn_bi/ qed-.
-
-(* Inversion lemmas with sort-irrelevant whd equivalence for terms **********)
-
-lemma tweq_inv_lifts_bi: deliftable2_bi tweq.
-#U1 #U2 #H elim H -U1 -U2
-[ #s1 #s2 #f #X1 #H1 #X2 #H2
- >(lifts_inv_sort2 … H1) -H1 >(lifts_inv_sort2 … H2) -H2
- /1 width=1 by tweq_sort/
-| #j #f #X1 #H1 #X2 #H2
- elim (lifts_inv_lref2 … H1) -H1 #i1 #Hj1 #H destruct
- elim (lifts_inv_lref2 … H2) -H2 #i2 #Hj2 #H destruct
- <(at_inj … Hj2 … Hj1) -j -f -i1
- /1 width=1 by tweq_lref/
-| #l #f #X1 #H1 #X2 #H2
- >(lifts_inv_gref2 … H1) -H1 >(lifts_inv_gref2 … H2) -H2
- /1 width=1 by tweq_gref/
-| #p #W1 #W2 #U1 #U2 #_ #IH #f #X1 #H1 #X2 #H2
- elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #HTU1 #H destruct -W1
- elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #HTU2 #H destruct -W2
- elim (true_or_false p) #H destruct
- [ /3 width=3 by tweq_abbr_pos/
- | /1 width=1 by tweq_abbr_neg/
- ]
-| #p #W1 #W2 #U1 #U2 #f #X1 #H1 #X2 #H2
- elim (lifts_inv_bind2 … H1) -H1 #V1 #T1 #_ #_ #H destruct -W1 -U1
- elim (lifts_inv_bind2 … H2) -H2 #V2 #T2 #_ #_ #H destruct -W2 -U2
- /1 width=1 by tweq_abst/
-| #W1 #W2 #U1 #U2 #_ #IH #f #X1 #H1 #X2 #H2
- elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #_ #HTU1 #H destruct -W1
- elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #_ #HTU2 #H destruct -W2
- /3 width=3 by tweq_appl/
-| #W1 #W2 #U1 #U2 #_ #_ #IHW #IHU #f #X1 #H1 #X2 #H2
- elim (lifts_inv_flat2 … H1) -H1 #V1 #T1 #HVW1 #HTU1 #H destruct
- elim (lifts_inv_flat2 … H2) -H2 #V2 #T2 #HVW2 #HTU2 #H destruct
- /3 width=3 by tweq_cast/
-]
-qed-.
-
-lemma tweq_inv_abbr_pos_x_lifts_y_y (T) (f):
- ∀V,U. +ⓓV.U ≅ T → ⇧*[f]T ≘ U → ⊥.
-@(f_ind … tw) #n #IH #T #Hn #f #V #U #H1 #H2 destruct
-elim (tweq_inv_abbr_pos_sn … H1) -H1 #X1 #X2 #HX2 #H destruct -V
-elim (lifts_inv_bind1 … H2) -H2 #Y1 #Y2 #_ #HXY2 #H destruct
-/2 width=7 by/
-qed-.
(**************************************************************************)
include "static_2/notation/relations/ideqsn_3.ma".
-include "static_2/syntax/ceq_ext.ma".
+include "static_2/syntax/teq_ext.ma".
include "static_2/relocation/sex.ma".
(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************)
(* Basic_2A1: includes: lreq_atom lreq_zero lreq_pair lreq_succ *)
-definition seq: relation3 rtmap lenv lenv ≝ sex ceq_ext cfull.
+definition seq: relation3 rtmap lenv lenv ≝
+ sex ceq_ext cfull.
interpretation
"syntactic equivalence on selected entries (local environment)"
(* Basic properties *********************************************************)
-lemma seq_eq_repl_back: ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2).
+lemma seq_eq_repl_back:
+ ∀L1,L2. eq_repl_back … (λf. L1 ≡[f] L2).
/2 width=3 by sex_eq_repl_back/ qed-.
-lemma seq_eq_repl_fwd: ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2).
+lemma seq_eq_repl_fwd:
+ ∀L1,L2. eq_repl_fwd … (λf. L1 ≡[f] L2).
/2 width=3 by sex_eq_repl_fwd/ qed-.
-lemma sle_seq_trans: ∀f2,L1,L2. L1 ≡[f2] L2 →
- ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2.
+lemma sle_seq_trans:
+ ∀f2,L1,L2. L1 ≡[f2] L2 →
+ ∀f1. f1 ⊆ f2 → L1 ≡[f1] L2.
/2 width=3 by sle_sex_trans/ qed-.
(* Basic_2A1: includes: lreq_refl *)
-lemma seq_refl: ∀f. reflexive … (seq f).
+lemma seq_refl (f):
+ reflexive … (seq f).
/2 width=1 by sex_refl/ qed.
(* Basic_2A1: includes: lreq_sym *)
-lemma seq_sym: ∀f. symmetric … (seq f).
-/3 width=2 by sex_sym, cext2_sym/ qed-.
+lemma seq_sym (f):
+ symmetric … (seq f).
+/3 width=1 by sex_sym, ceq_ext_sym/ qed-.
(* Basic inversion lemmas ***************************************************)
(* Basic_2A1: includes: lreq_inv_atom1 *)
-lemma seq_inv_atom1: ∀f,Y. ⋆ ≡[f] Y → Y = ⋆.
+lemma seq_inv_atom1 (f):
+ ∀Y. ⋆ ≡[f] Y → Y = ⋆.
/2 width=4 by sex_inv_atom1/ qed-.
(* Basic_2A1: includes: lreq_inv_pair1 *)
-lemma seq_inv_next1: ∀g,J,K1,Y. K1.ⓘ[J] ≡[↑g] Y →
- ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ[J].
+lemma seq_inv_next1 (g):
+ ∀J,K1,Y. K1.ⓘ[J] ≡[↑g] Y →
+ ∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ[J].
#g #J #K1 #Y #H
elim (sex_inv_next1 … H) -H #Z #K2 #HK12 #H1 #H2 destruct
<(ceq_ext_inv_eq … H1) -Z /2 width=3 by ex2_intro/
qed-.
(* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *)
-lemma seq_inv_push1: ∀g,J1,K1,Y. K1.ⓘ[J1] ≡[⫯g] Y →
- ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ[J2].
+lemma seq_inv_push1 (g):
+ ∀J1,K1,Y. K1.ⓘ[J1] ≡[⫯g] Y →
+ ∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ[J2].
#g #J1 #K1 #Y #H elim (sex_inv_push1 … H) -H /2 width=4 by ex2_2_intro/
qed-.
(* Basic_2A1: includes: lreq_inv_atom2 *)
-lemma seq_inv_atom2: ∀f,X. X ≡[f] ⋆ → X = ⋆.
+lemma seq_inv_atom2 (f):
+ ∀X. X ≡[f] ⋆ → X = ⋆.
/2 width=4 by sex_inv_atom2/ qed-.
(* Basic_2A1: includes: lreq_inv_pair2 *)
-lemma seq_inv_next2: ∀g,J,X,K2. X ≡[↑g] K2.ⓘ[J] →
- ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ[J].
+lemma seq_inv_next2 (g):
+ ∀J,X,K2. X ≡[↑g] K2.ⓘ[J] →
+ ∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ[J].
#g #J #X #K2 #H
elim (sex_inv_next2 … H) -H #Z #K1 #HK12 #H1 #H2 destruct
<(ceq_ext_inv_eq … H1) -J /2 width=3 by ex2_intro/
qed-.
(* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *)
-lemma seq_inv_push2: ∀g,J2,X,K2. X ≡[⫯g] K2.ⓘ[J2] →
- ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ[J1].
+lemma seq_inv_push2 (g):
+ ∀J2,X,K2. X ≡[⫯g] K2.ⓘ[J2] →
+ ∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ[J1].
#g #J2 #X #K2 #H elim (sex_inv_push2 … H) -H /2 width=4 by ex2_2_intro/
qed-.
(* Basic_2A1: includes: lreq_inv_pair *)
-lemma seq_inv_next: ∀f,I1,I2,L1,L2. L1.ⓘ[I1] ≡[↑f] L2.ⓘ[I2] →
- ∧∧ L1 ≡[f] L2 & I1 = I2.
+lemma seq_inv_next (f):
+ ∀I1,I2,L1,L2. L1.ⓘ[I1] ≡[↑f] L2.ⓘ[I2] →
+ ∧∧ L1 ≡[f] L2 & I1 = I2.
#f #I1 #I2 #L1 #L2 #H elim (sex_inv_next … H) -H
/3 width=3 by ceq_ext_inv_eq, conj/
qed-.
(* Basic_2A1: includes: lreq_inv_succ *)
-lemma seq_inv_push: ∀f,I1,I2,L1,L2. L1.ⓘ[I1] ≡[⫯f] L2.ⓘ[I2] → L1 ≡[f] L2.
+lemma seq_inv_push (f):
+ ∀I1,I2,L1,L2. L1.ⓘ[I1] ≡[⫯f] L2.ⓘ[I2] → L1 ≡[f] L2.
#f #I1 #I2 #L1 #L2 #H elim (sex_inv_push … H) -H /2 width=1 by conj/
qed-.
-lemma seq_inv_tl: ∀f,I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ[I] ≡[f] L2.ⓘ[I].
+lemma seq_inv_tl (f):
+ ∀I,L1,L2. L1 ≡[⫱f] L2 → L1.ⓘ[I] ≡[f] L2.ⓘ[I].
/2 width=1 by sex_inv_tl/ qed-.
(* Basic_2A1: removed theorems 5:
(* Forward lemmas with length for local environments ************************)
(* Basic_2A1: includes: lreq_fwd_length *)
-lemma seq_fwd_length: ∀f,L1,L2. L1 ≡[f] L2 → |L1| = |L2|.
+lemma seq_fwd_length (f):
+ ∀L1,L2. L1 ≡[f] L2 → |L1| = |L2|.
/2 width=4 by sex_fwd_length/ qed-.
(* *)
(**************************************************************************)
-include "static_2/syntax/ceq_ext_ceq_ext.ma".
+include "static_2/syntax/teq_ext_teq_ext.ma".
include "static_2/relocation/sex_sex.ma".
(* SYNTACTIC EQUIVALENCE FOR SELECTED LOCAL ENVIRONMENTS ********************)
(* Main properties **********************************************************)
-theorem seq_trans: ∀f. Transitive … (seq f).
+theorem seq_trans (f):
+ Transitive … (seq f).
/3 width=5 by sex_trans, ceq_ext_trans/ qed-.
-theorem seq_canc_sn: ∀f. left_cancellable … (seq f).
+theorem seq_canc_sn (f):
+ left_cancellable … (seq f).
/3 width=3 by sex_canc_sn, seq_trans, seq_sym/ qed-.
-theorem seq_canc_dx: ∀f. right_cancellable … (seq f).
+theorem seq_canc_dx (f):
+ right_cancellable … (seq f).
/3 width=3 by sex_canc_dx, seq_trans, seq_sym/ qed-.
-theorem seq_join: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 →
- ∀f. f1 ⋓ f2 ≘ f → L1 ≡[f] L2.
+theorem seq_join:
+ ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 →
+ ∀f. f1 ⋓ f2 ≘ f → L1 ≡[f] L2.
/2 width=5 by sex_join/ qed-.
-theorem seq_meet: ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 →
- ∀f. f1 ⋒ f2 ≘ f → L1 ≡[f] L2.
+theorem seq_meet:
+ ∀f1,L1,L2. L1 ≡[f1] L2 → ∀f2. L1 ≡[f2] L2 →
+ ∀f. f1 ⋒ f2 ≘ f → L1 ≡[f] L2.
/2 width=5 by sex_meet/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqg.ma".
+include "static_2/s_transition/fqu_length.ma".
+
+(* SUPCLOSURE ***************************************************************)
+
+(* Inversion lemmas with context-free generic equivalence for terms *********)
+
+fact fqu_inv_teqg_aux (S) (b):
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
+ G1 = G2 → |L1| = |L2| → T1 ≛[S] T2 → ⊥.
+#S #b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
+[1: #I #G #L #V #_ #H elim (succ_inv_refl_sn … H)
+|6: #I #G #L #T #U #_ #_ #H elim (succ_inv_refl_sn … H)
+]
+/2 width=6 by teqg_inv_pair_xy_y, teqg_inv_pair_xy_x/
+qed-.
+
+(* Basic_2A1: uses: fqu_inv_eq *)
+lemma fqu_inv_teqg (S) (b):
+ ∀G,L1,L2,T1,T2. ❪G,L1,T1❫ ⬂[b] ❪G,L2,T2❫ →
+ |L1| = |L2| → T1 ≛[S] T2 → ⊥.
+#S #b #G #L1 #L2 #T1 #T2 #H
+@(fqu_inv_teqg_aux … H) // (**) (* full auto fails *)
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/teqx.ma".
-include "static_2/s_transition/fqu_length.ma".
-
-(* SUPCLOSURE ***************************************************************)
-
-(* Inversion lemmas with context-free sort-irrelevant equivalence for terms *)
-
-fact fqu_inv_teqx_aux: ∀b,G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂[b] ❪G2,L2,T2❫ →
- G1 = G2 → |L1| = |L2| → T1 ≛ T2 → ⊥.
-#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
-[1: #I #G #L #V #_ #H elim (succ_inv_refl_sn … H)
-|6: #I #G #L #T #U #_ #_ #H elim (succ_inv_refl_sn … H)
-]
-/2 width=6 by teqx_inv_pair_xy_y, teqx_inv_pair_xy_x/
-qed-.
-
-(* Basic_2A1: uses: fqu_inv_eq *)
-lemma fqu_inv_teqx: ∀b,G,L1,L2,T1,T2. ❪G,L1,T1❫ ⬂[b] ❪G,L2,T2❫ →
- |L1| = |L2| → T1 ≛ T2 → ⊥.
-#b #G #L1 #L2 #T1 #T2 #H
-@(fqu_inv_teqx_aux … H) // (**) (* full auto fails *)
-qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/feqg.ma".
+include "static_2/static/aaa_reqg.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Properties with generic equivalence on referred entries ******************)
+
+lemma aaa_feqg_conf (S):
+ reflexive … S →
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ →
+ ∀A. ❪G1,L1❫ ⊢ T1 ⁝ A → ❪G2,L2❫ ⊢ T2 ⁝ A.
+#S #HS #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+/2 width=7 by aaa_teqg_conf_reqg/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/feqx.ma".
-include "static_2/static/aaa_reqx.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Properties with sort-irrelevant equivalence on referred entries **********)
-
-lemma aaa_feqx_conf: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ →
- ∀A. ❪G1,L1❫ ⊢ T1 ⁝ A → ❪G2,L2❫ ⊢ T2 ⁝ A.
-#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
-/2 width=5 by aaa_teqx_conf_reqx/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg.ma".
+include "static_2/static/aaa.ma".
+
+(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
+
+(* Properties with generic equivalence on referred entries ******************)
+
+lemma aaa_teqg_conf_reqg (S) (G):
+ reflexive … S →
+ ∀L1,T1,A. ❪G,L1❫ ⊢ T1 ⁝ A → ∀T2. T1 ≛[S] T2 →
+ ∀L2. L1 ≛[S,T1] L2 → ❪G,L2❫ ⊢ T2 ⁝ A.
+#S #G #HS #L1 #T1 #A #H elim H -G -L1 -T1 -A
+[ #G #L1 #s1 #X #H1 elim (teqg_inv_sort1 … H1) -H1 //
+| #I #G #L1 #V1 #B #_ #IH #X #H1 >(teqg_inv_lref1 … H1) -H1
+ #Y #H2 elim (reqg_inv_zero_pair_sn … H2) -H2
+ #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by aaa_zero/
+| #I #G #L1 #A #i #_ #IH #X #H1 >(teqg_inv_lref1 … H1) -H1
+ #Y #H2 elim (reqg_inv_lref_bind_sn … H2) -H2
+ #J #L2 #HL12 #H destruct /3 width=1 by aaa_lref/
+| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1
+ #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_bind_refl … H2) -H2 destruct
+ /5 width=2 by aaa_abbr, reqg_bind_repl_dx, ext2_pair/
+| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1
+ #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_bind_refl … H2) -H2 destruct
+ /5 width=2 by aaa_abst, reqg_bind_repl_dx, ext2_pair/
+| #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1
+ #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_flat … H2) -H2 destruct
+ /3 width=3 by aaa_appl/
+| #G #L1 #V1 #T1 #A #_ #_ #IHV #IHT #X #H1 elim (teqg_inv_pair1 … H1) -H1
+ #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqg_inv_flat … H2) -H2 destruct
+ /3 width=1 by aaa_cast/
+]
+qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx.ma".
-include "static_2/static/aaa.ma".
-
-(* ATONIC ARITY ASSIGNMENT ON TERMS *****************************************)
-
-(* Properties with sort-irrelevant equivalence on referred entries **********)
-
-lemma aaa_teqx_conf_reqx: ∀G,L1,T1,A. ❪G,L1❫ ⊢ T1 ⁝ A → ∀T2. T1 ≛ T2 →
- ∀L2. L1 ≛[T1] L2 → ❪G,L2❫ ⊢ T2 ⁝ A.
-#G #L1 #T1 #A #H elim H -G -L1 -T1 -A
-[ #G #L1 #s1 #X #H1 elim (teqx_inv_sort1 … H1) -H1 //
-| #I #G #L1 #V1 #B #_ #IH #X #H1 >(teqx_inv_lref1 … H1) -H1
- #Y #H2 elim (reqx_inv_zero_pair_sn … H2) -H2
- #L2 #V2 #HL12 #HV12 #H destruct /3 width=1 by aaa_zero/
-| #I #G #L1 #A #i #_ #IH #X #H1 >(teqx_inv_lref1 … H1) -H1
- #Y #H2 elim (reqx_inv_lref_bind_sn … H2) -H2
- #J #L2 #HL12 #H destruct /3 width=1 by aaa_lref/
-| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1
- #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_bind … H2) -H2 destruct
- /5 width=2 by aaa_abbr, reqx_bind_repl_dx, ext2_pair/
-| #p #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1
- #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_bind … H2) -H2 destruct
- /5 width=2 by aaa_abst, reqx_bind_repl_dx, ext2_pair/
-| #G #L1 #V1 #T1 #B #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1
- #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_flat … H2) -H2 destruct
- /3 width=3 by aaa_appl/
-| #G #L1 #V1 #T1 #A #_ #_ #IHV #IHT #X #H1 elim (teqx_inv_pair1 … H1) -H1
- #V2 #T2 #HV12 #HT12 #H #L2 #H2 elim (reqx_inv_flat … H2) -H2 destruct
- /3 width=1 by aaa_cast/
-]
-qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/notation/relations/stareqsn_7.ma".
+include "static_2/syntax/genv.ma".
+include "static_2/static/reqg.ma".
+
+(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************)
+
+inductive feqg (S) (G) (L1) (T1): relation3 genv lenv term ≝
+| feqg_intro_sn: ∀L2,T2. L1 ≛[S,T1] L2 → T1 ≛[S] T2 →
+ feqg S G L1 T1 G L2 T2
+.
+
+interpretation
+ "generic equivalence on referred entries (closure)"
+ 'StarEqSn S G1 L1 T1 G2 L2 T2 = (feqg S G1 L1 T1 G2 L2 T2).
+
+(* Basic_properties *********************************************************)
+
+lemma feqg_intro_dx (S) (G):
+ reflexive … S → symmetric … S →
+ ∀L1,L2,T2. L1 ≛[S,T2] L2 →
+ ∀T1. T1 ≛[S] T2 → ❪G,L1,T1❫ ≛[S] ❪G,L2,T2❫.
+/3 width=6 by feqg_intro_sn, teqg_reqg_div/ qed.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma feqg_inv_gen_sn (S):
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ →
+ ∧∧ G1 = G2 & L1 ≛[S,T1] L2 & T1 ≛[S] T2.
+#S #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2 /2 width=1 by and3_intro/
+qed-.
+
+lemma feqg_inv_gen_dx (S):
+ reflexive … S →
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ →
+ ∧∧ G1 = G2 & L1 ≛[S,T2] L2 & T1 ≛[S] T2.
+#S #HS #G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
+/3 width=6 by teqg_reqg_conf_sn, and3_intro/
+qed-.
+
+(* Basic_2A1: removed theorems 6:
+ fleq_refl fleq_sym fleq_inv_gen
+ fleq_trans fleq_canc_sn fleq_canc_dx
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_reqg.ma".
+include "static_2/static/feqg.ma".
+
+(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************)
+
+(* Advanced properties ******************************************************)
+
+lemma feqg_sym (S):
+ reflexive … S → symmetric … S →
+ tri_symmetric … (feqg S).
+#S #H1S #H2S #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1
+/3 width=1 by feqg_intro_dx, reqg_sym, teqg_sym/
+qed-.
+
+lemma feqg_dec (S):
+ (∀s1,s2. Decidable … (S s1 s2)) →
+ ∀G1,G2,L1,L2,T1,T2. Decidable (❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫).
+#S #HS #G1 #G2 #L1 #L2 #T1 #T2
+elim (eq_genv_dec G1 G2) #HnG destruct
+[ elim (reqg_dec … HS L1 L2 T1) #HnL
+ [ elim (teqg_dec … HS T1 T2) #HnT
+ [ /3 width=1 by feqg_intro_sn, or_introl/ ]
+ ]
+]
+@or_intror #H
+elim (feqg_inv_gen_sn … H) -H #H #HL #HT destruct
+/2 width=1 by/
+qed-.
+
+(* Main properties **********************************************************)
+
+theorem feqg_trans (S):
+ reflexive … S → symmetric … S → Transitive … S →
+ tri_transitive … (feqg S).
+#S #H1S #H2S #H3S #G1 #G #L1 #L #T1 #T * -G -L -T
+#L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
+/4 width=8 by feqg_intro_sn, reqg_trans, teqg_reqg_div, teqg_trans/
+qed-.
+
+theorem feqg_canc_sn (S):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G,G1,L,L1,T,T1. ❪G,L,T❫ ≛[S] ❪G1,L1,T1❫ →
+ ∀G2,L2,T2. ❪G,L,T❫ ≛[S] ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫.
+/3 width=5 by feqg_trans, feqg_sym/ qed-.
+
+theorem feqg_canc_dx (S):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G,L,T❫ →
+ ∀G2,L2,T2. ❪G2,L2,T2❫ ≛[S] ❪G,L,T❫ → ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫.
+/3 width=5 by feqg_trans, feqg_sym/ qed-.
+
+(* Main inversion lemmas with generic equivalence on terms ******************)
+
+theorem feqg_tneqg_repl_dx (S):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛[S] ❪G2,L2,T2❫ →
+ ∀U1,U2. ❪G1,L1,U1❫ ≛[S] ❪G2,L2,U2❫ →
+ (T2 ≛[S] U2 → ⊥) → (T1 ≛[S] U1 → ⊥).
+#S #H1S #H2S #H3S #G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1
+elim (feqg_inv_gen_sn … HT) -HT #_ #_ #HT
+elim (feqg_inv_gen_sn … HU) -HU #_ #_ #HU
+/3 width=5 by teqg_repl/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_fqup.ma".
+include "static_2/static/feqg.ma".
+
+(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************)
+
+(* Properties with generic equivalence for terms ****************************)
+
+lemma teqg_feqg (S):
+ reflexive … S →
+ ∀T1,T2. T1 ≛[S] T2 →
+ ∀G,L. ❪G,L,T1❫ ≛[S] ❪G,L,T2❫.
+/3 width=1 by feqg_intro_sn, reqg_refl/ qed.
+
+(* Advanced properties ******************************************************)
+
+lemma feqg_refl (S):
+ reflexive … S →
+ tri_reflexive … (feqg S).
+/3 width=1 by teqg_refl, teqg_feqg/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_fqus.ma".
+include "static_2/static/feqg.ma".
+
+(* GENERIC EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *********************)
+
+(* Properties with star-iterated structural successor for closures **********)
+
+lemma feqg_fqus_trans (S) (b):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛[S] ❪G,L,T❫ →
+ ∀G2,L2,T2. ❪G,L,T❫ ⬂*[b] ❪G2,L2,T2❫ →
+ ∃∃G,L0,T0. ❪G1,L1,T1❫ ⬂*[b] ❪G,L0,T0❫ & ❪G,L0,T0❫ ≛[S] ❪G2,L2,T2❫.
+#S #b #H1S #H2S #H3S #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2
+elim(feqg_inv_gen_dx … H1) -H1 // #HG #HL1 #HT1 destruct
+elim (reqg_fqus_trans … H2 … HL1) -L // #L #T0 #H2 #HT02 #HL2
+elim (teqg_fqus_trans … H2 … HT1) -T // #L0 #T #H2 #HT0 #HL0
+lapply (teqg_reqg_conf_sn … HT02 … HL0) -HL0 // #HL0
+/4 width=7 by feqg_intro_dx, reqg_trans, teqg_trans, ex2_3_intro/
+qed-.
(* *)
(**************************************************************************)
-include "static_2/notation/relations/stareqsn_6.ma".
-include "static_2/syntax/genv.ma".
-include "static_2/static/reqx.ma".
+include "static_2/notation/relations/approxeqsn_6.ma".
+include "static_2/syntax/teqx.ma".
+include "static_2/static/feqg.ma".
(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
-inductive feqx (G) (L1) (T1): relation3 genv lenv term ≝
-| feqx_intro_sn: ∀L2,T2. L1 ≛[T1] L2 → T1 ≛ T2 →
- feqx G L1 T1 G L2 T2
-.
+definition feqx: relation6 genv lenv term genv lenv term ≝
+ feqg sfull.
interpretation
"sort-irrelevant equivalence on referred entries (closure)"
- 'StarEqSn G1 L1 T1 G2 L2 T2 = (feqx G1 L1 T1 G2 L2 T2).
+ 'ApproxEqSn G1 L1 T1 G2 L2 T2 = (feqx G1 L1 T1 G2 L2 T2).
(* Basic_properties *********************************************************)
-
+(*
lemma feqx_intro_dx (G):
∀L1,L2,T2. L1 ≛[T2] L2 →
∀T1. T1 ≛ T2 → ❪G,L1,T1❫ ≛ ❪G,L2,T2❫.
#G1 #G2 #L1 #L2 #T1 #T2 * -G2 -L2 -T2
/3 width=3 by teqx_reqx_conf_sn, and3_intro/
qed-.
-
+*)
(* Basic_2A1: removed theorems 6:
fleq_refl fleq_sym fleq_inv_gen
fleq_trans fleq_canc_sn fleq_canc_dx
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_reqx.ma".
-include "static_2/static/feqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
-
-(* Advanced properties ******************************************************)
-
-lemma feqx_sym: tri_symmetric … feqx.
-#G1 #G2 #L1 #L2 #T1 #T2 * -G1 -L1 -T1
-/3 width=1 by feqx_intro_dx, reqx_sym, teqx_sym/
-qed-.
-
-(* Main properties **********************************************************)
-
-theorem feqx_trans: tri_transitive … feqx.
-#G1 #G #L1 #L #T1 #T * -G -L -T
-#L #T #HL1 #HT1 #G2 #L2 #T2 * -G2 -L2 -T2
-/4 width=5 by feqx_intro_sn, reqx_trans, teqx_reqx_div, teqx_trans/
-qed-.
-
-theorem feqx_canc_sn: ∀G,G1,L,L1,T,T1. ❪G,L,T❫ ≛ ❪G1,L1,T1❫→
- ∀G2,L2,T2. ❪G,L,T❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
-/3 width=5 by feqx_trans, feqx_sym/ qed-.
-
-theorem feqx_canc_dx: ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛ ❪G,L,T❫ →
- ∀G2,L2,T2. ❪G2,L2,T2❫ ≛ ❪G,L,T❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
-/3 width=5 by feqx_trans, feqx_sym/ qed-.
-
-(* Main inversion lemmas with degree-based equivalence on terms *************)
-
-theorem feqx_tneqx_repl_dx: ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫ →
- ∀U1,U2. ❪G1,L1,U1❫ ≛ ❪G2,L2,U2❫ →
- (T2 ≛ U2 → ⊥) → (T1 ≛ U1 → ⊥).
-#G1 #G2 #L1 #L2 #T1 #T2 #HT #U1 #U2 #HU #HnTU2 #HTU1
-elim (feqx_inv_gen_sn … HT) -HT #_ #_ #HT
-elim (feqx_inv_gen_sn … HU) -HU #_ #_ #HU
-/3 width=5 by teqx_repl/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_fqup.ma".
-include "static_2/static/feqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
-
-(* Properties with sort-irrelevant equivalence for terms ********************)
-
-lemma teqx_feqx: ∀T1,T2. T1 ≛ T2 →
- ∀G,L. ❪G,L,T1❫ ≛ ❪G,L,T2❫.
-/2 width=1 by feqx_intro_sn/ qed.
-
-(* Advanced properties ******************************************************)
-
-lemma feqx_refl: tri_reflexive … feqx.
-/2 width=1 by feqx_intro_sn/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_fqus.ma".
-include "static_2/static/feqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
-
-(* Properties with star-iterated structural successor for closures **********)
-
-lemma feqx_fqus_trans (b):
- ∀G1,G,L1,L,T1,T. ❪G1,L1,T1❫ ≛ ❪G,L,T❫ →
- ∀G2,L2,T2. ❪G,L,T❫ ⬂*[b] ❪G2,L2,T2❫ →
- ∃∃G,L0,T0. ❪G1,L1,T1❫ ⬂*[b] ❪G,L0,T0❫ & ❪G,L0,T0❫ ≛ ❪G2,L2,T2❫.
-#b #G1 #G #L1 #L #T1 #T #H1 #G2 #L2 #T2 #H2
-elim(feqx_inv_gen_dx … H1) -H1 #HG #HL1 #HT1 destruct
-elim (reqx_fqus_trans … H2 … HL1) -L #L #T0 #H2 #HT02 #HL2
-elim (teqx_fqus_trans … H2 … HT1) -T #L0 #T #H2 #HT0 #HL0
-lapply (teqx_reqx_conf_sn … HT02 … HL0) -HL0 #HL0
-/4 width=7 by feqx_intro_dx, reqx_trans, teqx_trans, ex2_3_intro/
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/reqx_req.ma".
-include "static_2/static/feqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
-
-(* Properties with syntactic equivalence on referred entries ****************)
-
-lemma req_feqx_trans: ∀L1,L,T1. L1 ≡[T1] L →
- ∀G1,G2,L2,T2. ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
-#L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H
-elim (feqx_inv_gen_sn … H) -H #H #HL2 #T12 destruct
-/3 width=3 by feqx_intro_sn, req_reqx_trans/
-qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqx_req.ma".
+include "static_2/static/feqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR CLOSURES ON REFERRED ENTRIES *************)
+
+(* Properties with syntactic equivalence on referred entries ****************)
+
+lemma req_feqx_trans: ∀L1,L,T1. L1 ≡[T1] L →
+ ∀G1,G2,L2,T2. ❪G1,L,T1❫ ≛ ❪G2,L2,T2❫ → ❪G1,L1,T1❫ ≛ ❪G2,L2,T2❫.
+#L1 #L #T1 #HL1 #G1 #G2 #L2 #T2 #H
+elim (feqx_inv_gen_sn … H) -H #H #HL2 #T12 destruct
+/3 width=3 by feqx_intro_sn, req_reqx_trans/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_drops.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Note: req_inv_lifts_dx missing in basic_2A1 *)
+
+(* Basic_2A1: uses: lleq_inv_lift_le lleq_inv_lift_be lleq_inv_lift_ge *)
+lemma req_inv_lifts_bi: ∀L1,L2,U. L1 ≡[U] L2 → ∀b,f. 𝐔❪f❫ →
+ ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
+ ∀T. ⇧*[f] T ≘ U → K1 ≡[T] K2.
+/2 width=10 by rex_inv_lifts_bi/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_fqup.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: was: lleq_refl *)
+lemma req_refl: ∀T. reflexive … (req T).
+/2 width=1 by rex_refl/ qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_length.ma".
+include "static_2/static/rex_fsle.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Properties with free variables inclusion for restricted closures *********)
+
+lemma req_fsle_comp:
+ rex_fsle_compatible ceq.
+#L1 #L2 #T #HL12
+elim (frees_total L1 T)
+/4 width=8 by frees_req_conf, rex_fwd_length, lveq_length_eq, sle_refl, ex4_4_intro/
+qed.
+
+(* Forward lemmas with free variables inclusion for restricted closures *****)
+
+lemma req_rex_trans (R):
+ R_transitive_req R →
+ ∀L1,L,T. L1 ≡[T] L → ∀L2. L ⪤[R,T] L2 → L1 ⪤[R,T] L2.
+/4 width=16 by req_fsle_comp, rex_trans_fsle, rex_trans_next/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_length.ma".
+include "static_2/static/rex_fsle.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Advanved properties with free variables inclusion ************************)
+
+lemma req_fsge_comp:
+ rex_fsge_compatible ceq.
+#L1 #L2 #T #H elim H #f1 #Hf1 #HL12
+lapply (frees_req_conf … Hf1 … H) -H
+lapply (sex_fwd_length … HL12)
+/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
+qed-.
+
+(* Advanced properties ******************************************************)
+
+(* Basic_2A1: uses: lleq_sym *)
+lemma req_sym (T):
+ symmetric … (req T).
+/3 width=1 by req_fsge_comp, rex_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/req_fsle.ma".
+include "static_2/static/reqx.ma".
+
+(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
+
+(* Properties with syntactic equivalence on referred entries ****************)
+
+lemma req_reqx: ∀L1,L2. ∀T:term. L1 ≡[T] L2 → L1 ≛[T] L2.
+/2 width=3 by rex_co/ qed.
+
+lemma req_reqx_trans: ∀L1,L. ∀T:term. L1 ≡[T] L →
+ ∀L2. L ≛[T] L2 → L1 ≛[T] L2.
+/2 width=3 by req_rex_trans/ qed-.
(**************************************************************************)
include "static_2/notation/relations/ideqsn_3.ma".
-include "static_2/static/rex.ma".
+include "static_2/syntax/teq_ext.ma".
+include "static_2/static/reqg.ma".
(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
(* Basic_2A1: was: lleq *)
definition req: relation3 term lenv lenv ≝
- rex ceq.
+ reqg (eq …).
interpretation
"syntactic equivalence on referred entries (local environment)"
lemma req_inv_bind:
∀p,I,L1,L2,V,T. L1 ≡[ⓑ[p,I]V.T] L2 →
∧∧ L1 ≡[V] L2 & L1.ⓑ[I]V ≡[T] L2.ⓑ[I]V.
-/2 width=2 by rex_inv_bind/ qed-.
+/2 width=2 by reqg_inv_bind_refl/ qed-.
lemma req_inv_flat:
∀I,L1,L2,V,T. L1 ≡[ⓕ[I]V.T] L2 →
∧∧ L1 ≡[V] L2 & L1 ≡[T] L2.
-/2 width=2 by rex_inv_flat/ qed-.
+/2 width=2 by reqg_inv_flat/ qed-.
(* Advanced inversion lemmas ************************************************)
∀I,L2,K1,V. K1.ⓑ[I]V ≡[#0] L2 →
∃∃K2. K1 ≡[V] K2 & L2 = K2.ⓑ[I]V.
#I #L2 #K1 #V #H
-elim (rex_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct
-/2 width=3 by ex2_intro/
+elim (reqg_inv_zero_pair_sn … H) -H #K2 #X #HK12 #HX #H destruct
+@(teq_repl_1 … HX) -X
+@(ex2_intro … HK12) // (**) (* auto fails because a δ-expamsion gets in the way *)
qed-.
lemma req_inv_zero_pair_dx:
∀I,L1,K2,V. L1 ≡[#0] K2.ⓑ[I]V →
∃∃K1. K1 ≡[V] K2 & L1 = K1.ⓑ[I]V.
#I #L1 #K2 #V #H
-elim (rex_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct
-/2 width=3 by ex2_intro/
+elim (reqg_inv_zero_pair_dx … H) -H #K1 #X #HK12 #HX #H destruct
+@(teq_repl_1 … HX) -V
+@(ex2_intro … HK12) // (**) (* auto fails because a δ-expamsion gets in the way *)
qed-.
lemma req_inv_lref_bind_sn:
∀I1,K1,L2,i. K1.ⓘ[I1] ≡[#↑i] L2 →
∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ[I2].
-/2 width=2 by rex_inv_lref_bind_sn/ qed-.
+/2 width=2 by reqg_inv_lref_bind_sn/ qed-.
lemma req_inv_lref_bind_dx:
∀I2,K2,L1,i. L1 ≡[#↑i] K2.ⓘ[I2] →
∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ[I1].
-/2 width=2 by rex_inv_lref_bind_dx/ qed-.
+/2 width=2 by reqg_inv_lref_bind_dx/ qed-.
(* Basic forward lemmas *****************************************************)
c_reflexive … R →
∀L1,L2,T. L1 ≡[T] L2 → L1 ⪤[R,T] L2.
#R #HR #L1 #L2 #T * #f #Hf #HL12
-/4 width=7 by sex_co, cext2_co, ex2_intro/
+/5 width=7 by sex_co, cext2_co, teq_repl_1, ex2_intro/
qed-.
-(* Basic_properties *********************************************************)
-
-lemma frees_req_conf:
- ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f →
- ∀L2. L1 ≡[T] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f.
-#f #L1 #T #H elim H -f -L1 -T
-[ /2 width=3 by frees_sort/
-| #f #i #Hf #L2 #H2
- >(rex_inv_atom_sn … H2) -L2
- /2 width=1 by frees_atom/
-| #f #I #L1 #V1 #_ #IH #Y #H2
- elim (req_inv_zero_pair_sn … H2) -H2 #L2 #HL12 #H destruct
- /3 width=1 by frees_pair/
-| #f #I #L1 #Hf #Y #H2
- elim (rex_inv_zero_unit_sn … H2) -H2 #g #L2 #_ #_ #H destruct
- /2 width=1 by frees_unit/
-| #f #I #L1 #i #_ #IH #Y #H2
- elim (req_inv_lref_bind_sn … H2) -H2 #J #L2 #HL12 #H destruct
- /3 width=1 by frees_lref/
-| /2 width=1 by frees_gref/
-| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2
- elim (req_inv_bind … H2) -H2 /3 width=5 by frees_bind/
-| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #L2 #H2
- elim (req_inv_flat … H2) -H2 /3 width=5 by frees_flat/
-]
+lemma req_fwd_reqg (S) (T:term):
+ reflexive … S →
+ ∀L1,L2. L1 ≡[T] L2 → L1 ≛[S,T] L2.
+/3 width=1 by req_fwd_rex, teqg_refl/ qed-.
+
+lemma transitive_req_fwd_rex (R):
+ R_transitive_req R → R_transitive_rex ceq R R.
+#R #HR #L1 #L #T1 #HL1 #T #HT #T2 #HT2
+@(HR … HL1) -HR -HL1 >(teq_inv_eq … HT) -T1 // (**)
qed-.
(* Basic_2A1: removed theorems 10:
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/rex_drops.ma".
-include "static_2/static/req.ma".
-
-(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
-
-(* Note: req_inv_lifts_dx missing in basic_2A1 *)
-
-(* Basic_2A1: uses: lleq_inv_lift_le lleq_inv_lift_be lleq_inv_lift_ge *)
-lemma req_inv_lifts_bi: ∀L1,L2,U. L1 ≡[U] L2 → ∀b,f. 𝐔❪f❫ →
- ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
- ∀T. ⇧*[f] T ≘ U → K1 ≡[T] K2.
-/2 width=10 by rex_inv_lifts_bi/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/rex_fqup.ma".
-include "static_2/static/req.ma".
-
-(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: was: lleq_refl *)
-lemma req_refl: ∀T. reflexive … (req T).
-/2 width=1 by rex_refl/ qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/rex_length.ma".
-include "static_2/static/rex_fsle.ma".
-include "static_2/static/req.ma".
-
-(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
-
-(* Properties with free variables inclusion for restricted closures *********)
-
-lemma req_fsle_comp:
- rex_fsle_compatible ceq.
-#L1 #L2 #T #HL12
-elim (frees_total L1 T)
-/4 width=8 by frees_req_conf, rex_fwd_length, lveq_length_eq, sle_refl, ex4_4_intro/
-qed.
-
-(* Forward lemmas with free variables inclusion for restricted closures *****)
-
-lemma req_rex_trans (R):
- R_transitive_req R →
- ∀L1,L,T. L1 ≡[T] L → ∀L2. L ⪤[R,T] L2 → L1 ⪤[R,T] L2.
-/4 width=16 by req_fsle_comp, rex_trans_fsle, rex_trans_next/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/rex_length.ma".
-include "static_2/static/rex_fsle.ma".
-include "static_2/static/req.ma".
-
-(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
-
-(* Advanved properties with free variables inclusion ************************)
-
-lemma req_fsge_comp:
- rex_fsge_compatible ceq.
-#L1 #L2 #T #H elim H #f1 #Hf1 #HL12
-lapply (frees_req_conf … Hf1 … H) -H
-lapply (sex_fwd_length … HL12)
-/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
-qed-.
-
-(* Advanced properties ******************************************************)
-
-(* Basic_2A1: uses: lleq_sym *)
-lemma req_sym (T):
- symmetric … (req T).
-/3 width=1 by req_fsge_comp, rex_sym/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/reqg_reqg.ma".
+include "static_2/static/req.ma".
+
+(* SYNTACTIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *********)
+
+(* Advanced Forward lemmas **************************************************)
+
+lemma req_rex_trans (R) (L) (T):
+ R_transitive_req R →
+ ∀L1. L1 ≡[T] L → ∀L2. L ⪤[R,T] L2 → L1 ⪤[R,T] L2.
+#R #L #T #HR #L1 #HL1 #L2 #HL2
+@(rex_trans_fsle … HL1 … HL2) -L (**) (* fulll auto too slow *)
+/3 width=16 by transitive_req_fwd_rex, reqg_fsle_comp, rex_trans_next/
+qed-.
+
+lemma req_reqg_trans (S) (T:term) (L):
+ ∀L1. L1 ≡[T] L → ∀L2. L ≛[S,T] L2 → L1 ≛[S,T] L2.
+/2 width=3 by req_rex_trans/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/notation/relations/stareqsn_4.ma".
+include "static_2/syntax/teqg_ext.ma".
+include "static_2/static/rex.ma".
+
+(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********)
+
+definition reqg (S): relation3 … ≝
+ rex (ceqg S).
+
+interpretation
+ "generic equivalence on selected entries (local environment)"
+ 'StarEqSn S f L1 L2 = (sex (ceqg_ext S) cfull f L1 L2).
+
+interpretation
+ "generic equivalence on referred entries (local environment)"
+ 'StarEqSn S T L1 L2 = (reqg S T L1 L2).
+
+(* Basic properties ***********************************************************)
+
+lemma frees_teqg_conf_seqg (S):
+ ∀f,L1,T1. L1 ⊢ 𝐅+❪T1❫ ≘ f → ∀T2. T1 ≛[S] T2 →
+ ∀L2. L1 ≛[S,f] L2 → L2 ⊢ 𝐅+❪T2❫ ≘ f.
+#S #f #L1 #T1 #H elim H -f -L1 -T1
+[ #f #L1 #s1 #Hf #X #H1 #L2 #_
+ elim (teqg_inv_sort1 … H1) -H1 #s2 #_ #H destruct
+ /2 width=3 by frees_sort/
+| #f #i #Hf #X #H1
+ >(teqg_inv_lref1 … H1) -X #Y #H2
+ >(sex_inv_atom1 … H2) -Y
+ /2 width=1 by frees_atom/
+| #f #I #L1 #V1 #_ #IH #X #H1
+ >(teqg_inv_lref1 … H1) -X #Y #H2
+ elim (sex_inv_next1 … H2) -H2 #Z #L2 #HL12 #HZ #H destruct
+ elim (ext2_inv_pair_sn … HZ) -HZ #V2 #HV12 #H destruct
+ /3 width=1 by frees_pair/
+| #f #I #L1 #Hf #X #H1
+ >(teqg_inv_lref1 … H1) -X #Y #H2
+ elim (sex_inv_next1 … H2) -H2 #Z #L2 #_ #HZ #H destruct
+ >(ext2_inv_unit_sn … HZ) -Z /2 width=1 by frees_unit/
+| #f #I #L1 #i #_ #IH #X #H1
+ >(teqg_inv_lref1 … H1) -X #Y #H2
+ elim (sex_inv_push1 … H2) -H2 #J #L2 #HL12 #_ #H destruct
+ /3 width=1 by frees_lref/
+| #f #L1 #l #Hf #X #H1 #L2 #_
+ >(teqg_inv_gref1 … H1) -X /2 width=1 by frees_gref/
+| #f1V #f1T #f1 #p #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1
+ elim (teqg_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct
+ /6 width=5 by frees_bind, sex_inv_tl, ext2_pair, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/
+| #f1V #f1T #f1 #I #L1 #V1 #T1 #_ #_ #Hf1 #IHV #IHT #X #H1
+ elim (teqg_inv_pair1 … H1) -H1 #V2 #T2 #HV12 #HT12 #H1 #L2 #HL12 destruct
+ /5 width=5 by frees_flat, sle_sex_trans, sor_inv_sle_dx, sor_inv_sle_sn/
+]
+qed-.
+
+lemma frees_teqg_conf (S):
+ reflexive … S →
+ ∀f,L,T1. L ⊢ 𝐅+❪T1❫ ≘ f →
+ ∀T2. T1 ≛[S] T2 → L ⊢ 𝐅+❪T2❫ ≘ f.
+/5 width=6 by frees_teqg_conf_seqg, sex_refl, teqg_refl, ext2_refl/ qed-.
+
+lemma frees_seqg_conf (S):
+ reflexive … S →
+ ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f →
+ ∀L2. L1 ≛[S,f] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f.
+/3 width=6 by frees_teqg_conf_seqg, teqg_refl/ qed-.
+
+lemma teqg_rex_conf_sn (S) (R):
+ reflexive … S →
+ s_r_confluent1 … (ceqg S) (rex R).
+#S #R #HS #L1 #T1 #T2 #HT12 #L2 *
+/3 width=5 by frees_teqg_conf, ex2_intro/
+qed-.
+
+lemma teqg_rex_div (S) (R):
+ reflexive … S → symmetric … S →
+ ∀T1,T2. T1 ≛[S] T2 →
+ ∀L1,L2. L1 ⪤[R,T2] L2 → L1 ⪤[R,T1] L2.
+/3 width=5 by teqg_rex_conf_sn, teqg_sym/ qed-.
+
+lemma teqg_reqg_conf_sn (S1) (S2):
+ reflexive … S1 →
+ s_r_confluent1 … (ceqg S1) (reqg S2).
+/2 width=5 by teqg_rex_conf_sn/ qed-.
+
+lemma teqg_reqg_div (S1) (S2):
+ reflexive … S1 → symmetric … S1 →
+ ∀T1,T2. T1 ≛[S1] T2 →
+ ∀L1,L2. L1 ≛[S2,T2] L2 → L1 ≛[S2,T1] L2.
+/2 width=6 by teqg_rex_div/ qed-.
+
+lemma reqg_atom (S):
+ ∀I. ⋆ ≛[S,⓪[I]] ⋆.
+/2 width=1 by rex_atom/ qed.
+
+lemma reqg_sort (S):
+ ∀I1,I2,L1,L2,s.
+ L1 ≛[S,⋆s] L2 → L1.ⓘ[I1] ≛[S,⋆s] L2.ⓘ[I2].
+/2 width=1 by rex_sort/ qed.
+
+lemma reqg_pair (S):
+ ∀I,L1,L2,V1,V2.
+ L1 ≛[S,V1] L2 → V1 ≛[S] V2 → L1.ⓑ[I]V1 ≛[S,#0] L2.ⓑ[I]V2.
+/2 width=1 by rex_pair/ qed.
+
+lemma reqg_unit (S):
+ ∀f,I,L1,L2. 𝐈❪f❫ → L1 ≛[S,f] L2 →
+ L1.ⓤ[I] ≛[S,#0] L2.ⓤ[I].
+/2 width=3 by rex_unit/ qed.
+
+lemma reqg_lref (S):
+ ∀I1,I2,L1,L2,i.
+ L1 ≛[S,#i] L2 → L1.ⓘ[I1] ≛[S,#↑i] L2.ⓘ[I2].
+/2 width=1 by rex_lref/ qed.
+
+lemma reqg_gref (S):
+ ∀I1,I2,L1,L2,l.
+ L1 ≛[S,§l] L2 → L1.ⓘ[I1] ≛[S,§l] L2.ⓘ[I2].
+/2 width=1 by rex_gref/ qed.
+
+lemma reqg_bind_repl_dx (S):
+ ∀I,I1,L1,L2.∀T:term. L1.ⓘ[I] ≛[S,T] L2.ⓘ[I1] →
+ ∀I2. I ≛[S] I2 → L1.ⓘ[I] ≛[S,T] L2.ⓘ[I2].
+/2 width=2 by rex_bind_repl_dx/ qed-.
+
+lemma reqg_co (S1) (S2):
+ S1 ⊆ S2 →
+ ∀T:term. ∀L1,L2. L1 ≛[S1,T] L2 → L1 ≛[S2,T] L2.
+/3 width=3 by rex_co, teqg_co/ qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma reqg_inv_atom_sn (S):
+ ∀Y2. ∀T:term. ⋆ ≛[S,T] Y2 → Y2 = ⋆.
+/2 width=3 by rex_inv_atom_sn/ qed-.
+
+lemma reqg_inv_atom_dx (S):
+ ∀Y1. ∀T:term. Y1 ≛[S,T] ⋆ → Y1 = ⋆.
+/2 width=3 by rex_inv_atom_dx/ qed-.
+
+lemma reqg_inv_zero (S):
+ ∀Y1,Y2. Y1 ≛[S,#0] Y2 →
+ ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+ | ∃∃I,L1,L2,V1,V2. L1 ≛[S,V1] L2 & V1 ≛[S] V2 & Y1 = L1.ⓑ[I]V1 & Y2 = L2.ⓑ[I]V2
+ | ∃∃f,I,L1,L2. 𝐈❪f❫ & L1 ≛[S,f] L2 & Y1 = L1.ⓤ[I] & Y2 = L2.ⓤ[I].
+#S #Y1 #Y2 #H elim (rex_inv_zero … H) -H *
+/3 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex4_4_intro, conj/
+qed-.
+
+lemma reqg_inv_lref (S):
+ ∀Y1,Y2,i. Y1 ≛[S,#↑i] Y2 →
+ ∨∨ ∧∧ Y1 = ⋆ & Y2 = ⋆
+ | ∃∃I1,I2,L1,L2. L1 ≛[S,#i] L2 & Y1 = L1.ⓘ[I1] & Y2 = L2.ⓘ[I2].
+/2 width=1 by rex_inv_lref/ qed-.
+
+(* Basic_2A1: uses: lleq_inv_bind lleq_inv_bind_O *)
+lemma reqg_inv_bind_refl (S):
+ reflexive … S →
+ ∀p,I,L1,L2,V,T. L1 ≛[S,ⓑ[p,I]V.T] L2 →
+ ∧∧ L1 ≛[S,V] L2 & L1.ⓑ[I]V ≛[S,T] L2.ⓑ[I]V.
+/3 width=2 by rex_inv_bind, teqg_refl/ qed-.
+
+(* Basic_2A1: uses: lleq_inv_flat *)
+lemma reqg_inv_flat (S):
+ ∀I,L1,L2,V,T. L1 ≛[S,ⓕ[I]V.T] L2 →
+ ∧∧ L1 ≛[S,V] L2 & L1 ≛[S,T] L2.
+/2 width=2 by rex_inv_flat/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma reqg_inv_zero_pair_sn (S):
+ ∀I,Y2,L1,V1. L1.ⓑ[I]V1 ≛[S,#0] Y2 →
+ ∃∃L2,V2. L1 ≛[S,V1] L2 & V1 ≛[S] V2 & Y2 = L2.ⓑ[I]V2.
+/2 width=1 by rex_inv_zero_pair_sn/ qed-.
+
+lemma reqg_inv_zero_pair_dx (S):
+ ∀I,Y1,L2,V2. Y1 ≛[S,#0] L2.ⓑ[I]V2 →
+ ∃∃L1,V1. L1 ≛[S,V1] L2 & V1 ≛[S] V2 & Y1 = L1.ⓑ[I]V1.
+/2 width=1 by rex_inv_zero_pair_dx/ qed-.
+
+lemma reqg_inv_lref_bind_sn (S):
+ ∀I1,Y2,L1,i. L1.ⓘ[I1] ≛[S,#↑i] Y2 →
+ ∃∃I2,L2. L1 ≛[S,#i] L2 & Y2 = L2.ⓘ[I2].
+/2 width=2 by rex_inv_lref_bind_sn/ qed-.
+
+lemma reqg_inv_lref_bind_dx (S):
+ ∀I2,Y1,L2,i. Y1 ≛[S,#↑i] L2.ⓘ[I2] →
+ ∃∃I1,L1. L1 ≛[S,#i] L2 & Y1 = L1.ⓘ[I1].
+/2 width=2 by rex_inv_lref_bind_dx/ qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma reqg_fwd_zero_pair (S):
+ ∀I,K1,K2,V1,V2.
+ K1.ⓑ[I]V1 ≛[S,#0] K2.ⓑ[I]V2 → K1 ≛[S,V1] K2.
+/2 width=3 by rex_fwd_zero_pair/ qed-.
+
+(* Basic_2A1: uses: lleq_fwd_bind_sn lleq_fwd_flat_sn *)
+lemma reqg_fwd_pair_sn (S):
+ ∀I,L1,L2,V,T. L1 ≛[S,②[I]V.T] L2 → L1 ≛[S,V] L2.
+/2 width=3 by rex_fwd_pair_sn/ qed-.
+
+(* Basic_2A1: uses: lleq_fwd_bind_dx lleq_fwd_bind_O_dx *)
+lemma reqg_fwd_bind_dx (S):
+ reflexive … S →
+ ∀p,I,L1,L2,V,T.
+ L1 ≛[S,ⓑ[p,I]V.T] L2 → L1.ⓑ[I]V ≛[S,T] L2.ⓑ[I]V.
+/3 width=2 by rex_fwd_bind_dx, teqg_refl/ qed-.
+
+(* Basic_2A1: uses: lleq_fwd_flat_dx *)
+lemma reqg_fwd_flat_dx (S):
+ ∀I,L1,L2,V,T. L1 ≛[S,ⓕ[I]V.T] L2 → L1 ≛[S,T] L2.
+/2 width=3 by rex_fwd_flat_dx/ qed-.
+
+lemma reqg_fwd_dx (S):
+ ∀I2,L1,K2. ∀T:term. L1 ≛[S,T] K2.ⓘ[I2] →
+ ∃∃I1,K1. L1 = K1.ⓘ[I1].
+/2 width=5 by rex_fwd_dx/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqg.ma".
+include "static_2/static/rex_drops.ma".
+include "static_2/static/reqg.ma".
+
+(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********)
+
+(* Properties with generic slicing for local environments *******************)
+
+lemma reqg_lifts_sn (S):
+ reflexive … S → f_dedropable_sn (ceqg S).
+/3 width=5 by rex_liftable_dedropable_sn, teqg_lifts_sn, teqg_refl/ qed-.
+
+(* Inversion lemmas with generic slicing for local environments *************)
+
+lemma reqg_inv_lifts_sn (S):
+ f_dropable_sn (ceqg S).
+/2 width=5 by rex_dropable_sn/ qed-.
+
+lemma reqg_inv_lifts_dx (S):
+ f_dropable_dx (ceqg S).
+/2 width=5 by rex_dropable_dx/ qed-.
+
+lemma reqg_inv_lifts_bi (S):
+ ∀L1,L2,U. L1 ≛[S,U] L2 → ∀b,f. 𝐔❪f❫ →
+ ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
+ ∀T. ⇧*[f] T ≘ U → K1 ≛[S,T] K2.
+/2 width=10 by rex_inv_lifts_bi/ qed-.
+
+lemma reqg_inv_lref_pair_sn (S):
+ ∀L1,L2,i. L1 ≛[S,#i] L2 → ∀I,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 →
+ ∃∃K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 & K1 ≛[S,V1] K2 & V1 ≛[S] V2.
+/2 width=3 by rex_inv_lref_pair_sn/ qed-.
+
+lemma reqg_inv_lref_pair_dx (S):
+ ∀L1,L2,i. L1 ≛[S,#i] L2 → ∀I,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 →
+ ∃∃K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 & K1 ≛[S,V1] K2 & V1 ≛[S] V2.
+/2 width=3 by rex_inv_lref_pair_dx/ qed-.
+
+lemma reqg_inv_lref_pair_bi (S) (L1) (L2) (i):
+ L1 ≛[S,#i] L2 →
+ ∀I1,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I1]V1 →
+ ∀I2,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I2]V2 →
+ ∧∧ K1 ≛[S,V1] K2 & V1 ≛[S] V2 & I1 = I2.
+/2 width=6 by rex_inv_lref_pair_bi/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/static/rex_fqup.ma".
+include "static_2/static/reqg.ma".
+
+(* GEBERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********)
+
+(* Advanced properties ******************************************************)
+
+lemma reqg_refl (S):
+ reflexive … S →
+ c_reflexive … (reqg S).
+/3 width=1 by rex_refl, teqg_refl/ qed.
+
+lemma reqg_pair_refl (S):
+ reflexive … S →
+ ∀V1,V2. V1 ≛[S] V2 →
+ ∀I,L. ∀T:term. L.ⓑ[I]V1 ≛[S,T] L.ⓑ[I]V2.
+/3 width=1 by rex_pair_refl, teqg_refl/ qed.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma reqg_inv_bind_void (S):
+ ∀p,I,L1,L2,V,T. L1 ≛[S,ⓑ[p,I]V.T] L2 →
+ ∧∧ L1 ≛[S,V] L2 & L1.ⓧ ≛[S,T] L2.ⓧ.
+/2 width=3 by rex_inv_bind_void/ qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma reqg_fwd_bind_dx_void (S):
+ ∀p,I,L1,L2,V,T.
+ L1 ≛[S,ⓑ[p,I]V.T] L2 → L1.ⓧ ≛[S,T] L2.ⓧ.
+/2 width=4 by rex_fwd_bind_dx_void/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/s_computation/fqus_fqup.ma".
+include "static_2/static/reqg_drops.ma".
+include "static_2/static/reqg_fqup.ma".
+include "static_2/static/reqg_reqg.ma".
+
+(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES **********)
+
+(* Properties with extended structural successor for closures ***************)
+
+lemma fqu_teqg_conf (S) (b):
+ reflexive … S →
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ →
+ ∀U2. U1 ≛[S] U2 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & L2 ≛[S,T1] L & T1 ≛[S] T2.
+#S #b #HS #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1
+[ #I #G #L #W #X #H >(teqg_inv_lref1 … H) -X
+ /3 width=5 by reqg_refl, fqu_lref_O, teqg_refl, ex3_2_intro/
+| #I #G #L #W1 #U1 #X #H
+ elim (teqg_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct
+ /3 width=5 by reqg_refl, fqu_pair_sn, ex3_2_intro/
+| #p #I #G #L #W1 #U1 #Hb #X #H
+ elim (teqg_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
+ /3 width=5 by reqg_pair_refl, fqu_bind_dx, ex3_2_intro/
+| #p #I #G #L #W1 #U1 #Hb #X #H
+ elim (teqg_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
+ /3 width=5 by reqg_refl, fqu_clear, ex3_2_intro/
+| #I #G #L #W1 #U1 #X #H
+ elim (teqg_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct
+ /3 width=5 by reqg_refl, fqu_flat_dx, ex3_2_intro/
+| #I #G #L #T1 #U1 #HTU1 #U2 #HU12
+ elim (teqg_inv_lifts_sn … HU12 … HTU1) -U1
+ /3 width=5 by reqg_refl, fqu_drop, ex3_2_intro/
+]
+qed-.
+
+lemma teqg_fqu_trans (S) (b):
+ reflexive … S → symmetric … S →
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛[S] U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2.
+#S #b #H1S #H2S #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21
+elim (fqu_teqg_conf … H12 U2) -H12
+/3 width=5 by reqg_sym, teqg_sym, ex3_2_intro/
+qed-.
+
+(* Basic_2A1: uses: lleq_fqu_trans *)
+lemma reqg_fqu_trans (S) (b):
+ reflexive … S →
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[S,T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2.
+#S #b #HS #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U
+[ #I #G #L2 #V2 #L1 #H elim (reqg_inv_zero_pair_dx … H) -H
+ #K1 #V1 #HV1 #HV12 #H destruct
+ /3 width=9 by teqg_reqg_conf_sn, fqu_lref_O, ex3_2_intro/
+| * [ #p ] #I #G #L2 #V #T #L1 #H
+ [ elim (reqg_inv_bind_refl … H)
+ | elim (reqg_inv_flat … H)
+ ] -H
+ /3 width=5 by fqu_pair_sn, teqg_refl, ex3_2_intro/
+| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqg_inv_bind_refl … H) -H
+ /3 width=5 by fqu_bind_dx, teqg_refl, ex3_2_intro/
+| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqg_inv_bind_void … H) -H
+ /3 width=5 by fqu_clear, teqg_refl, ex3_2_intro/
+| #I #G #L2 #V #T #L1 #H elim (reqg_inv_flat … H) -H
+ /3 width=5 by fqu_flat_dx, teqg_refl, ex3_2_intro/
+| #I #G #L2 #T #U #HTU #Y #HU
+ elim (reqg_fwd_dx … HU) #L1 #V1 #H destruct
+ /5 width=14 by reqg_inv_lifts_bi, fqu_drop, teqg_refl, drops_refl, drops_drop, ex3_2_intro/
+]
+qed-.
+
+(* Properties with optional structural successor for closures ***************)
+
+lemma teqg_fquq_trans (S) (b):
+ reflexive … S → symmetric … S →
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛[S] U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂⸮[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2.
+#S #b #H1S #H2S #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H
+[ #H #U2 #HU21 elim (teqg_fqu_trans … H … HU21) -U1
+ /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #HG #HL #HT destruct /3 width=5 by reqg_refl, ex3_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was just: lleq_fquq_trans *)
+lemma reqg_fquq_trans (S) (b):
+ reflexive … S →
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂⸮[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[S,T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂⸮[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2.
+#S #b #HS #G1 #G2 #L2 #K2 #T #U #H elim H -H
+[ #H #L1 #HL12 elim (reqg_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/
+| * #HG #HL #HT destruct /3 width=5 by teqg_refl, ex3_2_intro/
+]
+qed-.
+
+(* Properties with plus-iterated structural successor for closures **********)
+
+(* Basic_2A1: was just: lleq_fqup_trans *)
+lemma reqg_fqup_trans (S) (b):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂+[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[S,T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂+[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2.
+#S #b #H1S #H2S #H3S #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U
+[ #G2 #K2 #U #HTU #L1 #HL12 elim (reqg_fqu_trans … HTU … HL12) -L2
+ /3 width=5 by fqu_fqup, ex3_2_intro/
+| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12
+ elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0
+ elim (reqg_fqu_trans … HU2 … HK0) -K // #K1 #U1 #HU1 #HU12 #HK12
+ elim (teqg_fqu_trans … HU1 … HU0) -U // #K3 #U3 #HU03 #HU31 #HK31
+ @(ex3_2_intro … K3 U3) (**) (* full auto too slow *)
+ /3 width=5 by reqg_trans, teqg_reqg_conf_sn, fqup_strap1, teqg_trans/
+]
+qed-.
+
+lemma teqg_fqup_trans (S) (b):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛[S] U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂+[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2.
+#S #b #H1S #H2S #H3S #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1
+[ #G1 #L1 #U1 #H #U2 #HU21 elim (teqg_fqu_trans … H … HU21) -U1 //
+ /3 width=5 by fqu_fqup, ex3_2_intro/
+| #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21
+ elim (teqg_fqu_trans … H … HU21) -U1 // #L0 #T #H1 #HTU #HL0
+ lapply (teqg_reqg_div … HTU … HL0) -HL0 // #HL0
+ elim (IH … HTU) -U #K2 #U1 #H2 #HUT1 #HKL2
+ elim (reqg_fqup_trans … H2 … HL0) -L // #K #U #H2 #HU1 #HK2
+ lapply (teqg_reqg_conf_sn … HUT1 … HK2) -HK2 // #HK2
+ /3 width=7 by reqg_trans, fqup_strap2, teqg_trans, ex3_2_intro/
+]
+qed-.
+
+(* Properties with star-iterated structural successor for closures **********)
+
+lemma teqg_fqus_trans (S) (b):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,T1❫ →
+ ∀U2. U2 ≛[S] U1 →
+ ∃∃L,T2. ❪G1,L1,U2❫ ⬂*[b] ❪G2,L,T2❫ & T2 ≛[S] T1 & L ≛[S,T1] L2.
+#S #b #H1S #H2S #H3S #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H
+[ #H elim (teqg_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/
+| * #HG #HL #HT destruct /3 width=5 by reqg_refl, ex3_2_intro/
+]
+qed-.
+
+(* Basic_2A1: was just: lleq_fqus_trans *)
+lemma reqg_fqus_trans (S) (b):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂*[b] ❪G2,K2,U❫ →
+ ∀L1. L1 ≛[S,T] L2 →
+ ∃∃K1,U0. ❪G1,L1,T❫ ⬂*[b] ❪G2,K1,U0❫ & U0 ≛[S] U & K1 ≛[S,U] K2.
+#S #b #H1S #H2S #H3S #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H
+[ #H elim (reqg_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/
+| * #HG #HL #HT destruct /3 width=5 by teqg_refl, ex3_2_intro/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/relocation/lifts_teqg.ma".
+include "static_2/static/rex_length.ma".
+include "static_2/static/rex_fsle.ma".
+include "static_2/static/reqg.ma".
+
+(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********)
+
+(* Advanved properties with free variables inclusion ************************)
+
+lemma reqg_fsge_comp (S):
+ reflexive … S →
+ rex_fsge_compatible (ceqg S).
+#S #HS #L1 #L2 #T * #f1 #Hf1 #HL12
+lapply (frees_seqg_conf … Hf1 … HL12)
+lapply (sex_fwd_length … HL12)
+/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
+qed-.
+
+(* Properties with length for local environments ****************************)
+
+(* Basic_2A1: uses: lleq_sort *)
+lemma reqg_sort_length (S):
+ ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[S,⋆s] L2.
+/2 width=1 by rex_sort_length/ qed.
+
+(* Basic_2A1: uses: lleq_gref *)
+lemma reqg_gref_length (S):
+ ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[S,§l] L2.
+/2 width=1 by rex_gref_length/ qed.
+
+lemma reqg_unit_length (S):
+ ∀L1,L2. |L1| = |L2| →
+ ∀I. L1.ⓤ[I] ≛[S,#0] L2.ⓤ[I].
+/2 width=1 by rex_unit_length/ qed.
+
+(* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *)
+lemma reqg_lifts_bi (S):
+ ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[S,T] K2 →
+ ∀b,f. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
+ ∀U. ⇧*[f] T ≘ U → L1 ≛[S,U] L2.
+/3 width=9 by rex_lifts_bi, teqg_lifts_sn/ qed-.
+
+(* Forward lemmas with length for local environments ************************)
+
+(* Basic_2A1: lleq_fwd_length *)
+lemma reqg_fwd_length (S):
+ ∀L1,L2. ∀T:term. L1 ≛[S,T] L2 → |L1| = |L2|.
+/2 width=3 by rex_fwd_length/ qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/ext2_ext2.ma".
+include "static_2/syntax/teqg_teqg.ma".
+include "static_2/static/rex_rex.ma".
+include "static_2/static/reqg_length.ma".
+
+(* GENERIC EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***********)
+
+(* Advanced forward lemmas **************************************************)
+
+lemma frees_reqg_conf (S):
+ reflexive … S →
+ ∀f,L1,T. L1 ⊢ 𝐅+❪T❫ ≘ f →
+ ∀L2. L1 ≛[S,T] L2 → L2 ⊢ 𝐅+❪T❫ ≘ f.
+/3 width=7 by frees_seqg_conf, rex_inv_frees/ qed-.
+
+(* Properties with free variables inclusion for restricted closures *******)
+
+lemma reqg_fsle_comp (S):
+ reflexive … S →
+ rex_fsle_compatible (ceqg S).
+#S #HS #L1 #L2 #T #HL12
+elim (frees_total L1 T) #f #Hf
+/4 width=8 by frees_reqg_conf, rex_fwd_length, lveq_length_eq, sle_refl, ex4_4_intro/
+qed.
+
+(* Advanced properties ******************************************************)
+
+lemma reqg_sym (S) (T):
+ reflexive … S → symmetric … S →
+ symmetric … (reqg S T).
+/3 width=3 by reqg_fsge_comp, rex_sym, teqg_sym/ qed-.
+
+(* Basic_2A1: uses: lleq_dec *)
+lemma reqg_dec (S):
+ (∀s1,s2. Decidable … (S s1 s2)) →
+ ∀L1,L2. ∀T:term. Decidable (L1 ≛[S,T] L2).
+/3 width=1 by rex_dec, teqg_dec/ qed-.
+
+(* Main properties **********************************************************)
+
+(* Basic_2A1: uses: lleq_bind lleq_bind_O *)
+theorem reqg_bind (S):
+ ∀p,I,L1,L2,V1,V2,T.
+ L1 ≛[S,V1] L2 → L1.ⓑ[I]V1 ≛[S,T] L2.ⓑ[I]V2 →
+ L1 ≛[S,ⓑ[p,I]V1.T] L2.
+/2 width=2 by rex_bind/ qed.
+
+(* Basic_2A1: uses: lleq_flat *)
+theorem reqg_flat (S):
+ ∀I,L1,L2,V,T.
+ L1 ≛[S,V] L2 → L1 ≛[S,T] L2 → L1 ≛[S,ⓕ[I]V.T] L2.
+/2 width=1 by rex_flat/ qed.
+
+theorem reqg_bind_void (S):
+ ∀p,I,L1,L2,V,T.
+ L1 ≛[S,V] L2 → L1.ⓧ ≛[S,T] L2.ⓧ → L1 ≛[S,ⓑ[p,I]V.T] L2.
+/2 width=1 by rex_bind_void/ qed.
+
+(* Basic_2A1: uses: lleq_trans *)
+theorem reqg_trans (S) (T):
+ reflexive … S → Transitive … S →
+ Transitive … (reqg S T).
+#S #T #H1S #H2S #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
+lapply (frees_teqg_conf_seqg … Hf1 T … HL1) /2 width=1 by teqg_refl/ #H0
+lapply (frees_mono … Hf2 … H0) -Hf2 -H0
+/5 width=7 by sex_trans, sex_eq_repl_back, teqg_trans, ext2_trans, ex2_intro/
+qed-.
+
+(* Basic_2A1: uses: lleq_canc_sn *)
+theorem reqg_canc_sn (S) (T):
+ reflexive … S → symmetric … S → Transitive … S →
+ left_cancellable … (reqg S T).
+/3 width=3 by reqg_trans, reqg_sym/ qed-.
+
+(* Basic_2A1: uses: lleq_canc_dx *)
+theorem reqg_canc_dx (S) (T):
+ reflexive … S → symmetric … S → Transitive … S →
+ right_cancellable … (reqg S T).
+/3 width=3 by reqg_trans, reqg_sym/ qed-.
+
+theorem reqg_repl (S) (T:term):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀L1,L2. L1 ≛[S,T] L2 →
+ ∀K1. L1 ≛[S,T] K1 → ∀K2. L2 ≛[S,T] K2 → K1 ≛[S,T] K2.
+/3 width=3 by reqg_canc_sn, reqg_trans/ qed-.
+
+(* Negated properties *******************************************************)
+
+(* Note: auto works with /4 width=8/ so reqg_canc_sn is preferred **********)
+(* Basic_2A1: uses: lleq_nlleq_trans *)
+lemma reqg_rneqg_trans (S) (T:term):
+ reflexive … S → symmetric … S → Transitive … S →
+ ∀L1,L. L1 ≛[S,T] L →
+ ∀L2. (L ≛[S,T] L2 → ⊥) → (L1 ≛[S,T] L2 → ⊥).
+/3 width=3 by reqg_canc_sn/ qed-.
+
+(* Basic_2A1: uses: nlleq_lleq_div *)
+lemma rneqg_reqg_div (S) (T:term):
+ reflexive … S → Transitive … S →
+ ∀L2,L. L2 ≛[S,T] L →
+ ∀L1. (L1 ≛[S,T] L → ⊥) → (L1 ≛[S,T] L2 → ⊥).
+/3 width=3 by reqg_trans/ qed-.
+
+theorem rneqg_reqg_canc_dx (S) (T:term):
+ reflexive … S → Transitive … S →
+ ∀L1,L. (L1 ≛[S,T] L → ⊥) →
+ ∀L2. L2 ≛[S,T] L → L1 ≛[S,T] L2 → ⊥.
+/3 width=3 by reqg_trans/ qed-.
+
+(* Negated inversion lemmas *************************************************)
+
+(* Basic_2A1: uses: nlleq_inv_bind nlleq_inv_bind_O *)
+lemma rneqg_inv_bind (S):
+ (∀s1,s2. Decidable … (S s1 s2)) →
+ ∀p,I,L1,L2,V,T. (L1 ≛[S,ⓑ[p,I]V.T] L2 → ⊥) →
+ ∨∨ L1 ≛[S,V] L2 → ⊥ | (L1.ⓑ[I]V ≛[S,T] L2.ⓑ[I]V → ⊥).
+/3 width=2 by rnex_inv_bind, teqg_dec/ qed-.
+
+(* Basic_2A1: uses: nlleq_inv_flat *)
+lemma rneqg_inv_flat (S):
+ (∀s1,s2. Decidable … (S s1 s2)) →
+ ∀I,L1,L2,V,T. (L1 ≛[S,ⓕ[I]V.T] L2 → ⊥) →
+ ∨∨ L1 ≛[S,V] L2 → ⊥ | (L1 ≛[S,T] L2 → ⊥).
+/3 width=2 by rnex_inv_flat, teqg_dec/ qed-.
+
+lemma rneqg_inv_bind_void (S):
+ (∀s1,s2. Decidable … (S s1 s2)) →
+ ∀p,I,L1,L2,V,T. (L1 ≛[S,ⓑ[p,I]V.T] L2 → ⊥) →
+ ∨∨ L1 ≛[S,V] L2 → ⊥ | (L1.ⓧ ≛[S,T] L2.ⓧ → ⊥).
+/3 width=3 by rnex_inv_bind_void, teqg_dec/ qed-.
(* *)
(**************************************************************************)
-include "static_2/notation/relations/stareqsn_3.ma".
+include "static_2/notation/relations/approxeqsn_3.ma".
include "static_2/syntax/teqx_ext.ma".
-include "static_2/static/rex.ma".
+include "static_2/static/reqg.ma".
(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
-
+(*
definition reqx: relation3 … ≝
- rex cdeq.
-
+ reqg sfull.
+*)
interpretation
"sort-irrelevant equivalence on referred entries (local environment)"
- 'StarEqSn T L1 L2 = (reqx T L1 L2).
+ 'ApproxEqSn T L1 L2 = (reqg sfull T L1 L2).
interpretation
"sort-irrelevant ranged equivalence (local environment)"
- 'StarEqSn f L1 L2 = (sex cdeq_ext cfull f L1 L2).
+ 'StarEqSn f L1 L2 = (sex ceqx_ext cfull f L1 L2).
(* Basic properties ***********************************************************)
-
+(*
lemma frees_teqx_conf_reqx:
∀f,L1,T1. L1 ⊢ 𝐅+❪T1❫ ≘ f → ∀T2. T1 ≛ T2 →
∀L2. L1 ≛[f] L2 → L2 ⊢ 𝐅+❪T2❫ ≘ f.
∀I,I1,L1,L2.∀T:term. L1.ⓘ[I] ≛[T] L2.ⓘ[I1] →
∀I2. I ≛ I2 → L1.ⓘ[I] ≛[T] L2.ⓘ[I2].
/2 width=2 by rex_bind_repl_dx/ qed-.
-
+*)
+lemma reqg_reqx (S) (T):
+ ∀L1,L2. L1 ≛[S,T] L2 → L1 ≅[T] L2.
+/2 width=3 by reqg_co/ qed.
+(*
(* Basic inversion lemmas ***************************************************)
lemma reqx_inv_atom_sn:
∀I2,L1,K2. ∀T:term. L1 ≛[T] K2.ⓘ[I2] →
∃∃I1,K1. L1 = K1.ⓘ[I1].
/2 width=5 by rex_fwd_dx/ qed-.
+*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/relocation/lifts_teqx.ma".
-include "static_2/static/rex_drops.ma".
-include "static_2/static/reqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
-
-(* Properties with generic slicing for local environments *******************)
-
-lemma reqx_lifts_sn: f_dedropable_sn cdeq.
-/3 width=5 by rex_liftable_dedropable_sn, teqx_lifts_sn/ qed-.
-
-(* Inversion lemmas with generic slicing for local environments *************)
-
-lemma reqx_inv_lifts_sn: f_dropable_sn cdeq.
-/2 width=5 by rex_dropable_sn/ qed-.
-
-lemma reqx_inv_lifts_dx: f_dropable_dx cdeq.
-/2 width=5 by rex_dropable_dx/ qed-.
-
-lemma reqx_inv_lifts_bi: ∀L1,L2,U. L1 ≛[U] L2 → ∀b,f. 𝐔❪f❫ →
- ∀K1,K2. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
- ∀T. ⇧*[f] T ≘ U → K1 ≛[T] K2.
-/2 width=10 by rex_inv_lifts_bi/ qed-.
-
-lemma reqx_inv_lref_pair_sn: ∀L1,L2,i. L1 ≛[#i] L2 → ∀I,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 →
- ∃∃K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 & K1 ≛[V1] K2 & V1 ≛ V2.
-/2 width=3 by rex_inv_lref_pair_sn/ qed-.
-
-lemma reqx_inv_lref_pair_dx: ∀L1,L2,i. L1 ≛[#i] L2 → ∀I,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 →
- ∃∃K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 & K1 ≛[V1] K2 & V1 ≛ V2.
-/2 width=3 by rex_inv_lref_pair_dx/ qed-.
-
-lemma reqx_inv_lref_pair_bi (L1) (L2) (i):
- L1 ≛[#i] L2 →
- ∀I1,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I1]V1 →
- ∀I2,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I2]V2 →
- ∧∧ K1 ≛[V1] K2 & V1 ≛ V2 & I1 = I2.
-/2 width=6 by rex_inv_lref_pair_bi/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/rex_fqup.ma".
-include "static_2/static/reqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
-
-(* Advanced properties ******************************************************)
-
-lemma reqx_refl: ∀T. reflexive … (reqx T).
-/2 width=1 by rex_refl/ qed.
-
-lemma reqx_pair_refl: ∀V1,V2. V1 ≛ V2 →
- ∀I,L. ∀T:term. L.ⓑ[I]V1 ≛[T] L.ⓑ[I]V2.
-/2 width=1 by rex_pair_refl/ qed.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma reqx_inv_bind_void: ∀p,I,L1,L2,V,T. L1 ≛[ⓑ[p,I]V.T] L2 →
- L1 ≛[V] L2 ∧ L1.ⓧ ≛[T] L2.ⓧ.
-/2 width=3 by rex_inv_bind_void/ qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma reqx_fwd_bind_dx_void: ∀p,I,L1,L2,V,T.
- L1 ≛[ⓑ[p,I]V.T] L2 → L1.ⓧ ≛[T] L2.ⓧ.
-/2 width=4 by rex_fwd_bind_dx_void/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/s_computation/fqus_fqup.ma".
-include "static_2/static/reqx_drops.ma".
-include "static_2/static/reqx_fqup.ma".
-include "static_2/static/reqx_reqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
-
-(* Properties with extended structural successor for closures ***************)
-
-lemma fqu_teqx_conf (b):
- ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ →
- ∀U2. U1 ≛ U2 →
- ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & L2 ≛[T1] L & T1 ≛ T2.
-#b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -G1 -G2 -L1 -L2 -U1 -T1
-[ #I #G #L #W #X #H >(teqx_inv_lref1 … H) -X
- /2 width=5 by fqu_lref_O, ex3_2_intro/
-| #I #G #L #W1 #U1 #X #H
- elim (teqx_inv_pair1 … H) -H #W2 #U2 #HW12 #_ #H destruct
- /2 width=5 by fqu_pair_sn, ex3_2_intro/
-| #p #I #G #L #W1 #U1 #Hb #X #H
- elim (teqx_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
- /3 width=5 by reqx_pair_refl, fqu_bind_dx, ex3_2_intro/
-| #p #I #G #L #W1 #U1 #Hb #X #H
- elim (teqx_inv_pair1 … H) -H #W2 #U2 #HW12 #HU12 #H destruct
- /3 width=5 by fqu_clear, ex3_2_intro/
-| #I #G #L #W1 #U1 #X #H
- elim (teqx_inv_pair1 … H) -H #W2 #U2 #_ #HU12 #H destruct
- /2 width=5 by fqu_flat_dx, ex3_2_intro/
-| #I #G #L #T1 #U1 #HTU1 #U2 #HU12
- elim (teqx_inv_lifts_sn … HU12 … HTU1) -U1
- /3 width=5 by fqu_drop, ex3_2_intro/
-]
-qed-.
-
-lemma teqx_fqu_trans (b):
- ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂[b] ❪G2,L2,T1❫ →
- ∀U2. U2 ≛ U1 →
- ∃∃L,T2. ❪G1,L1,U2❫ ⬂[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
-#b #G1 #G2 #L1 #L2 #U1 #T1 #H12 #U2 #HU21
-elim (fqu_teqx_conf … H12 U2) -H12
-/3 width=5 by reqx_sym, teqx_sym, ex3_2_intro/
-qed-.
-
-(* Basic_2A1: uses: lleq_fqu_trans *)
-lemma reqx_fqu_trans (b):
- ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂[b] ❪G2,K2,U❫ →
- ∀L1. L1 ≛[T] L2 →
- ∃∃K1,U0. ❪G1,L1,T❫ ⬂[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
-#b #G1 #G2 #L2 #K2 #T #U #H elim H -G1 -G2 -L2 -K2 -T -U
-[ #I #G #L2 #V2 #L1 #H elim (reqx_inv_zero_pair_dx … H) -H
- #K1 #V1 #HV1 #HV12 #H destruct
- /3 width=7 by teqx_reqx_conf_sn, fqu_lref_O, ex3_2_intro/
-| * [ #p ] #I #G #L2 #V #T #L1 #H
- [ elim (reqx_inv_bind … H)
- | elim (reqx_inv_flat … H)
- ] -H
- /2 width=5 by fqu_pair_sn, ex3_2_intro/
-| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqx_inv_bind … H) -H
- /3 width=5 by fqu_bind_dx, ex3_2_intro/
-| #p #I #G #L2 #V #T #Hb #L1 #H elim (reqx_inv_bind_void … H) -H
- /3 width=5 by fqu_clear, ex3_2_intro/
-| #I #G #L2 #V #T #L1 #H elim (reqx_inv_flat … H) -H
- /2 width=5 by fqu_flat_dx, ex3_2_intro/
-| #I #G #L2 #T #U #HTU #Y #HU
- elim (reqx_fwd_dx … HU) #L1 #V1 #H destruct
- /5 width=14 by reqx_inv_lifts_bi, fqu_drop, drops_refl, drops_drop, ex3_2_intro/
-]
-qed-.
-
-(* Properties with optional structural successor for closures ***************)
-
-lemma teqx_fquq_trans (b):
- ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂⸮[b] ❪G2,L2,T1❫ →
- ∀U2. U2 ≛ U1 →
- ∃∃L,T2. ❪G1,L1,U2❫ ⬂⸮[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
-#b #G1 #G2 #L1 #L2 #U1 #T1 #H elim H -H
-[ #H #U2 #HU21 elim (teqx_fqu_trans … H … HU21) -U1
- /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-(* Basic_2A1: was just: lleq_fquq_trans *)
-lemma reqx_fquq_trans (b):
- ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂⸮[b] ❪G2,K2,U❫ →
- ∀L1. L1 ≛[T] L2 →
- ∃∃K1,U0. ❪G1,L1,T❫ ⬂⸮[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
-#b #G1 #G2 #L2 #K2 #T #U #H elim H -H
-[ #H #L1 #HL12 elim (reqx_fqu_trans … H … HL12) -L2 /3 width=5 by fqu_fquq, ex3_2_intro/
-| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-(* Properties with plus-iterated structural successor for closures **********)
-
-(* Basic_2A1: was just: lleq_fqup_trans *)
-lemma reqx_fqup_trans (b):
- ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂+[b] ❪G2,K2,U❫ →
- ∀L1. L1 ≛[T] L2 →
- ∃∃K1,U0. ❪G1,L1,T❫ ⬂+[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
-#b #G1 #G2 #L2 #K2 #T #U #H @(fqup_ind … H) -G2 -K2 -U
-[ #G2 #K2 #U #HTU #L1 #HL12 elim (reqx_fqu_trans … HTU … HL12) -L2
- /3 width=5 by fqu_fqup, ex3_2_intro/
-| #G #G2 #K #K2 #U #U2 #_ #HU2 #IHTU #L1 #HL12
- elim (IHTU … HL12) -L2 #K0 #U0 #HTU #HU0 #HK0
- elim (reqx_fqu_trans … HU2 … HK0) -K #K1 #U1 #HU1 #HU12 #HK12
- elim (teqx_fqu_trans … HU1 … HU0) -U #K3 #U3 #HU03 #HU31 #HK31
- @(ex3_2_intro … K3 U3) (**) (* full auto too slow *)
- /3 width=5 by reqx_trans, teqx_reqx_conf_sn, fqup_strap1, teqx_trans/
-]
-qed-.
-
-lemma teqx_fqup_trans (b):
- ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂+[b] ❪G2,L2,T1❫ →
- ∀U2. U2 ≛ U1 →
- ∃∃L,T2. ❪G1,L1,U2❫ ⬂+[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
-#b #G1 #G2 #L1 #L2 #U1 #T1 #H @(fqup_ind_dx … H) -G1 -L1 -U1
-[ #G1 #L1 #U1 #H #U2 #HU21 elim (teqx_fqu_trans … H … HU21) -U1
- /3 width=5 by fqu_fqup, ex3_2_intro/
-| #G1 #G #L1 #L #U1 #U #H #_ #IH #U2 #HU21
- elim (teqx_fqu_trans … H … HU21) -U1 #L0 #T #H1 #HTU #HL0
- lapply (teqx_reqx_div … HTU … HL0) -HL0 #HL0
- elim (IH … HTU) -U #K2 #U1 #H2 #HUT1 #HKL2
- elim (reqx_fqup_trans … H2 … HL0) -L #K #U #H2 #HU1 #HK2
- lapply (teqx_reqx_conf_sn … HUT1 … HK2) -HK2 #HK2
- /3 width=7 by reqx_trans, fqup_strap2, teqx_trans, ex3_2_intro/
-]
-qed-.
-
-(* Properties with star-iterated structural successor for closures **********)
-
-lemma teqx_fqus_trans (b):
- ∀G1,G2,L1,L2,U1,T1. ❪G1,L1,U1❫ ⬂*[b] ❪G2,L2,T1❫ →
- ∀U2. U2 ≛ U1 →
- ∃∃L,T2. ❪G1,L1,U2❫ ⬂*[b] ❪G2,L,T2❫ & T2 ≛ T1 & L ≛[T1] L2.
-#b #G1 #G2 #L1 #L2 #U1 #T1 #H #U2 #HU21 elim(fqus_inv_fqup … H) -H
-[ #H elim (teqx_fqup_trans … H … HU21) -U1 /3 width=5 by fqup_fqus, ex3_2_intro/
-| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-(* Basic_2A1: was just: lleq_fqus_trans *)
-lemma reqx_fqus_trans (b):
- ∀G1,G2,L2,K2,T,U. ❪G1,L2,T❫ ⬂*[b] ❪G2,K2,U❫ →
- ∀L1. L1 ≛[T] L2 →
- ∃∃K1,U0. ❪G1,L1,T❫ ⬂*[b] ❪G2,K1,U0❫ & U0 ≛ U & K1 ≛[U] K2.
-#b #G1 #G2 #L2 #K2 #T #U #H #L1 #HL12 elim(fqus_inv_fqup … H) -H
-[ #H elim (reqx_fqup_trans … H … HL12) -L2 /3 width=5 by fqup_fqus, ex3_2_intro/
-| * #HG #HL #HT destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/relocation/lifts_teqx.ma".
-include "static_2/static/rex_length.ma".
-include "static_2/static/rex_fsle.ma".
-include "static_2/static/reqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
-
-(* Advanved properties with free variables inclusion ************************)
-
-lemma reqx_fsge_comp: rex_fsge_compatible cdeq.
-#L1 #L2 #T * #f1 #Hf1 #HL12
-lapply (frees_reqx_conf … Hf1 … HL12)
-lapply (sex_fwd_length … HL12)
-/3 width=8 by lveq_length_eq, ex4_4_intro/ (**) (* full auto fails *)
-qed-.
-
-(* Properties with length for local environments ****************************)
-
-(* Basic_2A1: uses: lleq_sort *)
-lemma reqx_sort_length: ∀L1,L2. |L1| = |L2| → ∀s. L1 ≛[⋆s] L2.
-/2 width=1 by rex_sort_length/ qed.
-
-(* Basic_2A1: uses: lleq_gref *)
-lemma reqx_gref_length: ∀L1,L2. |L1| = |L2| → ∀l. L1 ≛[§l] L2.
-/2 width=1 by rex_gref_length/ qed.
-
-lemma reqx_unit_length: ∀L1,L2. |L1| = |L2| →
- ∀I. L1.ⓤ[I] ≛[#0] L2.ⓤ[I].
-/2 width=1 by rex_unit_length/ qed.
-
-(* Basic_2A1: uses: lleq_lift_le lleq_lift_ge *)
-lemma reqx_lifts_bi: ∀L1,L2. |L1| = |L2| → ∀K1,K2,T. K1 ≛[T] K2 →
- ∀b,f. ⇩*[b,f] L1 ≘ K1 → ⇩*[b,f] L2 ≘ K2 →
- ∀U. ⇧*[f] T ≘ U → L1 ≛[U] L2.
-/3 width=9 by rex_lifts_bi, teqx_lifts_sn/ qed-.
-
-(* Forward lemmas with length for local environments ************************)
-
-(* Basic_2A1: lleq_fwd_length *)
-lemma reqx_fwd_length: ∀L1,L2. ∀T:term. L1 ≛[T] L2 → |L1| = |L2|.
-/2 width=3 by rex_fwd_length/ qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/static/req_fsle.ma".
-include "static_2/static/reqx.ma".
-
-(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
-
-(* Properties with syntactic equivalence on referred entries ****************)
-
-lemma req_reqx: ∀L1,L2. ∀T:term. L1 ≡[T] L2 → L1 ≛[T] L2.
-/2 width=3 by rex_co/ qed.
-
-lemma req_reqx_trans: ∀L1,L. ∀T:term. L1 ≡[T] L →
- ∀L2. L ≛[T] L2 → L1 ≛[T] L2.
-/2 width=3 by req_rex_trans/ qed-.
(* *)
(**************************************************************************)
-include "static_2/syntax/ext2_ext2.ma".
-include "static_2/syntax/teqx_teqx.ma".
-include "static_2/static/reqx_length.ma".
+include "static_2/static/reqg_reqg.ma".
+include "static_2/static/reqx.ma".
(* SORT-IRRELEVANT EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ***)
(* Advanced properties ******************************************************)
-
+(*
lemma reqx_sym: ∀T. symmetric … (reqx T).
/3 width=3 by reqx_fsge_comp, rex_sym, teqx_sym/ qed-.
-
+*)
(* Basic_2A1: uses: lleq_dec *)
-lemma reqx_dec: â\88\80L1,L2. â\88\80T:term. Decidable (L1 â\89\9b[T] L2).
-/3 width=1 by rex_dec, teqx_dec/ qed-.
-
+lemma reqx_dec: â\88\80L1,L2. â\88\80T:term. Decidable (L1 â\89\85[T] L2).
+/2 width=1 by reqg_dec/ qed-.
+(*
(* Main properties **********************************************************)
(* Basic_2A1: uses: lleq_bind lleq_bind_O *)
theorem reqx_canc_dx: ∀T. right_cancellable … (reqx T).
/3 width=3 by reqx_trans, reqx_sym/ qed-.
-theorem reqx_repl: â\88\80L1,L2. â\88\80T:term. L1 â\89\9b[T] L2 →
- â\88\80K1. L1 â\89\9b[T] K1 â\86\92 â\88\80K2. L2 â\89\9b[T] K2 â\86\92 K1 â\89\9b[T] K2.
-/3 width=3 by reqx_canc_sn, reqx_trans/ qed-.
+theorem reqx_repl: â\88\80L1,L2. â\88\80T:term. L1 â\89\85[T] L2 →
+ â\88\80K1. L1 â\89\85[T] K1 â\86\92 â\88\80K2. L2 â\89\85[T] K2 â\86\92 K1 â\89\85[T] K2.
+/2 width=5 by reqg_repl/ qed-.
(* Negated properties *******************************************************)
lemma rneqx_inv_bind_void: ∀p,I,L1,L2,V,T. (L1 ≛[ⓑ[p,I]V.T] L2 → ⊥) →
(L1 ≛[V] L2 → ⊥) ∨ (L1.ⓧ ≛[T] L2.ⓧ → ⊥).
/3 width=3 by rnex_inv_bind_void, teqx_dec/ qed-.
+*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/cext2.ma".
-
-(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************)
-
-definition ceq_ext: lenv → relation bind ≝
- cext2 ceq.
-
-(* Basic properties *********************************************************)
-
-lemma ceq_ext_refl (L): reflexive … (ceq_ext L).
-/2 width=1 by ext2_refl/ qed.
-
-(* Basic inversion lemmas ***************************************************)
-
-lemma ceq_ext_inv_eq: ∀L,I1,I2. ceq_ext L I1 I2 → I1 = I2.
-#L #I1 #I2 * -I1 -I2 //
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/ceq_ext.ma".
-
-(* CONTEXT-AWARE SYNTACTIC EQUIVALENCE FOR BINDERS **************************)
-
-(* Main properties **********************************************************)
-
-theorem ceq_ext_trans: ∀L1,I1,I. ceq_ext L1 I1 I →
- ∀L2,I2. ceq_ext L2 I I2 → ∀L3. ceq_ext L3 I1 I2.
-#L1 #I1 #I * -I1 -I //
-#I1 #V1 #V #HV1 #L2 #Z #H elim (ext2_inv_pair_sn … H) -H //
-qed-.
definition cfull: relation3 lenv bind bind ≝ λL,I1,I2. ⊤.
-definition ceq: relation3 lenv term term ≝ λL. eq ….
-
(* Basic properties *********************************************************)
lemma eq_lenv_dec: ∀L1,L2:lenv. Decidable (L1 = L2).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/notation/relations/ideq_2.ma".
+include "static_2/syntax/teqg.ma".
+
+(* SYNTACTIC EQUIVALENCE ON TERMS *******************************************)
+
+definition teq: relation term ≝
+ teqg (eq …).
+
+interpretation
+ "context-free syntactic equivalence (term)"
+ 'IdEq T1 T2 = (teq T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma teq_refl:
+ reflexive … teq.
+/2 width=1 by teqg_refl/ qed.
+
+lemma teq_sym:
+ symmetric … teq.
+/2 width=1 by teqg_sym/ qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma teq_inv_eq:
+ ∀T1,T2. T1 ≡ T2 → T1 = T2.
+#T1 #T2 #H elim H -H //
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma teq_repl_1 (R:predicate …):
+ ∀T1. R T1 → ∀T2. T1 ≡ T2 → R T2.
+#R #T1 #HT1 #T2 #HT12
+<(teq_inv_eq … HT12) -T2 //
+qed-.
+
+lemma teq_sym_repl_1 (R:predicate …):
+ ∀T1. R T1 → ∀T2. T2 ≡ T1 → R T2.
+#R #T1 #HT1 #T2 #HT12
+>(teq_inv_eq … HT12) -T2 //
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/notation/relations/ideq_3.ma".
+include "static_2/syntax/teqg_ext.ma".
+include "static_2/syntax/teq.ma".
+
+(* SYNTACTIC EQUIVALENCE ****************************************************)
+
+definition ceq: relation3 lenv term term ≝
+ ceqg (eq …).
+
+definition ceq_ext: lenv → relation bind ≝
+ ceqg_ext (eq …).
+
+interpretation
+ "context-dependent syntactic equivalence (term)"
+ 'IdEq L T1 T2 = (ceq L T1 T2).
+
+interpretation
+ "context-dependent syntactic equivalence (binder)"
+ 'IdEq L I1 I2 = (ceq_ext L I1 I2).
+
+(* Basic properties *********************************************************)
+
+lemma ceq_ext_refl (L):
+ reflexive … (ceq_ext L).
+/2 width=1 by ext2_refl/ qed.
+
+lemma ceq_ext_sym (L):
+ symmetric … (ceq_ext L).
+#L @ext2_sym (**) (* full auto does not work *)
+/2 width=1 by teq_sym/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+lemma ceq_ext_inv_eq (L):
+ ∀I1,I2. L ⊢ I1 ≡ I2 → I1 = I2.
+#L #I1 #I2 * -I1 -I2
+/3 width=4 by teq_inv_eq, eq_f3/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teq_teq.ma".
+include "static_2/syntax/teq_ext.ma".
+
+(* SYNTACTIC EQUIVALENCE ****************************************************)
+
+(* Main properties **********************************************************)
+
+theorem ceq_ext_trans (I):
+ ∀L1,I1. L1 ⊢ I1 ≡ I → ∀L2,I2. L2 ⊢ I ≡ I2 → ∀L3. L3 ⊢ I1 ≡ I2.
+#I #L1 #I1 * -I1 -I //
+#I1 #V1 #V #HV1 #L2 #Z #H
+elim (ext2_inv_pair_sn … H) -H #V2 #HV2 #H #L3 destruct
+/3 width=3 by ext2_pair, teq_trans/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teq.ma".
+
+(* SYNTACTIC EQUIVALENCE ON TERMS *******************************************)
+
+(* Main forward properties **************************************************)
+
+theorem teq_trans:
+ Transitive … teq.
+/2 width=3 by teq_repl_1/ qed-.
+(*
+theorem teq_repl_2 (R):
+ replace_2 … R teq teq.
+#R #T1 #U1 #HTU1 #T2 #HT12 #U2 #HU12
+<(teq_inv_eq … HT12) -T2 <(teq_inv_eq … HU12) -U2 //
+qed-.
+*)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_3_2.ma".
+include "static_2/notation/relations/stareq_3.ma".
+include "static_2/syntax/term.ma".
+
+(* GENERIC EQUIVALENCE ON TERMS *********************************************)
+
+inductive teqg (S:relation …): relation term ≝
+| teqg_sort: ∀s1,s2. S s1 s2 → teqg S (⋆s1) (⋆s2)
+| teqg_lref: ∀i. teqg S (#i) (#i)
+| teqg_gref: ∀l. teqg S (§l) (§l)
+| teqg_pair: ∀I,V1,V2,T1,T2. teqg S V1 V2 → teqg S T1 T2 → teqg S (②[I]V1.T1) (②[I]V2.T2)
+.
+
+interpretation
+ "context-free generic equivalence (term)"
+ 'StarEq S T1 T2 = (teqg S T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma teqg_refl (S):
+ reflexive … S → reflexive … (teqg S).
+#S #HS #T elim T -T /2 width=1 by teqg_pair/
+* /2 width=1 by teqg_sort, teqg_lref, teqg_gref/
+qed.
+
+lemma teqg_sym (S):
+ symmetric … S → symmetric … (teqg S).
+#S #HS #T1 #T2 #H elim H -T1 -T2
+/3 width=3 by teqg_sort, teqg_lref, teqg_gref, teqg_pair/
+qed-.
+
+alias symbol "subseteq" (instance 3) = "relation inclusion".
+lemma teqg_co (S1) (S2):
+ S1 ⊆ S2 →
+ ∀T1,T2. T1 ≛[S1] T2 → T1 ≛[S2] T2.
+#S1 #S2 #HS #T1 #T2 #H elim H -T1 -T2
+/3 width=1 by teqg_pair, teqg_sort/
+qed-.
+
+(* Basic inversion lemmas ***************************************************)
+
+fact teqg_inv_sort1_aux (S):
+ ∀X,Y. X ≛[S] Y → ∀s1. X = ⋆s1 →
+ ∃∃s2. S s1 s2 & Y = ⋆s2.
+#S #X #Y * -X -Y
+[ #s1 #s2 #Hs12 #s #H destruct /2 width=3 by ex2_intro/
+| #i #s #H destruct
+| #l #s #H destruct
+| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
+]
+qed-.
+
+lemma teqg_inv_sort1 (S):
+ ∀Y,s1. ⋆s1 ≛[S] Y →
+ ∃∃s2. S s1 s2 & Y = ⋆s2.
+/2 width=4 by teqg_inv_sort1_aux/ qed-.
+
+fact teqg_inv_lref1_aux (S):
+ ∀X,Y. X ≛[S] Y → ∀i. X = #i → Y = #i.
+#S #X #Y * -X -Y //
+[ #s1 #s2 #_ #j #H destruct
+| #I #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
+]
+qed-.
+
+lemma teqg_inv_lref1 (S):
+ ∀Y,i. #i ≛[S] Y → Y = #i.
+/2 width=5 by teqg_inv_lref1_aux/ qed-.
+
+fact teqg_inv_gref1_aux (S):
+ ∀X,Y. X ≛[S] Y → ∀l. X = §l → Y = §l.
+#S #X #Y * -X -Y //
+[ #s1 #s2 #_ #k #H destruct
+| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct
+]
+qed-.
+
+lemma teqg_inv_gref1 (S):
+ ∀Y,l. §l ≛[S] Y → Y = §l.
+/2 width=5 by teqg_inv_gref1_aux/ qed-.
+
+fact teqg_inv_pair1_aux (S):
+ ∀X,Y. X ≛[S] Y → ∀I,V1,T1. X = ②[I]V1.T1 →
+ ∃∃V2,T2. V1 ≛[S] V2 & T1 ≛[S] T2 & Y = ②[I]V2.T2.
+#S #X #Y * -X -Y
+[ #s1 #s2 #_ #J #W1 #U1 #H destruct
+| #i #J #W1 #U1 #H destruct
+| #l #J #W1 #U1 #H destruct
+| #I #V1 #V2 #T1 #T2 #HV #HT #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma teqg_inv_pair1 (S):
+ ∀I,V1,T1,Y. ②[I]V1.T1 ≛[S] Y →
+ ∃∃V2,T2. V1 ≛[S] V2 & T1 ≛[S] T2 & Y = ②[I]V2.T2.
+/2 width=3 by teqg_inv_pair1_aux/ qed-.
+
+fact teqg_inv_sort2_aux (S):
+ ∀X,Y. X ≛[S] Y → ∀s2. Y = ⋆s2 →
+ ∃∃s1. S s1 s2 & X = ⋆s1.
+#S #X #Y * -X -Y
+[ #s1 #s2 #Hs12 #s #H destruct /2 width=3 by ex2_intro/
+| #i #s #H destruct
+| #l #s #H destruct
+| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
+]
+qed-.
+
+lemma teqg_inv_sort2 (S):
+ ∀X1,s2. X1 ≛[S] ⋆s2 →
+ ∃∃s1. S s1 s2 & X1 = ⋆s1.
+/2 width=3 by teqg_inv_sort2_aux/ qed-.
+
+fact teqg_inv_pair2_aux (S):
+ ∀X,Y. X ≛[S] Y → ∀I,V2,T2. Y = ②[I]V2.T2 →
+ ∃∃V1,T1. V1 ≛[S] V2 & T1 ≛[S] T2 & X = ②[I]V1.T1.
+#S #X #Y * -X -Y
+[ #s1 #s2 #_ #J #W2 #U2 #H destruct
+| #i #J #W2 #U2 #H destruct
+| #l #J #W2 #U2 #H destruct
+| #I #V1 #V2 #T1 #T2 #HV #HT #J #W2 #U2 #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma teqg_inv_pair2 (S):
+ ∀I,X1,V2,T2. X1 ≛[S] ②[I]V2.T2 →
+ ∃∃V1,T1. V1 ≛[S] V2 & T1 ≛[S] T2 & X1 = ②[I]V1.T1.
+/2 width=3 by teqg_inv_pair2_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma teqg_inv_pair (S):
+ ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ≛[S] ②[I2]V2.T2 →
+ ∧∧ I1 = I2 & V1 ≛[S] V2 & T1 ≛[S] T2.
+#S #I1 #I2 #V1 #V2 #T1 #T2 #H elim (teqg_inv_pair1 … H) -H
+#V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/
+qed-.
+
+lemma teqg_inv_pair_xy_x (S):
+ ∀I,V,T. ②[I]V.T ≛[S] V → ⊥.
+#S #I #V elim V -V
+[ #J #T #H elim (teqg_inv_pair1 … H) -H #X #Y #_ #_ #H destruct
+| #J #X #Y #IHX #_ #T #H elim (teqg_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/
+]
+qed-.
+
+lemma teqg_inv_pair_xy_y (S):
+ ∀I,T,V. ②[I]V.T ≛[S] T → ⊥.
+#S #I #T elim T -T
+[ #J #V #H elim (teqg_inv_pair1 … H) -H #X #Y #_ #_ #H destruct
+| #J #X #Y #_ #IHY #V #H elim (teqg_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/
+]
+qed-.
+
+(* Basic forward lemmas *****************************************************)
+
+lemma teqg_fwd_atom1 (S):
+ ∀I,Y. ⓪[I] ≛[S] Y → ∃J. Y = ⓪[J].
+#S * #x #Y #H [ elim (teqg_inv_sort1 … H) -H ]
+/3 width=4 by teqg_inv_gref1, teqg_inv_lref1, ex_intro/
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma teqg_dec (S):
+ (∀s1,s2. Decidable (S s1 s2)) →
+ ∀T1,T2. Decidable (T1 ≛[S] T2).
+#S #HS #T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
+[ elim (HS s1 s2) -HS [ /3 width=1 by or_introl, teqg_sort/ ] #HS
+ @or_intror #H
+ elim (teqg_inv_sort1 … H) -H #x #Hx #H destruct /2 width=1 by/
+|2,3,13:
+ @or_intror #H
+ elim (teqg_inv_sort1 … H) -H #x #_ #H destruct
+|4,6,14:
+ @or_intror #H
+ lapply (teqg_inv_lref1 … H) -H #H destruct
+|5:
+ elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
+ @or_intror #H
+ lapply (teqg_inv_lref1 … H) -H #H destruct /2 width=1 by/
+|7,8,15:
+ @or_intror #H
+ lapply (teqg_inv_gref1 … H) -H #H destruct
+|9:
+ elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
+ @or_intror #H
+ lapply (teqg_inv_gref1 … H) -H #H destruct /2 width=1 by/
+|10,11,12:
+ @or_intror #H
+ elim (teqg_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
+|16:
+ elim (eq_item2_dec I1 I2) #HI12 destruct
+ [ elim (IHV V2) -IHV #HV12
+ elim (IHT T2) -IHT #HT12
+ [ /3 width=1 by teqg_pair, or_introl/ ]
+ ]
+ @or_intror #H
+ elim (teqg_inv_pair … H) -H /2 width=1 by/
+]
+qed-.
+
+(* Negated inversion lemmas *************************************************)
+
+lemma tneqg_inv_pair (S):
+ (∀s1,s2. Decidable (S s1 s2)) →
+ ∀I1,I2,V1,V2,T1,T2.
+ (②[I1]V1.T1 ≛[S] ②[I2]V2.T2 → ⊥) →
+ ∨∨ I1 = I2 → ⊥
+ | (V1 ≛[S] V2 → ⊥)
+ | (T1 ≛[S] T2 → ⊥).
+#S #HS #I1 #I2 #V1 #V2 #T1 #T2 #H12
+elim (eq_item2_dec I1 I2) /3 width=1 by or3_intro0/ #H destruct
+elim (teqg_dec S … V1 V2) /3 width=1 by or3_intro1/
+elim (teqg_dec S … T1 T2) /4 width=1 by teqg_pair, or3_intro2/
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/notation/relations/stareq_4.ma".
+include "static_2/syntax/cext2.ma".
+include "static_2/syntax/teqg.ma".
+
+(* GENERIC EQUIVALENCE ******************************************************)
+
+definition teqg_ext (S): relation bind ≝
+ ext2 (teqg S).
+
+definition ceqg (S): relation3 lenv term term ≝
+ λL. (teqg S).
+
+definition ceqg_ext (S): relation3 lenv bind bind ≝
+ cext2 (ceqg S).
+
+interpretation
+ "context-free generic equivalence (binder)"
+ 'StarEq S I1 I2 = (teqg_ext S I1 I2).
+
+interpretation
+ "context-dependent generic equivalence (term)"
+ 'StarEq S L T1 T2 = (ceqg S L T1 T2).
+
+interpretation
+ "context-dependent generic equivalence (binder)"
+ 'StarEq S L I1 I2 = (ceqg_ext S L I1 I2).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqg.ma".
+
+(* GENERIC EQUIVALENCE ON TERMS *********************************************)
+
+(* Main properties **********************************************************)
+
+theorem teqg_trans (S):
+ Transitive … S → Transitive … (teqg S).
+#S #HS #T1 #T #H elim H -T1 -T //
+[ #s1 #s #Hs1 #X #H
+ elim (teqg_inv_sort1 … H) -H /3 width=3 by teqg_sort/
+| #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
+ elim (teqg_inv_pair1 … H) -H /3 width=1 by teqg_pair/
+]
+qed-.
+
+theorem teqg_canc_sn (S):
+ symmetric … S → Transitive … S →
+ left_cancellable … (teqg S).
+/3 width=3 by teqg_trans, teqg_sym/ qed-.
+
+theorem teqg_canc_dx (S):
+ symmetric … S → Transitive … S →
+ right_cancellable … (teqg S).
+/3 width=3 by teqg_trans, teqg_sym/ qed-.
+
+theorem teqg_repl (S):
+ symmetric … S → Transitive … S →
+ replace_2 … (teqg S) (teqg S) (teqg S).
+/3 width=3 by teqg_canc_sn, teqg_trans/ qed-.
+
+(* Negated main properies ***************************************************)
+
+theorem teqg_tneqg_trans (S):
+ symmetric … S → Transitive … S →
+ ∀T1,T. T1 ≛[S] T → ∀T2. (T ≛[S] T2 → ⊥) → T1 ≛[S] T2 → ⊥.
+/3 width=3 by teqg_canc_sn/ qed-.
+
+theorem tneqg_teqg_canc_dx (S):
+ Transitive … S →
+ ∀T1,T. (T1 ≛[S] T → ⊥) → ∀T2. T2 ≛[S] T → T1 ≛[S] T2 → ⊥.
+/3 width=3 by teqg_trans/ qed-.
(**************************************************************************)
include "ground/xoa/ex_1_2.ma".
-include "static_2/notation/relations/topiso_2.ma".
+include "static_2/notation/relations/tilde_2.ma".
include "static_2/syntax/term.ma".
(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
interpretation
"sort-irrelevant outer equivalence (term)"
- 'TopIso T1 T2 = (teqo T1 T2).
+ 'Tilde T1 T2 = (teqo T1 T2).
(* Basic inversion lemmas ***************************************************)
-fact teqo_inv_sort1_aux: ∀X,Y. X ⩳ Y → ∀s1. X = ⋆s1 →
+fact teqo_inv_sort1_aux: ∀X,Y. X ~ Y → ∀s1. X = ⋆s1 →
∃s2. Y = ⋆s2.
#X #Y * -X -Y
[ #s1 #s2 #s #H destruct /2 width=2 by ex_intro/
qed-.
(* Basic_1: was just: iso_gen_sort *)
-lemma teqo_inv_sort1: ∀Y,s1. ⋆s1 ⩳ Y →
+lemma teqo_inv_sort1: ∀Y,s1. ⋆s1 ~ Y →
∃s2. Y = ⋆s2.
/2 width=4 by teqo_inv_sort1_aux/ qed-.
-fact teqo_inv_lref1_aux: ∀X,Y. X ⩳ Y → ∀i. X = #i → Y = #i.
+fact teqo_inv_lref1_aux: ∀X,Y. X ~ Y → ∀i. X = #i → Y = #i.
#X #Y * -X -Y //
[ #s1 #s2 #j #H destruct
| #I #V1 #V2 #T1 #T2 #j #H destruct
qed-.
(* Basic_1: was: iso_gen_lref *)
-lemma teqo_inv_lref1: ∀Y,i. #i ⩳ Y → Y = #i.
+lemma teqo_inv_lref1: ∀Y,i. #i ~ Y → Y = #i.
/2 width=5 by teqo_inv_lref1_aux/ qed-.
-fact teqo_inv_gref1_aux: ∀X,Y. X ⩳ Y → ∀l. X = §l → Y = §l.
+fact teqo_inv_gref1_aux: ∀X,Y. X ~ Y → ∀l. X = §l → Y = §l.
#X #Y * -X -Y //
[ #s1 #s2 #k #H destruct
| #I #V1 #V2 #T1 #T2 #k #H destruct
]
qed-.
-lemma teqo_inv_gref1: ∀Y,l. §l ⩳ Y → Y = §l.
+lemma teqo_inv_gref1: ∀Y,l. §l ~ Y → Y = §l.
/2 width=5 by teqo_inv_gref1_aux/ qed-.
-fact teqo_inv_pair1_aux: ∀T1,T2. T1 ⩳ T2 →
+fact teqo_inv_pair1_aux: ∀T1,T2. T1 ~ T2 →
∀J,W1,U1. T1 = ②[J]W1.U1 →
∃∃W2,U2. T2 = ②[J]W2.U2.
#T1 #T2 * -T1 -T2
(* Basic_1: was: iso_gen_head *)
(* Basic_2A1: was: tsts_inv_pair1 *)
-lemma teqo_inv_pair1: ∀J,W1,U1,T2. ②[J]W1.U1 ⩳ T2 →
+lemma teqo_inv_pair1: ∀J,W1,U1,T2. ②[J]W1.U1 ~ T2 →
∃∃W2,U2. T2 = ②[J]W2. U2.
/2 width=7 by teqo_inv_pair1_aux/ qed-.
-fact teqo_inv_pair2_aux: ∀T1,T2. T1 ⩳ T2 →
+fact teqo_inv_pair2_aux: ∀T1,T2. T1 ~ T2 →
∀J,W2,U2. T2 = ②[J]W2.U2 →
∃∃W1,U1. T1 = ②[J]W1.U1.
#T1 #T2 * -T1 -T2
qed-.
(* Basic_2A1: was: tsts_inv_pair2 *)
-lemma teqo_inv_pair2: ∀J,T1,W2,U2. T1 ⩳ ②[J]W2.U2 →
+lemma teqo_inv_pair2: ∀J,T1,W2,U2. T1 ~ ②[J]W2.U2 →
∃∃W1,U1. T1 = ②[J]W1.U1.
/2 width=7 by teqo_inv_pair2_aux/ qed-.
(* Advanced inversion lemmas ************************************************)
-lemma teqo_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ⩳ ②[I2]V2.T2 →
+lemma teqo_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ~ ②[I2]V2.T2 →
I1 = I2.
#I1 #I2 #V1 #V2 #T1 #T2 #H elim (teqo_inv_pair1 … H) -H
#V0 #T0 #H destruct //
qed-.
(* Basic_2A1: was: tsts_dec *)
-lemma teqo_dec: ∀T1,T2. Decidable (T1 ⩳ T2).
+lemma teqo_dec: ∀T1,T2. Decidable (T1 ~ T2).
* [ * #s1 | #I1 #V1 #T1 ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
[ /3 width=1 by teqo_sort, or_introl/
|2,3,13:
(* Properies with simple (neutral) terms ************************************)
(* Basic_2A1: was: simple_tsts_repl_dx *)
-lemma simple_teqo_repl_dx: ∀T1,T2. T1 ⩳ T2 → 𝐒❪T1❫ → 𝐒❪T2❫.
+lemma simple_teqo_repl_dx: ∀T1,T2. T1 ~ T2 → 𝐒❪T1❫ → 𝐒❪T2❫.
#T1 #T2 * -T1 -T2 //
#I #V1 #V2 #T1 #T2 #H
elim (simple_inv_pair … H) -H #J #H destruct //
qed-.
(* Basic_2A1: was: simple_tsts_repl_sn *)
-lemma simple_teqo_repl_sn: ∀T1,T2. T1 ⩳ T2 → 𝐒❪T2❫ → 𝐒❪T1❫.
+lemma simple_teqo_repl_sn: ∀T1,T2. T1 ~ T2 → 𝐒❪T2❫ → 𝐒❪T1❫.
/3 width=3 by simple_teqo_repl_dx, teqo_sym/ qed-.
(* Basic_1: was only: iso_flats_lref_bind_false iso_flats_flat_bind_false *)
(* Basic_2A1: was: tsts_inv_bind_applv_simple *)
lemma teqo_inv_applv_bind_simple (p) (I):
- ∀Vs,V2,T1,T2. ⒶVs.T1 ⩳ ⓑ[p,I]V2.T2 → 𝐒❪T1❫ → ⊥.
+ ∀Vs,V2,T1,T2. ⒶVs.T1 ~ ⓑ[p,I]V2.T2 → 𝐒❪T1❫ → ⊥.
#p #I #Vs #V2 #T1 #T2 #H elim (teqo_inv_pair2 … H) -H
#V0 #T0 elim Vs -Vs normalize
[ #H destruct #H /2 width=5 by simple_inv_bind/
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqg.ma".
+include "static_2/syntax/teqo.ma".
+
+(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
+
+(* Properties with generic equivalence for terms ****************************)
+
+lemma teqg_teqo (S):
+ ∀T1,T2. T1 ≛[S] T2 → T1 ~ T2.
+#S #T1 #T2 * -T1 -T2 /2 width=1 by teqo_sort, teqo_pair/
+qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/teqx.ma".
-include "static_2/syntax/teqo.ma".
-
-(* SORT-IRRELEVANT OUTER EQUIVALENCE FOR TERMS ******************************)
-
-(* Properties with sort-irrelevant equivalence for terms ********************)
-
-lemma teqx_teqo: ∀T1,T2. T1 ≛ T2 → T1 ⩳ T2.
-#T1 #T2 * -T1 -T2 /2 width=1 by teqo_sort, teqo_pair/
-qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "ground/xoa/ex_1_2.ma".
+include "ground/xoa/ex_3_2.ma".
+include "static_2/notation/relations/tildeminus_2.ma".
+include "static_2/syntax/term_weight.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+inductive teqw: relation term ≝
+| teqw_sort: ∀s1,s2. teqw (⋆s1) (⋆s2)
+| teqw_lref: ∀i. teqw (#i) (#i)
+| teqw_gref: ∀l. teqw (§l) (§l)
+| teqw_abbr: ∀p,V1,V2,T1,T2. (p=Ⓣ→teqw T1 T2) → teqw (ⓓ[p]V1.T1) (ⓓ[p]V2.T2)
+| teqw_abst: ∀p,V1,V2,T1,T2. teqw (ⓛ[p]V1.T1) (ⓛ[p]V2.T2)
+| teqw_appl: ∀V1,V2,T1,T2. teqw T1 T2 → teqw (ⓐV1.T1) (ⓐV2.T2)
+| teqw_cast: ∀V1,V2,T1,T2. teqw V1 V2 → teqw T1 T2 → teqw (ⓝV1.T1) (ⓝV2.T2)
+.
+
+interpretation
+ "context-free tail sort-irrelevant equivalence (term)"
+ 'TildeMinus T1 T2 = (teqw T1 T2).
+
+(* Basic properties *********************************************************)
+
+lemma teqw_abbr_pos: ∀V1,V2,T1,T2. T1 ≃ T2 → +ⓓV1.T1 ≃ +ⓓV2.T2.
+/3 width=1 by teqw_abbr/ qed.
+
+lemma teqw_abbr_neg: ∀V1,V2,T1,T2. -ⓓV1.T1 ≃ -ⓓV2.T2.
+#V1 #V2 #T1 #T2
+@teqw_abbr #H destruct
+qed.
+
+lemma teqw_refl: reflexive … teqw.
+#T elim T -T * [||| #p * | * ]
+/2 width=1 by teqw_sort, teqw_lref, teqw_gref, teqw_abbr, teqw_abst, teqw_appl, teqw_cast/
+qed.
+
+lemma teqw_sym: symmetric … teqw.
+#T1 #T2 #H elim H -T1 -T2
+/3 width=3 by teqw_sort, teqw_lref, teqw_gref, teqw_abbr, teqw_abst, teqw_appl, teqw_cast/
+qed-.
+
+(* Left basic inversion lemmas **********************************************)
+
+fact teqw_inv_sort_sn_aux:
+ ∀X,Y. X ≃ Y → ∀s1. X = ⋆s1 → ∃s2. Y = ⋆s2.
+#X #Y * -X -Y
+[1 : #s1 #s2 #s #H destruct /2 width=2 by ex_intro/
+|2,3: #i #s #H destruct
+|4 : #p #V1 #V2 #T1 #T2 #_ #s #H destruct
+|5 : #p #V1 #V2 #T1 #T2 #s #H destruct
+|6 : #V1 #V2 #T1 #T2 #_ #s #H destruct
+|7 : #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
+]
+qed-.
+
+lemma teqw_inv_sort_sn:
+ ∀Y,s1. ⋆s1 ≃ Y → ∃s2. Y = ⋆s2.
+/2 width=4 by teqw_inv_sort_sn_aux/ qed-.
+
+fact teqw_inv_lref_sn_aux:
+ ∀X,Y. X ≃ Y → ∀i. X = #i → Y = #i.
+#X #Y * -X -Y
+[1 : #s1 #s2 #j #H destruct
+|2,3: //
+|4 : #p #V1 #V2 #T1 #T2 #_ #j #H destruct
+|5 : #p #V1 #V2 #T1 #T2 #j #H destruct
+|6 : #V1 #V2 #T1 #T2 #_ #j #H destruct
+|7 : #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
+]
+qed-.
+
+lemma teqw_inv_lref_sn: ∀Y,i. #i ≃ Y → Y = #i.
+/2 width=5 by teqw_inv_lref_sn_aux/ qed-.
+
+fact teqw_inv_gref_sn_aux:
+ ∀X,Y. X ≃ Y → ∀l. X = §l → Y = §l.
+#X #Y * -X -Y
+[1 : #s1 #s2 #k #H destruct
+|2,3: //
+|4 : #p #V1 #V2 #T1 #T2 #_ #k #H destruct
+|5 : #p #V1 #V2 #T1 #T2 #k #H destruct
+|6 : #V1 #V2 #T1 #T2 #_ #k #H destruct
+|7 : #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
+]
+qed-.
+
+lemma teqw_inv_gref_sn:
+ ∀Y,l. §l ≃ Y → Y = §l.
+/2 width=5 by teqw_inv_gref_sn_aux/ qed-.
+
+fact teqw_inv_abbr_sn_aux:
+ ∀X,Y. X ≃ Y → ∀p,V1,T1. X = ⓓ[p]V1.T1 →
+ ∃∃V2,T2. p = Ⓣ → T1 ≃ T2 & Y = ⓓ[p]V2.T2.
+#X #Y * -X -Y
+[1 : #s1 #s2 #q #W1 #U1 #H destruct
+|2,3: #i #q #W1 #U1 #H destruct
+|4 : #p #V1 #V2 #T1 #T2 #HT #q #W1 #U1 #H destruct /3 width=4 by ex2_2_intro/
+|5 : #p #V1 #V2 #T1 #T2 #q #W1 #U1 #H destruct
+|6 : #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
+|7 : #V1 #V2 #T1 #T2 #_ #_ #q #W1 #U1 #H destruct
+]
+qed-.
+
+lemma teqw_inv_abbr_sn:
+ ∀p,V1,T1,Y. ⓓ[p]V1.T1 ≃ Y →
+ ∃∃V2,T2. p = Ⓣ → T1 ≃ T2 & Y = ⓓ[p]V2.T2.
+/2 width=4 by teqw_inv_abbr_sn_aux/ qed-.
+
+fact teqw_inv_abst_sn_aux:
+ ∀X,Y. X ≃ Y → ∀p,V1,T1. X = ⓛ[p]V1.T1 →
+ ∃∃V2,T2. Y = ⓛ[p]V2.T2.
+#X #Y * -X -Y
+[1 : #s1 #s2 #q #W1 #U1 #H destruct
+|2,3: #i #q #W1 #U1 #H destruct
+|4 : #p #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
+|5 : #p #V1 #V2 #T1 #T2 #q #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/
+|6 : #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
+|7 : #V1 #V2 #T1 #T2 #_ #_ #q #W1 #U1 #H destruct
+]
+qed-.
+
+lemma teqw_inv_abst_sn:
+ ∀p,V1,T1,Y. ⓛ[p]V1.T1 ≃ Y →
+ ∃∃V2,T2. Y = ⓛ[p]V2.T2.
+/2 width=5 by teqw_inv_abst_sn_aux/ qed-.
+
+fact teqw_inv_appl_sn_aux:
+ ∀X,Y. X ≃ Y → ∀V1,T1. X = ⓐV1.T1 →
+ ∃∃V2,T2. T1 ≃ T2 & Y = ⓐV2.T2.
+#X #Y * -X -Y
+[1 : #s1 #s2 #W1 #U1 #H destruct
+|2,3: #i #W1 #U1 #H destruct
+|4 : #p #V1 #V2 #T1 #T2 #HT #W1 #U1 #H destruct
+|5 : #p #V1 #V2 #T1 #T2 #W1 #U1 #H destruct
+|6 : #V1 #V2 #T1 #T2 #HT #W1 #U1 #H destruct /2 width=4 by ex2_2_intro/
+|7 : #V1 #V2 #T1 #T2 #_ #_ #W1 #U1 #H destruct
+]
+qed-.
+
+lemma teqw_inv_appl_sn:
+ ∀V1,T1,Y. ⓐV1.T1 ≃ Y →
+ ∃∃V2,T2. T1 ≃ T2 & Y = ⓐV2.T2.
+/2 width=4 by teqw_inv_appl_sn_aux/ qed-.
+
+fact teqw_inv_cast_sn_aux:
+ ∀X,Y. X ≃ Y → ∀V1,T1. X = ⓝV1.T1 →
+ ∃∃V2,T2. V1 ≃ V2 & T1 ≃ T2 & Y = ⓝV2.T2.
+#X #Y * -X -Y
+[1 : #s1 #s2 #W1 #U1 #H destruct
+|2,3: #i #W1 #U1 #H destruct
+|4 : #p #V1 #V2 #T1 #T2 #_ #W1 #U1 #H destruct
+|5 : #p #V1 #V2 #T1 #T2 #W1 #U1 #H destruct
+|6 : #V1 #V2 #T1 #T2 #_ #W1 #U1 #H destruct
+|7 : #V1 #V2 #T1 #T2 #HV #HT #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
+]
+qed-.
+
+lemma teqw_inv_cast_sn:
+ ∀V1,T1,Y. ⓝV1.T1 ≃ Y →
+ ∃∃V2,T2. V1 ≃ V2 & T1 ≃ T2 & Y = ⓝV2.T2.
+/2 width=3 by teqw_inv_cast_sn_aux/ qed-.
+
+(* Advanced inversion lemmas ************************************************)
+
+lemma teqw_inv_abbr_pos_sn:
+ ∀V1,T1,Y. +ⓓV1.T1 ≃ Y → ∃∃V2,T2. T1 ≃ T2 & Y = +ⓓV2.T2.
+#V1 #V2 #Y #H
+elim (teqw_inv_abbr_sn … H) -H #V2 #T2
+/3 width=4 by ex2_2_intro/
+qed-.
+
+lemma teqw_inv_abbr_neg_sn:
+ ∀V1,T1,Y. -ⓓV1.T1 ≃ Y → ∃∃V2,T2. Y = -ⓓV2.T2.
+#V1 #V2 #Y #H
+elim (teqw_inv_abbr_sn … H) -H #V2 #T2 #_
+/2 width=3 by ex1_2_intro/
+qed-.
+
+lemma teqw_inv_abbr_pos_bi:
+ ∀V1,V2,T1,T2. +ⓓV1.T1 ≃ +ⓓV2.T2 → T1 ≃ T2.
+#V1 #V2 #T1 #T2 #H
+elim (teqw_inv_abbr_pos_sn … H) -H #W2 #U2 #HTU #H destruct //
+qed-.
+
+lemma teqw_inv_appl_bi:
+ ∀V1,V2,T1,T2. ⓐV1.T1 ≃ ⓐV2.T2 → T1 ≃ T2.
+#V1 #V2 #T1 #T2 #H
+elim (teqw_inv_appl_sn … H) -H #W2 #U2 #HTU #H destruct //
+qed-.
+
+lemma teqw_inv_cast_bi:
+ ∀V1,V2,T1,T2. ⓝV1.T1 ≃ ⓝV2.T2 → ∧∧ V1 ≃ V2 & T1 ≃ T2.
+#V1 #V2 #T1 #T2 #H
+elim (teqw_inv_cast_sn … H) -H #W2 #U2 #HVW #HTU #H destruct
+/2 width=1 by conj/
+qed-.
+
+lemma teqw_inv_cast_xy_y: ∀T,V. ⓝV.T ≃ T → ⊥.
+@(f_ind … tw) #n #IH #T #Hn #V #H destruct
+elim (teqw_inv_cast_sn … H) -H #X1 #X2 #_ #HX2 #H destruct -V
+/2 width=4 by/
+qed-.
+
+(* Advanced forward lemmas **************************************************)
+
+lemma teqw_fwd_pair_sn (I):
+ ∀V1,T1,X2. ②[I]V1.T1 ≃ X2 → ∃∃V2,T2. X2 = ②[I]V2.T2.
+* [ #p ] * [ cases p -p ] #V1 #T1 #X2 #H
+[ elim (teqw_inv_abbr_pos_sn … H) -H #V2 #T2 #_ #H
+| elim (teqw_inv_abbr_neg_sn … H) -H #V2 #T2 #H
+| elim (teqw_inv_abst_sn … H) -H #V2 #T2 #H
+| elim (teqw_inv_appl_sn … H) -H #V2 #T2 #_ #H
+| elim (teqw_inv_cast_sn … H) -H #V2 #T2 #_ #_ #H
+] /2 width=3 by ex1_2_intro/
+qed-.
+
+lemma teqw_fwd_pair_bi (I1) (I2):
+ ∀V1,V2,T1,T2. ②[I1]V1.T1 ≃ ②[I2]V2.T2 → I1 = I2.
+#I1 #I2 #V1 #V2 #T1 #T2 #H
+elim (teqw_fwd_pair_sn … H) -H #W2 #U2 #H destruct //
+qed-.
+
+(* Advanced properties ******************************************************)
+
+lemma teqw_dec: ∀T1,T2. Decidable (T1 ≃ T2).
+#T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
+[ /3 width=1 by teqw_sort, or_introl/
+|2,3,13:
+ @or_intror #H
+ elim (teqw_inv_sort_sn … H) -H #x #H destruct
+|4,6,14:
+ @or_intror #H
+ lapply (teqw_inv_lref_sn … H) -H #H destruct
+|5:
+ elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
+ @or_intror #H
+ lapply (teqw_inv_lref_sn … H) -H #H destruct /2 width=1 by/
+|7,8,15:
+ @or_intror #H
+ lapply (teqw_inv_gref_sn … H) -H #H destruct
+|9:
+ elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
+ @or_intror #H
+ lapply (teqw_inv_gref_sn … H) -H #H destruct /2 width=1 by/
+|10,11,12:
+ @or_intror #H
+ elim (teqw_fwd_pair_sn … H) -H #X1 #X2 #H destruct
+|16:
+ elim (eq_item2_dec I1 I2) #HI12 destruct
+ [ cases I2 -I2 [ #p ] * [ cases p -p ]
+ [ elim (IHT T2) -IHT #HT12
+ [ /3 width=1 by teqw_abbr_pos, or_introl/
+ | /4 width=3 by teqw_inv_abbr_pos_bi, or_intror/
+ ]
+ | /3 width=1 by teqw_abbr_neg, or_introl/
+ | /3 width=1 by teqw_abst, or_introl/
+ | elim (IHT T2) -IHT #HT12
+ [ /3 width=1 by teqw_appl, or_introl/
+ | /4 width=3 by teqw_inv_appl_bi, or_intror/
+ ]
+ | elim (IHV V2) -IHV #HV12
+ elim (IHT T2) -IHT #HT12
+ [1: /3 width=1 by teqw_cast, or_introl/
+ |*: @or_intror #H
+ elim (teqw_inv_cast_bi … H) -H #HV12 #HT12
+ /2 width=1 by/
+ ]
+ ]
+ | /4 width=5 by teqw_fwd_pair_bi, or_intror/
+ ]
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/term_simple.ma".
+include "static_2/syntax/teqw.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+(* Properties with simple terms *********************************************)
+
+lemma teqw_simple_trans:
+ ∀T1,T2. T1 ≃ T2 → 𝐒❪T1❫ → 𝐒❪T2❫.
+#T1 #T2 * -T1 -T2
+[4,5: #p #V1 #V2 #T1 #T2 [ #_ ] #H
+ elim (simple_inv_bind … H)
+|* : /1 width=1 by simple_atom, simple_flat/
+]
+qed-.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqg.ma".
+include "static_2/syntax/teqw.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+(* Properties with generic equivalence for terms ****************************)
+
+lemma teqg_teqw (S):
+ ∀T1,T2. T1 ≛[S] T2 → T1 ≃ T2.
+#S #T1 #T2 #H elim H -T1 -T2 [||| * [ #p ] * #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT ]
+[ /1 width=1 by teqw_sort/
+| /1 width=1 by teqw_lref/
+| /1 width=1 by teqw_gref/
+| cases p -p /2 width=1 by teqw_abbr_pos, teqw_abbr_neg/
+| /1 width=1 by teqw_abst/
+| /2 width=1 by teqw_appl/
+| /2 width=1 by teqw_cast/
+]
+qed.
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||M|| *)
+(* ||A|| A project by Andrea Asperti *)
+(* ||T|| *)
+(* ||I|| Developers: *)
+(* ||T|| The HELM team. *)
+(* ||A|| http://helm.cs.unibo.it *)
+(* \ / *)
+(* \ / This file is distributed under the terms of the *)
+(* v GNU General Public License Version 2 *)
+(* *)
+(**************************************************************************)
+
+include "static_2/syntax/teqw.ma".
+
+(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
+
+(* Main properties **********************************************************)
+
+theorem teqw_trans: Transitive … teqw.
+#T1 #T #H elim H -T1 -T
+[ #s1 #s #X #H
+ elim (teqw_inv_sort_sn … H) -s #s2 destruct
+ /2 width=1 by teqw_sort/
+| #i1 #i #H //
+| #l1 #l #H //
+| #p #V1 #V #T1 #T #_ #IHT #X #H
+ elim (teqw_inv_abbr_sn … H) -H #V2 #T2 #HT #H destruct
+ /4 width=1 by teqw_abbr/
+| #p #V1 #V #T1 #T #X #H
+ elim (teqw_inv_abst_sn … H) -H #V2 #T2 #H destruct
+ /2 width=1 by teqw_abst/
+| #V1 #V #T1 #T #_ #IHT #X #H
+ elim (teqw_inv_appl_sn … H) -H #V2 #T2 #HT #H destruct
+ /3 width=1 by teqw_appl/
+| #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
+ elim (teqw_inv_cast_sn … H) -H #V2 #T2 #HV #HT #H destruct
+ /3 width=1 by teqw_cast/
+]
+qed-.
+
+theorem teqw_canc_sn: left_cancellable … teqw.
+/3 width=3 by teqw_trans, teqw_sym/ qed-.
+
+theorem teqw_canc_dx: right_cancellable … teqw.
+/3 width=3 by teqw_trans, teqw_sym/ qed-.
+
+theorem teqw_repl:
+ ∀T1,T2. T1 ≃ T2 → ∀U1. T1 ≃ U1 → ∀U2. T2 ≃ U2 → U1 ≃ U2.
+/3 width=3 by teqw_canc_sn, teqw_trans/ qed-.
(* *)
(**************************************************************************)
-include "ground/xoa/ex_3_2.ma".
-include "static_2/notation/relations/stareq_2.ma".
-include "static_2/syntax/term.ma".
+include "static_2/notation/relations/approxeq_2.ma".
+include "static_2/syntax/teqg.ma".
(* SORT-IRRELEVANT EQUIVALENCE ON TERMS *************************************)
-inductive teqx: relation term ≝
-| teqx_sort: ∀s1,s2. teqx (⋆s1) (⋆s2)
-| teqx_lref: ∀i. teqx (#i) (#i)
-| teqx_gref: ∀l. teqx (§l) (§l)
-| teqx_pair: ∀I,V1,V2,T1,T2. teqx V1 V2 → teqx T1 T2 → teqx (②[I]V1.T1) (②[I]V2.T2)
-.
+definition sfull: relation2 nat nat ≝
+ λs1,s2. ⊤.
+
+definition teqx: relation term ≝
+ teqg sfull.
interpretation
- "context-free sort-irrelevant equivalence (term)"
- 'StarEq T1 T2 = (teqx T1 T2).
+ "context-free sort-irrelevant equivalence (term)"
+ 'ApproxEq T1 T2 = (teqx T1 T2).
(* Basic properties *********************************************************)
-lemma teqx_refl: reflexive … teqx.
-#T elim T -T /2 width=1 by teqx_pair/
-* /2 width=1 by teqx_lref, teqx_gref/
-qed.
-
-lemma teqx_sym: symmetric … teqx.
-#T1 #T2 #H elim H -T1 -T2
-/2 width=3 by teqx_sort, teqx_lref, teqx_gref, teqx_pair/
-qed-.
-
-(* Basic inversion lemmas ***************************************************)
+lemma sfull_dec:
+ ∀s1,s2. Decidable (sfull s1 s2).
+/2 width=1 by or_introl/ qed.
-fact teqx_inv_sort1_aux: ∀X,Y. X ≛ Y → ∀s1. X = ⋆s1 →
- ∃s2. Y = ⋆s2.
-#X #Y * -X -Y
-[ #s1 #s2 #s #H destruct /2 width=2 by ex_intro/
-| #i #s #H destruct
-| #l #s #H destruct
-| #I #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
-]
-qed-.
+lemma teqx_pair:
+ ∀V1,V2. V1 ≅ V2 → ∀T1,T2. T1 ≅ T2 →
+ ∀I. ②[I]V1.T1 ≅ ②[I]V2.T2.
+/2 width=1 by teqg_pair/ qed.
-lemma teqx_inv_sort1: ∀Y,s1. ⋆s1 ≛ Y →
- ∃s2. Y = ⋆s2.
-/2 width=4 by teqx_inv_sort1_aux/ qed-.
+lemma teqx_refl:
+ reflexive … teqx.
+/2 width=1 by teqg_refl/ qed.
-fact teqx_inv_lref1_aux: ∀X,Y. X ≛ Y → ∀i. X = #i → Y = #i.
-#X #Y * -X -Y //
-[ #s1 #s2 #j #H destruct
-| #I #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
-]
-qed-.
+lemma teqx_sym:
+ symmetric … teqx.
+/2 width=1 by teqg_sym/ qed-.
-lemma teqx_inv_lref1: ∀Y,i. #i ≛ Y → Y = #i.
-/2 width=5 by teqx_inv_lref1_aux/ qed-.
+lemma teqg_teqx (S):
+ ∀T1,T2. T1 ≛[S] T2 → T1 ≅ T2.
+/2 width=3 by teqg_co/ qed.
-fact teqx_inv_gref1_aux: ∀X,Y. X ≛ Y → ∀l. X = §l → Y = §l.
-#X #Y * -X -Y //
-[ #s1 #s2 #k #H destruct
-| #I #V1 #V2 #T1 #T2 #_ #_ #k #H destruct
-]
-qed-.
+(* Basic inversion lemmas ***************************************************)
-lemma teqx_inv_gref1: ∀Y,l. §l ≛ Y → Y = §l.
-/2 width=5 by teqx_inv_gref1_aux/ qed-.
-
-fact teqx_inv_pair1_aux: ∀X,Y. X ≛ Y → ∀I,V1,T1. X = ②[I]V1.T1 →
- ∃∃V2,T2. V1 ≛ V2 & T1 ≛ T2 & Y = ②[I]V2.T2.
-#X #Y * -X -Y
-[ #s1 #s2 #J #W1 #U1 #H destruct
-| #i #J #W1 #U1 #H destruct
-| #l #J #W1 #U1 #H destruct
-| #I #V1 #V2 #T1 #T2 #HV #HT #J #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
-]
+lemma teqx_inv_sort1:
+ ∀X2,s1. ⋆s1 ≅ X2 →
+ ∃s2. X2 = ⋆s2.
+#X1 #s1 #H elim (teqg_inv_sort1 … H) -H /2 width=2 by ex_intro/
qed-.
-
-lemma teqx_inv_pair1: ∀I,V1,T1,Y. ②[I]V1.T1 ≛ Y →
- ∃∃V2,T2. V1 ≛ V2 & T1 ≛ T2 & Y = ②[I]V2.T2.
-/2 width=3 by teqx_inv_pair1_aux/ qed-.
-
-lemma teqx_inv_sort2: ∀X1,s2. X1 ≛ ⋆s2 →
- ∃s1. X1 = ⋆s1.
-#X1 #s2 #H
-elim (teqx_inv_sort1 X1 s2)
-/2 width=2 by teqx_sym, ex_intro/
+(*
+lemma teqx_inv_lref1:
+ ∀X,i. #i ≅ X → X = #i.
+/2 width=5 by teqg_inv_lref1/ qed-.
+
+lemma teqx_inv_gref1:
+ ∀X,l. §l ≅ X → X = §l.
+/2 width=5 by teqg_inv_gref1/ qed-.
+*)
+lemma teqx_inv_pair1:
+ ∀I,V1,T1,X2. ②[I]V1.T1 ≅ X2 →
+ ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & X2 = ②[I]V2.T2.
+/2 width=3 by teqg_inv_pair1/ qed-.
+
+lemma teqx_inv_sort2:
+ ∀X1,s2. X1 ≅ ⋆s2 →
+ ∃s1. X1 = ⋆s1.
+#X1 #s2 #H elim (teqg_inv_sort2 … H) -H /2 width=2 by ex_intro/
qed-.
-lemma teqx_inv_pair2: ∀I,X1,V2,T2. X1 ≛ ②[I]V2.T2 →
- ∃∃V1,T1. V1 ≛ V2 & T1 ≛ T2 & X1 = ②[I]V1.T1.
-#I #X1 #V2 #T2 #H
-elim (teqx_inv_pair1 I V2 T2 X1)
-[ #V1 #T1 #HV #HT #H destruct ]
-/3 width=5 by teqx_sym, ex3_2_intro/
-qed-.
+lemma teqx_inv_pair2:
+ ∀I,X1,V2,T2. X1 ≅ ②[I]V2.T2 →
+ ∃∃V1,T1. V1 ≅ V2 & T1 ≅ T2 & X1 = ②[I]V1.T1.
+/2 width=1 by teqg_inv_pair2/ qed-.
(* Advanced inversion lemmas ************************************************)
-lemma teqx_inv_pair: ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ≛ ②[I2]V2.T2 →
- ∧∧ I1 = I2 & V1 ≛ V2 & T1 ≛ T2.
-#I1 #I2 #V1 #V2 #T1 #T2 #H elim (teqx_inv_pair1 … H) -H
-#V0 #T0 #HV #HT #H destruct /2 width=1 by and3_intro/
-qed-.
-
-lemma teqx_inv_pair_xy_x: ∀I,V,T. ②[I]V.T ≛ V → ⊥.
-#I #V elim V -V
-[ #J #T #H elim (teqx_inv_pair1 … H) -H #X #Y #_ #_ #H destruct
-| #J #X #Y #IHX #_ #T #H elim (teqx_inv_pair … H) -H #H #HY #_ destruct /2 width=2 by/
-]
-qed-.
-
-lemma teqx_inv_pair_xy_y: ∀I,T,V. ②[I]V.T ≛ T → ⊥.
-#I #T elim T -T
-[ #J #V #H elim (teqx_inv_pair1 … H) -H #X #Y #_ #_ #H destruct
-| #J #X #Y #_ #IHY #V #H elim (teqx_inv_pair … H) -H #H #_ #HY destruct /2 width=2 by/
-]
-qed-.
-
+lemma teqx_inv_pair:
+ ∀I1,I2,V1,V2,T1,T2. ②[I1]V1.T1 ≅ ②[I2]V2.T2 →
+ ∧∧ I1 = I2 & V1 ≅ V2 & T1 ≅ T2.
+/2 width=1 by teqg_inv_pair/ qed-.
+(*
+lemma teqx_inv_pair_xy_x:
+ ∀I,V,T. ②[I]V.T ≅ V → ⊥.
+/2 width=5 by teqg_inv_pair_xy_x/ qed-.
+
+lemma teqx_inv_pair_xy_y:
+ ∀I,T,V. ②[I]V.T ≅ T → ⊥.
+/2 width=5 by teqg_inv_pair_xy_y/ qed-.
+*)
(* Basic forward lemmas *****************************************************)
-
-lemma teqx_fwd_atom1: ∀I,Y. ⓪[I] ≛ Y → ∃J. Y = ⓪[J].
-* #x #Y #H [ elim (teqx_inv_sort1 … H) -H ]
-/3 width=4 by teqx_inv_gref1, teqx_inv_lref1, ex_intro/
-qed-.
-
+(*
+lemma teqx_fwd_atom1:
+ ∀I,Y. ⓪[I] ≅ Y → ∃J. Y = ⓪[J].
+/2 width=3 by teqg_fwd_atom1/ qed-.
+*)
(* Advanced properties ******************************************************)
-lemma teqx_dec: ∀T1,T2. Decidable (T1 ≛ T2).
-#T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
-[ /3 width=1 by teqx_sort, or_introl/
-|2,3,13:
- @or_intror #H
- elim (teqx_inv_sort1 … H) -H #x #H destruct
-|4,6,14:
- @or_intror #H
- lapply (teqx_inv_lref1 … H) -H #H destruct
-|5:
- elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
- @or_intror #H
- lapply (teqx_inv_lref1 … H) -H #H destruct /2 width=1 by/
-|7,8,15:
- @or_intror #H
- lapply (teqx_inv_gref1 … H) -H #H destruct
-|9:
- elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
- @or_intror #H
- lapply (teqx_inv_gref1 … H) -H #H destruct /2 width=1 by/
-|10,11,12:
- @or_intror #H
- elim (teqx_inv_pair1 … H) -H #X1 #X2 #_ #_ #H destruct
-|16:
- elim (eq_item2_dec I1 I2) #HI12 destruct
- [ elim (IHV V2) -IHV #HV12
- elim (IHT T2) -IHT #HT12
- [ /3 width=1 by teqx_pair, or_introl/ ]
- ]
- @or_intror #H
- elim (teqx_inv_pair … H) -H /2 width=1 by/
-]
-qed-.
+lemma teqx_dec:
+ ∀T1,T2. Decidable (T1 ≅ T2).
+/3 width=1 by teqg_dec, or_introl/ qed-.
(* Negated inversion lemmas *************************************************)
-lemma tneqx_inv_pair: ∀I1,I2,V1,V2,T1,T2.
- (②[I1]V1.T1 ≛ ②[I2]V2.T2 → ⊥) →
- ∨∨ I1 = I2 → ⊥
- | (V1 ≛ V2 → ⊥)
- | (T1 ≛ T2 → ⊥).
-#I1 #I2 #V1 #V2 #T1 #T2 #H12
-elim (eq_item2_dec I1 I2) /3 width=1 by or3_intro0/ #H destruct
-elim (teqx_dec V1 V2) /3 width=1 by or3_intro1/
-elim (teqx_dec T1 T2) /4 width=1 by teqx_pair, or3_intro2/
-qed-.
+lemma tneqx_inv_pair:
+ ∀I1,I2,V1,V2,T1,T2.
+ (②[I1]V1.T1 ≅ ②[I2]V2.T2 → ⊥) →
+ ∨∨ I1 = I2 → ⊥
+ | (V1 ≅ V2 → ⊥)
+ | (T1 ≅ T2 → ⊥).
+/3 width=1 by tneqg_inv_pair, or_introl/ qed-.
(* *)
(**************************************************************************)
+(*
include "static_2/notation/relations/stareq_3.ma".
-include "static_2/syntax/cext2.ma".
+*)
+include "static_2/syntax/teqg_ext.ma".
include "static_2/syntax/teqx.ma".
(* EXTENDED SORT-IRRELEVANT EQUIVALENCE *************************************)
-
+(*
definition teqx_ext: relation bind ≝
- ext2 teqx.
-
-definition cdeq: relation3 lenv term term ≝
- λL. teqx.
-
-definition cdeq_ext: relation3 lenv bind bind ≝
- cext2 cdeq.
-
+ teqg_ext sfull.
+
+definition ceqx: relation3 lenv term term ≝
+ ceqg sfull.
+*)
+definition ceqx_ext: relation3 lenv bind bind ≝
+ ceqg_ext sfull.
+(*
interpretation
- "context-free sort-irrelevant equivalence (binder)"
- 'StarEq I1 I2 = (teqx_ext I1 I2).
+ "context-free sort-irrelevant equivalence (binder)"
+ 'StarEq I1 I2 = (teqx_ext I1 I2).
interpretation
- "context-dependent sort-irrelevant equivalence (term)"
- 'StarEq L T1 T2 = (cdeq L T1 T2).
+ "context-dependent sort-irrelevant equivalence (term)"
+ 'StarEq L T1 T2 = (cdeq L T1 T2).
interpretation
- "context-dependent sort-irrelevant equivalence (binder)"
- 'StarEq L I1 I2 = (cdeq_ext L I1 I2).
+ "context-dependent sort-irrelevant equivalence (binder)"
+ 'ApproxEq L I1 I2 = (cdeq_ext L I1 I2).
+*)
(* *)
(**************************************************************************)
+include "static_2/syntax/teqg_teqg.ma".
include "static_2/syntax/teqx.ma".
(* SORT-IRRELEVANT EQUIVALENCE ON TERMS *************************************)
(* Main properties **********************************************************)
-theorem teqx_trans: Transitive … teqx.
-#T1 #T #H elim H -T1 -T
-[ #s1 #s #X #H
- elim (teqx_inv_sort1 … H) -s /2 width=1 by teqx_sort/
-| #i1 #i #H <(teqx_inv_lref1 … H) -H //
-| #l1 #l #H <(teqx_inv_gref1 … H) -H //
-| #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
- elim (teqx_inv_pair1 … H) -H /3 width=1 by teqx_pair/
-]
-qed-.
+theorem teqx_trans:
+ Transitive … teqx.
+/2 width=3 by teqg_trans/ qed-.
-theorem teqx_canc_sn: left_cancellable … teqx.
-/3 width=3 by teqx_trans, teqx_sym/ qed-.
-
-theorem teqx_canc_dx: right_cancellable … teqx.
-/3 width=3 by teqx_trans, teqx_sym/ qed-.
+theorem teqx_canc_sn:
+ left_cancellable … teqx.
+/2 width=3 by teqg_canc_sn/ qed-.
+theorem teqx_canc_dx:
+ right_cancellable … teqx.
+/2 width=3 by teqg_canc_dx/ qed-.
+(*
theorem teqx_repl: ∀T1,T2. T1 ≛ T2 →
∀U1. T1 ≛ U1 → ∀U2. T2 ≛ U2 → U1 ≛ U2.
/3 width=3 by teqx_canc_sn, teqx_trans/ qed-.
theorem tneqx_teqx_canc_dx: ∀T1,T. (T1 ≛ T → ⊥) → ∀T2. T2 ≛ T → T1 ≛ T2 → ⊥.
/3 width=3 by teqx_trans/ qed-.
+*)
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "ground/xoa/ex_1_2.ma".
-include "ground/xoa/ex_3_2.ma".
-include "static_2/notation/relations/approxeq_2.ma".
-include "static_2/syntax/term_weight.ma".
-
-(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
-
-inductive tweq: relation term ≝
-| tweq_sort: ∀s1,s2. tweq (⋆s1) (⋆s2)
-| tweq_lref: ∀i. tweq (#i) (#i)
-| tweq_gref: ∀l. tweq (§l) (§l)
-| tweq_abbr: ∀p,V1,V2,T1,T2. (p=Ⓣ→tweq T1 T2) → tweq (ⓓ[p]V1.T1) (ⓓ[p]V2.T2)
-| tweq_abst: ∀p,V1,V2,T1,T2. tweq (ⓛ[p]V1.T1) (ⓛ[p]V2.T2)
-| tweq_appl: ∀V1,V2,T1,T2. tweq T1 T2 → tweq (ⓐV1.T1) (ⓐV2.T2)
-| tweq_cast: ∀V1,V2,T1,T2. tweq V1 V2 → tweq T1 T2 → tweq (ⓝV1.T1) (ⓝV2.T2)
-.
-
-interpretation
- "context-free tail sort-irrelevant equivalence (term)"
- 'ApproxEq T1 T2 = (tweq T1 T2).
-
-(* Basic properties *********************************************************)
-
-lemma tweq_abbr_pos: ∀V1,V2,T1,T2. T1 ≅ T2 → +ⓓV1.T1 ≅ +ⓓV2.T2.
-/3 width=1 by tweq_abbr/ qed.
-
-lemma tweq_abbr_neg: ∀V1,V2,T1,T2. -ⓓV1.T1 ≅ -ⓓV2.T2.
-#V1 #V2 #T1 #T2
-@tweq_abbr #H destruct
-qed.
-
-lemma tweq_refl: reflexive … tweq.
-#T elim T -T * [||| #p * | * ]
-/2 width=1 by tweq_sort, tweq_lref, tweq_gref, tweq_abbr, tweq_abst, tweq_appl, tweq_cast/
-qed.
-
-lemma tweq_sym: symmetric … tweq.
-#T1 #T2 #H elim H -T1 -T2
-/3 width=3 by tweq_sort, tweq_lref, tweq_gref, tweq_abbr, tweq_abst, tweq_appl, tweq_cast/
-qed-.
-
-(* Left basic inversion lemmas **********************************************)
-
-fact tweq_inv_sort_sn_aux:
- ∀X,Y. X ≅ Y → ∀s1. X = ⋆s1 → ∃s2. Y = ⋆s2.
-#X #Y * -X -Y
-[1 : #s1 #s2 #s #H destruct /2 width=2 by ex_intro/
-|2,3: #i #s #H destruct
-|4 : #p #V1 #V2 #T1 #T2 #_ #s #H destruct
-|5 : #p #V1 #V2 #T1 #T2 #s #H destruct
-|6 : #V1 #V2 #T1 #T2 #_ #s #H destruct
-|7 : #V1 #V2 #T1 #T2 #_ #_ #s #H destruct
-]
-qed-.
-
-lemma tweq_inv_sort_sn:
- ∀Y,s1. ⋆s1 ≅ Y → ∃s2. Y = ⋆s2.
-/2 width=4 by tweq_inv_sort_sn_aux/ qed-.
-
-fact tweq_inv_lref_sn_aux:
- ∀X,Y. X ≅ Y → ∀i. X = #i → Y = #i.
-#X #Y * -X -Y
-[1 : #s1 #s2 #j #H destruct
-|2,3: //
-|4 : #p #V1 #V2 #T1 #T2 #_ #j #H destruct
-|5 : #p #V1 #V2 #T1 #T2 #j #H destruct
-|6 : #V1 #V2 #T1 #T2 #_ #j #H destruct
-|7 : #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
-]
-qed-.
-
-lemma tweq_inv_lref_sn: ∀Y,i. #i ≅ Y → Y = #i.
-/2 width=5 by tweq_inv_lref_sn_aux/ qed-.
-
-fact tweq_inv_gref_sn_aux:
- ∀X,Y. X ≅ Y → ∀l. X = §l → Y = §l.
-#X #Y * -X -Y
-[1 : #s1 #s2 #k #H destruct
-|2,3: //
-|4 : #p #V1 #V2 #T1 #T2 #_ #k #H destruct
-|5 : #p #V1 #V2 #T1 #T2 #k #H destruct
-|6 : #V1 #V2 #T1 #T2 #_ #k #H destruct
-|7 : #V1 #V2 #T1 #T2 #_ #_ #j #H destruct
-]
-qed-.
-
-lemma tweq_inv_gref_sn:
- ∀Y,l. §l ≅ Y → Y = §l.
-/2 width=5 by tweq_inv_gref_sn_aux/ qed-.
-
-fact tweq_inv_abbr_sn_aux:
- ∀X,Y. X ≅ Y → ∀p,V1,T1. X = ⓓ[p]V1.T1 →
- ∃∃V2,T2. p = Ⓣ → T1 ≅ T2 & Y = ⓓ[p]V2.T2.
-#X #Y * -X -Y
-[1 : #s1 #s2 #q #W1 #U1 #H destruct
-|2,3: #i #q #W1 #U1 #H destruct
-|4 : #p #V1 #V2 #T1 #T2 #HT #q #W1 #U1 #H destruct /3 width=4 by ex2_2_intro/
-|5 : #p #V1 #V2 #T1 #T2 #q #W1 #U1 #H destruct
-|6 : #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
-|7 : #V1 #V2 #T1 #T2 #_ #_ #q #W1 #U1 #H destruct
-]
-qed-.
-
-lemma tweq_inv_abbr_sn:
- ∀p,V1,T1,Y. ⓓ[p]V1.T1 ≅ Y →
- ∃∃V2,T2. p = Ⓣ → T1 ≅ T2 & Y = ⓓ[p]V2.T2.
-/2 width=4 by tweq_inv_abbr_sn_aux/ qed-.
-
-fact tweq_inv_abst_sn_aux:
- ∀X,Y. X ≅ Y → ∀p,V1,T1. X = ⓛ[p]V1.T1 →
- ∃∃V2,T2. Y = ⓛ[p]V2.T2.
-#X #Y * -X -Y
-[1 : #s1 #s2 #q #W1 #U1 #H destruct
-|2,3: #i #q #W1 #U1 #H destruct
-|4 : #p #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
-|5 : #p #V1 #V2 #T1 #T2 #q #W1 #U1 #H destruct /2 width=3 by ex1_2_intro/
-|6 : #V1 #V2 #T1 #T2 #_ #q #W1 #U1 #H destruct
-|7 : #V1 #V2 #T1 #T2 #_ #_ #q #W1 #U1 #H destruct
-]
-qed-.
-
-lemma tweq_inv_abst_sn:
- ∀p,V1,T1,Y. ⓛ[p]V1.T1 ≅ Y →
- ∃∃V2,T2. Y = ⓛ[p]V2.T2.
-/2 width=5 by tweq_inv_abst_sn_aux/ qed-.
-
-fact tweq_inv_appl_sn_aux:
- ∀X,Y. X ≅ Y → ∀V1,T1. X = ⓐV1.T1 →
- ∃∃V2,T2. T1 ≅ T2 & Y = ⓐV2.T2.
-#X #Y * -X -Y
-[1 : #s1 #s2 #W1 #U1 #H destruct
-|2,3: #i #W1 #U1 #H destruct
-|4 : #p #V1 #V2 #T1 #T2 #HT #W1 #U1 #H destruct
-|5 : #p #V1 #V2 #T1 #T2 #W1 #U1 #H destruct
-|6 : #V1 #V2 #T1 #T2 #HT #W1 #U1 #H destruct /2 width=4 by ex2_2_intro/
-|7 : #V1 #V2 #T1 #T2 #_ #_ #W1 #U1 #H destruct
-]
-qed-.
-
-lemma tweq_inv_appl_sn:
- ∀V1,T1,Y. ⓐV1.T1 ≅ Y →
- ∃∃V2,T2. T1 ≅ T2 & Y = ⓐV2.T2.
-/2 width=4 by tweq_inv_appl_sn_aux/ qed-.
-
-fact tweq_inv_cast_sn_aux:
- ∀X,Y. X ≅ Y → ∀V1,T1. X = ⓝV1.T1 →
- ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & Y = ⓝV2.T2.
-#X #Y * -X -Y
-[1 : #s1 #s2 #W1 #U1 #H destruct
-|2,3: #i #W1 #U1 #H destruct
-|4 : #p #V1 #V2 #T1 #T2 #_ #W1 #U1 #H destruct
-|5 : #p #V1 #V2 #T1 #T2 #W1 #U1 #H destruct
-|6 : #V1 #V2 #T1 #T2 #_ #W1 #U1 #H destruct
-|7 : #V1 #V2 #T1 #T2 #HV #HT #W1 #U1 #H destruct /2 width=5 by ex3_2_intro/
-]
-qed-.
-
-lemma tweq_inv_cast_sn:
- ∀V1,T1,Y. ⓝV1.T1 ≅ Y →
- ∃∃V2,T2. V1 ≅ V2 & T1 ≅ T2 & Y = ⓝV2.T2.
-/2 width=3 by tweq_inv_cast_sn_aux/ qed-.
-
-(* Advanced inversion lemmas ************************************************)
-
-lemma tweq_inv_abbr_pos_sn:
- ∀V1,T1,Y. +ⓓV1.T1 ≅ Y → ∃∃V2,T2. T1 ≅ T2 & Y = +ⓓV2.T2.
-#V1 #V2 #Y #H
-elim (tweq_inv_abbr_sn … H) -H #V2 #T2
-/3 width=4 by ex2_2_intro/
-qed-.
-
-lemma tweq_inv_abbr_neg_sn:
- ∀V1,T1,Y. -ⓓV1.T1 ≅ Y → ∃∃V2,T2. Y = -ⓓV2.T2.
-#V1 #V2 #Y #H
-elim (tweq_inv_abbr_sn … H) -H #V2 #T2 #_
-/2 width=3 by ex1_2_intro/
-qed-.
-
-lemma tweq_inv_abbr_pos_bi:
- ∀V1,V2,T1,T2. +ⓓV1.T1 ≅ +ⓓV2.T2 → T1 ≅ T2.
-#V1 #V2 #T1 #T2 #H
-elim (tweq_inv_abbr_pos_sn … H) -H #W2 #U2 #HTU #H destruct //
-qed-.
-
-lemma tweq_inv_appl_bi:
- ∀V1,V2,T1,T2. ⓐV1.T1 ≅ ⓐV2.T2 → T1 ≅ T2.
-#V1 #V2 #T1 #T2 #H
-elim (tweq_inv_appl_sn … H) -H #W2 #U2 #HTU #H destruct //
-qed-.
-
-lemma tweq_inv_cast_bi:
- ∀V1,V2,T1,T2. ⓝV1.T1 ≅ ⓝV2.T2 → ∧∧ V1 ≅ V2 & T1 ≅ T2.
-#V1 #V2 #T1 #T2 #H
-elim (tweq_inv_cast_sn … H) -H #W2 #U2 #HVW #HTU #H destruct
-/2 width=1 by conj/
-qed-.
-
-lemma tweq_inv_cast_xy_y: ∀T,V. ⓝV.T ≅ T → ⊥.
-@(f_ind … tw) #n #IH #T #Hn #V #H destruct
-elim (tweq_inv_cast_sn … H) -H #X1 #X2 #_ #HX2 #H destruct -V
-/2 width=4 by/
-qed-.
-
-(* Advanced forward lemmas **************************************************)
-
-lemma tweq_fwd_pair_sn (I):
- ∀V1,T1,X2. ②[I]V1.T1 ≅ X2 → ∃∃V2,T2. X2 = ②[I]V2.T2.
-* [ #p ] * [ cases p -p ] #V1 #T1 #X2 #H
-[ elim (tweq_inv_abbr_pos_sn … H) -H #V2 #T2 #_ #H
-| elim (tweq_inv_abbr_neg_sn … H) -H #V2 #T2 #H
-| elim (tweq_inv_abst_sn … H) -H #V2 #T2 #H
-| elim (tweq_inv_appl_sn … H) -H #V2 #T2 #_ #H
-| elim (tweq_inv_cast_sn … H) -H #V2 #T2 #_ #_ #H
-] /2 width=3 by ex1_2_intro/
-qed-.
-
-lemma tweq_fwd_pair_bi (I1) (I2):
- ∀V1,V2,T1,T2. ②[I1]V1.T1 ≅ ②[I2]V2.T2 → I1 = I2.
-#I1 #I2 #V1 #V2 #T1 #T2 #H
-elim (tweq_fwd_pair_sn … H) -H #W2 #U2 #H destruct //
-qed-.
-
-(* Advanced properties ******************************************************)
-
-lemma tweq_dec: ∀T1,T2. Decidable (T1 ≅ T2).
-#T1 elim T1 -T1 [ * #s1 | #I1 #V1 #T1 #IHV #IHT ] * [1,3,5,7: * #s2 |*: #I2 #V2 #T2 ]
-[ /3 width=1 by tweq_sort, or_introl/
-|2,3,13:
- @or_intror #H
- elim (tweq_inv_sort_sn … H) -H #x #H destruct
-|4,6,14:
- @or_intror #H
- lapply (tweq_inv_lref_sn … H) -H #H destruct
-|5:
- elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
- @or_intror #H
- lapply (tweq_inv_lref_sn … H) -H #H destruct /2 width=1 by/
-|7,8,15:
- @or_intror #H
- lapply (tweq_inv_gref_sn … H) -H #H destruct
-|9:
- elim (eq_nat_dec s1 s2) #Hs12 destruct /2 width=1 by or_introl/
- @or_intror #H
- lapply (tweq_inv_gref_sn … H) -H #H destruct /2 width=1 by/
-|10,11,12:
- @or_intror #H
- elim (tweq_fwd_pair_sn … H) -H #X1 #X2 #H destruct
-|16:
- elim (eq_item2_dec I1 I2) #HI12 destruct
- [ cases I2 -I2 [ #p ] * [ cases p -p ]
- [ elim (IHT T2) -IHT #HT12
- [ /3 width=1 by tweq_abbr_pos, or_introl/
- | /4 width=3 by tweq_inv_abbr_pos_bi, or_intror/
- ]
- | /3 width=1 by tweq_abbr_neg, or_introl/
- | /3 width=1 by tweq_abst, or_introl/
- | elim (IHT T2) -IHT #HT12
- [ /3 width=1 by tweq_appl, or_introl/
- | /4 width=3 by tweq_inv_appl_bi, or_intror/
- ]
- | elim (IHV V2) -IHV #HV12
- elim (IHT T2) -IHT #HT12
- [1: /3 width=1 by tweq_cast, or_introl/
- |*: @or_intror #H
- elim (tweq_inv_cast_bi … H) -H #HV12 #HT12
- /2 width=1 by/
- ]
- ]
- | /4 width=5 by tweq_fwd_pair_bi, or_intror/
- ]
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/term_simple.ma".
-include "static_2/syntax/tweq.ma".
-
-(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
-
-(* Properties with simple terms *********************************************)
-
-lemma tweq_simple_trans:
- ∀T1,T2. T1 ≅ T2 → 𝐒❪T1❫ → 𝐒❪T2❫.
-#T1 #T2 * -T1 -T2
-[4,5: #p #V1 #V2 #T1 #T2 [ #_ ] #H
- elim (simple_inv_bind … H)
-|* : /1 width=1 by simple_atom, simple_flat/
-]
-qed-.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/teqx.ma".
-include "static_2/syntax/tweq.ma".
-
-(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
-
-(* Properties with sort-irrelevant equivalence for terms ********************)
-
-lemma teqx_tweq: ∀T1,T2. T1 ≛ T2 → T1 ≅ T2.
-#T1 #T2 #H elim H -T1 -T2 [||| * [ #p ] * #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT ]
-[ /1 width=1 by tweq_sort/
-| /1 width=1 by tweq_lref/
-| /1 width=1 by tweq_gref/
-| cases p -p /2 width=1 by tweq_abbr_pos, tweq_abbr_neg/
-| /1 width=1 by tweq_abst/
-| /2 width=1 by tweq_appl/
-| /2 width=1 by tweq_cast/
-]
-qed.
+++ /dev/null
-(**************************************************************************)
-(* ___ *)
-(* ||M|| *)
-(* ||A|| A project by Andrea Asperti *)
-(* ||T|| *)
-(* ||I|| Developers: *)
-(* ||T|| The HELM team. *)
-(* ||A|| http://helm.cs.unibo.it *)
-(* \ / *)
-(* \ / This file is distributed under the terms of the *)
-(* v GNU General Public License Version 2 *)
-(* *)
-(**************************************************************************)
-
-include "static_2/syntax/tweq.ma".
-
-(* SORT-IRRELEVANT WHD EQUIVALENCE ON TERMS *********************************)
-
-(* Main properties **********************************************************)
-
-theorem tweq_trans: Transitive … tweq.
-#T1 #T #H elim H -T1 -T
-[ #s1 #s #X #H
- elim (tweq_inv_sort_sn … H) -s #s2 destruct
- /2 width=1 by tweq_sort/
-| #i1 #i #H //
-| #l1 #l #H //
-| #p #V1 #V #T1 #T #_ #IHT #X #H
- elim (tweq_inv_abbr_sn … H) -H #V2 #T2 #HT #H destruct
- /4 width=1 by tweq_abbr/
-| #p #V1 #V #T1 #T #X #H
- elim (tweq_inv_abst_sn … H) -H #V2 #T2 #H destruct
- /2 width=1 by tweq_abst/
-| #V1 #V #T1 #T #_ #IHT #X #H
- elim (tweq_inv_appl_sn … H) -H #V2 #T2 #HT #H destruct
- /3 width=1 by tweq_appl/
-| #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
- elim (tweq_inv_cast_sn … H) -H #V2 #T2 #HV #HT #H destruct
- /3 width=1 by tweq_cast/
-]
-qed-.
-
-theorem tweq_canc_sn: left_cancellable … tweq.
-/3 width=3 by tweq_trans, tweq_sym/ qed-.
-
-theorem tweq_canc_dx: right_cancellable … tweq.
-/3 width=3 by tweq_trans, tweq_sym/ qed-.
-
-theorem tweq_repl:
- ∀T1,T2. T1 ≅ T2 → ∀U1. T1 ≅ U1 → ∀U2. T2 ≅ U2 → U1 ≅ U2.
-/3 width=3 by tweq_canc_sn, tweq_trans/ qed-.
]
[ { "atomic arity assignment" * } {
[ [ "restricted refinement for lenvs" ] "lsuba" + "( ? ⊢ ? ⫃⁝ ? )" "lsuba_drops" + "lsuba_lsubr" + "lsuba_aaa" + "lsuba_lsuba" * ]
- [ [ "for terms" ] "aaa" + "( ❪?,?❫ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_reqx" + "aaa_feqx" + "aaa_aaa" + "aaa_dec" * ]
+ [ [ "for terms" ] "aaa" + "( ❪?,?❫ ⊢ ? ⁝ ? )" "aaa_drops" + "aaa_fqus" + "aaa_reqg" + "aaa_feqg" + "aaa_aaa" + "aaa_dec" * ]
}
]
- [ { "degree-based equivalence" * } {
- [ [ "for closures on referred entries" ] "feqx" + "( â\9dª?,?,?â\9d« â\89\9b â\9dª?,?,?â\9d« )" "feqx_fqup" + "feqx_fqus" + "feqx_req" + "feqx_feqx" * ]
- [ [ "for lenvs on referred entries" ] "reqx" + "( ? â\89\9b[?] ? )" "reqx_length" + "reqx_drops" + "reqx_fqup" + "reqx_fqus" + "reqx_req" + "reqx_reqx" * ]
+ [ { "sort-irrelevant equivalence" * } {
+ [ [ "for closures on referred entries" ] "feqx" + "( â\9dª?,?,?â\9d« â\89\85 â\9dª?,?,?â\9d« )" * ]
+ [ [ "for lenvs on referred entries" ] "reqx" + "( ? â\89\85[?] ? )" "reqx_reqx" * ]
}
]
[ { "syntactic equivalence" * } {
- [ [ "for lenvs on referred entries" ] "req" + "( ? ≡[?] ? )" "req_length" + "req_drops" + "req_fqup" + "req_fsle" * ]
+ [ [ "for lenvs on referred entries" ] "req" + "( ? ≡[?] ? )" * ]
+ }
+ ]
+ [ { "generic equivalence" * } {
+ [ [ "for closures on referred entries" ] "feqg" + "( ❪?,?,?❫ ≛[?] ❪?,?,?❫ )" "feqg_fqup" + "feqg_fqus" + "feqg_feqg" * ]
+ [ [ "for lenvs on referred entries" ] "reqg" + "( ? ≛[?,?] ? )" "reqg_length" + "reqg_drops" + "reqg_fqup" + "reqg_fqus" + "reqg_reqg" * ]
}
]
[ { "generic extension of a context-sensitive relation" * } {
[ { "s-transition" * } {
[ { "structural successor" * } {
[ [ "for closures" ] "fquq" + "( ❪?,?,?❫ ⬂⸮[?] ❪?,?,?❫ )" + "( ❪?,?,?❫ ⬂⸮ ❪?,?,?❫ )" "fquq_length" + "fquq_weight" * ]
- [ [ "proper for closures" ] "fqu" + "( ❪?,?,?❫ ⬂[?] ❪?,?,?❫ )" + "( ❪?,?,?❫ ⬂ ❪?,?,?❫ )" "fqu_length" + "fqu_weight" + "fqu_teqx" * ]
+ [ [ "proper for closures" ] "fqu" + "( ❪?,?,?❫ ⬂[?] ❪?,?,?❫ )" + "( ❪?,?,?❫ ⬂ ❪?,?,?❫ )" "fqu_length" + "fqu_weight" + "fqu_teqg" * ]
}
]
}
[ { "generic and uniform relocation" * } {
[ [ "for binders" ] "lifts_bind" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_weight_bind" + "lifts_lifts_bind" * ]
[ [ "for term vectors" ] "lifts_vector" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_lifts_vector" * ]
- [ [ "for terms" ] "lifts" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_teqx" + "lifts_tweq" + "lifts_teqo" + "lifts_lifts" * ]
+ [ [ "for terms" ] "lifts" + "( ⇧*[?] ? ≘ ? )" + "( ⇧[?] ? ≘ ? )" "lifts_simple" + "lifts_weight" + "lifts_teqg" + "lifts_teqx" + "lifts_teqw" + "lifts_teqo" + "lifts_lifts" * ]
}
]
[ { "syntactic equivalence" * } {
}
]
[ { "sort-irrelevant outer equivalence" * } {
- [ [ "for terms" ] "teqo" + "( ? ⩳ ? )" "teqo_simple" + "teqo_teqx" + "teqo_teqo" + "teqo_simple_vector" * ]
+ [ [ "for terms" ] "teqo" + "( ? ~ ? )" "teqo_simple" + "teqo_teqg" + "teqo_teqo" + "teqo_simple_vector" * ]
}
]
[ { "sort-irrelevant whd equivalence" * } {
- [ [ "for terms" ] "tweq" + "( ? ≅ ? )" "tweq_simple" + "tweq_teqx" + "tweq_tueq" * ]
+ [ [ "for terms" ] "teqw" + "( ? ≃ ? )" "teqw_simple" + "teqw_teqg" + "teqw_teqw" * ]
}
]
[ { "sort-irrelevant equivalence" * } {
- [ [ "" ] "teqx_ext" + "( ? ≛ ? )" + "( ? ⊢ ? ≛ ? )" * ]
- [ [ "" ] "teqx" + "( ? ≛ ? )" "teqx_teqx" * ]
+ [ [ "" ] "teqx_ext" + "( ? ≅ ? )" + "( ? ⊢ ? ≅ ? )" * ]
+ [ [ "" ] "teqx" + "( ? ≅ ? )" "teqx_teqx" * ]
+ }
+ ]
+ [ { "syntactic equivalence" * } {
+ [ [ "" ] "teq_ext" + "( ? ≡ ? )" + "( ? ⊢ ? ≡ ? )" "teq_ext_teq_ext" * ]
+ [ [ "" ] "teq" + "( ? ≡ ? )" "teq_teq" * ]
+ }
+ ]
+ [ { "generic equivalence" * } {
+ [ [ "" ] "teqg_ext" + "( ? ≛[?] ? )" + "( ? ⊢ ? ≛[?] ? )" * ]
+ [ [ "" ] "teqg" + "( ? ≛[?] ? )" "teqg_teqg" * ]
}
]
[ { "closures" * } {
}
]
[ { "local environments" * } {
- [ [ "" ] "ceq_ext" "ceq_ext_ceq_ext" * ]
[ [ "" ] "cext2" * ]
[ [ "" ] "lenv_length" + "( |?| )" * ]
[ [ "" ] "lenv_weight" + "( ♯❨?❩ )" * ]
}
]
[ [{ "equivalences" * }]
- { "" "" "" "" "" "" "" }
- { "+" "-" "+" "+" "+" "+" "-" }
+ { "" "" "" "" "" "" "" "" }
+ { "+" "-" "+" "+" "+" "+" "-" "+" }
{ "derived rt-equivalence (terms)"
"primitive decomposed rt-equivalence (terms) removed"
"equivalence for whd rt-reduction (terms)"
"equivalence up to exclusion binders (selected lenvs)"
"syntactic equivalence (items)"
"syntactic equivalence (selected closures) removed"
+ "generic quivalence (terms, items, referred lenvs, referred closures)"
}
]
[ [{ "partial orders" * }]