# GENERATE HTML LDDL #########################################################
-$(HTMLSTAMP): LDWS = `find $(LDDLDIR) -name *.ldw.xml`
+ifeq ($(MAKECMDGOALS),html)
+ LDWS = $(shell find $(LDDLDIR) -name *.ldw.xml)
+endif
$(HTMLSTAMP): $(LDWSTAMP) $(SITEMAP) $(LDWEB:%=$(XSLTDIR)/%)
$(H)for LDW in $(LDWS); do \
# GENERATE HTML HOME #########################################################
-$(HOMESTAMP): LDWS = `find -L $(WEBDIRS) -name "*.ldw.xml"`
+ifeq ($(MAKECMDGOALS),home)
+ LDWS = $(shell find -L $(WEBDIRS) -name *.ldw.xml)
+endif
$(HOMESTAMP): $(LDWS) $(TABLES) $(LDWEB:%=$(XSLTDIR)/%)
$(H)for LDW in $(LDWS); do \
# GENERATE XSL ###############################################################
-$(TABLES) $(SITEMAP): TBLS = `find -L $(WEBDIRS) -name "*.tbl"`
+TBLS = $(shell find -L $(WEBDIRS) -name *.tbl)
$(TABLES) $(SITEMAP): $(TBLS) $(XHTBL)
@echo " XHTBL $(XHTBLOPTS) *.tbl"
# $(H)$(XSLT) --novalid $(XSLT_OUT) $(LDDLDIR)/$@.ldw.xml $(XSLT_XSL) $(XSLTDIR)/lddl.xsl $(XSLT_IN) $(XMLDIR)/$@.xml
.PHONY: $(TAGS)
+
+.SUFFIXES:
(* Basic properties *********************************************************)
-lemma ApplDelta_lifts (f:rtmap) (s0) (s):
- ⇧*[f] (ApplDelta s0 s) ≘ (ApplDelta s0 s).
+lemma ApplDelta_lifts (f) (s0) (s):
+ ⇧*[f] (ApplDelta s0 s) ≘ (ApplDelta s0 s).
/5 width=1 by lifts_sort, lifts_lref, lifts_bind, lifts_flat/ qed.
lemma cpr_ApplOmega_12 (h) (G) (L) (s0) (s): ❪G,L❫ ⊢ ApplOmega1 s0 s ➡[h] ApplOmega2 s0 s.
(* Properties with relocation ***********************************************)
lemma mf_delta_drops (h) (G): ∀K,V1,V2. ❪G,K❫ ⊢ V1 ➡[h] V2 →
- ∀T,L,l. ⇩*[l] L ≘ K.ⓓV1 →
- ∀gv,lv. ❪G,L❫ ⊢ ●[gv,⇡[l←#l]lv]T ➡[h] ●[gv,⇡[l←↑[↑l]V2]lv]T.
+ ∀T,L,i. ⇩[i] L ≘ K.ⓓV1 →
+ ∀gv,lv. ❪G,L❫ ⊢ ●[gv,⇡[i←#i]lv]T ➡[h] ●[gv,⇡[i←↑[↑i]V2]lv]T.
#h #G #K #V1 #V2 #HV #T elim T -T * //
-[ #i #L #l #HKL #gv #lv
+[ #i #L #j #HKL #gv #lv
>mf_lref >mf_lref
- elim (lt_or_eq_or_gt i l) #Hl destruct
- [ >(mf_vpush_lt … Hl) >(mf_vpush_lt … Hl) //
+ elim (lt_or_eq_or_gt i j) #Hj destruct
+ [ >(mf_vpush_lt … Hj) >(mf_vpush_lt … Hj) //
| >mf_vpush_eq >mf_vpush_eq
/2 width=6 by cpm_delta_drops/
- | >(mf_vpush_gt … Hl) >(mf_vpush_gt … Hl) //
+ | >(mf_vpush_gt … Hj) >(mf_vpush_gt … Hj) //
]
-| #p #I #V #T #IHV #IHT #L #l #HLK #gv #lv
+| #p #I #V #T #IHV #IHT #L #j #HLK #gv #lv
>mf_bind >mf_bind
>(mf_comp … T) in ⊢ (?????%?);
[2: @mf_vpush_swap // |4: @exteq_refl |3,5: skip ]
>(mf_comp … T) in ⊢ (??????%);
[2: @mf_vpush_swap // |4: @exteq_refl |3,5: skip ]
- >(flifts_lref_uni 1 l) >(flifts_compose_uni 1 (↑l))
+ >(flifts_lref_uni 1 j) >(flifts_compose_uni 1 (↑j))
/4 width=1 by cpm_bind, drops_drop/
-| #I #V #T #IHV #IHT #L #l #HLK #gv #lv
+| #I #V #T #IHV #IHT #L #j #HLK #gv #lv
>mf_flat >mf_flat /3 width=1 by cpr_flat/
]
qed.
qed-.
lemma lifts_SO_fwd_vpush (M) (gv): is_model M → is_extensional M →
- ∀T1,T2. ⇧*[1] T1 ≘ T2 →
+ ∀T1,T2. ⇧[1] T1 ≘ T2 →
∀lv,d. ⟦T1⟧[gv,lv] ≗{M} ⟦T2⟧[gv,⫯[0←d]lv].
/2 width=3 by lifts_fwd_vpush_aux/ qed-.
fact cnv_cpm_conf_lpr_atom_delta_aux (h) (a) (G) (L) (i):
(∀G0,L0,T0. ❪G,L,#i❫ >[h] ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
❪G,L❫⊢#i![h,a] →
- ∀K,V. ⇩*[i]L ≘ K.ⓓV →
+ ∀K,V. ⇩[i]L ≘ K.ⓓV →
∀n,XV. ❪G,K❫ ⊢ V ➡[n,h] XV →
- ∀X. ⇧*[↑i]XV ≘ X →
+ ∀X. ⇧[↑i]XV ≘ X →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ #i ➡*[n,h] T & ❪G,L2❫ ⊢ X ➡*[h] T.
#h #a #G #L #i #IH #HT #K #V #HLK #n #XV #HVX #X #HXV #L1 #HL1 #L2 #HL2
fact cnv_cpm_conf_lpr_atom_ell_aux (h) (a) (G) (L) (i):
(∀G0,L0,T0. ❪G,L,#i❫ >[h] ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
❪G,L❫⊢#i![h,a] →
- ∀K,W. ⇩*[i]L ≘ K.ⓛW →
+ ∀K,W. ⇩[i]L ≘ K.ⓛW →
∀n,XW. ❪G,K❫ ⊢ W ➡[n,h] XW →
- ∀X. ⇧*[↑i]XW ≘ X →
+ ∀X. ⇧[↑i]XW ≘ X →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ #i ➡*[↑n,h] T & ❪G,L2❫ ⊢ X ➡*[h] T.
#h #a #G #L #i #IH #HT #K #W #HLK #n #XW #HWX #X #HXW #L1 #HL1 #L2 #HL2
fact cnv_cpm_conf_lpr_delta_delta_aux (h) (a) (I) (G) (L) (i):
(∀G0,L0,T0. ❪G,L,#i❫ >[h] ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
❪G,L❫⊢#i![h,a] →
- ∀K1,V1. ⇩*[i]L ≘ K1.ⓑ[I]V1 → ∀K2,V2. ⇩*[i]L ≘ K2.ⓑ[I]V2 →
+ ∀K1,V1. ⇩[i]L ≘ K1.ⓑ[I]V1 → ∀K2,V2. ⇩[i]L ≘ K2.ⓑ[I]V2 →
∀n1,XV1. ❪G,K1❫ ⊢ V1 ➡[n1,h] XV1 → ∀n2,XV2. ❪G,K2❫ ⊢ V2 ➡[n2,h] XV2 →
- ∀X1. ⇧*[↑i]XV1 ≘ X1 → ∀X2. ⇧*[↑i]XV2 ≘ X2 →
+ ∀X1. ⇧[↑i]XV1 ≘ X1 → ∀X2. ⇧[↑i]XV2 ≘ X2 →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ X1 ➡*[n2-n1,h] T & ❪G,L2❫ ⊢ X2 ➡*[n1-n2,h] T.
#h #a #I #G #L #i #IH #HT
qed-.
fact cnv_cpm_conf_lpr_delta_ell_aux (L) (K1) (K2) (V) (W) (i):
- ⇩*[i]L ≘ K1.ⓓV → ⇩*[i]L ≘ K2.ⓛW → ⊥.
+ ⇩[i]L ≘ K1.ⓓV → ⇩[i]L ≘ K2.ⓛW → ⊥.
#L #K1 #K2 #V #W #i #HLK1 #HLK2
lapply (drops_mono … HLK2 … HLK1) -L -i #H destruct
qed-.
(∀G0,L0,T0. ❪G,L,+ⓓV.T❫ >[h] ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
❪G,L❫ ⊢ +ⓓV.T ![h,a] →
∀V1. ❪G,L❫ ⊢V ➡[h] V1 → ∀n1,T1. ❪G,L.ⓓV❫ ⊢ T ➡[n1,h] T1 →
- ∀T2. ⇧*[1]T2 ≘ T → ∀n2,XT2. ❪G,L❫ ⊢ T2 ➡[n2,h] XT2 →
+ ∀T2. ⇧[1]T2 ≘ T → ∀n2,XT2. ❪G,L❫ ⊢ T2 ➡[n2,h] XT2 →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ +ⓓV1.T1 ➡*[n2-n1,h] T & ❪G,L2❫ ⊢ XT2 ➡*[n1-n2,h] T.
#h #a #G0 #L0 #V0 #T0 #IH #H0
fact cnv_cpm_conf_lpr_zeta_zeta_aux (h) (a) (G) (L) (V) (T):
(∀G0,L0,T0. ❪G,L,+ⓓV.T❫ >[h] ❪G0,L0,T0❫ → IH_cnv_cpms_conf_lpr h a G0 L0 T0) →
❪G,L❫ ⊢ +ⓓV.T ![h,a] →
- ∀T1. ⇧*[1]T1 ≘ T → ∀T2. ⇧*[1]T2 ≘ T →
+ ∀T1. ⇧[1]T1 ≘ T → ∀T2. ⇧[1]T2 ≘ T →
∀n1,XT1. ❪G,L❫ ⊢ T1 ➡[n1,h] XT1 → ∀n2,XT2. ❪G,L❫ ⊢ T2 ➡[n2,h] XT2 →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ XT1 ➡*[n2-n1,h] T & ❪G,L2❫ ⊢ XT2 ➡*[n1-n2,h] T.
∀V1. ❪G,L❫ ⊢ V ➡[h] V1 → ∀V2. ❪G,L❫ ⊢ V ➡[h] V2 →
∀W2. ❪G,L❫ ⊢ W ➡[h] W2 →
∀n1,T1. ❪G,L❫ ⊢ ⓓ[p]W.T ➡[n1,h] T1 → ∀n2,T2. ❪G,L.ⓓW❫ ⊢ T ➡[n2,h] T2 →
- ∀U2. ⇧*[1]V2 ≘ U2 →
+ ∀U2. ⇧[1]V2 ≘ U2 →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ ⓐV1.T1 ➡*[n2-n1,h] T & ❪G,L2❫ ⊢ ⓓ[p]W2.ⓐU2.T2 ➡*[n1-n2,h] T.
#h #a #p #G0 #L0 #V0 #W0 #T0 #IH #H0
∀V1. ❪G,L❫ ⊢ V ➡[h] V1 → ∀V2. ❪G,L❫ ⊢ V ➡[h] V2 →
∀W1. ❪G,L❫ ⊢ W ➡[h] W1 → ∀W2. ❪G,L❫ ⊢ W ➡[h] W2 →
∀n1,T1. ❪G,L.ⓓW❫ ⊢ T ➡[n1,h] T1 → ∀n2,T2. ❪G,L.ⓓW❫ ⊢ T ➡[n2,h] T2 →
- ∀U1. ⇧*[1]V1 ≘ U1 → ∀U2. ⇧*[1]V2 ≘ U2 →
+ ∀U1. ⇧[1]V1 ≘ U1 → ∀U2. ⇧[1]V2 ≘ U2 →
∀L1. ❪G,L❫ ⊢ ➡[h] L1 → ∀L2. ❪G,L❫ ⊢ ➡[h] L2 →
∃∃T. ❪G,L1❫ ⊢ ⓓ[p]W1.ⓐU1.T1 ➡*[n2-n1,h] T & ❪G,L2❫ ⊢ ⓓ[p]W2.ⓐU2.T2 ➡*[n1-n2,h] T.
#h #a #p #G0 #L0 #V0 #W0 #T0 #IH #H0
(* Basic_2A1: uses: snv_lref *)
lemma cnv_lref_drops (h) (a) (G):
∀I,K,V,i,L. ❪G,K❫ ⊢ V ![h,a] →
- ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,L❫ ⊢ #i ![h,a].
+ ⇩[i] L ≘ K.ⓑ[I]V → ❪G,L❫ ⊢ #i ![h,a].
#h #a #G #I #K #V #i elim i -i
[ #L #HV #H
lapply (drops_fwd_isid … H ?) -H // #H destruct
(* Basic_2A1: uses: snv_inv_lref *)
lemma cnv_inv_lref_drops (h) (a) (G):
∀i,L. ❪G,L❫ ⊢ #i ![h,a] →
- ∃∃I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ V ![h,a].
+ ∃∃I,K,V. ⇩[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ V ![h,a].
#h #a #G #i elim i -i
[ #L #H
elim (cnv_inv_zero … H) -H #I #K #V #HV #H destruct
lemma cnv_inv_lref_pair (h) (a) (G):
∀i,L. ❪G,L❫ ⊢ #i ![h,a] →
- ∀I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ![h,a].
+ ∀I,K,V. ⇩[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ![h,a].
#h #a #G #i #L #H #I #K #V #HLK
elim (cnv_inv_lref_drops … H) -H #Z #Y #X #HLY #HX
lapply (drops_mono … HLY … HLK) -L #H destruct //
lemma cnv_inv_lref_unit (h) (a) (G):
∀i,L. ❪G,L❫ ⊢ #i ![h,a] →
- ∀I,K. ⇩*[i] L ≘ K.ⓤ[I] → ⊥.
+ ∀I,K. ⇩[i] L ≘ K.ⓤ[I] → ⊥.
#h #a #G #i #L #H #I #K #HLK
elim (cnv_inv_lref_drops … H) -H #Z #Y #X #HLY #_
lapply (drops_mono … HLY … HLK) -L #H destruct
(* Basic_1: uses: ty3_repellent *)
theorem nta_abst_repellent (h) (a) (p) (G) (K):
∀W,T,U1. ❪G,K❫ ⊢ ⓛ[p]W.T :[h,a] U1 →
- ∀U2. ❪G,K.ⓛW❫ ⊢ T :[h,a] U2 → ⇧*[1] U1 ≘ U2 → ⊥.
+ ∀U2. ❪G,K.ⓛW❫ ⊢ T :[h,a] U2 → ⇧[1] U1 ≘ U2 → ⊥.
#h #a #p #G #K #W #T #U1 #H1 #U2 #H2 #HU12
elim (nta_fwd_aaa … H2) -H2 #A2 #H2T #H2U2
elim (nta_fwd_aaa … H1) -H1 #X1 #H1 #HU1
lemma nta_inv_ldec_sn_cnv (h) (a) (G) (K) (V):
∀X2. ❪G,K.ⓛV❫ ⊢ #0 :[h,a] X2 →
- ∃∃U. ❪G,K❫ ⊢ V ![h,a] & ⇧*[1] V ≘ U & ❪G,K.ⓛV❫ ⊢ U ⬌*[h] X2 & ❪G,K.ⓛV❫ ⊢ X2 ![h,a].
+ ∃∃U. ❪G,K❫ ⊢ V ![h,a] & ⇧[1] V ≘ U & ❪G,K.ⓛV❫ ⊢ U ⬌*[h] X2 & ❪G,K.ⓛV❫ ⊢ X2 ![h,a].
#h #a #G #Y #X #X2 #H
elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
elim (cnv_inv_zero … H1) -H1 #Z #K #V #HV #H destruct
lemma nta_ldef (h) (a) (G) (K):
∀V,W. ❪G,K❫ ⊢ V :[h,a] W →
- ∀U. ⇧*[1] W ≘ U → ❪G,K.ⓓV❫ ⊢ #0 :[h,a] U.
+ ∀U. ⇧[1] W ≘ U → ❪G,K.ⓓV❫ ⊢ #0 :[h,a] U.
#h #a #G #K #V #W #H #U #HWU
elim (cnv_inv_cast … H) -H #X #HW #HV #HWX #HVX
lapply (cnv_lifts … HW (Ⓣ) … (K.ⓓV) … HWU) -HW
lemma nta_ldec_cnv (h) (a) (G) (K):
∀W. ❪G,K❫ ⊢ W ![h,a] →
- ∀U. ⇧*[1] W ≘ U → ❪G,K.ⓛW❫ ⊢ #0 :[h,a] U.
+ ∀U. ⇧[1] W ≘ U → ❪G,K.ⓛW❫ ⊢ #0 :[h,a] U.
#h #a #G #K #W #HW #U #HWU
lapply (cnv_lifts … HW (Ⓣ) … (K.ⓛW) … HWU)
/3 width=5 by cnv_zero, cnv_cast, cpms_ell, drops_refl, drops_drop/
lemma nta_lref (h) (a) (I) (G) (K):
∀T,i. ❪G,K❫ ⊢ #i :[h,a] T →
- ∀U. ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #(↑i) :[h,a] U.
+ ∀U. ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #(↑i) :[h,a] U.
#h #a #I #G #K #T #i #H #U #HTU
elim (cnv_inv_cast … H) -H #X #HT #Hi #HTX #H2
lapply (cnv_lifts … HT (Ⓣ) … (K.ⓘ[I]) … HTU) -HT
(* Basic_2A1: was by definition: nta_ldef ntaa_ldef *)
lemma nta_ldef_drops (h) (a) (G) (K) (L) (i):
∀V,W. ❪G,K❫ ⊢ V :[h,a] W →
- ∀U. ⇧*[↑i] W ≘ U → ⇩*[i] L ≘ K.ⓓV → ❪G,L❫ ⊢ #i :[h,a] U.
+ ∀U. ⇧[↑i] W ≘ U → ⇩[i] L ≘ K.ⓓV → ❪G,L❫ ⊢ #i :[h,a] U.
#h #a #G #K #L #i #V #W #HVW #U #HWU #HLK
elim (lifts_split_trans … HWU (𝐔❨1❩) (𝐔❨i❩)) [| // ] #X #HWX #HXU
/3 width=9 by nta_lifts_bi, nta_ldef/
lemma nta_ldec_drops_cnv (h) (a) (G) (K) (L) (i):
∀W. ❪G,K❫ ⊢ W ![h,a] →
- ∀U. ⇧*[↑i] W ≘ U → ⇩*[i] L ≘ K.ⓛW → ❪G,L❫ ⊢ #i :[h,a] U.
+ ∀U. ⇧[↑i] W ≘ U → ⇩[i] L ≘ K.ⓛW → ❪G,L❫ ⊢ #i :[h,a] U.
#h #a #G #K #L #i #W #HW #U #HWU #HLK
elim (lifts_split_trans … HWU (𝐔❨1❩) (𝐔❨i❩)) [| // ] #X #HWX #HXU
/3 width=9 by nta_lifts_bi, nta_ldec_cnv/
lemma nta_ind_rest_cnv (h) (Q:relation4 …):
(∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
(∀G,K,V,W,U.
- ❪G,K❫ ⊢ V :[h,𝟐] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ V :[h,𝟐] W → ⇧[1] W ≘ U →
Q G K V W → Q G (K.ⓓV) (#0) U
) →
- (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,𝟐] → ⇧*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+ (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,𝟐] → ⇧[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
(∀I,G,K,W,U,i.
- ❪G,K❫ ⊢ #i :[h,𝟐] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ #i :[h,𝟐] W → ⇧[1] W ≘ U →
Q G K (#i) W → Q G (K.ⓘ[I]) (#↑i) U
) →
(∀p,I,G,K,V,T,U.
lemma nta_ind_ext_cnv_mixed (h) (Q:relation4 …):
(∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
(∀G,K,V,W,U.
- ❪G,K❫ ⊢ V :[h,𝛚] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ V :[h,𝛚] W → ⇧[1] W ≘ U →
Q G K V W → Q G (K.ⓓV) (#0) U
) →
- (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,𝛚] → ⇧*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+ (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,𝛚] → ⇧[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
(∀I,G,K,W,U,i.
- ❪G,K❫ ⊢ #i :[h,𝛚] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ #i :[h,𝛚] W → ⇧[1] W ≘ U →
Q G K (#i) W → Q G (K.ⓘ[I]) (#↑i) U
) →
(∀p,I,G,K,V,T,U.
lemma nta_ind_ext_cnv (h) (Q:relation4 …):
(∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
(∀G,K,V,W,U.
- ❪G,K❫ ⊢ V :[h,𝛚] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ V :[h,𝛚] W → ⇧[1] W ≘ U →
Q G K V W → Q G (K.ⓓV) (#0) U
) →
- (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,𝛚] → ⇧*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+ (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,𝛚] → ⇧[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
(∀I,G,K,W,U,i.
- ❪G,K❫ ⊢ #i :[h,𝛚] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ #i :[h,𝛚] W → ⇧[1] W ≘ U →
Q G K (#i) W → Q G (K.ⓘ[I]) (#↑i) U
) →
(∀p,I,G,K,V,T,U.
lemma nta_inv_ldef_sn (h) (a) (G) (K) (V):
∀X2. ❪G,K.ⓓV❫ ⊢ #0 :[h,a] X2 →
- ∃∃W,U. ❪G,K❫ ⊢ V :[h,a] W & ⇧*[1] W ≘ U & ❪G,K.ⓓV❫ ⊢ U ⬌*[h] X2 & ❪G,K.ⓓV❫ ⊢ X2 ![h,a].
+ ∃∃W,U. ❪G,K❫ ⊢ V :[h,a] W & ⇧[1] W ≘ U & ❪G,K.ⓓV❫ ⊢ U ⬌*[h] X2 & ❪G,K.ⓓV❫ ⊢ X2 ![h,a].
#h #a #G #Y #X #X2 #H
elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
elim (cnv_inv_zero … H1) -H1 #Z #K #V #HV #H destruct
lemma nta_inv_lref_sn (h) (a) (G) (L):
∀X2,i. ❪G,L❫ ⊢ #↑i :[h,a] X2 →
- ∃∃I,K,T2,U2. ❪G,K❫ ⊢ #i :[h,a] T2 & ⇧*[1] T2 ≘ U2 & ❪G,K.ⓘ[I]❫ ⊢ U2 ⬌*[h] X2 & ❪G,K.ⓘ[I]❫ ⊢ X2 ![h,a] & L = K.ⓘ[I].
+ ∃∃I,K,T2,U2. ❪G,K❫ ⊢ #i :[h,a] T2 & ⇧[1] T2 ≘ U2 & ❪G,K.ⓘ[I]❫ ⊢ U2 ⬌*[h] X2 & ❪G,K.ⓘ[I]❫ ⊢ X2 ![h,a] & L = K.ⓘ[I].
#h #a #G #L #X2 #i #H
elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
elim (cnv_inv_lref … H1) -H1 #I #K #Hi #H destruct
lemma nta_inv_lref_sn_drops_cnv (h) (a) (G) (L):
∀X2,i. ❪G,L❫ ⊢ #i :[h,a] X2 →
- ∨∨ ∃∃K,V,W,U. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V :[h,a] W & ⇧*[↑i] W ≘ U & ❪G,L❫ ⊢ U ⬌*[h] X2 & ❪G,L❫ ⊢ X2 ![h,a]
- | ∃∃K,W,U. ⇩*[i] L ≘ K. ⓛW & ❪G,K❫ ⊢ W ![h,a] & ⇧*[↑i] W ≘ U & ❪G,L❫ ⊢ U ⬌*[h] X2 & ❪G,L❫ ⊢ X2 ![h,a].
+ ∨∨ ∃∃K,V,W,U. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V :[h,a] W & ⇧[↑i] W ≘ U & ❪G,L❫ ⊢ U ⬌*[h] X2 & ❪G,L❫ ⊢ X2 ![h,a]
+ | ∃∃K,W,U. ⇩[i] L ≘ K. ⓛW & ❪G,K❫ ⊢ W ![h,a] & ⇧[↑i] W ≘ U & ❪G,L❫ ⊢ U ⬌*[h] X2 & ❪G,L❫ ⊢ X2 ![h,a].
#h #a #G #L #X2 #i #H
elim (cnv_inv_cast … H) -H #X1 #HX2 #H1 #HX21 #H2
elim (cnv_inv_lref_drops … H1) -H1 #I #K #V #HLK #HV
lemma nta_ind_cnv (h) (a) (Q:relation4 …):
(∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
(∀G,K,V,W,U.
- ❪G,K❫ ⊢ V :[h,a] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ V :[h,a] W → ⇧[1] W ≘ U →
Q G K V W → Q G (K.ⓓV) (#0) U
) →
- (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,a] → ⇧*[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
+ (∀G,K,W,U. ❪G,K❫ ⊢ W ![h,a] → ⇧[1] W ≘ U → Q G (K.ⓛW) (#0) U) →
(∀I,G,K,W,U,i.
- ❪G,K❫ ⊢ #i :[h,a] W → ⇧*[1] W ≘ U →
+ ❪G,K❫ ⊢ #i :[h,a] W → ⇧[1] W ≘ U →
Q G K (#i) W → Q G (K.ⓘ[I]) (#↑i) U
) →
(∀p,I,G,K,V,T,U.
qed.
lemma cnuw_unit_drops (h) (I) (G) (L):
- ∀K,i. ⇩*[i] L ≘ K.ⓤ[I] → ❪G,L❫ ⊢ ➡𝐍𝐖*[h] #i.
+ ∀K,i. ⇩[i] L ≘ K.ⓤ[I] → ❪G,L❫ ⊢ ➡𝐍𝐖*[h] #i.
#h #I #G #L #K #i #HLK #n #X #H
elim (cpms_inv_lref1_drops … H) -H * [ // || #m ] #Y #V1 #V2 #HLY
lapply (drops_mono … HLK … HLY) -L #H destruct
qed.
lemma cpms_zeta (n) (h) (G) (L):
- ∀T1,T. ⇧*[1] T ≘ T1 →
+ ∀T1,T. ⇧[1] T ≘ T1 →
∀V,T2. ❪G,L❫ ⊢ T ➡*[n,h] T2 → ❪G,L❫ ⊢ +ⓓV.T1 ➡*[n,h] T2.
#n #h #G #L #T1 #T #HT1 #V #T2 #H @(cpms_ind_dx … H) -T2
/3 width=3 by cpms_step_dx, cpm_cpms, cpm_zeta/
(* Basic_2A1: uses: cprs_zeta *)
lemma cpms_zeta_dx (n) (h) (G) (L):
- ∀T2,T. ⇧*[1] T2 ≘ T →
+ ∀T2,T. ⇧[1] T2 ≘ T →
∀V,T1. ❪G,L.ⓓV❫ ⊢ T1 ➡*[n,h] T → ❪G,L❫ ⊢ +ⓓV.T1 ➡*[n,h] T2.
#n #h #G #L #T2 #T #HT2 #V #T1 #H @(cpms_ind_sn … H) -T1
/3 width=3 by cpms_step_sn, cpm_cpms, cpm_bind, cpm_zeta/
(* Basic_2A1: uses: cprs_theta_dx *)
lemma cpms_theta_dx (n) (h) (G) (L):
∀V1,V. ❪G,L❫ ⊢ V1 ➡[h] V →
- ∀V2. ⇧*[1] V ≘ V2 →
+ ∀V2. ⇧[1] V ≘ V2 →
∀W1,W2. ❪G,L❫ ⊢ W1 ➡[h] W2 →
∀T1,T2. ❪G,L.ⓓW1❫ ⊢ T1 ➡*[n,h] T2 →
∀p. ❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ➡*[n,h] ⓓ[p]W2.ⓐV2.T2.
(* Basic_2A1: includes: cprs_theta_rc *)
theorem cpms_theta_rc (n) (h) (G) (L):
- ∀V1,V. ❪G,L❫ ⊢ V1 ➡[h] V → ∀V2. ⇧*[1] V ≘ V2 →
+ ∀V1,V. ❪G,L❫ ⊢ V1 ➡[h] V → ∀V2. ⇧[1] V ≘ V2 →
∀W1,T1,T2. ❪G,L.ⓓW1❫ ⊢ T1 ➡*[n,h] T2 →
∀W2. ❪G,L❫ ⊢ W1 ➡*[h] W2 →
∀p. ❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ➡*[n,h] ⓓ[p]W2.ⓐV2.T2.
(* Basic_2A1: includes: cprs_theta *)
theorem cpms_theta (n) (h) (G) (L):
- ∀V,V2. ⇧*[1] V ≘ V2 → ∀W1,W2. ❪G,L❫ ⊢ W1 ➡*[h] W2 →
+ ∀V,V2. ⇧[1] V ≘ V2 → ∀W1,W2. ❪G,L❫ ⊢ W1 ➡*[h] W2 →
∀T1,T2. ❪G,L.ⓓW1❫ ⊢ T1 ➡*[n,h] T2 →
∀V1. ❪G,L❫ ⊢ V1 ➡*[h] V →
∀p. ❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ➡*[n,h] ⓓ[p]W2.ⓐV2.T2.
❪G,L❫ ⊢ T1 ➡*[n1,h] ⓛ[p]W.T & ❪G,L❫ ⊢ ⓓ[p]ⓝW.V1.T ➡*[n2,h] X2 &
n1 + n2 = n
| ∃∃n1,n2,p,V0,V2,V,T.
- ❪G,L❫ ⊢ V1 ➡*[h] V0 & ⇧*[1] V0 ≘ V2 &
+ ❪G,L❫ ⊢ V1 ➡*[h] V0 & ⇧[1] V0 ≘ V2 &
❪G,L❫ ⊢ T1 ➡*[n1,h] ⓓ[p]V.T & ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ➡*[n2,h] X2 &
n1 + n2 = n.
#n #h #G #L #V1 #T1 #U2 #H
(* Advanced properties ******************************************************)
lemma cpms_delta (n) (h) (G): ∀K,V1,V2. ❪G,K❫ ⊢ V1 ➡*[n,h] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ➡*[n,h] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ➡*[n,h] W2.
#n #h #G #K #V1 #V2 #H @(cpms_ind_dx … H) -V2
[ /3 width=3 by cpm_cpms, cpm_delta/
| #n1 #n2 #V #V2 #_ #IH #HV2 #W2 #HVW2
qed.
lemma cpms_ell (n) (h) (G): ∀K,V1,V2. ❪G,K❫ ⊢ V1 ➡*[n,h] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ➡*[↑n,h] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ➡*[↑n,h] W2.
#n #h #G #K #V1 #V2 #H @(cpms_ind_dx … H) -V2
[ /3 width=3 by cpm_cpms, cpm_ell/
| #n1 #n2 #V #V2 #_ #IH #HV2 #W2 #HVW2
qed.
lemma cpms_lref (n) (h) (I) (G): ∀K,T,i. ❪G,K❫ ⊢ #i ➡*[n,h] T →
- ∀U. ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡*[n,h] U.
+ ∀U. ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡*[n,h] U.
#n #h #I #G #K #T #i #H @(cpms_ind_dx … H) -T
[ /3 width=3 by cpm_cpms, cpm_lref/
| #n1 #n2 #T #T2 #_ #IH #HT2 #U2 #HTU2
(* Note: apparently this was missing in basic_1 *)
(* Basic_2A1: uses: cprs_delta *)
lemma cpms_delta_drops (n) (h) (G):
- ∀L,K,V,i. ⇩*[i] L ≘ K.ⓓV →
+ ∀L,K,V,i. ⇩[i] L ≘ K.ⓓV →
∀V2. ❪G,K❫ ⊢ V ➡*[n,h] V2 →
- ∀W2. ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ➡*[n,h] W2.
+ ∀W2. ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ➡*[n,h] W2.
#n #h #G #L #K #V #i #HLK #V2 #H @(cpms_ind_dx … H) -V2
[ /3 width=6 by cpm_cpms, cpm_delta_drops/
| #n1 #n2 #V1 #V2 #_ #IH #HV12 #W2 #HVW2
qed.
lemma cpms_ell_drops (n) (h) (G):
- ∀L,K,W,i. ⇩*[i] L ≘ K.ⓛW →
+ ∀L,K,W,i. ⇩[i] L ≘ K.ⓛW →
∀W2. ❪G,K❫ ⊢ W ➡*[n,h] W2 →
- ∀V2. ⇧*[↑i] W2 ≘ V2 → ❪G,L❫ ⊢ #i ➡*[↑n,h] V2.
+ ∀V2. ⇧[↑i] W2 ≘ V2 → ❪G,L❫ ⊢ #i ➡*[↑n,h] V2.
#n #h #G #L #K #W #i #HLK #W2 #H @(cpms_ind_dx … H) -W2
[ /3 width=6 by cpm_cpms, cpm_ell_drops/
| #n1 #n2 #W1 #W2 #_ #IH #HW12 #V2 #HWV2
lemma cpms_inv_lref1_drops (n) (h) (G):
∀L,T2,i. ❪G,L❫ ⊢ #i ➡*[n,h] T2 →
∨∨ ∧∧ T2 = #i & n = 0
- | ∃∃K,V,V2. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡*[n,h] V2 &
- ⇧*[↑i] V2 ≘ T2
- | ∃∃m,K,V,V2. ⇩*[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ➡*[m,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & n = ↑m.
+ | ∃∃K,V,V2. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡*[n,h] V2 &
+ ⇧[↑i] V2 ≘ T2
+ | ∃∃m,K,V,V2. ⇩[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ➡*[m,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & n = ↑m.
#n #h #G #L #T2 #i #H @(cpms_ind_dx … H) -T2
[ /3 width=1 by or3_intro0, conj/
| #n1 #n2 #T #T2 #_ #IH #HT2 cases IH -IH *
lemma cpms_inv_delta_sn (n) (h) (G) (K) (V):
∀T2. ❪G,K.ⓓV❫ ⊢ #0 ➡*[n,h] T2 →
∨∨ ∧∧ T2 = #0 & n = 0
- | ∃∃V2. ❪G,K❫ ⊢ V ➡*[n,h] V2 & ⇧*[1] V2 ≘ T2.
+ | ∃∃V2. ❪G,K❫ ⊢ V ➡*[n,h] V2 & ⇧[1] V2 ≘ T2.
#n #h #G #K #V #T2 #H
elim (cpms_inv_lref1_drops … H) -H *
[ /3 width=1 by or_introl, conj/
lemma cpms_inv_ell_sn (n) (h) (G) (K) (V):
∀T2. ❪G,K.ⓛV❫ ⊢ #0 ➡*[n,h] T2 →
∨∨ ∧∧ T2 = #0 & n = 0
- | ∃∃m,V2. ❪G,K❫ ⊢ V ➡*[m,h] V2 & ⇧*[1] V2 ≘ T2 & n = ↑m.
+ | ∃∃m,V2. ❪G,K❫ ⊢ V ➡*[m,h] V2 & ⇧[1] V2 ≘ T2 & n = ↑m.
#n #h #G #K #V #T2 #H
elim (cpms_inv_lref1_drops … H) -H *
[ /3 width=1 by or_introl, conj/
lemma cpms_inv_lref_sn (n) (h) (G) (I) (K):
∀U2,i. ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡*[n,h] U2 →
∨∨ ∧∧ U2 = #↑i & n = 0
- | ∃∃T2. ❪G,K❫ ⊢ #i ➡*[n,h] T2 & ⇧*[1] T2 ≘ U2.
+ | ∃∃T2. ❪G,K❫ ⊢ #i ➡*[n,h] T2 & ⇧[1] T2 ≘ U2.
#n #h #G #I #K #U2 #i #H
elim (cpms_inv_lref1_drops … H) -H *
[ /3 width=1 by or_introl, conj/
X2 = ⓐV2. T2
| ∃∃p,W,T. ❪G,L❫ ⊢ T1 ➡*[h] ⓛ[p]W.T &
❪G,L❫ ⊢ ⓓ[p]ⓝW.V1.T ➡*[h] X2
- | ∃∃p,V0,V2,V,T. ❪G,L❫ ⊢ V1 ➡*[h] V0 & ⇧*[1] V0 ≘ V2 &
+ | ∃∃p,V0,V2,V,T. ❪G,L❫ ⊢ V1 ➡*[h] V0 & ⇧[1] V0 ≘ V2 &
❪G,L❫ ⊢ T1 ➡*[h] ⓓ[p]V.T &
❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ➡*[h] X2.
#h #G #L #V1 #T1 #X2 #H elim (cpms_inv_appl_sn … H) -H *
(* Basic_2A1: was: cprs_inv_lref1 *)
lemma cprs_inv_lref1_drops (h) (G): ∀L,T2,i. ❪G,L❫ ⊢ #i ➡*[h] T2 →
∨∨ T2 = #i
- | ∃∃K,V1,T1. ⇩*[i] L ≘ K.ⓓV1 & ❪G,K❫ ⊢ V1 ➡*[h] T1 &
- ⇧*[↑i] T1 ≘ T2.
+ | ∃∃K,V1,T1. ⇩[i] L ≘ K.ⓓV1 & ❪G,K❫ ⊢ V1 ➡*[h] T1 &
+ ⇧[↑i] T1 ≘ T2.
#h #G #L #T2 #i #H elim (cpms_inv_lref1_drops … H) -H *
[ /2 width=1 by or_introl/
| /3 width=6 by ex3_3_intro, or_intror/
lemma cpts_delta (h) (n) (G):
∀K,V1,V2. ❪G,K❫ ⊢ V1 ⬆*[h,n] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ⬆*[h,n] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ⬆*[h,n] W2.
#h #n #G #K #V1 #V2 #H @(cpts_ind_dx … H) -V2
[ /3 width=3 by cpt_cpts, cpt_delta/
| #n1 #n2 #V #V2 #_ #IH #HV2 #W2 #HVW2
lemma cpts_ell (h) (n) (G):
∀K,V1,V2. ❪G,K❫ ⊢ V1 ⬆*[h,n] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ⬆*[h,↑n] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ⬆*[h,↑n] W2.
#h #n #G #K #V1 #V2 #H @(cpts_ind_dx … H) -V2
[ /3 width=3 by cpt_cpts, cpt_ell/
| #n1 #n2 #V #V2 #_ #IH #HV2 #W2 #HVW2
lemma cpts_lref (h) (n) (I) (G):
∀K,T,i. ❪G,K❫ ⊢ #i ⬆*[h,n] T →
- ∀U. ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬆*[h,n] U.
+ ∀U. ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬆*[h,n] U.
#h #n #I #G #K #T #i #H @(cpts_ind_dx … H) -T
[ /3 width=3 by cpt_cpts, cpt_lref/
| #n1 #n2 #T #T2 #_ #IH #HT2 #U2 #HTU2
qed.
lemma cpts_delta_drops (h) (n) (G):
- ∀L,K,V,i. ⇩*[i] L ≘ K.ⓓV →
+ ∀L,K,V,i. ⇩[i] L ≘ K.ⓓV →
∀V2. ❪G,K❫ ⊢ V ⬆*[h,n] V2 →
- ∀W2. ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬆*[h,n] W2.
+ ∀W2. ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬆*[h,n] W2.
#h #n #G #L #K #V #i #HLK #V2 #H @(cpts_ind_dx … H) -V2
[ /3 width=6 by cpt_cpts, cpt_delta_drops/
| #n1 #n2 #V1 #V2 #_ #IH #HV12 #W2 #HVW2
qed.
lemma cpts_ell_drops (h) (n) (G):
- ∀L,K,W,i. ⇩*[i] L ≘ K.ⓛW →
+ ∀L,K,W,i. ⇩[i] L ≘ K.ⓛW →
∀W2. ❪G,K❫ ⊢ W ⬆*[h,n] W2 →
- ∀V2. ⇧*[↑i] W2 ≘ V2 → ❪G,L❫ ⊢ #i ⬆*[h,↑n] V2.
+ ∀V2. ⇧[↑i] W2 ≘ V2 → ❪G,L❫ ⊢ #i ⬆*[h,↑n] V2.
#h #n #G #L #K #W #i #HLK #W2 #H @(cpts_ind_dx … H) -W2
[ /3 width=6 by cpt_cpts, cpt_ell_drops/
| #n1 #n2 #W1 #W2 #_ #IH #HW12 #V2 #HWV2
lemma cpts_inv_lref_sn_drops (h) (n) (G) (L) (i):
∀X2. ❪G,L❫ ⊢ #i ⬆*[h,n] X2 →
∨∨ ∧∧ X2 = #i & n = 0
- | ∃∃K,V,V2. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬆*[h,n] V2 & ⇧*[↑i] V2 ≘ X2
- | ∃∃m,K,V,V2. ⇩*[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬆*[h,m] V2 & ⇧*[↑i] V2 ≘ X2 & n = ↑m.
+ | ∃∃K,V,V2. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬆*[h,n] V2 & ⇧[↑i] V2 ≘ X2
+ | ∃∃m,K,V,V2. ⇩[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬆*[h,m] V2 & ⇧[↑i] V2 ≘ X2 & n = ↑m.
#h #n #G #L #i #X2 #H @(cpts_ind_dx … H) -X2
[ /3 width=1 by or3_intro0, conj/
| #n1 #n2 #T #T2 #_ #IH #HT2 cases IH -IH *
lemma cpts_inv_delta_sn (h) (n) (G) (K) (V):
∀X2. ❪G,K.ⓓV❫ ⊢ #0 ⬆*[h,n] X2 →
∨∨ ∧∧ X2 = #0 & n = 0
- | ∃∃V2. ❪G,K❫ ⊢ V ⬆*[h,n] V2 & ⇧*[1] V2 ≘ X2.
+ | ∃∃V2. ❪G,K❫ ⊢ V ⬆*[h,n] V2 & ⇧[1] V2 ≘ X2.
#h #n #G #K #V #X2 #H
elim (cpts_inv_lref_sn_drops … H) -H *
[ /3 width=1 by or_introl, conj/
lemma cpts_inv_ell_sn (h) (n) (G) (K) (V):
∀X2. ❪G,K.ⓛV❫ ⊢ #0 ⬆*[h,n] X2 →
∨∨ ∧∧ X2 = #0 & n = 0
- | ∃∃m,V2. ❪G,K❫ ⊢ V ⬆*[h,m] V2 & ⇧*[1] V2 ≘ X2 & n = ↑m.
+ | ∃∃m,V2. ❪G,K❫ ⊢ V ⬆*[h,m] V2 & ⇧[1] V2 ≘ X2 & n = ↑m.
#h #n #G #K #V #X2 #H
elim (cpts_inv_lref_sn_drops … H) -H *
[ /3 width=1 by or_introl, conj/
lemma cpts_inv_lref_sn (h) (n) (I) (G) (K) (i):
∀X2. ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬆*[h,n] X2 →
∨∨ ∧∧ X2 = #↑i & n = 0
- | ∃∃T2. ❪G,K❫ ⊢ #i ⬆*[h,n] T2 & ⇧*[1] T2 ≘ X2.
+ | ∃∃T2. ❪G,K❫ ⊢ #i ⬆*[h,n] T2 & ⇧[1] T2 ≘ X2.
#h #n #I #G #K #i #X2 #H
elim (cpts_inv_lref_sn_drops … H) -H *
[ /3 width=1 by or_introl, conj/
qed.
lemma cpxs_zeta (h) (G) (L) (V):
- ∀T1,T. ⇧*[1] T ≘ T1 →
+ ∀T1,T. ⇧[1] T ≘ T1 →
∀T2. ❪G,L❫ ⊢ T ⬈*[h] T2 → ❪G,L❫ ⊢ +ⓓV.T1 ⬈*[h] T2.
#h #G #L #V #T1 #T #HT1 #T2 #H @(cpxs_ind … H) -T2
/3 width=3 by cpxs_strap1, cpx_cpxs, cpx_zeta/
(* Basic_2A1: was: cpxs_zeta *)
lemma cpxs_zeta_dx (h) (G) (L) (V):
- ∀T2,T. ⇧*[1] T2 ≘ T →
+ ∀T2,T. ⇧[1] T2 ≘ T →
∀T1. ❪G,L.ⓓV❫ ⊢ T1 ⬈*[h] T → ❪G,L❫ ⊢ +ⓓV.T1 ⬈*[h] T2.
#h #G #L #V #T2 #T #HT2 #T1 #H @(cpxs_ind_dx … H) -T1
/3 width=3 by cpxs_strap2, cpx_cpxs, cpx_bind, cpx_zeta/
qed.
lemma cpxs_theta_dx: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
- ❪G,L❫ ⊢ V1 ⬈[h] V → ⇧*[1] V ≘ V2 → ❪G,L.ⓓW1❫ ⊢ T1 ⬈*[h] T2 →
+ ❪G,L❫ ⊢ V1 ⬈[h] V → ⇧[1] V ≘ V2 → ❪G,L.ⓓW1❫ ⊢ T1 ⬈*[h] T2 →
❪G,L❫ ⊢ W1 ⬈[h] W2 → ❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ⬈*[h] ⓓ[p]W2.ⓐV2.T2.
#h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 * -T2
/4 width=9 by cpx_cpxs, cpxs_strap1, cpxs_bind_dx, cpxs_flat_dx, cpx_theta/
qed.
theorem cpxs_theta_rc: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
- ❪G,L❫ ⊢ V1 ⬈[h] V → ⇧*[1] V ≘ V2 →
+ ❪G,L❫ ⊢ V1 ⬈[h] V → ⇧[1] V ≘ V2 →
❪G,L.ⓓW1❫ ⊢ T1 ⬈*[h] T2 → ❪G,L❫ ⊢ W1 ⬈*[h] W2 →
❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ⬈*[h] ⓓ[p]W2.ⓐV2.T2.
#h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV1 #HV2 #HT12 #H @(cpxs_ind … H) -W2
qed.
theorem cpxs_theta: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
- ⇧*[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ⬈*[h] W2 →
+ ⇧[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ⬈*[h] W2 →
❪G,L.ⓓW1❫ ⊢ T1 ⬈*[h] T2 → ❪G,L❫ ⊢ V1 ⬈*[h] V →
❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ⬈*[h] ⓓ[p]W2.ⓐV2.T2.
#h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #HV2 #HW12 #HT12 #H @(TC_ind_dx … V1 H) -V1
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ⬈*[h] V2 & ❪G,L❫ ⊢ T1 ⬈*[h] T2 &
U2 = ⓐV2.T2
| ∃∃p,W,T. ❪G,L❫ ⊢ T1 ⬈*[h] ⓛ[p]W.T & ❪G,L❫ ⊢ ⓓ[p]ⓝW.V1.T ⬈*[h] U2
- | ∃∃p,V0,V2,V,T. ❪G,L❫ ⊢ V1 ⬈*[h] V0 & ⇧*[1] V0 ≘ V2 &
+ | ∃∃p,V0,V2,V,T. ❪G,L❫ ⊢ V1 ⬈*[h] V0 & ⇧[1] V0 ≘ V2 &
❪G,L❫ ⊢ T1 ⬈*[h] ⓓ[p]V.T & ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ⬈*[h] U2.
#h #G #L #V1 #T1 #U2 #H @(cpxs_ind … H) -U2 [ /3 width=5 by or3_intro0, ex3_2_intro/ ]
#U #U2 #_ #HU2 * *
(* Advanced properties ******************************************************)
lemma cpxs_delta: ∀h,I,G,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈*[h] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓑ[I]V1❫ ⊢ #0 ⬈*[h] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓑ[I]V1❫ ⊢ #0 ⬈*[h] W2.
#h #I #G #K #V1 #V2 #H @(cpxs_ind … H) -V2
[ /3 width=3 by cpx_cpxs, cpx_delta/
| #V #V2 #_ #HV2 #IH #W2 #HVW2
qed.
lemma cpxs_lref: ∀h,I,G,K,T,i. ❪G,K❫ ⊢ #i ⬈*[h] T →
- ∀U. ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬈*[h] U.
+ ∀U. ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬈*[h] U.
#h #I #G #K #T #i #H @(cpxs_ind … H) -T
[ /3 width=3 by cpx_cpxs, cpx_lref/
| #T0 #T #_ #HT2 #IH #U #HTU
(* Basic_2A1: was: cpxs_delta *)
lemma cpxs_delta_drops: ∀h,I,G,L,K,V1,V2,i.
- ⇩*[i] L ≘ K.ⓑ[I]V1 → ❪G,K❫ ⊢ V1 ⬈*[h] V2 →
- ∀W2. ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬈*[h] W2.
+ ⇩[i] L ≘ K.ⓑ[I]V1 → ❪G,K❫ ⊢ V1 ⬈*[h] V2 →
+ ∀W2. ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬈*[h] W2.
#h #I #G #L #K #V1 #V2 #i #HLK #H @(cpxs_ind … H) -V2
[ /3 width=7 by cpx_cpxs, cpx_delta_drops/
| #V #V2 #_ #HV2 #IH #W2 #HVW2
lemma cpxs_inv_zero1: ∀h,G,L,T2. ❪G,L❫ ⊢ #0 ⬈*[h] T2 →
T2 = #0 ∨
- ∃∃I,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈*[h] V2 & ⇧*[1] V2 ≘ T2 &
+ ∃∃I,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈*[h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓑ[I]V1.
#h #G #L #T2 #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
lemma cpxs_inv_lref1: ∀h,G,L,T2,i. ❪G,L❫ ⊢ #↑i ⬈*[h] T2 →
T2 = #(↑i) ∨
- ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬈*[h] T & ⇧*[1] T ≘ T2 & L = K.ⓘ[I].
+ ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬈*[h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I].
#h #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
[ #H destruct
(* Basic_2A1: was: cpxs_inv_lref1 *)
lemma cpxs_inv_lref1_drops: ∀h,G,L,T2,i. ❪G,L❫ ⊢ #i ⬈*[h] T2 →
T2 = #i ∨
- ∃∃I,K,V1,T1. ⇩*[i] L ≘ K.ⓑ[I]V1 & ❪G,K❫ ⊢ V1 ⬈*[h] T1 &
- ⇧*[↑i] T1 ≘ T2.
+ ∃∃I,K,V1,T1. ⇩[i] L ≘ K.ⓑ[I]V1 & ❪G,K❫ ⊢ V1 ⬈*[h] T1 &
+ ⇧[↑i] T1 ≘ T2.
#h #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
[ #H destruct
(* Note: probably this is an inversion lemma *)
(* Basic_2A1: was: cpxs_fwd_delta *)
lemma cpxs_fwd_delta_drops (h) (I) (G) (L) (K):
- ∀V1,i. ⇩*[i] L ≘ K.ⓑ[I]V1 →
- ∀V2. ⇧*[↑i] V1 ≘ V2 →
+ ∀V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 →
+ ∀V2. ⇧[↑i] V1 ≘ V2 →
∀X2. ❪G,L❫ ⊢ #i ⬈*[h] X2 →
∨∨ #i ⩳ X2 | ❪G,L❫ ⊢ V2 ⬈*[h] X2.
#h #I #G #L #K #V1 #i #HLK #V2 #HV12 #X2 #H
lemma cpxs_fwd_theta (h) (p) (G) (L):
∀V1,V,T,X2. ❪G,L❫ ⊢ ⓐV1.ⓓ[p]V.T ⬈*[h] X2 →
- ∀V2. ⇧*[1] V1 ≘ V2 →
+ ∀V2. ⇧[1] V1 ≘ V2 →
∨∨ ⓐV1.ⓓ[p]V.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⓐV2.T ⬈*[h] X2.
#h #p #G #L #V1 #V #T #X2 #H #V2 #HV12
elim (cpxs_inv_appl1 … H) -H *
(* Basic_2A1: was: cpxs_fwd_delta_vector *)
lemma cpxs_fwd_delta_drops_vector (h) (I) (G) (L) (K):
- ∀V1,i. ⇩*[i] L ≘ K.ⓑ[I]V1 →
- ∀V2. ⇧*[↑i] V1 ≘ V2 →
+ ∀V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 →
+ ∀V2. ⇧[↑i] V1 ≘ V2 →
∀Vs,X2. ❪G,L❫ ⊢ ⒶVs.#i ⬈*[h] X2 →
∨∨ ⒶVs.#i ⩳ X2 | ❪G,L❫ ⊢ ⒶVs.V2 ⬈*[h] X2.
#h #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs
(* Basic_1: was just: pr3_iso_appls_abbr *)
lemma cpxs_fwd_theta_vector (h) (G) (L):
- ∀V1b,V2b. ⇧*[1] V1b ≘ V2b →
+ ∀V1b,V2b. ⇧[1] V1b ≘ V2b →
∀p,V,T,X2. ❪G,L❫ ⊢ ⒶV1b.ⓓ[p]V.T ⬈*[h] X2 →
∨∨ ⒶV1b.ⓓ[p]V.T ⩳ X2 | ❪G,L❫ ⊢ ⓓ[p]V.ⒶV2b.T ⬈*[h] X2.
#h #G #L #V1b #V2b * -V1b -V2b /3 width=1 by or_intror/
(* Basic_1: was just: sn3_abbr *)
(* Basic_2A1: was: csx_lref_bind *)
lemma csx_lref_pair_drops (h) (G):
- ∀I,L,K,V,i. ⇩*[i] L ≘ K.ⓑ[I]V →
+ ∀I,L,K,V,i. ⇩[i] L ≘ K.ⓑ[I]V →
❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫ → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪#i❫.
#h #G #I #L #K #V #i #HLK #HV
@csx_intro #X #H #Hi elim (cpx_inv_lref1_drops … H) -H
(* Basic_1: was: sn3_gen_def *)
(* Basic_2A1: was: csx_inv_lref_bind *)
lemma csx_inv_lref_pair_drops (h) (G):
- ∀I,L,K,V,i. ⇩*[i] L ≘ K.ⓑ[I]V →
+ ∀I,L,K,V,i. ⇩[i] L ≘ K.ⓑ[I]V →
❪G,L❫ ⊢ ⬈*[h] 𝐒❪#i❫ → ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
#h #G #I #L #K #V #i #HLK #Hi
elim (lifts_total V (𝐔❨↑i❩))
lemma csx_inv_lref_drops (h) (G):
∀L,i. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪#i❫ →
∨∨ ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆
- | ∃∃I,K. ⇩*[i] L ≘ K.ⓤ[I]
- | ∃∃I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
+ | ∃∃I,K. ⇩[i] L ≘ K.ⓤ[I]
+ | ∃∃I,K,V. ⇩[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
#h #G #L #i #H elim (drops_F_uni L i) /2 width=1 by or3_intro0/
* * /4 width=9 by csx_inv_lref_pair_drops, ex2_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
qed-.
qed.
lemma csx_applv_delta_drops (h) (G):
- ∀I,L,K,V1,i. ⇩*[i] L ≘ K.ⓑ[I]V1 →
- ∀V2. ⇧*[↑i] V1 ≘ V2 →
+ ∀I,L,K,V1,i. ⇩[i] L ≘ K.ⓑ[I]V1 →
+ ∀V2. ⇧[↑i] V1 ≘ V2 →
∀Vs. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⒶVs.V2❫ → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⒶVs.#i❫.
#h #G #I #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
[ /4 width=11 by csx_inv_lifts, csx_lref_pair_drops, drops_isuni_fwd_drop2/
(* Basic_1: was just: sn3_appls_abbr *)
lemma csx_applv_theta (h) (G):
- ∀p,L,V1b,V2b. ⇧*[1] V1b ≘ V2b →
+ ∀p,L,V1b,V2b. ⇧[1] V1b ≘ V2b →
∀V,T. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⓓ[p]V.ⒶV2b.T❫ → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⒶV1b.ⓓ[p]V.T❫.
#h #G #p #L #V1b #V2b * -V1b -V2b /2 width=1 by/
#V1b #V2b #V1 #V2 #HV12 #H
qed.
fact csx_appl_theta_aux (h) (G):
- ∀p,L,U. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪U❫ → ∀V1,V2. ⇧*[1] V1 ≘ V2 →
+ ∀p,L,U. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪U❫ → ∀V1,V2. ⇧[1] V1 ≘ V2 →
∀V,T. U = ⓓ[p]V.ⓐV2.T → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⓐV1.ⓓ[p]V.T❫.
#h #G #p #L #X #H
@(csx_ind_cpxs … H) -X #X #HVT #IHVT #V1 #V2 #HV12 #V #T #H destruct
lemma csx_appl_theta (h) (G):
∀p,L,V,V2,T. ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⓓ[p]V.ⓐV2.T❫ →
- ∀V1. ⇧*[1] V1 ≘ V2 → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⓐV1.ⓓ[p]V.T❫.
+ ∀V1. ⇧[1] V1 ≘ V2 → ❪G,L❫ ⊢ ⬈*[h] 𝐒❪ⓐV1.ⓓ[p]V.T❫.
/2 width=5 by csx_appl_theta_aux/ qed.
lemma cpms_inv_abbr_sn_dx (n) (h) (G) (L):
∀p,V1,T1,X2. ❪G,L❫ ⊢ ⓓ[p]V1.T1 ➡*[n,h] X2 →
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ➡*[h] V2 & ❪G,L.ⓓV1❫ ⊢ T1 ➡*[n,h] T2 & X2 = ⓓ[p]V2.T2
- | ∃∃T2. ❪G,L.ⓓV1❫ ⊢ T1 ➡*[n ,h] T2 & ⇧*[1] X2 ≘ T2 & p = Ⓣ.
+ | ∃∃T2. ❪G,L.ⓓV1❫ ⊢ T1 ➡*[n ,h] T2 & ⇧[1] X2 ≘ T2 & p = Ⓣ.
#n #h #G #L #p #V1 #T1 #X2 #H
@(cpms_ind_dx … H) -X2 -n /3 width=5 by ex3_2_intro, or_introl/
#n1 #n2 #X #X2 #_ * *
(* Basic_2A1: uses: scpds_inv_abbr_abst *)
lemma cpms_inv_abbr_abst (n) (h) (G) (L):
∀p1,p2,V1,W2,T1,T2. ❪G,L❫ ⊢ ⓓ[p1]V1.T1 ➡*[n,h] ⓛ[p2]W2.T2 →
- ∃∃T. ❪G,L.ⓓV1❫ ⊢ T1 ➡*[n,h] T & ⇧*[1] ⓛ[p2]W2.T2 ≘ T & p1 = Ⓣ.
+ ∃∃T. ❪G,L.ⓓV1❫ ⊢ T1 ➡*[n,h] T & ⇧[1] ⓛ[p2]W2.T2 ≘ T & p1 = Ⓣ.
#n #h #G #L #p1 #p2 #V1 #W2 #T1 #T2 #H
elim (cpms_inv_abbr_sn_dx … H) -H *
[ #V #T #_ #_ #H destruct
∀V1,T1,U2. ❪G,L❫ ⊢ ⓓ[p]V1.T1 ⬈*[h] U2 →
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ⬈*[h] V2 & ❪G,L.ⓓV1❫ ⊢ T1 ⬈*[h] T2 &
U2 = ⓓ[p]V2.T2
- | ∃∃T2. ❪G,L.ⓓV1❫ ⊢ T1 ⬈*[h] T2 & ⇧*[1] U2 ≘ T2 & p = Ⓣ.
+ | ∃∃T2. ❪G,L.ⓓV1❫ ⊢ T1 ⬈*[h] T2 & ⇧[1] U2 ≘ T2 & p = Ⓣ.
#h #p #G #L #V1 #T1 #U2 #H
@(cpxs_ind … H) -U2 /3 width=5 by ex3_2_intro, or_introl/
#U0 #U2 #_ #HU02 * *
/2 width=4 by rsx_fwd_lref_pair_csx_aux/ qed-.
lemma rsx_fwd_lref_pair_csx_drops (h) (G):
- ∀I,K,V,i,L. ⇩*[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,#i] 𝐒❪L❫ → ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
+ ∀I,K,V,i,L. ⇩[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,#i] 𝐒❪L❫ → ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫.
#h #G #I #K #V #i elim i -i
[ #L #H >(drops_fwd_isid … H) -H
/2 width=2 by rsx_fwd_lref_pair_csx/
/3 width=2 by rsx_fwd_lref_pair_csx, rsx_fwd_pair, conj/ qed-.
lemma rsx_inv_lref_pair_drops (h) (G):
- ∀I,K,V,i,L. ⇩*[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,#i] 𝐒❪L❫ →
+ ∀I,K,V,i,L. ⇩[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,#i] 𝐒❪L❫ →
∧∧ ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫ & G ⊢ ⬈*[h,V] 𝐒❪K❫.
/3 width=5 by rsx_fwd_lref_pair_csx_drops, rsx_fwd_lref_pair_drops, conj/ qed-.
lemma rsx_inv_lref_drops (h) (G):
∀L,i. G ⊢ ⬈*[h,#i] 𝐒❪L❫ →
∨∨ ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆
- | ∃∃I,K. ⇩*[i] L ≘ K.ⓤ[I]
- | ∃∃I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫ & G ⊢ ⬈*[h,V] 𝐒❪K❫.
+ | ∃∃I,K. ⇩[i] L ≘ K.ⓤ[I]
+ | ∃∃I,K,V. ⇩[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫ & G ⊢ ⬈*[h,V] 𝐒❪K❫.
#h #G #L #i #H elim (drops_F_uni L i)
[ /2 width=1 by or3_intro0/
| * * /4 width=10 by rsx_fwd_lref_pair_csx_drops, rsx_fwd_lref_pair_drops, ex3_3_intro, ex1_2_intro, or3_intro2, or3_intro1/
(* Basic_2A1: uses: lsx_lref_be *)
lemma rsx_lref_pair_drops (h) (G):
∀K,V. ❪G,K❫ ⊢ ⬈*[h] 𝐒❪V❫ → G ⊢ ⬈*[h,V] 𝐒❪K❫ →
- ∀I,i,L. ⇩*[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,#i] 𝐒❪L❫.
+ ∀I,i,L. ⇩[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,#i] 𝐒❪L❫.
#h #G #K #V #HV #HK #I #i elim i -i
[ #L #H >(drops_fwd_isid … H) -H /2 width=1 by rsx_lref_pair/
| #i #IH #L #H
qed.
(* Basic_2A1: uses: lsx_lref_skip *)
-lemma rsx_lref_unit_drops (h) (G): ∀I,L,K,i. ⇩*[i] L ≘ K.ⓤ[I] → G ⊢ ⬈*[h,#i] 𝐒❪L❫.
+lemma rsx_lref_unit_drops (h) (G): ∀I,L,K,i. ⇩[i] L ≘ K.ⓤ[I] → G ⊢ ⬈*[h,#i] 𝐒❪L❫.
#h #G #I #L1 #K1 #i #HL1
@(rsx_lifts … (#0) … HL1) -HL1 //
qed.
(* Basic_2A1: uses: lsx_fwd_lref_be *)
lemma rsx_fwd_lref_pair_drops (h) (G):
∀L,i. G ⊢ ⬈*[h,#i] 𝐒❪L❫ →
- ∀I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,V] 𝐒❪K❫.
+ ∀I,K,V. ⇩[i] L ≘ K.ⓑ[I]V → G ⊢ ⬈*[h,V] 𝐒❪K❫.
#h #G #L #i #HL #I #K #V #HLK
lapply (rsx_inv_lifts … HL … HLK … (#0) ?) -L
/2 width=2 by rsx_fwd_pair/
(* Basic_1: was: nf2_lref_abst *)
lemma cnr_lref_abst (h) (G) (L):
- ∀K,V,i. ⇩*[i] L ≘ K.ⓛV → ❪G,L❫ ⊢ ➡[h] 𝐍❪#i❫.
+ ∀K,V,i. ⇩[i] L ≘ K.ⓛV → ❪G,L❫ ⊢ ➡[h] 𝐍❪#i❫.
#h #G #L #K #V #i #HLK #X #H
elim (cpr_inv_lref1_drops … H) -H // *
#K0 #V1 #V2 #HLK0 #_ #_
qed.
lemma cnr_lref_unit (h) (I) (G) (L):
- ∀K,i. ⇩*[i] L ≘ K.ⓤ[I] → ❪G,L❫ ⊢ ➡[h] 𝐍❪#i❫.
+ ∀K,i. ⇩[i] L ≘ K.ⓤ[I] → ❪G,L❫ ⊢ ➡[h] 𝐍❪#i❫.
#h #I #G #L #K #i #HLK #X #H
elim (cpr_inv_lref1_drops … H) -H // *
#K0 #V1 #V2 #HLK0 #_ #_
(* Basic_2A1: was: cnr_inv_delta *)
lemma cnr_inv_lref_abbr (h) (G) (L):
- ∀K,V,i. ⇩*[i] L ≘ K.ⓓV → ❪G,L❫ ⊢ ➡[h] 𝐍❪#i❫ → ⊥.
+ ∀K,V,i. ⇩[i] L ≘ K.ⓓV → ❪G,L❫ ⊢ ➡[h] 𝐍❪#i❫ → ⊥.
#h #G #L #K #V #i #HLK #H
elim (lifts_total V 𝐔❨↑i❩) #W #HVW
lapply (H W ?) -H [ /3 width=6 by cpm_delta_drops/ ] -HLK #H destruct
(* Properties with generic slicing ******************************************)
-lemma cnx_lref_atom: ∀h,G,L,i. ⇩*[i] L ≘ ⋆ → ❪G,L❫ ⊢ ⬈[h] 𝐍❪#i❫.
+lemma cnx_lref_atom: ∀h,G,L,i. ⇩[i] L ≘ ⋆ → ❪G,L❫ ⊢ ⬈[h] 𝐍❪#i❫.
#h #G #L #i #Hi #X #H elim (cpx_inv_lref1_drops … H) -H // *
#I #K #V1 #V2 #HLK lapply (drops_mono … Hi … HLK) -L #H destruct
qed.
-lemma cnx_lref_unit: ∀h,I,G,L,K,i. ⇩*[i] L ≘ K.ⓤ[I] → ❪G,L❫ ⊢ ⬈[h] 𝐍❪#i❫.
+lemma cnx_lref_unit: ∀h,I,G,L,K,i. ⇩[i] L ≘ K.ⓤ[I] → ❪G,L❫ ⊢ ⬈[h] 𝐍❪#i❫.
#h #I #G #L #K #i #HLK #X #H elim (cpx_inv_lref1_drops … H) -H // *
#Z #Y #V1 #V2 #HLY lapply (drops_mono … HLK … HLY) -L #H destruct
qed.
(* Inversion lemmas with generic slicing ************************************)
(* Basic_2A1: was: cnx_inv_delta *)
-lemma cnx_inv_lref_pair: ∀h,I,G,L,K,V,i. ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,L❫ ⊢ ⬈[h] 𝐍❪#i❫ → ⊥.
+lemma cnx_inv_lref_pair: ∀h,I,G,L,K,V,i. ⇩[i] L ≘ K.ⓑ[I]V → ❪G,L❫ ⊢ ⬈[h] 𝐍❪#i❫ → ⊥.
#h #I #G #L #K #V #i #HLK #H
elim (lifts_total V (𝐔❨↑i❩)) #W #HVW
lapply (H W ?) -H /2 width=7 by cpx_delta_drops/ -HLK
include "ground_2/xoa/ex_6_9.ma".
include "ground_2/xoa/ex_7_10.ma".
include "ground_2/xoa/or_5.ma".
-include "ground_2/steps/rtc_max.ma".
+include "ground_2/steps/rtc_shift.ma".
include "ground_2/steps/rtc_plus.ma".
+include "ground_2/steps/rtc_max.ma".
include "basic_2/notation/relations/predty_7.ma".
include "static_2/syntax/sh.ma".
include "static_2/syntax/lenv.ma".
| cpg_atom : ∀I,G,L. cpg Rt h (𝟘𝟘) G L (⓪[I]) (⓪[I])
| cpg_ess : ∀G,L,s. cpg Rt h (𝟘𝟙) G L (⋆s) (⋆(⫯[h]s))
| cpg_delta: ∀c,G,L,V1,V2,W2. cpg Rt h c G L V1 V2 →
- ⇧*[1] V2 ≘ W2 → cpg Rt h c G (L.ⓓV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → cpg Rt h c G (L.ⓓV1) (#0) W2
| cpg_ell : ∀c,G,L,V1,V2,W2. cpg Rt h c G L V1 V2 →
- ⇧*[1] V2 ≘ W2 → cpg Rt h (c+𝟘𝟙) G (L.ⓛV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → cpg Rt h (c+𝟘𝟙) G (L.ⓛV1) (#0) W2
| cpg_lref : ∀c,I,G,L,T,U,i. cpg Rt h c G L (#i) T →
- ⇧*[1] T ≘ U → cpg Rt h c G (L.ⓘ[I]) (#↑i) U
+ ⇧[1] T ≘ U → cpg Rt h c G (L.ⓘ[I]) (#↑i) U
| cpg_bind : ∀cV,cT,p,I,G,L,V1,V2,T1,T2.
cpg Rt h cV G L V1 V2 → cpg Rt h cT G (L.ⓑ[I]V1) T1 T2 →
cpg Rt h ((↕*cV)∨cT) G L (ⓑ[p,I]V1.T1) (ⓑ[p,I]V2.T2)
| cpg_cast : ∀cU,cT,G,L,U1,U2,T1,T2. Rt cU cT →
cpg Rt h cU G L U1 U2 → cpg Rt h cT G L T1 T2 →
cpg Rt h (cU∨cT) G L (ⓝU1.T1) (ⓝU2.T2)
-| cpg_zeta : ∀c,G,L,V,T1,T,T2. ⇧*[1] T ≘ T1 → cpg Rt h c G L T T2 →
+| cpg_zeta : ∀c,G,L,V,T1,T,T2. ⇧[1] T ≘ T1 → cpg Rt h c G L T T2 →
cpg Rt h (c+𝟙𝟘) G L (+ⓓV.T1) T2
| cpg_eps : ∀c,G,L,V,T1,T2. cpg Rt h c G L T1 T2 → cpg Rt h (c+𝟙𝟘) G L (ⓝV.T1) T2
| cpg_ee : ∀c,G,L,V1,V2,T. cpg Rt h c G L V1 V2 → cpg Rt h (c+𝟘𝟙) G L (ⓝV1.T) V2
cpg Rt h cV G L V1 V2 → cpg Rt h cW G L W1 W2 → cpg Rt h cT G (L.ⓛW1) T1 T2 →
cpg Rt h (((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘) G L (ⓐV1.ⓛ[p]W1.T1) (ⓓ[p]ⓝW2.V2.T2)
| cpg_theta: ∀cV,cW,cT,p,G,L,V1,V,V2,W1,W2,T1,T2.
- cpg Rt h cV G L V1 V → ⇧*[1] V ≘ V2 → cpg Rt h cW G L W1 W2 →
+ cpg Rt h cV G L V1 V → ⇧[1] V ≘ V2 → cpg Rt h cW G L W1 W2 →
cpg Rt h cT G (L.ⓓW1) T1 T2 →
cpg Rt h (((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘) G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
.
fact cpg_inv_atom1_aux: ∀Rt,c,h,G,L,T1,T2. ❪G,L❫ ⊢ T1 ⬈[Rt,c,h] T2 → ∀J. T1 = ⓪[J] →
∨∨ T2 = ⓪[J] ∧ c = 𝟘𝟘
| ∃∃s. J = Sort s & T2 = ⋆(⫯[h]s) & c = 𝟘𝟙
- | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1 & J = LRef 0 & c = cV
- | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓛV1 & J = LRef 0 & c = cV+𝟘𝟙
- | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧*[1] T ≘ T2 &
+ | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧[1] T ≘ T2 &
L = K.ⓘ[I] & J = LRef (↑i).
#Rt #c #h #G #L #T1 #T2 * -c -G -L -T1 -T2
[ #I #G #L #J #H destruct /3 width=1 by or5_intro0, conj/
lemma cpg_inv_atom1: ∀Rt,c,h,J,G,L,T2. ❪G,L❫ ⊢ ⓪[J] ⬈[Rt,c,h] T2 →
∨∨ T2 = ⓪[J] ∧ c = 𝟘𝟘
| ∃∃s. J = Sort s & T2 = ⋆(⫯[h]s) & c = 𝟘𝟙
- | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1 & J = LRef 0 & c = cV
- | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓛV1 & J = LRef 0 & c = cV+𝟘𝟙
- | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧*[1] T ≘ T2 &
+ | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧[1] T ≘ T2 &
L = K.ⓘ[I] & J = LRef (↑i).
/2 width=3 by cpg_inv_atom1_aux/ qed-.
lemma cpg_inv_zero1: ∀Rt,c,h,G,L,T2. ❪G,L❫ ⊢ #0 ⬈[Rt,c,h] T2 →
∨∨ T2 = #0 ∧ c = 𝟘𝟘
- | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1 & c = cV
- | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓛV1 & c = cV+𝟘𝟙.
#Rt #c #h #G #L #T2 #H
elim (cpg_inv_atom1 … H) -H * /3 width=1 by or3_intro0, conj/
lemma cpg_inv_lref1: ∀Rt,c,h,G,L,T2,i. ❪G,L❫ ⊢ #↑i ⬈[Rt,c,h] T2 →
∨∨ T2 = #(↑i) ∧ c = 𝟘𝟘
- | ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧*[1] T ≘ T2 & L = K.ⓘ[I].
+ | ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I].
#Rt #c #h #G #L #T2 #i #H
elim (cpg_inv_atom1 … H) -H * /3 width=1 by or_introl, conj/
[ #s #H destruct
∀p,J,V1,U1. U = ⓑ[p,J]V1.U1 →
∨∨ ∃∃cV,cT,V2,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ❪G,L.ⓑ[J]V1❫ ⊢ U1 ⬈[Rt,cT,h] T2 &
U2 = ⓑ[p,J]V2.T2 & c = ((↕*cV)∨cT)
- | ∃∃cT,T. ⇧*[1] T ≘ U1 & ❪G,L❫ ⊢ T ⬈[Rt,cT,h] U2 &
+ | ∃∃cT,T. ⇧[1] T ≘ U1 & ❪G,L❫ ⊢ T ⬈[Rt,cT,h] U2 &
p = true & J = Abbr & c = cT+𝟙𝟘.
#Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
[ #I #G #L #q #J #W #U1 #H destruct
lemma cpg_inv_bind1: ∀Rt,c,h,p,I,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓑ[p,I]V1.T1 ⬈[Rt,c,h] U2 →
∨∨ ∃∃cV,cT,V2,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ❪G,L.ⓑ[I]V1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
U2 = ⓑ[p,I]V2.T2 & c = ((↕*cV)∨cT)
- | ∃∃cT,T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[Rt,cT,h] U2 &
+ | ∃∃cT,T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[Rt,cT,h] U2 &
p = true & I = Abbr & c = cT+𝟙𝟘.
/2 width=3 by cpg_inv_bind1_aux/ qed-.
lemma cpg_inv_abbr1: ∀Rt,c,h,p,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓓ[p]V1.T1 ⬈[Rt,c,h] U2 →
∨∨ ∃∃cV,cT,V2,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ❪G,L.ⓓV1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
U2 = ⓓ[p]V2.T2 & c = ((↕*cV)∨cT)
- | ∃∃cT,T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[Rt,cT,h] U2 &
+ | ∃∃cT,T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[Rt,cT,h] U2 &
p = true & c = cT+𝟙𝟘.
#Rt #c #h #p #G #L #V1 #T1 #U2 #H elim (cpg_inv_bind1 … H) -H *
/3 width=8 by ex4_4_intro, ex4_2_intro, or_introl, or_intror/
U2 = ⓐV2.T2 & c = ((↕*cV)∨cT)
| ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ❪G,L❫ ⊢ W1 ⬈[Rt,cW,h] W2 & ❪G,L.ⓛW1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
U1 = ⓛ[p]W1.T1 & U2 = ⓓ[p]ⓝW2.V2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘
- | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V & ⇧*[1] V ≘ V2 & ❪G,L❫ ⊢ W1 ⬈[Rt,cW,h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
+ | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V & ⇧[1] V ≘ V2 & ❪G,L❫ ⊢ W1 ⬈[Rt,cW,h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
U1 = ⓓ[p]W1.T1 & U2 = ⓓ[p]W2.ⓐV2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘.
#Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
[ #I #G #L #W #U1 #H destruct
U2 = ⓐV2.T2 & c = ((↕*cV)∨cT)
| ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ❪G,L❫ ⊢ W1 ⬈[Rt,cW,h] W2 & ❪G,L.ⓛW1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
U1 = ⓛ[p]W1.T1 & U2 = ⓓ[p]ⓝW2.V2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘
- | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V & ⇧*[1] V ≘ V2 & ❪G,L❫ ⊢ W1 ⬈[Rt,cW,h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
+ | ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[Rt,cV,h] V & ⇧[1] V ≘ V2 & ❪G,L❫ ⊢ W1 ⬈[Rt,cW,h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ⬈[Rt,cT,h] T2 &
U1 = ⓓ[p]W1.T1 & U2 = ⓓ[p]W2.ⓐV2.T2 & c = ((↕*cV)∨(↕*cW)∨cT)+𝟙𝟘.
/2 width=3 by cpg_inv_appl1_aux/ qed-.
lemma cpg_inv_zero1_pair: ∀Rt,c,h,I,G,K,V1,T2. ❪G,K.ⓑ[I]V1❫ ⊢ #0 ⬈[Rt,c,h] T2 →
∨∨ T2 = #0 ∧ c = 𝟘𝟘
- | ∃∃cV,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
I = Abbr & c = cV
- | ∃∃cV,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃cV,V2. ❪G,K❫ ⊢ V1 ⬈[Rt,cV,h] V2 & ⇧[1] V2 ≘ T2 &
I = Abst & c = cV+𝟘𝟙.
#Rt #c #h #I #G #K #V1 #T2 #H elim (cpg_inv_zero1 … H) -H /2 width=1 by or3_intro0/
* #z #Y #X1 #X2 #HX12 #HXT2 #H1 #H2 destruct /3 width=5 by or3_intro1, or3_intro2, ex4_2_intro/
lemma cpg_inv_lref1_bind: ∀Rt,c,h,I,G,K,T2,i. ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬈[Rt,c,h] T2 →
∨∨ T2 = #(↑i) ∧ c = 𝟘𝟘
- | ∃∃T. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧*[1] T ≘ T2.
+ | ∃∃T. ❪G,K❫ ⊢ #i ⬈[Rt,c,h] T & ⇧[1] T ≘ T2.
#Rt #c #h #I #G #L #T2 #i #H elim (cpg_inv_lref1 … H) -H /2 width=1 by or_introl/
* #Z #Y #T #HT #HT2 #H destruct /3 width=3 by ex2_intro, or_intror/
qed-.
(* Advanced properties ******************************************************)
-lemma cpg_delta_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⇩*[i] L ≘ K.ⓓV → ❪G,K❫ ⊢ V ⬈[Rt,c,h] V2 →
- ⇧*[↑i] V2 ≘ T2 → ❪G,L❫ ⊢ #i ⬈[Rt,c,h] T2.
+lemma cpg_delta_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⇩[i] L ≘ K.ⓓV → ❪G,K❫ ⊢ V ⬈[Rt,c,h] V2 →
+ ⇧[↑i] V2 ≘ T2 → ❪G,L❫ ⊢ #i ⬈[Rt,c,h] T2.
#Rt #c #h #G #K #V #V2 #i elim i -i
[ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_delta/
| #i #IH #L0 #T0 #H0 #HV2 #HVT2
]
qed.
-lemma cpg_ell_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⇩*[i] L ≘ K.ⓛV → ❪G,K❫ ⊢ V ⬈[Rt,c,h] V2 →
- ⇧*[↑i] V2 ≘ T2 → ❪G,L❫ ⊢ #i ⬈[Rt,c+𝟘𝟙,h] T2.
+lemma cpg_ell_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⇩[i] L ≘ K.ⓛV → ❪G,K❫ ⊢ V ⬈[Rt,c,h] V2 →
+ ⇧[↑i] V2 ≘ T2 → ❪G,L❫ ⊢ #i ⬈[Rt,c+𝟘𝟙,h] T2.
#Rt #c #h #G #K #V #V2 #i elim i -i
[ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_ell/
| #i #IH #L0 #T0 #H0 #HV2 #HVT2
lemma cpg_inv_lref1_drops: ∀Rt,c,h,G,i,L,T2. ❪G,L❫ ⊢ #i ⬈[Rt,c,h] T2 →
∨∨ T2 = #i ∧ c = 𝟘𝟘
- | ∃∃cV,K,V,V2. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & c = cV
- | ∃∃cV,K,V,V2. ⇩*[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & c = cV + 𝟘𝟙.
+ | ∃∃cV,K,V,V2. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & c = cV
+ | ∃∃cV,K,V,V2. ⇩[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & c = cV + 𝟘𝟙.
#Rt #c #h #G #i elim i -i
[ #L #T2 #H elim (cpg_inv_zero1 … H) -H * /3 width=1 by or3_intro0, conj/
/4 width=8 by drops_refl, ex4_4_intro, or3_intro2, or3_intro1/
| #i #IH #L #T2 #H elim (cpg_inv_lref1 … H) -H * /3 width=1 by or3_intro0, conj/
#I #K #V2 #H #HVT2 #H0 destruct elim (IH … H) -IH -H
- [ * #H1 #H2 destruct lapply (lifts_inv_lref1_uni … HVT2) -HVT2 #H destruct /3 width=1 by or3_intro0, conj/ ] *
+ [ * #H1 #H2 destruct
+ lapply (lifts_inv_lref1_uni … HVT2) -HVT2 #H destruct
+ /3 width=1 by or3_intro0, conj/
+ ] *
#cV #L #W #W2 #HKL #HW2 #HWV2 #H destruct
- lapply (lifts_trans … HWV2 … HVT2 ??) -V2
+ lapply (lifts_trans … HWV2 … HVT2 ??) -V2 [3,6: |*: // ] #H
+ lapply (lifts_uni … H) -H #H
/4 width=8 by drops_drop, ex4_4_intro, or3_intro2, or3_intro1/
]
qed-.
lemma cpg_inv_atom1_drops: ∀Rt,c,h,I,G,L,T2. ❪G,L❫ ⊢ ⓪[I] ⬈[Rt,c,h] T2 →
∨∨ T2 = ⓪[I] ∧ c = 𝟘𝟘
| ∃∃s. T2 = ⋆(⫯[h]s) & I = Sort s & c = 𝟘𝟙
- | ∃∃cV,i,K,V,V2. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & I = LRef i & c = cV
- | ∃∃cV,i,K,V,V2. ⇩*[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & I = LRef i & c = cV + 𝟘𝟙.
+ | ∃∃cV,i,K,V,V2. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & I = LRef i & c = cV
+ | ∃∃cV,i,K,V,V2. ⇩[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬈[Rt,cV,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & I = LRef i & c = cV + 𝟘𝟙.
#Rt #c #h * #n #G #L #T2 #H
[ elim (cpg_inv_sort1 … H) -H *
/3 width=3 by or4_intro0, or4_intro1, ex3_intro, conj/
include "ground_2/xoa/ex_4_3.ma".
include "ground_2/xoa/ex_5_6.ma".
include "ground_2/xoa/ex_6_7.ma".
+include "ground_2/steps/rtc_max_shift.ma".
+include "ground_2/steps/rtc_isrt_plus.ma".
+include "ground_2/steps/rtc_isrt_max_shift.ma".
include "basic_2/notation/relations/pred_6.ma".
include "basic_2/notation/relations/pred_5.ma".
include "basic_2/rt_transition/cpg.ma".
/2 width=3 by cpg_ess, ex2_intro/ qed.
lemma cpm_delta: ∀n,h,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 →
- ⇧*[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ➡[n,h] W2.
+ ⇧[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ➡[n,h] W2.
#n #h #G #K #V1 #V2 #W2 *
/3 width=5 by cpg_delta, ex2_intro/
qed.
lemma cpm_ell: ∀n,h,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 →
- ⇧*[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ➡[↑n,h] W2.
+ ⇧[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ➡[↑n,h] W2.
#n #h #G #K #V1 #V2 #W2 *
/3 width=5 by cpg_ell, ex2_intro, isrt_succ/
qed.
lemma cpm_lref: ∀n,h,I,G,K,T,U,i. ❪G,K❫ ⊢ #i ➡[n,h] T →
- ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡[n,h] U.
+ ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ➡[n,h] U.
#n #h #I #G #K #T #U #i *
/3 width=5 by cpg_lref, ex2_intro/
qed.
(* Basic_2A1: includes: cpr_zeta *)
lemma cpm_zeta (n) (h) (G) (L):
- ∀T1,T. ⇧*[1] T ≘ T1 → ∀T2. ❪G,L❫ ⊢ T ➡[n,h] T2 →
+ ∀T1,T. ⇧[1] T ≘ T1 → ∀T2. ❪G,L❫ ⊢ T ➡[n,h] T2 →
∀V. ❪G,L❫ ⊢ +ⓓV.T1 ➡[n,h] T2.
#n #h #G #L #T1 #T #HT1 #T2 *
/3 width=5 by cpg_zeta, isrt_plus_O2, ex2_intro/
(* Basic_2A1: includes: cpr_theta *)
lemma cpm_theta: ∀n,h,p,G,L,V1,V,V2,W1,W2,T1,T2.
- ❪G,L❫ ⊢ V1 ➡[h] V → ⇧*[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ➡[h] W2 →
+ ❪G,L❫ ⊢ V1 ➡[h] V → ⇧[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ➡[h] W2 →
❪G,L.ⓓW1❫ ⊢ T1 ➡[n,h] T2 →
❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ➡[n,h] ⓓ[p]W2.ⓐV2.T2.
#n #h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 * #riV #rhV #HV1 #HV2 * #riW #rhW #HW12 *
lemma cpm_inv_atom1: ∀n,h,J,G,L,T2. ❪G,L❫ ⊢ ⓪[J] ➡[n,h] T2 →
∨∨ T2 = ⓪[J] ∧ n = 0
| ∃∃s. T2 = ⋆(⫯[h]s) & J = Sort s & n = 1
- | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1 & J = LRef 0
- | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓛV1 & J = LRef 0 & n = ↑m
- | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧*[1] T ≘ T2 &
+ | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧[1] T ≘ T2 &
L = K.ⓘ[I] & J = LRef (↑i).
#n #h #J #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1 … H) -H *
[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or5_intro0, conj/
lemma cpm_inv_zero1: ∀n,h,G,L,T2. ❪G,L❫ ⊢ #0 ➡[n,h] T2 →
∨∨ T2 = #0 ∧ n = 0
- | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1
- | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ➡[m,h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓛV1 & n = ↑m.
#n #h #G #L #T2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H *
[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/
lemma cpm_inv_lref1: ∀n,h,G,L,T2,i. ❪G,L❫ ⊢ #↑i ➡[n,h] T2 →
∨∨ T2 = #(↑i) ∧ n = 0
- | ∃∃I,K,T. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧*[1] T ≘ T2 & L = K.ⓘ[I].
+ | ∃∃I,K,T. ❪G,K❫ ⊢ #i ➡[n,h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I].
#n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1 … H) -H *
[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or_introl, conj/
| #I #K #V2 #HV2 #HVT2 #H destruct
lemma cpm_inv_bind1: ∀n,h,p,I,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓑ[p,I]V1.T1 ➡[n,h] U2 →
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L.ⓑ[I]V1❫ ⊢ T1 ➡[n,h] T2 &
U2 = ⓑ[p,I]V2.T2
- | ∃∃T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 &
+ | ∃∃T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 &
p = true & I = Abbr.
#n #h #p #I #G #L #V1 #T1 #U2 * #c #Hc #H elim (cpg_inv_bind1 … H) -H *
[ #cV #cT #V2 #T2 #HV12 #HT12 #H1 #H2 destruct
lemma cpm_inv_abbr1: ∀n,h,p,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓓ[p]V1.T1 ➡[n,h] U2 →
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L.ⓓV1❫ ⊢ T1 ➡[n,h] T2 &
U2 = ⓓ[p]V2.T2
- | ∃∃T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 & p = true.
+ | ∃∃T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ➡[n,h] U2 & p = true.
#n #h #p #G #L #V1 #T1 #U2 #H
elim (cpm_inv_bind1 … H) -H
[ /3 width=1 by or_introl/
| ∃∃p,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L❫ ⊢ W1 ➡[h] W2 &
❪G,L.ⓛW1❫ ⊢ T1 ➡[n,h] T2 &
U1 = ⓛ[p]W1.T1 & U2 = ⓓ[p]ⓝW2.V2.T2
- | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V & ⇧*[1] V ≘ V2 &
+ | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V & ⇧[1] V ≘ V2 &
❪G,L❫ ⊢ W1 ➡[h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ➡[n,h] T2 &
U1 = ⓓ[p]W1.T1 & U2 = ⓓ[p]W2.ⓐV2.T2.
#n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_appl1 … H) -H *
(∀I,G,L. Q 0 G L (⓪[I]) (⓪[I])) →
(∀G,L,s. Q 1 G L (⋆s) (⋆(⫯[h]s))) →
(∀n,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 → Q n G K V1 V2 →
- ⇧*[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2
) → (∀n,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[n,h] V2 → Q n G K V1 V2 →
- ⇧*[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2
) → (∀n,I,G,K,T,U,i. ❪G,K❫ ⊢ #i ➡[n,h] T → Q n G K (#i) T →
- ⇧*[1] T ≘ U → Q n G (K.ⓘ[I]) (#↑i) (U)
+ ⇧[1] T ≘ U → Q n G (K.ⓘ[I]) (#↑i) (U)
) → (∀n,p,I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 → ❪G,L.ⓑ[I]V1❫ ⊢ T1 ➡[n,h] T2 →
Q 0 G L V1 V2 → Q n G (L.ⓑ[I]V1) T1 T2 → Q n G L (ⓑ[p,I]V1.T1) (ⓑ[p,I]V2.T2)
) → (∀n,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 → ❪G,L❫ ⊢ T1 ➡[n,h] T2 →
Q 0 G L V1 V2 → Q n G L T1 T2 → Q n G L (ⓐV1.T1) (ⓐV2.T2)
) → (∀n,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[n,h] V2 → ❪G,L❫ ⊢ T1 ➡[n,h] T2 →
Q n G L V1 V2 → Q n G L T1 T2 → Q n G L (ⓝV1.T1) (ⓝV2.T2)
- ) → (∀n,G,L,V,T1,T,T2. ⇧*[1] T ≘ T1 → ❪G,L❫ ⊢ T ➡[n,h] T2 →
+ ) → (∀n,G,L,V,T1,T,T2. ⇧[1] T ≘ T1 → ❪G,L❫ ⊢ T ➡[n,h] T2 →
Q n G L T T2 → Q n G L (+ⓓV.T1) T2
) → (∀n,G,L,V,T1,T2. ❪G,L❫ ⊢ T1 ➡[n,h] T2 →
Q n G L T1 T2 → Q n G L (ⓝV.T1) T2
Q n G L (ⓐV1.ⓛ[p]W1.T1) (ⓓ[p]ⓝW2.V2.T2)
) → (∀n,p,G,L,V1,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V → ❪G,L❫ ⊢ W1 ➡[h] W2 → ❪G,L.ⓓW1❫ ⊢ T1 ➡[n,h] T2 →
Q 0 G L V1 V → Q 0 G L W1 W2 → Q n G (L.ⓓW1) T1 T2 →
- ⇧*[1] V ≘ V2 → Q n G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
+ ⇧[1] V ≘ V2 → Q n G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
) →
∀n,G,L,T1,T2. ❪G,L❫ ⊢ T1 ➡[n,h] T2 → Q n G L T1 T2.
#h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #IH10 #IH11 #IH12 #IH13 #n #G #L #T1 #T2
(* Basic_1: includes: pr2_delta1 *)
(* Basic_2A1: includes: cpr_delta *)
lemma cpm_delta_drops: ∀n,h,G,L,K,V,V2,W2,i.
- ⇩*[i] L ≘ K.ⓓV → ❪G,K❫ ⊢ V ➡[n,h] V2 →
- ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ➡[n,h] W2.
+ ⇩[i] L ≘ K.ⓓV → ❪G,K❫ ⊢ V ➡[n,h] V2 →
+ ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ➡[n,h] W2.
#n #h #G #L #K #V #V2 #W2 #i #HLK *
/3 width=8 by cpg_delta_drops, ex2_intro/
qed.
lemma cpm_ell_drops: ∀n,h,G,L,K,V,V2,W2,i.
- ⇩*[i] L ≘ K.ⓛV → ❪G,K❫ ⊢ V ➡[n,h] V2 →
- ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ➡[↑n,h] W2.
+ ⇩[i] L ≘ K.ⓛV → ❪G,K❫ ⊢ V ➡[n,h] V2 →
+ ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ➡[↑n,h] W2.
#n #h #G #L #K #V #V2 #W2 #i #HLK *
/3 width=8 by cpg_ell_drops, isrt_succ, ex2_intro/
qed.
lemma cpm_inv_atom1_drops: ∀n,h,I,G,L,T2. ❪G,L❫ ⊢ ⓪[I] ➡[n,h] T2 →
∨∨ T2 = ⓪[I] ∧ n = 0
| ∃∃s. T2 = ⋆(⫯[h]s) & I = Sort s & n = 1
- | ∃∃K,V,V2,i. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡[n,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & I = LRef i
- | ∃∃m,K,V,V2,i. ⇩*[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ➡[m,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & I = LRef i & n = ↑m.
+ | ∃∃K,V,V2,i. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡[n,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & I = LRef i
+ | ∃∃m,K,V,V2,i. ⇩[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ➡[m,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & I = LRef i & n = ↑m.
#n #h #I #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1_drops … H) -H *
[ #H1 #H2 destruct lapply (isrt_inv_00 … Hc) -Hc
/3 width=1 by or4_intro0, conj/
lemma cpm_inv_lref1_drops: ∀n,h,G,L,T2,i. ❪G,L❫ ⊢ #i ➡[n,h] T2 →
∨∨ T2 = #i ∧ n = 0
- | ∃∃K,V,V2. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡[n,h] V2 &
- ⇧*[↑i] V2 ≘ T2
- | ∃∃m,K,V,V2. ⇩*[i] L ≘ K. ⓛV & ❪G,K❫ ⊢ V ➡[m,h] V2 &
- ⇧*[↑i] V2 ≘ T2 & n = ↑m.
+ | ∃∃K,V,V2. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡[n,h] V2 &
+ ⇧[↑i] V2 ≘ T2
+ | ∃∃m,K,V,V2. ⇩[i] L ≘ K. ⓛV & ❪G,K❫ ⊢ V ➡[m,h] V2 &
+ ⇧[↑i] V2 ≘ T2 & n = ↑m.
#n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1_drops … H) -H *
[ #H1 #H2 destruct lapply (isrt_inv_00 … Hc) -Hc
/3 width=1 by or3_intro0, conj/
lemma cpr_inv_atom1: ∀h,J,G,L,T2. ❪G,L❫ ⊢ ⓪[J] ➡[h] T2 →
∨∨ T2 = ⓪[J]
- | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1 & J = LRef 0
- | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ➡[h] T & ⇧*[1] T ≘ T2 &
+ | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ➡[h] T & ⇧[1] T ≘ T2 &
L = K.ⓘ[I] & J = LRef (↑i).
#h #J #G #L #T2 #H elim (cpm_inv_atom1 … H) -H *
[2,4:|*: /3 width=8 by or3_intro0, or3_intro1, or3_intro2, ex4_4_intro, ex4_3_intro/ ]
lemma cpr_inv_zero1: ∀h,G,L,T2. ❪G,L❫ ⊢ #0 ➡[h] T2 →
∨∨ T2 = #0
- | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ➡[h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓓV1.
#h #G #L #T2 #H elim (cpm_inv_zero1 … H) -H *
/3 width=6 by ex3_3_intro, or_introl, or_intror/
lemma cpr_inv_lref1: ∀h,G,L,T2,i. ❪G,L❫ ⊢ #↑i ➡[h] T2 →
∨∨ T2 = #(↑i)
- | ∃∃I,K,T. ❪G,K❫ ⊢ #i ➡[h] T & ⇧*[1] T ≘ T2 & L = K.ⓘ[I].
+ | ∃∃I,K,T. ❪G,K❫ ⊢ #i ➡[h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I].
#h #G #L #T2 #i #H elim (cpm_inv_lref1 … H) -H *
/3 width=6 by ex3_3_intro, or_introl, or_intror/
qed-.
| ∃∃p,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 & ❪G,L❫ ⊢ W1 ➡[h] W2 &
❪G,L.ⓛW1❫ ⊢ T1 ➡[h] T2 & U1 = ⓛ[p]W1.T1 &
U2 = ⓓ[p]ⓝW2.V2.T2 & I = Appl
- | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V & ⇧*[1] V ≘ V2 &
+ | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V & ⇧[1] V ≘ V2 &
❪G,L❫ ⊢ W1 ➡[h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ➡[h] T2 &
U1 = ⓓ[p]W1.T1 &
U2 = ⓓ[p]W2.ⓐV2.T2 & I = Appl.
lemma cpr_ind (h): ∀Q:relation4 genv lenv term term.
(∀I,G,L. Q G L (⓪[I]) (⓪[I])) →
(∀G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ➡[h] V2 → Q G K V1 V2 →
- ⇧*[1] V2 ≘ W2 → Q G (K.ⓓV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → Q G (K.ⓓV1) (#0) W2
) → (∀I,G,K,T,U,i. ❪G,K❫ ⊢ #i ➡[h] T → Q G K (#i) T →
- ⇧*[1] T ≘ U → Q G (K.ⓘ[I]) (#↑i) (U)
+ ⇧[1] T ≘ U → Q G (K.ⓘ[I]) (#↑i) (U)
) → (∀p,I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 → ❪G,L.ⓑ[I]V1❫ ⊢ T1 ➡[h] T2 →
Q G L V1 V2 → Q G (L.ⓑ[I]V1) T1 T2 → Q G L (ⓑ[p,I]V1.T1) (ⓑ[p,I]V2.T2)
) → (∀I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V2 → ❪G,L❫ ⊢ T1 ➡[h] T2 →
Q G L V1 V2 → Q G L T1 T2 → Q G L (ⓕ[I]V1.T1) (ⓕ[I]V2.T2)
- ) → (∀G,L,V,T1,T,T2. ⇧*[1] T ≘ T1 → ❪G,L❫ ⊢ T ➡[h] T2 →
+ ) → (∀G,L,V,T1,T,T2. ⇧[1] T ≘ T1 → ❪G,L❫ ⊢ T ➡[h] T2 →
Q G L T T2 → Q G L (+ⓓV.T1) T2
) → (∀G,L,V,T1,T2. ❪G,L❫ ⊢ T1 ➡[h] T2 → Q G L T1 T2 →
Q G L (ⓝV.T1) T2
Q G L (ⓐV1.ⓛ[p]W1.T1) (ⓓ[p]ⓝW2.V2.T2)
) → (∀p,G,L,V1,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ➡[h] V → ❪G,L❫ ⊢ W1 ➡[h] W2 → ❪G,L.ⓓW1❫ ⊢ T1 ➡[h] T2 →
Q G L V1 V → Q G L W1 W2 → Q G (L.ⓓW1) T1 T2 →
- ⇧*[1] V ≘ V2 → Q G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
+ ⇧[1] V ≘ V2 → Q G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
) →
∀G,L,T1,T2. ❪G,L❫ ⊢ T1 ➡[h] T2 → Q G L T1 T2.
#h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #G #L #T1 #T2
(* Basic_2A1: includes: cpr_inv_atom1 *)
lemma cpr_inv_atom1_drops: ∀h,I,G,L,T2. ❪G,L❫ ⊢ ⓪[I] ➡[h] T2 →
∨∨ T2 = ⓪[I]
- | ∃∃K,V,V2,i. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡[h] V2 &
- ⇧*[↑i] V2 ≘ T2 & I = LRef i.
+ | ∃∃K,V,V2,i. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ➡[h] V2 &
+ ⇧[↑i] V2 ≘ T2 & I = LRef i.
#h #I #G #L #T2 #H elim (cpm_inv_atom1_drops … H) -H *
[ /2 width=1 by or_introl/
| #s #_ #_ #H destruct
(* Basic_2A1: includes: cpr_inv_lref1 *)
lemma cpr_inv_lref1_drops: ∀h,G,L,T2,i. ❪G,L❫ ⊢ #i ➡[h] T2 →
∨∨ T2 = #i
- | ∃∃K,V,V2. ⇩*[i] L ≘ K. ⓓV & ❪G,K❫ ⊢ V ➡[h] V2 &
- ⇧*[↑i] V2 ≘ T2.
+ | ∃∃K,V,V2. ⇩[i] L ≘ K. ⓓV & ❪G,K❫ ⊢ V ➡[h] V2 &
+ ⇧[↑i] V2 ≘ T2.
#h #G #L #T2 #i #H elim (cpm_inv_lref1_drops … H) -H *
[ /2 width=1 by or_introl/
| /3 width=6 by ex3_3_intro, or_intror/
(* Properties with basic relocation *****************************************)
lemma cpr_subst (h) (G) (L) (U1) (i):
- ∀K,V. ⇩*[i] L ≘ K.ⓓV →
+ ∀K,V. ⇩[i] L ≘ K.ⓓV →
∃∃U2,T2. ❪G,L❫ ⊢ U1 ➡[h] U2 & ⇧[i,1] T2 ≘ U2.
#h #G #L #U1 @(fqup_wf_ind_eq (Ⓣ) … G L U1) -G -L -U1
#G0 #L0 #U0 #IH #G #L * *
lemma cpt_delta (h) (n) (G) (K):
∀V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ⬆[h,n] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓓV1❫ ⊢ #0 ⬆[h,n] W2.
#h #n #G #K #V1 #V2 *
/3 width=5 by cpg_delta, ex2_intro/
qed.
lemma cpt_ell (h) (n) (G) (K):
∀V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 →
- ∀W2. ⇧*[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ⬆[h,↑n] W2.
+ ∀W2. ⇧[1] V2 ≘ W2 → ❪G,K.ⓛV1❫ ⊢ #0 ⬆[h,↑n] W2.
#h #n #G #K #V1 #V2 *
/3 width=5 by cpg_ell, ex2_intro, ist_succ/
qed.
lemma cpt_lref (h) (n) (G) (K):
- ∀T,i. ❪G,K❫ ⊢ #i ⬆[h,n] T → ∀U. ⇧*[1] T ≘ U →
+ ∀T,i. ❪G,K❫ ⊢ #i ⬆[h,n] T → ∀U. ⇧[1] T ≘ U →
∀I. ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬆[h,n] U.
#h #n #G #K #T #i *
/3 width=5 by cpg_lref, ex2_intro/
∀X2. ❪G,L❫ ⊢ ⓪[J] ⬆[h,n] X2 →
∨∨ ∧∧ X2 = ⓪[J] & n = 0
| ∃∃s. X2 = ⋆(⫯[h]s) & J = Sort s & n =1
- | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 & ⇧*[1] V2 ≘ X2 & L = K.ⓓV1 & J = LRef 0
- | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,m] V2 & ⇧*[1] V2 ≘ X2 & L = K.ⓛV1 & J = LRef 0 & n = ↑m
- | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬆[h,n] T & ⇧*[1] T ≘ X2 & L = K.ⓘ[I] & J = LRef (↑i).
+ | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 & ⇧[1] V2 ≘ X2 & L = K.ⓓV1 & J = LRef 0
+ | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,m] V2 & ⇧[1] V2 ≘ X2 & L = K.ⓛV1 & J = LRef 0 & n = ↑m
+ | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬆[h,n] T & ⇧[1] T ≘ X2 & L = K.ⓘ[I] & J = LRef (↑i).
#h #n #J #G #L #X2 * #c #Hc #H
elim (cpg_inv_atom1 … H) -H *
[ #H1 #H2 destruct /3 width=1 by or5_intro0, conj/
lemma cpt_inv_zero_sn (h) (n) (G) (L):
∀X2. ❪G,L❫ ⊢ #0 ⬆[h,n] X2 →
∨∨ ∧∧ X2 = #0 & n = 0
- | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 & ⇧*[1] V2 ≘ X2 & L = K.ⓓV1
- | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,m] V2 & ⇧*[1] V2 ≘ X2 & L = K.ⓛV1 & n = ↑m.
+ | ∃∃K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 & ⇧[1] V2 ≘ X2 & L = K.ⓓV1
+ | ∃∃m,K,V1,V2. ❪G,K❫ ⊢ V1 ⬆[h,m] V2 & ⇧[1] V2 ≘ X2 & L = K.ⓛV1 & n = ↑m.
#h #n #G #L #X2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H *
-[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/
+[ #H1 #H2 destruct /4 width=1 by ist_inv_00, or3_intro0, conj/
| #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct
/4 width=8 by or3_intro1, ex3_3_intro, ex2_intro/
| #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct
lemma cpt_inv_lref_sn (h) (n) (G) (L) (i):
∀X2. ❪G,L❫ ⊢ #↑i ⬆[h,n] X2 →
∨∨ ∧∧ X2 = #(↑i) & n = 0
- | ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬆[h,n] T & ⇧*[1] T ≘ X2 & L = K.ⓘ[I].
+ | ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬆[h,n] T & ⇧[1] T ≘ X2 & L = K.ⓘ[I].
#h #n #G #L #i #X2 * #c #Hc #H elim (cpg_inv_lref1 … H) -H *
-[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or_introl, conj/
+[ #H1 #H2 destruct /4 width=1 by ist_inv_00, or_introl, conj/
| #I #K #V2 #HV2 #HVT2 #H destruct
/4 width=6 by ex3_3_intro, ex2_intro, or_intror/
]
(* Advanced properties ******************************************************)
lemma cpt_delta_drops (h) (n) (G):
- ∀L,K,V,i. ⇩*[i] L ≘ K.ⓓV → ∀V2. ❪G,K❫ ⊢ V ⬆[h,n] V2 →
- ∀W2. ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬆[h,n] W2.
+ ∀L,K,V,i. ⇩[i] L ≘ K.ⓓV → ∀V2. ❪G,K❫ ⊢ V ⬆[h,n] V2 →
+ ∀W2. ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬆[h,n] W2.
#h #n #G #L #K #V #i #HLK #V2 *
/3 width=8 by cpg_delta_drops, ex2_intro/
qed.
lemma cpt_ell_drops (h) (n) (G):
- ∀L,K,V,i. ⇩*[i] L ≘ K.ⓛV → ∀V2. ❪G,K❫ ⊢ V ⬆[h,n] V2 →
- ∀W2. ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬆[h,↑n] W2.
+ ∀L,K,V,i. ⇩[i] L ≘ K.ⓛV → ∀V2. ❪G,K❫ ⊢ V ⬆[h,n] V2 →
+ ∀W2. ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬆[h,↑n] W2.
#h #n #G #L #K #V #i #HLK #V2 *
/3 width=8 by cpg_ell_drops, ist_succ, ex2_intro/
qed.
∀X2. ❪G,L❫ ⊢ ⓪[I] ⬆[h,n] X2 →
∨∨ ∧∧ X2 = ⓪[I] & n = 0
| ∃∃s. X2 = ⋆(⫯[h]s) & I = Sort s & n = 1
- | ∃∃K,V,V2,i. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬆[h,n] V2 & ⇧*[↑i] V2 ≘ X2 & I = LRef i
- | ∃∃m,K,V,V2,i. ⇩*[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬆[h,m] V2 & ⇧*[↑i] V2 ≘ X2 & I = LRef i & n = ↑m.
+ | ∃∃K,V,V2,i. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬆[h,n] V2 & ⇧[↑i] V2 ≘ X2 & I = LRef i
+ | ∃∃m,K,V,V2,i. ⇩[i] L ≘ K.ⓛV & ❪G,K❫ ⊢ V ⬆[h,m] V2 & ⇧[↑i] V2 ≘ X2 & I = LRef i & n = ↑m.
#h #n #I #G #L #X2 * #c #Hc #H elim (cpg_inv_atom1_drops … H) -H *
[ #H1 #H2 destruct
/3 width=1 by or4_intro0, conj/
lemma cpt_inv_lref_sn_drops (h) (n) (G) (L) (i):
∀X2. ❪G,L❫ ⊢ #i ⬆[h,n] X2 →
∨∨ ∧∧ X2 = #i & n = 0
- | ∃∃K,V,V2. ⇩*[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬆[h,n] V2 & ⇧*[↑i] V2 ≘ X2
- | ∃∃m,K,V,V2. ⇩*[i] L ≘ K. ⓛV & ❪G,K❫ ⊢ V ⬆[h,m] V2 & ⇧*[↑i] V2 ≘ X2 & n = ↑m.
+ | ∃∃K,V,V2. ⇩[i] L ≘ K.ⓓV & ❪G,K❫ ⊢ V ⬆[h,n] V2 & ⇧[↑i] V2 ≘ X2
+ | ∃∃m,K,V,V2. ⇩[i] L ≘ K. ⓛV & ❪G,K❫ ⊢ V ⬆[h,m] V2 & ⇧[↑i] V2 ≘ X2 & n = ↑m.
#h #n #G #L #i #X2 * #c #Hc #H elim (cpg_inv_lref1_drops … H) -H *
[ #H1 #H2 destruct
/3 width=1 by or3_intro0, conj/
(∀I,G,L. Q 0 G L (⓪[I]) (⓪[I])) →
(∀G,L,s. Q 1 G L (⋆s) (⋆(⫯[h]s))) →
(∀n,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 → Q n G K V1 V2 →
- ⇧*[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → Q n G (K.ⓓV1) (#0) W2
) → (∀n,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ⬆[h,n] V2 → Q n G K V1 V2 →
- ⇧*[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2
+ ⇧[1] V2 ≘ W2 → Q (↑n) G (K.ⓛV1) (#0) W2
) → (∀n,I,G,K,T,U,i. ❪G,K❫ ⊢ #i ⬆[h,n] T → Q n G K (#i) T →
- ⇧*[1] T ≘ U → Q n G (K.ⓘ[I]) (#↑i) (U)
+ ⇧[1] T ≘ U → Q n G (K.ⓘ[I]) (#↑i) (U)
) → (∀n,p,I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ⬆[h,0] V2 → ❪G,L.ⓑ[I]V1❫ ⊢ T1 ⬆[h,n] T2 →
Q 0 G L V1 V2 → Q n G (L.ⓑ[I]V1) T1 T2 → Q n G L (ⓑ[p,I]V1.T1) (ⓑ[p,I]V2.T2)
) → (∀n,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ⬆[h,0] V2 → ❪G,L❫ ⊢ T1 ⬆[h,n] T2 →
/2 width=2 by cpg_ess, ex_intro/ qed.
lemma cpx_delta: ∀h,I,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ⬈[h] V2 →
- ⇧*[1] V2 ≘ W2 → ❪G,K.ⓑ[I]V1❫ ⊢ #0 ⬈[h] W2.
+ ⇧[1] V2 ≘ W2 → ❪G,K.ⓑ[I]V1❫ ⊢ #0 ⬈[h] W2.
#h * #G #K #V1 #V2 #W2 *
/3 width=4 by cpg_delta, cpg_ell, ex_intro/
qed.
lemma cpx_lref: ∀h,I,G,K,T,U,i. ❪G,K❫ ⊢ #i ⬈[h] T →
- ⇧*[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬈[h] U.
+ ⇧[1] T ≘ U → ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬈[h] U.
#h #I #G #K #T #U #i *
/3 width=4 by cpg_lref, ex_intro/
qed.
qed.
lemma cpx_zeta (h) (G) (L):
- ∀T1,T. ⇧*[1] T ≘ T1 → ∀T2. ❪G,L❫ ⊢ T ⬈[h] T2 →
+ ∀T1,T. ⇧[1] T ≘ T1 → ∀T2. ❪G,L❫ ⊢ T ⬈[h] T2 →
∀V. ❪G,L❫ ⊢ +ⓓV.T1 ⬈[h] T2.
#h #G #L #T1 #T #HT1 #T2 *
/3 width=4 by cpg_zeta, ex_intro/
qed.
lemma cpx_theta: ∀h,p,G,L,V1,V,V2,W1,W2,T1,T2.
- ❪G,L❫ ⊢ V1 ⬈[h] V → ⇧*[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ⬈[h] W2 →
+ ❪G,L❫ ⊢ V1 ⬈[h] V → ⇧[1] V ≘ V2 → ❪G,L❫ ⊢ W1 ⬈[h] W2 →
❪G,L.ⓓW1❫ ⊢ T1 ⬈[h] T2 →
❪G,L❫ ⊢ ⓐV1.ⓓ[p]W1.T1 ⬈[h] ⓓ[p]W2.ⓐV2.T2.
#h #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 * #cV #HV1 #HV2 * #cW #HW12 *
lemma cpx_inv_atom1: ∀h,J,G,L,T2. ❪G,L❫ ⊢ ⓪[J] ⬈[h] T2 →
∨∨ T2 = ⓪[J]
| ∃∃s. T2 = ⋆(⫯[h]s) & J = Sort s
- | ∃∃I,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃I,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓑ[I]V1 & J = LRef 0
- | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬈[h] T & ⇧*[1] T ≘ T2 &
+ | ∃∃I,K,T,i. ❪G,K❫ ⊢ #i ⬈[h] T & ⇧[1] T ≘ T2 &
L = K.ⓘ[I] & J = LRef (↑i).
#h #J #G #L #T2 * #c #H elim (cpg_inv_atom1 … H) -H *
/4 width=8 by or4_intro0, or4_intro1, or4_intro2, or4_intro3, ex4_4_intro, ex2_intro, ex_intro/
lemma cpx_inv_zero1: ∀h,G,L,T2. ❪G,L❫ ⊢ #0 ⬈[h] T2 →
∨∨ T2 = #0
- | ∃∃I,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[h] V2 & ⇧*[1] V2 ≘ T2 &
+ | ∃∃I,K,V1,V2. ❪G,K❫ ⊢ V1 ⬈[h] V2 & ⇧[1] V2 ≘ T2 &
L = K.ⓑ[I]V1.
#h #G #L #T2 * #c #H elim (cpg_inv_zero1 … H) -H *
/4 width=7 by ex3_4_intro, ex_intro, or_introl, or_intror/
lemma cpx_inv_lref1: ∀h,G,L,T2,i. ❪G,L❫ ⊢ #↑i ⬈[h] T2 →
∨∨ T2 = #(↑i)
- | ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬈[h] T & ⇧*[1] T ≘ T2 & L = K.ⓘ[I].
+ | ∃∃I,K,T. ❪G,K❫ ⊢ #i ⬈[h] T & ⇧[1] T ≘ T2 & L = K.ⓘ[I].
#h #G #L #T2 #i * #c #H elim (cpg_inv_lref1 … H) -H *
/4 width=6 by ex3_3_intro, ex_intro, or_introl, or_intror/
qed-.
lemma cpx_inv_bind1: ∀h,p,I,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓑ[p,I]V1.T1 ⬈[h] U2 →
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ⬈[h] V2 & ❪G,L.ⓑ[I]V1❫ ⊢ T1 ⬈[h] T2 &
U2 = ⓑ[p,I]V2.T2
- | ∃∃T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[h] U2 &
+ | ∃∃T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[h] U2 &
p = true & I = Abbr.
#h #p #I #G #L #V1 #T1 #U2 * #c #H elim (cpg_inv_bind1 … H) -H *
/4 width=5 by ex4_intro, ex3_2_intro, ex_intro, or_introl, or_intror/
lemma cpx_inv_abbr1: ∀h,p,G,L,V1,T1,U2. ❪G,L❫ ⊢ ⓓ[p]V1.T1 ⬈[h] U2 →
∨∨ ∃∃V2,T2. ❪G,L❫ ⊢ V1 ⬈[h] V2 & ❪G,L.ⓓV1❫ ⊢ T1 ⬈[h] T2 &
U2 = ⓓ[p]V2.T2
- | ∃∃T. ⇧*[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[h] U2 & p = true.
+ | ∃∃T. ⇧[1] T ≘ T1 & ❪G,L❫ ⊢ T ⬈[h] U2 & p = true.
#h #p #G #L #V1 #T1 #U2 * #c #H elim (cpg_inv_abbr1 … H) -H *
/4 width=5 by ex3_2_intro, ex3_intro, ex_intro, or_introl, or_intror/
qed-.
| ∃∃p,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V2 & ❪G,L❫ ⊢ W1 ⬈[h] W2 &
❪G,L.ⓛW1❫ ⊢ T1 ⬈[h] T2 &
U1 = ⓛ[p]W1.T1 & U2 = ⓓ[p]ⓝW2.V2.T2
- | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V & ⇧*[1] V ≘ V2 &
+ | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V & ⇧[1] V ≘ V2 &
❪G,L❫ ⊢ W1 ⬈[h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ⬈[h] T2 &
U1 = ⓓ[p]W1.T1 & U2 = ⓓ[p]W2.ⓐV2.T2.
#h #G #L #V1 #U1 #U2 * #c #H elim (cpg_inv_appl1 … H) -H *
lemma cpx_inv_zero1_pair: ∀h,I,G,K,V1,T2. ❪G,K.ⓑ[I]V1❫ ⊢ #0 ⬈[h] T2 →
∨∨ T2 = #0
- | ∃∃V2. ❪G,K❫ ⊢ V1 ⬈[h] V2 & ⇧*[1] V2 ≘ T2.
+ | ∃∃V2. ❪G,K❫ ⊢ V1 ⬈[h] V2 & ⇧[1] V2 ≘ T2.
#h #I #G #L #V1 #T2 * #c #H elim (cpg_inv_zero1_pair … H) -H *
/4 width=3 by ex2_intro, ex_intro, or_intror, or_introl/
qed-.
lemma cpx_inv_lref1_bind: ∀h,I,G,K,T2,i. ❪G,K.ⓘ[I]❫ ⊢ #↑i ⬈[h] T2 →
∨∨ T2 = #(↑i)
- | ∃∃T. ❪G,K❫ ⊢ #i ⬈[h] T & ⇧*[1] T ≘ T2.
+ | ∃∃T. ❪G,K❫ ⊢ #i ⬈[h] T & ⇧[1] T ≘ T2.
#h #I #G #L #T2 #i * #c #H elim (cpg_inv_lref1_bind … H) -H *
/4 width=3 by ex2_intro, ex_intro, or_introl, or_intror/
qed-.
❪G,L.ⓛW1❫ ⊢ T1 ⬈[h] T2 &
U1 = ⓛ[p]W1.T1 &
U2 = ⓓ[p]ⓝW2.V2.T2 & I = Appl
- | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V & ⇧*[1] V ≘ V2 &
+ | ∃∃p,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V & ⇧[1] V ≘ V2 &
❪G,L❫ ⊢ W1 ⬈[h] W2 & ❪G,L.ⓓW1❫ ⊢ T1 ⬈[h] T2 &
U1 = ⓓ[p]W1.T1 &
U2 = ⓓ[p]W2.ⓐV2.T2 & I = Appl.
(∀I,G,L. Q G L (⓪[I]) (⓪[I])) →
(∀G,L,s. Q G L (⋆s) (⋆(⫯[h]s))) →
(∀I,G,K,V1,V2,W2. ❪G,K❫ ⊢ V1 ⬈[h] V2 → Q G K V1 V2 →
- ⇧*[1] V2 ≘ W2 → Q G (K.ⓑ[I]V1) (#0) W2
+ ⇧[1] V2 ≘ W2 → Q G (K.ⓑ[I]V1) (#0) W2
) → (∀I,G,K,T,U,i. ❪G,K❫ ⊢ #i ⬈[h] T → Q G K (#i) T →
- ⇧*[1] T ≘ U → Q G (K.ⓘ[I]) (#↑i) (U)
+ ⇧[1] T ≘ U → Q G (K.ⓘ[I]) (#↑i) (U)
) → (∀p,I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V2 → ❪G,L.ⓑ[I]V1❫ ⊢ T1 ⬈[h] T2 →
Q G L V1 V2 → Q G (L.ⓑ[I]V1) T1 T2 → Q G L (ⓑ[p,I]V1.T1) (ⓑ[p,I]V2.T2)
) → (∀I,G,L,V1,V2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V2 → ❪G,L❫ ⊢ T1 ⬈[h] T2 →
Q G L V1 V2 → Q G L T1 T2 → Q G L (ⓕ[I]V1.T1) (ⓕ[I]V2.T2)
- ) → (∀G,L,V,T1,T,T2. ⇧*[1] T ≘ T1 → ❪G,L❫ ⊢ T ⬈[h] T2 → Q G L T T2 →
+ ) → (∀G,L,V,T1,T,T2. ⇧[1] T ≘ T1 → ❪G,L❫ ⊢ T ⬈[h] T2 → Q G L T T2 →
Q G L (+ⓓV.T1) T2
) → (∀G,L,V,T1,T2. ❪G,L❫ ⊢ T1 ⬈[h] T2 → Q G L T1 T2 →
Q G L (ⓝV.T1) T2
Q G L (ⓐV1.ⓛ[p]W1.T1) (ⓓ[p]ⓝW2.V2.T2)
) → (∀p,G,L,V1,V,V2,W1,W2,T1,T2. ❪G,L❫ ⊢ V1 ⬈[h] V → ❪G,L❫ ⊢ W1 ⬈[h] W2 → ❪G,L.ⓓW1❫ ⊢ T1 ⬈[h] T2 →
Q G L V1 V → Q G L W1 W2 → Q G (L.ⓓW1) T1 T2 →
- ⇧*[1] V ≘ V2 → Q G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
+ ⇧[1] V ≘ V2 → Q G L (ⓐV1.ⓓ[p]W1.T1) (ⓓ[p]W2.ⓐV2.T2)
) →
∀G,L,T1,T2. ❪G,L❫ ⊢ T1 ⬈[h] T2 → Q G L T1 T2.
#h #Q #IH1 #IH2 #IH3 #IH4 #IH5 #IH6 #IH7 #IH8 #IH9 #IH10 #IH11 #G #L #T1 #T2
(* Basic_2A1: was: cpx_delta *)
lemma cpx_delta_drops: ∀h,I,G,L,K,V,V2,W2,i.
- ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ⬈[h] V2 →
- ⇧*[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬈[h] W2.
+ ⇩[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ⬈[h] V2 →
+ ⇧[↑i] V2 ≘ W2 → ❪G,L❫ ⊢ #i ⬈[h] W2.
#h * #G #L #K #V #V2 #W2 #i #HLK *
/3 width=7 by cpg_ell_drops, cpg_delta_drops, ex_intro/
qed.
lemma cpx_inv_atom1_drops: ∀h,I,G,L,T2. ❪G,L❫ ⊢ ⓪[I] ⬈[h] T2 →
∨∨ T2 = ⓪[I]
| ∃∃s. T2 = ⋆(⫯[h]s) & I = Sort s
- | ∃∃J,K,V,V2,i. ⇩*[i] L ≘ K.ⓑ[J]V & ❪G,K❫ ⊢ V ⬈[h] V2 &
- ⇧*[↑i] V2 ≘ T2 & I = LRef i.
+ | ∃∃J,K,V,V2,i. ⇩[i] L ≘ K.ⓑ[J]V & ❪G,K❫ ⊢ V ⬈[h] V2 &
+ ⇧[↑i] V2 ≘ T2 & I = LRef i.
#h #I #G #L #T2 * #c #H elim (cpg_inv_atom1_drops … H) -H *
/4 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex2_intro, ex_intro/
qed-.
(* Basic_2A1: was: cpx_inv_lref1 *)
lemma cpx_inv_lref1_drops: ∀h,G,L,T2,i. ❪G,L❫ ⊢ #i ⬈[h] T2 →
T2 = #i ∨
- ∃∃J,K,V,V2. ⇩*[i] L ≘ K. ⓑ[J]V & ❪G,K❫ ⊢ V ⬈[h] V2 &
- ⇧*[↑i] V2 ≘ T2.
+ ∃∃J,K,V,V2. ⇩[i] L ≘ K. ⓑ[J]V & ❪G,K❫ ⊢ V ⬈[h] V2 &
+ ⇧[↑i] V2 ≘ T2.
#h #G #L #T1 #i * #c #H elim (cpg_inv_lref1_drops … H) -H *
/4 width=7 by ex3_4_intro, ex_intro, or_introl, or_intror/
qed-.
(* Properties with basic relocation *****************************************)
lemma cpx_subst (h) (G) (L) (U1) (i):
- ∀I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V →
+ ∀I,K,V. ⇩[i] L ≘ K.ⓑ[I]V →
∃∃U2,T2. ❪G,L❫ ⊢ U1 ⬈[h] U2 & ⇧[i,1] T2 ≘ U2.
#h #G #L #U1 @(fqup_wf_ind_eq (Ⓣ) … G L U1) -G -L -U1
#G0 #L0 #U0 #IH #G #L * *
∀G0,L0,i. (
∀G,L,T. ❪G0,L0,#i❫ ⬂+ ❪G,L,T❫ → IH_cpr_conf_lpr h G L T
) →
- ∀K0,V0. ⇩*[i] L0 ≘ K0.ⓓV0 →
- ∀V2. ❪G0,K0❫ ⊢ V0 ➡[h] V2 → ∀T2. ⇧*[↑i] V2 ≘ T2 →
+ ∀K0,V0. ⇩[i] L0 ≘ K0.ⓓV0 →
+ ∀V2. ❪G0,K0❫ ⊢ V0 ➡[h] V2 → ∀T2. ⇧[↑i] V2 ≘ T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h] L2 →
∃∃T. ❪G0,L1❫ ⊢ #i ➡[h] T & ❪G0,L2❫ ⊢ T2 ➡[h] T.
#h #G0 #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
∀G0,L0,i. (
∀G,L,T. ❪G0,L0,#i❫ ⬂+ ❪G,L,T❫ → IH_cpr_conf_lpr h G L T
) →
- ∀K0,V0. ⇩*[i] L0 ≘ K0.ⓓV0 →
- ∀V1. ❪G0,K0❫ ⊢ V0 ➡[h] V1 → ∀T1. ⇧*[↑i] V1 ≘ T1 →
- ∀KX,VX. ⇩*[i] L0 ≘ KX.ⓓVX →
- ∀V2. ❪G0,KX❫ ⊢ VX ➡[h] V2 → ∀T2. ⇧*[↑i] V2 ≘ T2 →
+ ∀K0,V0. ⇩[i] L0 ≘ K0.ⓓV0 →
+ ∀V1. ❪G0,K0❫ ⊢ V0 ➡[h] V1 → ∀T1. ⇧[↑i] V1 ≘ T1 →
+ ∀KX,VX. ⇩[i] L0 ≘ KX.ⓓVX →
+ ∀V2. ❪G0,KX❫ ⊢ VX ➡[h] V2 → ∀T2. ⇧[↑i] V2 ≘ T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h] L2 →
∃∃T. ❪G0,L1❫ ⊢ T1 ➡[h] T & ❪G0,L2❫ ⊢ T2 ➡[h] T.
#h #G0 #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
∀G,L,T. ❪G0,L0,+ⓓV0.T0❫ ⬂+ ❪G,L,T❫ → IH_cpr_conf_lpr h G L T
) →
∀V1. ❪G0,L0❫ ⊢ V0 ➡[h] V1 → ∀T1. ❪G0,L0.ⓓV0❫ ⊢ T0 ➡[h] T1 →
- ∀T2. ⇧*[1]T2 ≘ T0 → ∀X2. ❪G0,L0❫ ⊢ T2 ➡[h] X2 →
+ ∀T2. ⇧[1]T2 ≘ T0 → ∀X2. ❪G0,L0❫ ⊢ T2 ➡[h] X2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h] L2 →
∃∃T. ❪G0,L1❫ ⊢ +ⓓV1.T1 ➡[h] T & ❪G0,L2❫ ⊢ X2 ➡[h] T.
#h #G0 #L0 #V0 #T0 #IH #V1 #HV01 #T1 #HT01
∀G0,L0,V0,T0. (
∀G,L,T. ❪G0,L0,+ⓓV0.T0❫ ⬂+ ❪G,L,T❫ → IH_cpr_conf_lpr h G L T
) →
- ∀T1. ⇧*[1] T1 ≘ T0 → ∀X1. ❪G0,L0❫ ⊢ T1 ➡[h] X1 →
- ∀T2. ⇧*[1] T2 ≘ T0 → ∀X2. ❪G0,L0❫ ⊢ T2 ➡[h] X2 →
+ ∀T1. ⇧[1] T1 ≘ T0 → ∀X1. ❪G0,L0❫ ⊢ T1 ➡[h] X1 →
+ ∀T2. ⇧[1] T2 ≘ T0 → ∀X2. ❪G0,L0❫ ⊢ T2 ➡[h] X2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h] L2 →
∃∃T. ❪G0,L1❫ ⊢ X1 ➡[h] T & ❪G0,L2❫ ⊢ X2 ➡[h] T.
#h #G0 #L0 #V0 #T0 #IH #T1 #HT10 #X1 #HTX1
∀G,L,T. ❪G0,L0,ⓐV0.ⓓ[p]W0.T0❫ ⬂+ ❪G,L,T❫ → IH_cpr_conf_lpr h G L T
) →
∀V1. ❪G0,L0❫ ⊢ V0 ➡[h] V1 → ∀T1. ❪G0,L0❫ ⊢ ⓓ[p]W0.T0 ➡[h] T1 →
- ∀V2. ❪G0,L0❫ ⊢ V0 ➡[h] V2 → ∀U2. ⇧*[1] V2 ≘ U2 →
+ ∀V2. ❪G0,L0❫ ⊢ V0 ➡[h] V2 → ∀U2. ⇧[1] V2 ≘ U2 →
∀W2. ❪G0,L0❫ ⊢ W0 ➡[h] W2 → ∀T2. ❪G0,L0.ⓓW0❫ ⊢ T0 ➡[h] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h] L2 →
∃∃T. ❪G0,L1❫ ⊢ ⓐV1.T1 ➡[h] T & ❪G0,L2❫ ⊢ ⓓ[p]W2.ⓐU2.T2 ➡[h] T.
∀p,G0,L0,V0,W0,T0. (
∀G,L,T. ❪G0,L0,ⓐV0.ⓓ[p]W0.T0❫ ⬂+ ❪G,L,T❫ → IH_cpr_conf_lpr h G L T
) →
- ∀V1. ❪G0,L0❫ ⊢ V0 ➡[h] V1 → ∀U1. ⇧*[1] V1 ≘ U1 →
+ ∀V1. ❪G0,L0❫ ⊢ V0 ➡[h] V1 → ∀U1. ⇧[1] V1 ≘ U1 →
∀W1. ❪G0,L0❫ ⊢ W0 ➡[h] W1 → ∀T1. ❪G0,L0.ⓓW0❫ ⊢ T0 ➡[h] T1 →
- ∀V2. ❪G0,L0❫ ⊢ V0 ➡[h] V2 → ∀U2. ⇧*[1] V2 ≘ U2 →
+ ∀V2. ❪G0,L0❫ ⊢ V0 ➡[h] V2 → ∀U2. ⇧[1] V2 ≘ U2 →
∀W2. ❪G0,L0❫ ⊢ W0 ➡[h] W2 → ∀T2. ❪G0,L0.ⓓW0❫ ⊢ T0 ➡[h] T2 →
∀L1. ❪G0,L0❫ ⊢ ➡[h] L1 → ∀L2. ❪G0,L0❫ ⊢ ➡[h] L2 →
∃∃T. ❪G0,L1❫ ⊢ ⓓ[p]W1.ⓐU1.T1 ➡[h] T & ❪G0,L2❫ ⊢ ⓓ[p]W2.ⓐU2.T2 ➡[h] T.
(* Forward lemmas with free variables inclusion for restricted closures *****)
(* Note: "❪L2, T1❫ ⊆ ❪L2, T0❫" does not hold *)
-(* Note: Take L0 = K0.ⓓ(ⓝW.V), L2 = K0.ⓓW, T0 = #0, T1 = ⇧*[1]V *)
+(* Note: Take L0 = K0.ⓓ(ⓝW.V), L2 = K0.ⓓW, T0 = #0, T1 = ⇧[1]V *)
(* Note: This invalidates rpxs_cpx_conf: "∀h, G. s_r_confluent1 … (cpx h G) (rpxs h G)" *)
lemma rpx_cpx_conf_fsge (h) (G): ∀L0,T0,T1. ❪G,L0❫ ⊢ T0 ⬈[h] T1 →
∀L2. ❪G,L0❫ ⊢⬈[h,T0] L2 → ❪L2,T1❫ ⊆ ❪L0,T0❫.
(* Basic properties *********************************************************)
-lemma isr_00: 𝐑𝐓❪0,𝟘𝟘❫.
+lemma isrt_00: 𝐑𝐓❪0,𝟘𝟘❫.
/2 width=3 by ex1_2_intro/ qed.
-lemma isr_10: 𝐑𝐓❪0,𝟙𝟘❫.
+lemma isrt_10: 𝐑𝐓❪0,𝟙𝟘❫.
/2 width=3 by ex1_2_intro/ qed.
lemma isrt_01: 𝐑𝐓❪1,𝟘𝟙❫.
--- /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_2/xoa/ex_3_2.ma".
+include "ground_2/steps/rtc_max.ma".
+include "ground_2/steps/rtc_isrt.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for constrained rt-transition counter ***************)
+
+lemma isrt_max: ∀n1,n2,c1,c2. 𝐑𝐓❪n1,c1❫ → 𝐑𝐓❪n2,c2❫ → 𝐑𝐓❪n1∨n2,c1∨c2❫.
+#n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
+/2 width=3 by ex1_2_intro/
+qed.
+
+lemma isrt_max_O1: ∀n,c1,c2. 𝐑𝐓❪0,c1❫ → 𝐑𝐓❪n,c2❫ → 𝐑𝐓❪n,c1∨c2❫.
+/2 width=1 by isrt_max/ qed.
+
+lemma isrt_max_O2: ∀n,c1,c2. 𝐑𝐓❪n,c1❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1∨c2❫.
+#n #c1 #c2 #H1 #H2 >(max_O2 n) /2 width=1 by isrt_max/
+qed.
+
+lemma isrt_max_idem1: ∀n,c1,c2. 𝐑𝐓❪n,c1❫ → 𝐑𝐓❪n,c2❫ → 𝐑𝐓❪n,c1∨c2❫.
+#n #c1 #c2 #H1 #H2 >(idempotent_max n) /2 width=1 by isrt_max/
+qed.
+
+(* Inversion properties with test for constrained rt-transition counter *****)
+
+lemma isrt_inv_max: ∀n,c1,c2. 𝐑𝐓❪n,c1 ∨ c2❫ →
+ ∃∃n1,n2. 𝐑𝐓❪n1,c1❫ & 𝐑𝐓❪n2,c2❫ & (n1 ∨ n2) = n.
+#n #c1 #c2 * #ri #rs #H
+elim (max_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
+elim (max_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
+qed-.
+
+lemma isrt_O_inv_max: ∀c1,c2. 𝐑𝐓❪0,c1 ∨ c2❫ → ∧∧ 𝐑𝐓❪0,c1❫ & 𝐑𝐓❪0,c2❫.
+#c1 #c2 #H
+elim (isrt_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H
+elim (max_inv_O3 … H) -H #H1 #H2 destruct
+/2 width=1 by conj/
+qed-.
+
+lemma isrt_inv_max_O_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 ∨ c2❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1❫.
+#n #c1 #c2 #H #H2
+elim (isrt_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
+lapply (isrt_inj … Hn2 H2) -c2 #H destruct //
+qed-.
+
+lemma isrt_inv_max_eq_t: ∀n,c1,c2. 𝐑𝐓❪n,c1 ∨ c2❫ → eq_t c1 c2 →
+ ∧∧ 𝐑𝐓❪n,c1❫ & 𝐑𝐓❪n,c2❫.
+#n #c1 #c2 #H #Hc12
+elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct
+lapply (isrt_eq_t_trans … Hc1 … Hc12) -Hc12 #H
+<(isrt_inj … H … Hc2) -Hc2
+<idempotent_max /2 width=1 by conj/
+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_2/steps/rtc_isrt_shift.ma".
+include "ground_2/steps/rtc_isrt_max.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Inversion properties with test for constrained rt-transition counter *****)
+
+lemma isrt_inv_max_shift_sn: ∀n,c1,c2. 𝐑𝐓❪n,↕*c1 ∨ c2❫ →
+ ∧∧ 𝐑𝐓❪0,c1❫ & 𝐑𝐓❪n,c2❫.
+#n #c1 #c2 #H
+elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct
+elim (isrt_inv_shift … Hc1) -Hc1 #Hc1 * -n1
+/2 width=1 by conj/
+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_2/xoa/ex_3_2.ma".
+include "ground_2/steps/rtc_plus.ma".
+include "ground_2/steps/rtc_isrt.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for constrained rt-transition counter ***************)
+
+lemma isrt_plus: ∀n1,n2,c1,c2. 𝐑𝐓❪n1,c1❫ → 𝐑𝐓❪n2,c2❫ → 𝐑𝐓❪n1+n2,c1+c2❫.
+#n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
+/2 width=3 by ex1_2_intro/
+qed.
+
+lemma isrt_plus_O1: ∀n,c1,c2. 𝐑𝐓❪0,c1❫ → 𝐑𝐓❪n,c2❫ → 𝐑𝐓❪n,c1+c2❫.
+/2 width=1 by isrt_plus/ qed.
+
+lemma isrt_plus_O2: ∀n,c1,c2. 𝐑𝐓❪n,c1❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1+c2❫.
+#n #c1 #c2 #H1 #H2 >(plus_n_O n) /2 width=1 by isrt_plus/
+qed.
+
+lemma isrt_succ: ∀n,c. 𝐑𝐓❪n,c❫ → 𝐑𝐓❪↑n,c+𝟘𝟙❫.
+/2 width=1 by isrt_plus/ qed.
+
+(* Inversion properties with test for constrained rt-transition counter *****)
+
+lemma isrt_inv_plus: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ →
+ ∃∃n1,n2. 𝐑𝐓❪n1,c1❫ & 𝐑𝐓❪n2,c2❫ & n1 + n2 = n.
+#n #c1 #c2 * #ri #rs #H
+elim (plus_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
+elim (plus_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
+qed-.
+
+lemma isrt_inv_plus_O_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1❫.
+#n #c1 #c2 #H #H2
+elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
+lapply (isrt_inj … Hn2 H2) -c2 #H destruct //
+qed-.
+
+lemma isrt_inv_plus_SO_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → 𝐑𝐓❪1,c2❫ →
+ ∃∃m. 𝐑𝐓❪m,c1❫ & n = ↑m.
+#n #c1 #c2 #H #H2
+elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
+lapply (isrt_inj … Hn2 H2) -c2 #H destruct
+/2 width=3 by 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 "ground_2/steps/rtc_shift.ma".
+include "ground_2/steps/rtc_isrt.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with test for costrained rt-transition counter ****************)
+
+lemma isr_shift: ∀c. 𝐑𝐓❪0,c❫ → 𝐑𝐓❪0,↕*c❫.
+#c * #ri #rs #H destruct /2 width=3 by ex1_2_intro/
+qed.
+
+(* Inversion properties with test for costrained rt-counter *****************)
+
+lemma isrt_inv_shift: ∀n,c. 𝐑𝐓❪n,↕*c❫ → 𝐑𝐓❪0,c❫ ∧ 0 = n.
+#n #c * #ri #rs #H
+elim (shift_inv_dx … H) -H #rt0 #rs0 #ti0 #ts0 #_ #_ #H1 #H2 #H3
+elim (max_inv_O3 … H1) -H1 /3 width=3 by ex1_2_intro, conj/
+qed-.
+
+lemma isr_inv_shift: ∀c. 𝐑𝐓❪0,↕*c❫ → 𝐑𝐓❪0,c❫.
+#c #H elim (isrt_inv_shift … H) -H //
+qed-.
(* Basic properties *********************************************************)
-lemma isr_00: 𝐓❪0,𝟘𝟘❫.
+lemma ist_00: 𝐓❪0,𝟘𝟘❫.
// qed.
lemma ist_01: 𝐓❪1,𝟘𝟙❫.
(* *)
(**************************************************************************)
+include "ground_2/xoa/ex_3_2.ma".
include "ground_2/steps/rtc_max.ma".
include "ground_2/steps/rtc_ist.ma".
(* *)
(**************************************************************************)
+include "ground_2/xoa/ex_3_2.ma".
include "ground_2/steps/rtc_plus.ma".
include "ground_2/steps/rtc_ist.ma".
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_2.ma".
include "ground_2/xoa/ex_6_8.ma".
-include "ground_2/steps/rtc_shift.ma".
+include "ground_2/steps/rtc.ma".
(* RT-TRANSITION COUNTER ****************************************************)
* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2 * #ri3 #rs3 #ti3 #ts3
<max_rew <max_rew //
qed.
-
-(* Properties with test for constrained rt-transition counter ***************)
-
-lemma isrt_max: ∀n1,n2,c1,c2. 𝐑𝐓❪n1,c1❫ → 𝐑𝐓❪n2,c2❫ → 𝐑𝐓❪n1∨n2,c1∨c2❫.
-#n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
-/2 width=3 by ex1_2_intro/
-qed.
-
-lemma isrt_max_O1: ∀n,c1,c2. 𝐑𝐓❪0,c1❫ → 𝐑𝐓❪n,c2❫ → 𝐑𝐓❪n,c1∨c2❫.
-/2 width=1 by isrt_max/ qed.
-
-lemma isrt_max_O2: ∀n,c1,c2. 𝐑𝐓❪n,c1❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1∨c2❫.
-#n #c1 #c2 #H1 #H2 >(max_O2 n) /2 width=1 by isrt_max/
-qed.
-
-lemma isrt_max_idem1: ∀n,c1,c2. 𝐑𝐓❪n,c1❫ → 𝐑𝐓❪n,c2❫ → 𝐑𝐓❪n,c1∨c2❫.
-#n #c1 #c2 #H1 #H2 >(idempotent_max n) /2 width=1 by isrt_max/
-qed.
-
-(* Inversion properties with test for constrained rt-transition counter *****)
-
-lemma isrt_inv_max: ∀n,c1,c2. 𝐑𝐓❪n,c1 ∨ c2❫ →
- ∃∃n1,n2. 𝐑𝐓❪n1,c1❫ & 𝐑𝐓❪n2,c2❫ & (n1 ∨ n2) = n.
-#n #c1 #c2 * #ri #rs #H
-elim (max_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
-elim (max_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
-qed-.
-
-lemma isrt_O_inv_max: ∀c1,c2. 𝐑𝐓❪0,c1 ∨ c2❫ → ∧∧ 𝐑𝐓❪0,c1❫ & 𝐑𝐓❪0,c2❫.
-#c1 #c2 #H
-elim (isrt_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H
-elim (max_inv_O3 … H) -H #H1 #H2 destruct
-/2 width=1 by conj/
-qed-.
-
-lemma isrt_inv_max_O_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 ∨ c2❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1❫.
-#n #c1 #c2 #H #H2
-elim (isrt_inv_max … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
-lapply (isrt_inj … Hn2 H2) -c2 #H destruct //
-qed-.
-
-lemma isrt_inv_max_eq_t: ∀n,c1,c2. 𝐑𝐓❪n,c1 ∨ c2❫ → eq_t c1 c2 →
- ∧∧ 𝐑𝐓❪n,c1❫ & 𝐑𝐓❪n,c2❫.
-#n #c1 #c2 #H #Hc12
-elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct
-lapply (isrt_eq_t_trans … Hc1 … Hc12) -Hc12 #H
-<(isrt_inj … H … Hc2) -Hc2
-<idempotent_max /2 width=1 by conj/
-qed-.
-
-(* Properties with shift ****************************************************)
-
-lemma max_shift: ∀c1,c2. ((↕*c1) ∨ (↕*c2)) = ↕*(c1∨c2).
-* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
-<shift_rew <shift_rew <shift_rew <max_rew //
-qed.
-
-(* Inversion lemmaswith shift ***********************************************)
-
-lemma isrt_inv_max_shift_sn: ∀n,c1,c2. 𝐑𝐓❪n,↕*c1 ∨ c2❫ →
- ∧∧ 𝐑𝐓❪0,c1❫ & 𝐑𝐓❪n,c2❫.
-#n #c1 #c2 #H
-elim (isrt_inv_max … H) -H #n1 #n2 #Hc1 #Hc2 #H destruct
-elim (isrt_inv_shift … Hc1) -Hc1 #Hc1 * -n1
-/2 width=1 by conj/
-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_2/steps/rtc_shift.ma".
+include "ground_2/steps/rtc_max.ma".
+
+(* RT-TRANSITION COUNTER ****************************************************)
+
+(* Properties with max and shift ********************************************)
+
+lemma max_shift: ∀c1,c2. ((↕*c1) ∨ (↕*c2)) = ↕*(c1∨c2).
+* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
+<shift_rew <shift_rew <shift_rew <max_rew //
+qed.
(* *)
(**************************************************************************)
-include "ground_2/xoa/ex_3_2.ma".
include "ground_2/xoa/ex_6_8.ma".
-include "ground_2/steps/rtc_isrt.ma".
+include "ground_2/steps/rtc.ma".
(* RT-TRANSITION COUNTER ****************************************************)
* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2 * #ri3 #rs3 #ti3 #ts3
<plus_rew //
qed.
-
-(* Properties with test for constrained rt-transition counter ***************)
-
-lemma isrt_plus: ∀n1,n2,c1,c2. 𝐑𝐓❪n1,c1❫ → 𝐑𝐓❪n2,c2❫ → 𝐑𝐓❪n1+n2,c1+c2❫.
-#n1 #n2 #c1 #c2 * #ri1 #rs1 #H1 * #ri2 #rs2 #H2 destruct
-/2 width=3 by ex1_2_intro/
-qed.
-
-lemma isrt_plus_O1: ∀n,c1,c2. 𝐑𝐓❪0,c1❫ → 𝐑𝐓❪n,c2❫ → 𝐑𝐓❪n,c1+c2❫.
-/2 width=1 by isrt_plus/ qed.
-
-lemma isrt_plus_O2: ∀n,c1,c2. 𝐑𝐓❪n,c1❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1+c2❫.
-#n #c1 #c2 #H1 #H2 >(plus_n_O n) /2 width=1 by isrt_plus/
-qed.
-
-lemma isrt_succ: ∀n,c. 𝐑𝐓❪n,c❫ → 𝐑𝐓❪↑n,c+𝟘𝟙❫.
-/2 width=1 by isrt_plus/ qed.
-
-(* Inversion properties with test for constrained rt-transition counter *****)
-
-lemma isrt_inv_plus: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ →
- ∃∃n1,n2. 𝐑𝐓❪n1,c1❫ & 𝐑𝐓❪n2,c2❫ & n1 + n2 = n.
-#n #c1 #c2 * #ri #rs #H
-elim (plus_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4
-elim (plus_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/
-qed-.
-
-lemma isrt_inv_plus_O_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1❫.
-#n #c1 #c2 #H #H2
-elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
-lapply (isrt_inj … Hn2 H2) -c2 #H destruct //
-qed-.
-
-lemma isrt_inv_plus_SO_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → 𝐑𝐓❪1,c2❫ →
- ∃∃m. 𝐑𝐓❪m,c1❫ & n = ↑m.
-#n #c1 #c2 #H #H2
-elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
-lapply (isrt_inj … Hn2 H2) -c2 #H destruct
-/2 width=3 by ex2_intro/
-qed-.
include "ground_2/xoa/ex_5_4.ma".
include "ground_2/notation/functions/updownarrowstar_1.ma".
-include "ground_2/steps/rtc_isrt.ma".
+include "ground_2/steps/rtc.ma".
(* RT-TRANSITION COUNTER ****************************************************)
#ri #rs #ti #ts * #ri0 #rs0 #ti0 #ts0 <shift_rew #H destruct
/2 width=7 by ex5_4_intro/
qed-.
-
-(* Properties with test for costrained rt-transition counter ****************)
-
-lemma isr_shift: ∀c. 𝐑𝐓❪0,c❫ → 𝐑𝐓❪0,↕*c❫.
-#c * #ri #rs #H destruct /2 width=3 by ex1_2_intro/
-qed.
-
-(* Inversion properties with test for costrained rt-counter *****************)
-
-lemma isrt_inv_shift: ∀n,c. 𝐑𝐓❪n,↕*c❫ → 𝐑𝐓❪0,c❫ ∧ 0 = n.
-#n #c * #ri #rs #H
-elim (shift_inv_dx … H) -H #rt0 #rs0 #ti0 #ts0 #_ #_ #H1 #H2 #H3
-elim (max_inv_O3 … H1) -H1 /3 width=3 by ex1_2_intro, conj/
-qed-.
-
-lemma isr_inv_shift: ∀c. 𝐑𝐓❪0,↕*c❫ → 𝐑𝐓❪0,c❫.
-#c #H elim (isrt_inv_shift … H) -H //
-qed-.
and its timeline.
</body>
<table name="ground_2_sum"/>
+
+ <news class="alpha" date="2020 January 6.">
+ Centralized xoa infrastructure removed.
+ </news>
+ <news class="alpha" date="2018 June 6.">
+ Decentralized xoa infrastructure.
+ </news>
<news class="alpha" date="2016 April 18.">
Generic rt-transition counter (rtc).
</news>
[ { "generic rt-transition counter" * } {
[ { "" * } {
[ "rtc_ist ( 𝐓❪?,?❫ )" "rtc_ist_shift" "rtc_ist_plus" "rtc_ist_max" * ]
- [ "rtc ( 〈?,?,?,?〉 ) ( 𝟘𝟘 ) ( 𝟙𝟘 ) ( 𝟘𝟙 )" "rtc_isrc ( 𝐑𝐓❪?,?❫ )" "rtc_shift ( ↕*? )" "rtc_max ( ? ∨ ? )" "rtc_plus ( ? + ? )" * ]
+ [ "rtc_isrc ( 𝐑𝐓❪?,?❫ )" "rtc_isrt_shift" "rtc_isrt_plus" "rtc_isrt_max" "rtc_isrt_max_shift" * ]
+ [ "rtc ( 〈?,?,?,?〉 ) ( 𝟘𝟘 ) ( 𝟙𝟘 ) ( 𝟘𝟙 )" "rtc_shift ( ↕*? )" "rtc_plus ( ? + ? )" "rtc_max ( ? ∨ ? )" "rtc_max_shift" * ]
}
]
}
--- /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 i ] break term 46 L1 ≘ break term 46 L2 )"
+ non associative with precedence 45
+ for @{ 'RDrop $i $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 i ] break term 46 L1 ≘ break term 46 L2 )"
- non associative with precedence 45
- for @{ 'RDropStar $i $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 i ] break term 46 T1 ≘ break term 46 T2 )"
+ non associative with precedence 45
+ for @{ 'RLift $i $T1 $T2 }.
include "ground_2/xoa/ex_1_2.ma".
include "ground_2/xoa/ex_4_3.ma".
include "ground_2/relocation/rtmap_coafter.ma".
-include "static_2/notation/relations/rdropstar_3.ma".
include "static_2/notation/relations/rdropstar_4.ma".
+include "static_2/notation/relations/rdrop_3.ma".
include "static_2/relocation/seq.ma".
include "static_2/relocation/lifts_bind.ma".
drops b (⫯f) (L1.ⓘ[I1]) (L2.ⓘ[I2])
.
-interpretation "uniform slicing (local environment)"
- 'RDropStar i L1 L2 = (drops true (uni i) L1 L2).
-
interpretation "generic slicing (local environment)"
'RDropStar b f L1 L2 = (drops b f L1 L2).
+interpretation "uniform slicing (local environment)"
+ 'RDrop i L1 L2 = (drops true (uni i) L1 L2).
+
definition d_liftable1: predicate (relation2 lenv term) ≝
λR. ∀K,T. R K T → ∀b,f,L. ⇩*[b,f] L ≘ K →
∀U. ⇧*[f] T ≘ U → R L U.
λR. ∀L,U. R L U → ∀b,f,K. ⇩*[b,f] L ≘ K → 𝐔❪f❫ →
∀T. ⇧*[f] T ≘ U → R K T.
-definition d_liftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C.
- predicate (lenv → relation C) ≝
+definition d_liftable2_sn: ∀C:Type[0]. ∀S:?→relation C.
+ predicate (lenv→relation C) ≝
λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⇩*[b,f] L ≘ K →
∀U1. S f T1 U1 →
∃∃U2. S f T2 U2 & R L U1 U2.
-definition d_deliftable2_sn: ∀C:Type[0]. ∀S:rtmap → relation C.
- predicate (lenv → relation C) ≝
+definition d_deliftable2_sn: ∀C:Type[0]. ∀S:?→relation C.
+ predicate (lenv→relation C) ≝
λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⇩*[b,f] L ≘ K →
∀T1. S f T1 U1 →
∃∃T2. S f T2 U2 & R K T1 T2.
-definition d_liftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C.
- predicate (lenv → relation C) ≝
+definition d_liftable2_bi: ∀C:Type[0]. ∀S:?→relation C.
+ predicate (lenv→relation C) ≝
λC,S,R. ∀K,T1,T2. R K T1 T2 → ∀b,f,L. ⇩*[b,f] L ≘ K →
∀U1. S f T1 U1 →
∀U2. S f T2 U2 → R L U1 U2.
-definition d_deliftable2_bi: ∀C:Type[0]. ∀S:rtmap → relation C.
- predicate (lenv → relation C) ≝
+definition d_deliftable2_bi: ∀C:Type[0]. ∀S:?→relation C.
+ predicate (lenv→relation C) ≝
λC,S,R. ∀L,U1,U2. R L U1 U2 → ∀b,f,K. ⇩*[b,f] L ≘ K →
∀T1. S f T1 U1 →
∀T2. S f T2 U2 → R K T1 T2.
-definition co_dropable_sn: predicate (rtmap → relation lenv) ≝
+definition co_dropable_sn: predicate (?→relation lenv) ≝
λR. ∀b,f,L1,K1. ⇩*[b,f] L1 ≘ K1 → 𝐔❪f❫ →
∀f2,L2. R f2 L1 L2 → ∀f1. f ~⊚ f1 ≘ f2 →
∃∃K2. R f1 K1 K2 & ⇩*[b,f] L2 ≘ K2.
-definition co_dropable_dx: predicate (rtmap → relation lenv) ≝
+definition co_dropable_dx: predicate (?→relation lenv) ≝
λR. ∀f2,L1,L2. R f2 L1 L2 →
∀b,f,K2. ⇩*[b,f] L2 ≘ K2 → 𝐔❪f❫ →
∀f1. f ~⊚ f1 ≘ f2 →
∃∃K1. ⇩*[b,f] L1 ≘ K1 & R f1 K1 K2.
-definition co_dedropable_sn: predicate (rtmap → relation lenv) ≝
+definition co_dedropable_sn: predicate (?→relation lenv) ≝
λR. ∀b,f,L1,K1. ⇩*[b,f] L1 ≘ K1 → ∀f1,K2. R f1 K1 K2 →
∀f2. f ~⊚ f1 ≘ f2 →
∃∃L2. R f2 L1 L2 & ⇩*[b,f] L2 ≘ K2 & L1 ≡[f] L2.
]
qed-.
-lemma drops_inv_succ: ∀L1,L2,i. ⇩*[↑i] L1 ≘ L2 →
- ∃∃I,K. ⇩*[i] K ≘ L2 & L1 = K.ⓘ[I].
+lemma drops_inv_succ: ∀L1,L2,i. ⇩[↑i] L1 ≘ L2 →
+ ∃∃I,K. ⇩[i] K ≘ L2 & L1 = K.ⓘ[I].
#L1 #L2 #i #H elim (drops_inv_isuni … H) -H // *
[ #H elim (isid_inv_next … H) -H //
| /2 width=4 by ex2_2_intro/
(* Properties with uniform relocations **************************************)
-lemma drops_F_uni: ∀L,i. ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆ ∨ ∃∃I,K. ⇩*[i] L ≘ K.ⓘ[I].
+lemma drops_F_uni: ∀L,i. ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆ ∨ ∃∃I,K. ⇩[i] L ≘ K.ⓘ[I].
#L elim L -L /2 width=1 by or_introl/
#L #I #IH * /4 width=3 by drops_refl, ex1_2_intro, or_intror/
#i elim (IH i) -IH /3 width=1 by drops_drop, or_introl/
/3 width=3 by drops_eq_repl_fwd, at_inv_tls/ qed-.
lemma drops_split_trans_bind2: ∀b,f,I,L,K0. ⇩*[b,f] L ≘ K0.ⓘ[I] → ∀i. @❪O,f❫ ≘ i →
- ∃∃J,K. ⇩*[i]L ≘ K.ⓘ[J] & ⇩*[b,⫱*[↑i]f] K ≘ K0 & ⇧*[⫱*[↑i]f] I ≘ J.
+ ∃∃J,K. ⇩[i]L ≘ K.ⓘ[J] & ⇩*[b,⫱*[↑i]f] K ≘ K0 & ⇧*[⫱*[↑i]f] I ≘ J.
#b #f #I #L #K0 #H #i #Hf
elim (drops_split_trans … H) -H [ |5: @(after_uni_dx … Hf) |2,3: skip ] /2 width=1 by after_isid_dx/ #Y #HLY #H
lapply (drops_tls_at … Hf … H) -H #H
/3 width=8 by drops_conf, drops_fwd_isid/
qed-.
-lemma drops_inv_uni: ∀L,i. ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆ → ∀I,K. ⇩*[i] L ≘ K.ⓘ[I] → ⊥.
+lemma drops_inv_uni: ∀L,i. ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆ → ∀I,K. ⇩[i] L ≘ K.ⓘ[I] → ⊥.
#L #i #H1 #I #K #H2
lapply (drops_F … H2) -H2 #H2
lapply (drops_mono … H2 … H1) -L -i #H destruct
qed-.
-lemma drops_ldec_dec: ∀L,i. Decidable (∃∃K,W. ⇩*[i] L ≘ K.ⓛW).
+lemma drops_ldec_dec: ∀L,i. Decidable (∃∃K,W. ⇩[i] L ≘ K.ⓛW).
#L #i elim (drops_F_uni L i) [| * * [ #I #K1 | * #W1 #K1 ] ]
[4: /3 width=3 by ex1_2_intro, or_introl/
|*: #H1L @or_intror * #K2 #W2 #H2L
include "ground_2/relocation/nstream_after.ma".
include "static_2/notation/relations/rliftstar_3.ma".
+include "static_2/notation/relations/rlift_3.ma".
include "static_2/syntax/term.ma".
(* GENERIC RELOCATION FOR TERMS *********************************************)
lifts f (ⓕ[I]V1.T1) (ⓕ[I]V2.T2)
.
-interpretation "uniform relocation (term)"
- 'RLiftStar i T1 T2 = (lifts (uni i) T1 T2).
-
interpretation "generic relocation (term)"
'RLiftStar f T1 T2 = (lifts f T1 T2).
+interpretation "uniform relocation (term)"
+ 'RLift i T1 T2 = (lifts (uni i) T1 T2).
+
definition liftable2_sn: predicate (relation term) ≝
λR. ∀T1,T2. R T1 T2 → ∀f,U1. ⇧*[f] T1 ≘ U1 →
∃∃U2. ⇧*[f] T2 ≘ U2 & R U1 U2.
Y = ⓑ[p,I]V2.T2.
/2 width=3 by lifts_inv_bind1_aux/ qed-.
-fact lifts_inv_flat1_aux: ∀f:rtmap. ∀X,Y. ⇧*[f] X ≘ Y →
+fact lifts_inv_flat1_aux: ∀f,X,Y. ⇧*[f] X ≘ Y →
∀I,V1,T1. X = ⓕ[I]V1.T1 →
∃∃V2,T2. ⇧*[f] V1 ≘ V2 & ⇧*[f] T1 ≘ T2 &
Y = ⓕ[I]V2.T2.
(* Basic_1: was: lift1_flat *)
(* Basic_2A1: includes: lift_inv_flat1 *)
-lemma lifts_inv_flat1: ∀f:rtmap. ∀I,V1,T1,Y. ⇧*[f] ⓕ[I]V1.T1 ≘ Y →
+lemma lifts_inv_flat1: ∀f,I,V1,T1,Y. ⇧*[f] ⓕ[I]V1.T1 ≘ Y →
∃∃V2,T2. ⇧*[f] V1 ≘ V2 & ⇧*[f] T1 ≘ T2 &
Y = ⓕ[I]V2.T2.
/2 width=3 by lifts_inv_flat1_aux/ qed-.
X = ⓑ[p,I]V1.T1.
/2 width=3 by lifts_inv_bind2_aux/ qed-.
-fact lifts_inv_flat2_aux: ∀f:rtmap. ∀X,Y. ⇧*[f] X ≘ Y →
+fact lifts_inv_flat2_aux: ∀f,X,Y. ⇧*[f] X ≘ Y →
∀I,V2,T2. Y = ⓕ[I]V2.T2 →
∃∃V1,T1. ⇧*[f] V1 ≘ V2 & ⇧*[f] T1 ≘ T2 &
X = ⓕ[I]V1.T1.
(* Basic_1: includes: lift_gen_flat *)
(* Basic_2A1: includes: lift_inv_flat2 *)
-lemma lifts_inv_flat2: ∀f:rtmap. ∀I,V2,T2,X. ⇧*[f] X ≘ ⓕ[I]V2.T2 →
+lemma lifts_inv_flat2: ∀f,I,V2,T2,X. ⇧*[f] X ≘ ⓕ[I]V2.T2 →
∃∃V1,T1. ⇧*[f] V1 ≘ V2 & ⇧*[f] T1 ≘ T2 &
X = ⓕ[I]V1.T1.
/2 width=3 by lifts_inv_flat2_aux/ qed-.
(* Inversion lemmas with uniform relocations ********************************)
-lemma lifts_inv_lref1_uni: ∀l,Y,i. ⇧*[l] #i ≘ Y → Y = #(l+i).
+lemma lifts_inv_lref1_uni: ∀l,Y,i. ⇧[l] #i ≘ Y → Y = #(l+i).
#l #Y #i1 #H elim (lifts_inv_lref1 … H) -H /4 width=4 by at_mono, eq_f/
qed-.
-lemma lifts_inv_lref2_uni: ∀l,X,i2. ⇧*[l] X ≘ #i2 →
+lemma lifts_inv_lref2_uni: ∀l,X,i2. ⇧[l] X ≘ #i2 →
∃∃i1. X = #i1 & i2 = l + i1.
#l #X #i2 #H elim (lifts_inv_lref2 … H) -H
/3 width=3 by at_inv_uni, ex2_intro/
qed-.
-lemma lifts_inv_lref2_uni_ge: ∀l,X,i. ⇧*[l] X ≘ #(l + i) → X = #i.
+lemma lifts_inv_lref2_uni_ge: ∀l,X,i. ⇧[l] X ≘ #(l + i) → X = #i.
#l #X #i2 #H elim (lifts_inv_lref2_uni … H) -H
#i1 #H1 #H2 destruct /4 width=2 by injective_plus_r, eq_f, sym_eq/
qed-.
-lemma lifts_inv_lref2_uni_lt: ∀l,X,i. ⇧*[l] X ≘ #i → i < l → ⊥.
+lemma lifts_inv_lref2_uni_lt: ∀l,X,i. ⇧[l] X ≘ #i → i < l → ⊥.
#l #X #i2 #H elim (lifts_inv_lref2_uni … H) -H
#i1 #_ #H1 #H2 destruct /2 width=4 by lt_le_false/
qed-.
qed-.
(* Basic_2A1: includes: lift_fwd_pair1 *)
-lemma lifts_fwd_pair1: ∀f:rtmap. ∀I,V1,T1,Y. ⇧*[f] ②[I]V1.T1 ≘ Y →
+lemma lifts_fwd_pair1: ∀f,I,V1,T1,Y. ⇧*[f] ②[I]V1.T1 ≘ Y →
∃∃V2,T2. ⇧*[f] V1 ≘ V2 & Y = ②[I]V2.T2.
#f * [ #p ] #I #V1 #T1 #Y #H
[ elim (lifts_inv_bind1 … H) -H /2 width=4 by ex2_2_intro/
qed-.
(* Basic_2A1: includes: lift_fwd_pair2 *)
-lemma lifts_fwd_pair2: ∀f:rtmap. ∀I,V2,T2,X. ⇧*[f] X ≘ ②[I]V2.T2 →
+lemma lifts_fwd_pair2: ∀f,I,V2,T2,X. ⇧*[f] X ≘ ②[I]V2.T2 →
∃∃V1,T1. ⇧*[f] V1 ≘ V2 & X = ②[I]V1.T1.
#f * [ #p ] #I #V2 #T2 #X #H
[ elim (lifts_inv_bind2 … H) -H /2 width=4 by ex2_2_intro/
/3 width=7 by lifts_lref, at_push/
qed.
-lemma lifts_lref_uni: ∀l,i. ⇧*[l] #i ≘ #(l+i).
+lemma lifts_lref_uni: ∀l,i. ⇧[l] #i ≘ #(l+i).
#l elim l -l /2 width=1 by lifts_lref/
qed.
(* Properties with uniform relocation ***************************************)
-lemma lifts_uni: ∀n1,n2,T,U. ⇧*[𝐔❨n1❩∘𝐔❨n2❩] T ≘ U → ⇧*[n1+n2] T ≘ U.
+lemma lifts_uni: ∀n1,n2,T,U. ⇧*[𝐔❨n1❩∘𝐔❨n2❩] T ≘ U → ⇧[n1+n2] T ≘ U.
/3 width=4 by lifts_eq_repl_back, after_inv_total/ qed.
(* Basic_2A1: removed theorems 14:
definition liftsb: rtmap → relation bind ≝
λf. ext2 (lifts f).
-interpretation "uniform relocation (binder for local environments)"
- 'RLiftStar i I1 I2 = (liftsb (uni i) I1 I2).
-
interpretation "generic relocation (binder for local environments)"
'RLiftStar f I1 I2 = (liftsb f I1 I2).
+interpretation "uniform relocation (binder for local environments)"
+ 'RLift i I1 I2 = (liftsb (uni i) I1 I2).
+
(* Basic_inversion lemmas **************************************************)
-lemma liftsb_inv_unit_sn: ∀f,I,Z2. ⇧*[f] BUnit I ≘ Z2 → Z2 = BUnit I.
+lemma liftsb_inv_unit_sn (f):
+ ∀I,Z2. ⇧*[f] BUnit I ≘ Z2 → Z2 = BUnit I.
/2 width=2 by ext2_inv_unit_sn/ qed-.
-lemma liftsb_inv_pair_sn: ∀f:rtmap. ∀Z2,I,V1. ⇧*[f] BPair I V1 ≘ Z2 →
- ∃∃V2. ⇧*[f] V1 ≘ V2 & Z2 = BPair I V2.
+lemma liftsb_inv_pair_sn (f):
+ ∀Z2,I,V1. ⇧*[f] BPair I V1 ≘ Z2 →
+ ∃∃V2. ⇧*[f] V1 ≘ V2 & Z2 = BPair I V2.
/2 width=1 by ext2_inv_pair_sn/ qed-.
-lemma liftsb_inv_unit_dx: ∀f,I,Z1. ⇧*[f] Z1 ≘ BUnit I → Z1 = BUnit I.
+lemma liftsb_inv_unit_dx (f):
+ ∀I,Z1. ⇧*[f] Z1 ≘ BUnit I → Z1 = BUnit I.
/2 width=2 by ext2_inv_unit_dx/ qed-.
-lemma liftsb_inv_pair_dx: ∀f:rtmap. ∀Z1,I,V2. ⇧*[f] Z1 ≘ BPair I V2 →
- ∃∃V1. ⇧*[f] V1 ≘ V2 & Z1 = BPair I V1.
+lemma liftsb_inv_pair_dx (f):
+ ∀Z1,I,V2. ⇧*[f] Z1 ≘ BPair I V2 →
+ ∃∃V1. ⇧*[f] V1 ≘ V2 & Z1 = BPair I V1.
/2 width=1 by ext2_inv_pair_dx/ qed-.
(* Basic properties *********************************************************)
#I1 #I2 #f1 * -I1 -I2 /3 width=3 by lifts_eq_repl_back, ext2_pair/
qed-.
-lemma liftsb_refl: ∀f. 𝐈❪f❫ → reflexive … (liftsb f).
+lemma liftsb_refl (f): 𝐈❪f❫ → reflexive … (liftsb f).
/3 width=1 by lifts_refl, ext2_refl/ qed.
lemma liftsb_total: ∀I1,f. ∃I2. ⇧*[f] I1 ≘ I2.
/3 width=2 by ext2_unit, ext2_pair, ex_intro/
qed-.
-lemma liftsb_split_trans: ∀f,I1,I2. ⇧*[f] I1 ≘ I2 →
- ∀f1,f2. f2 ⊚ f1 ≘ f →
- ∃∃I. ⇧*[f1] I1 ≘ I & ⇧*[f2] I ≘ I2.
+lemma liftsb_split_trans (f):
+ ∀I1,I2. ⇧*[f] I1 ≘ I2 → ∀f1,f2. f2 ⊚ f1 ≘ f →
+ ∃∃I. ⇧*[f1] I1 ≘ I & ⇧*[f2] I ≘ I2.
#f #I1 #I2 * -I1 -I2 /2 width=3 by ext2_unit, ex2_intro/
#I #V1 #V2 #HV12 #f1 #f2 #Hf elim (lifts_split_trans … HV12 … Hf) -f
/3 width=3 by ext2_pair, ex2_intro/
(* Basic forward lemmas *****************************************************)
-lemma liftsb_fwd_isid: ∀f,I1,I2. ⇧*[f] I1 ≘ I2 → 𝐈❪f❫ → I1 = I2.
+lemma liftsb_fwd_isid (f):
+ ∀I1,I2. ⇧*[f] I1 ≘ I2 → 𝐈❪f❫ → I1 = I2.
#f #I1 #I2 * -I1 -I2 /3 width=3 by lifts_fwd_isid, eq_f2/
qed-.
qed-.
lemma lifts_div4_one: ∀f,Tf,T. ⇧*[⫯f] Tf ≘ T →
- ∀T1. ⇧*[1] T1 ≘ T →
- ∃∃T0. ⇧*[1] T0 ≘ Tf & ⇧*[f] T0 ≘ T1.
+ ∀T1. ⇧[1] T1 ≘ T →
+ ∃∃T0. ⇧[1] T0 ≘ Tf & ⇧*[f] T0 ≘ T1.
/4 width=6 by lifts_div4, at_div_id_dx, at_div_pn/ qed-.
theorem lifts_div3: ∀f2,T,T2. ⇧*[f2] T2 ≘ T → ∀f,T1. ⇧*[f] T1 ≘ T →
qed-.
lemma lifts_trans4_one (f) (T1) (T2):
- ∀T. ⇧*[1]T1 ≘ T → ⇧*[⫯f]T ≘ T2 →
- ∃∃T0. ⇧*[f]T1 ≘ T0 & ⇧*[1]T0 ≘ T2.
+ ∀T. ⇧[1]T1 ≘ T → ⇧*[⫯f]T ≘ T2 →
+ ∃∃T0. ⇧*[f]T1 ≘ T0 & ⇧[1]T0 ≘ T2.
/4 width=6 by lifts_trans, lifts_split_trans, after_uni_one_dx/ qed-.
(* Basic_2A1: includes: lift_conf_O1 lift_conf_be *)
qed-.
lemma lifts_trans_uni (T):
- ∀l1,T1. ⇧*[l1] T1 ≘ T →
- ∀l2,T2. ⇧*[l2] T ≘ T2 → ⇧*[l1+l2] T1 ≘ T2.
+ ∀l1,T1. ⇧[l1] T1 ≘ T →
+ ∀l2,T2. ⇧[l2] T ≘ T2 → ⇧[l1+l2] T1 ≘ T2.
#T #l1 #T1 #HT1 #l2 #T2 #HT2
@(lifts_trans … HT1 … HT2) //
qed-.
lemma teqx_inv_lifts_bi: deliftable2_bi teqx.
/3 width=6 by teqx_inv_lifts_sn, deliftable2_sn_bi/ qed-.
-lemma teqx_lifts_inv_pair_sn (I) (f:rtmap):
- ∀X,T. ⇧*[f]X ≘ T → ∀V. ②[I]V.T ≛ X → ⊥.
+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
]
qed-.
-lemma tweq_inv_abbr_pos_x_lifts_y_y (T) (f:rtmap):
+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
(* GENERIC RELOCATION FOR TERM VECTORS *************************************)
(* Basic_2A1: includes: liftv_nil liftv_cons *)
-inductive liftsv (f:rtmap): relation (list term) ≝
+inductive liftsv (f): relation … ≝
| liftsv_nil : liftsv f (Ⓔ) (Ⓔ)
| liftsv_cons: ∀T1s,T2s,T1,T2.
⇧*[f] T1 ≘ T2 → liftsv f T1s T2s →
liftsv f (T1 ⨮ T1s) (T2 ⨮ T2s)
.
-interpretation "uniform relocation (term vector)"
- 'RLiftStar i T1s T2s = (liftsv (uni i) T1s T2s).
-
interpretation "generic relocation (term vector)"
'RLiftStar f T1s T2s = (liftsv f T1s T2s).
+interpretation "uniform relocation (term vector)"
+ 'RLift i T1s T2s = (liftsv (uni i) T1s T2s).
+
(* Basic inversion lemmas ***************************************************)
-fact liftsv_inv_nil1_aux: ∀f,X,Y. ⇧*[f] X ≘ Y → X = Ⓔ → Y = Ⓔ.
+fact liftsv_inv_nil1_aux (f):
+ ∀X,Y. ⇧*[f] X ≘ Y → X = Ⓔ → Y = Ⓔ.
#f #X #Y * -X -Y //
#T1s #T2s #T1 #T2 #_ #_ #H destruct
qed-.
(* Basic_2A1: includes: liftv_inv_nil1 *)
-lemma liftsv_inv_nil1: ∀f,Y. ⇧*[f] Ⓔ ≘ Y → Y = Ⓔ.
+lemma liftsv_inv_nil1 (f):
+ ∀Y. ⇧*[f] Ⓔ ≘ Y → Y = Ⓔ.
/2 width=5 by liftsv_inv_nil1_aux/ qed-.
-fact liftsv_inv_cons1_aux: ∀f:rtmap. ∀X,Y. ⇧*[f] X ≘ Y →
- ∀T1,T1s. X = T1 ⨮ T1s →
- ∃∃T2,T2s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s &
- Y = T2 ⨮ T2s.
+fact liftsv_inv_cons1_aux (f):
+ ∀X,Y. ⇧*[f] X ≘ Y → ∀T1,T1s. X = T1 ⨮ T1s →
+ ∃∃T2,T2s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s & Y = T2 ⨮ T2s.
#f #X #Y * -X -Y
[ #U1 #U1s #H destruct
| #T1s #T2s #T1 #T2 #HT12 #HT12s #U1 #U1s #H destruct /2 width=5 by ex3_2_intro/
qed-.
(* Basic_2A1: includes: liftv_inv_cons1 *)
-lemma liftsv_inv_cons1: ∀f:rtmap. ∀T1,T1s,Y. ⇧*[f] T1 ⨮ T1s ≘ Y →
- ∃∃T2,T2s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s &
- Y = T2 ⨮ T2s.
+lemma liftsv_inv_cons1 (f):
+ ∀T1,T1s,Y. ⇧*[f] T1 ⨮ T1s ≘ Y →
+ ∃∃T2,T2s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s & Y = T2 ⨮ T2s.
/2 width=3 by liftsv_inv_cons1_aux/ qed-.
-fact liftsv_inv_nil2_aux: ∀f,X,Y. ⇧*[f] X ≘ Y → Y = Ⓔ → X = Ⓔ.
+fact liftsv_inv_nil2_aux (f):
+ ∀X,Y. ⇧*[f] X ≘ Y → Y = Ⓔ → X = Ⓔ.
#f #X #Y * -X -Y //
#T1s #T2s #T1 #T2 #_ #_ #H destruct
qed-.
-lemma liftsv_inv_nil2: ∀f,X. ⇧*[f] X ≘ Ⓔ → X = Ⓔ.
+lemma liftsv_inv_nil2 (f):
+ ∀X. ⇧*[f] X ≘ Ⓔ → X = Ⓔ.
/2 width=5 by liftsv_inv_nil2_aux/ qed-.
-fact liftsv_inv_cons2_aux: ∀f:rtmap. ∀X,Y. ⇧*[f] X ≘ Y →
- ∀T2,T2s. Y = T2 ⨮ T2s →
- ∃∃T1,T1s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s &
- X = T1 ⨮ T1s.
+fact liftsv_inv_cons2_aux (f):
+ ∀X,Y. ⇧*[f] X ≘ Y → ∀T2,T2s. Y = T2 ⨮ T2s →
+ ∃∃T1,T1s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s & X = T1 ⨮ T1s.
#f #X #Y * -X -Y
[ #U2 #U2s #H destruct
| #T1s #T2s #T1 #T2 #HT12 #HT12s #U2 #U2s #H destruct /2 width=5 by ex3_2_intro/
]
qed-.
-lemma liftsv_inv_cons2: ∀f:rtmap. ∀X,T2,T2s. ⇧*[f] X ≘ T2 ⨮ T2s →
- ∃∃T1,T1s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s &
- X = T1 ⨮ T1s.
+lemma liftsv_inv_cons2 (f):
+ ∀X,T2,T2s. ⇧*[f] X ≘ T2 ⨮ T2s →
+ ∃∃T1,T1s. ⇧*[f] T1 ≘ T2 & ⇧*[f] T1s ≘ T2s & X = T1 ⨮ T1s.
/2 width=3 by liftsv_inv_cons2_aux/ qed-.
(* Basic_1: was: lifts1_flat (left to right) *)
-lemma lifts_inv_applv1: ∀f:rtmap. ∀V1s,U1,T2. ⇧*[f] Ⓐ V1s.U1 ≘ T2 →
- ∃∃V2s,U2. ⇧*[f] V1s ≘ V2s & ⇧*[f] U1 ≘ U2 &
- T2 = Ⓐ V2s.U2.
+lemma lifts_inv_applv1 (f):
+ ∀V1s,U1,T2. ⇧*[f] Ⓐ V1s.U1 ≘ T2 →
+ ∃∃V2s,U2. ⇧*[f] V1s ≘ V2s & ⇧*[f] U1 ≘ U2 & T2 = Ⓐ V2s.U2.
#f #V1s elim V1s -V1s
[ /3 width=5 by ex3_2_intro, liftsv_nil/
| #V1 #V1s #IHV1s #T1 #X #H elim (lifts_inv_flat1 … H) -H
]
qed-.
-lemma lifts_inv_applv2: ∀f:rtmap. ∀V2s,U2,T1. ⇧*[f] T1 ≘ Ⓐ V2s.U2 →
- ∃∃V1s,U1. ⇧*[f] V1s ≘ V2s & ⇧*[f] U1 ≘ U2 &
- T1 = Ⓐ V1s.U1.
+lemma lifts_inv_applv2 (f):
+ ∀V2s,U2,T1. ⇧*[f] T1 ≘ Ⓐ V2s.U2 →
+ ∃∃V1s,U1. ⇧*[f] V1s ≘ V2s & ⇧*[f] U1 ≘ U2 & T1 = Ⓐ V1s.U1.
#f #V2s elim V2s -V2s
[ /3 width=5 by ex3_2_intro, liftsv_nil/
| #V2 #V2s #IHV2s #T2 #X #H elim (lifts_inv_flat2 … H) -H
(* Basic properties *********************************************************)
(* Basic_2A1: includes: liftv_total *)
-lemma liftsv_total: ∀f. ∀T1s:list term. ∃T2s. ⇧*[f] T1s ≘ T2s.
+lemma liftsv_total (f):
+ ∀T1s. ∃T2s. ⇧*[f] T1s ≘ T2s.
#f #T1s elim T1s -T1s
[ /2 width=2 by liftsv_nil, ex_intro/
| #T1 #T1s * #T2s #HT12s
qed-.
(* Basic_1: was: lifts1_flat (right to left) *)
-lemma lifts_applv: ∀f:rtmap. ∀V1s,V2s. ⇧*[f] V1s ≘ V2s →
- ∀T1,T2. ⇧*[f] T1 ≘ T2 →
- ⇧*[f] Ⓐ V1s.T1 ≘ Ⓐ V2s.T2.
+lemma lifts_applv (f):
+ ∀V1s,V2s. ⇧*[f] V1s ≘ V2s → ∀T1,T2. ⇧*[f] T1 ≘ T2 →
+ ⇧*[f] Ⓐ V1s.T1 ≘ Ⓐ V2s.T2.
#f #V1s #V2s #H elim H -V1s -V2s /3 width=1 by lifts_flat/
qed.
-lemma liftsv_split_trans: ∀f,T1s,T2s. ⇧*[f] T1s ≘ T2s →
- ∀f1,f2. f2 ⊚ f1 ≘ f →
- ∃∃Ts. ⇧*[f1] T1s ≘ Ts & ⇧*[f2] Ts ≘ T2s.
+lemma liftsv_split_trans (f):
+ ∀T1s,T2s. ⇧*[f] T1s ≘ T2s → ∀f1,f2. f2 ⊚ f1 ≘ f →
+ ∃∃Ts. ⇧*[f1] T1s ≘ Ts & ⇧*[f2] Ts ≘ T2s.
#f #T1s #T2s #H elim H -T1s -T2s
[ /2 width=3 by liftsv_nil, ex2_intro/
| #T1s #T2s #T1 #T2 #HT12 #_ #IH #f1 #f2 #Hf
theorem sex_trans_gen (RN1) (RP1) (RN2) (RP2) (RN) (RP):
∀L1,f.
- (∀g,I,K,n. ⇩*[n] L1 ≘ K.ⓘ[I] → ↑g = ⫱*[n] f → sex_transitive RN1 RN2 RN RN1 RP1 g K I) →
- (∀g,I,K,n. ⇩*[n] L1 ≘ K.ⓘ[I] → ⫯g = ⫱*[n] f → sex_transitive RP1 RP2 RP RN1 RP1 g K I) →
+ (∀g,I,K,n. ⇩[n] L1 ≘ K.ⓘ[I] → ↑g = ⫱*[n] f → sex_transitive RN1 RN2 RN RN1 RP1 g K I) →
+ (∀g,I,K,n. ⇩[n] L1 ≘ K.ⓘ[I] → ⫯g = ⫱*[n] f → sex_transitive RP1 RP2 RP RN1 RP1 g K I) →
∀L0. L1 ⪤[RN1,RP1,f] L0 →
∀L2. L0 ⪤[RN2,RP2,f] L2 →
L1 ⪤[RN,RP,f] L2.
theorem sex_conf (RN1) (RP1) (RN2) (RP2):
∀L,f.
- (∀g,I,K,n. ⇩*[n] L ≘ K.ⓘ[I] → ↑g = ⫱*[n] f → R_pw_confluent2_sex RN1 RN2 RN1 RP1 RN2 RP2 g K I) →
- (∀g,I,K,n. ⇩*[n] L ≘ K.ⓘ[I] → ⫯g = ⫱*[n] f → R_pw_confluent2_sex RP1 RP2 RN1 RP1 RN2 RP2 g K I) →
+ (∀g,I,K,n. ⇩[n] L ≘ K.ⓘ[I] → ↑g = ⫱*[n] f → R_pw_confluent2_sex RN1 RN2 RN1 RP1 RN2 RP2 g K I) →
+ (∀g,I,K,n. ⇩[n] L ≘ K.ⓘ[I] → ⫯g = ⫱*[n] f → R_pw_confluent2_sex RP1 RP2 RN1 RP1 RN2 RP2 g K I) →
pw_confluent2 … (sex RN1 RP1 f) (sex RN2 RP2 f) L.
#RN1 #RP1 #RN2 #RP2 #L elim L -L
[ #f #_ #_ #L1 #H1 #L2 #H2 >(sex_inv_atom1 … H1) >(sex_inv_atom1 … H2) -H2 -H1
(* Advanced properties ******************************************************)
lemma fqup_zeta (b) (p) (I) (G) (K) (V):
- ∀T1,T2. ⇧*[1]T2 ≘ T1 → ❪G,K,ⓑ[p,I]V.T1❫ ⬂+[b] ❪G,K,T2❫.
+ ∀T1,T2. ⇧[1]T2 ≘ T1 → ❪G,K,ⓑ[p,I]V.T1❫ ⬂+[b] ❪G,K,T2❫.
* /4 width=5 by fqup_strap2, fqu_fqup, fqu_drop, fqu_clear, fqu_bind_dx/ qed.
(* Basic_2A1: removed theorems 1: fqup_drop *)
(* Properties with generic slicing for local environments *******************)
-lemma fqup_drops_succ: ∀b,G,K,T,i,L,U. ⇩*[↑i] L ≘ K → ⇧*[↑i] T ≘ U →
+lemma fqup_drops_succ: ∀b,G,K,T,i,L,U. ⇩[↑i] L ≘ K → ⇧[↑i] T ≘ U →
❪G,L,U❫ ⬂+[b] ❪G,K,T❫.
#b #G #K #T #i elim i -i
[ #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK
]
qed.
-lemma fqup_drops_strap1: ∀b,G1,G2,L1,K1,K2,T1,T2,U1,i. ⇩*[i] L1 ≘ K1 → ⇧*[i] T1 ≘ U1 →
+lemma fqup_drops_strap1: ∀b,G1,G2,L1,K1,K2,T1,T2,U1,i. ⇩[i] L1 ≘ K1 → ⇧[i] T1 ≘ U1 →
❪G1,K1,T1❫ ⬂[b] ❪G2,K2,T2❫ → ❪G1,L1,U1❫ ⬂+[b] ❪G2,K2,T2❫.
#b #G1 #G2 #L1 #K1 #K2 #T1 #T2 #U1 *
[ #HLK1 #HTU1 #HT12
]
qed-.
-lemma fqup_lref: ∀b,I,G,L,K,V,i. ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,L,#i❫ ⬂+[b] ❪G,K,V❫.
+lemma fqup_lref: ∀b,I,G,L,K,V,i. ⇩[i] L ≘ K.ⓑ[I]V → ❪G,L,#i❫ ⬂+[b] ❪G,K,V❫.
/2 width=6 by fqup_drops_strap1/ qed.
| ❪G1,L1,V1❫ ⬂*[b] ❪G2,L2,T2❫
| ∧∧ ❪G1,L1.ⓑ[I]V1,T1❫ ⬂*[b] ❪G2,L2,T2❫ & b = Ⓣ
| ∧∧ ❪G1,L1.ⓧ,T1❫ ⬂*[b] ❪G2,L2,T2❫ & b = Ⓕ
- | ∃∃J,L,T. ❪G1,L,T❫ ⬂*[b] ❪G2,L2,T2❫ & ⇧*[1] T ≘ ⓑ[p,I]V1.T1 & L1 = L.ⓘ[J].
+ | ∃∃J,L,T. ❪G1,L,T❫ ⬂*[b] ❪G2,L2,T2❫ & ⇧[1] T ≘ ⓑ[p,I]V1.T1 & L1 = L.ⓘ[J].
#b #p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or5_intro0/
#G #L #T #H elim (fqu_inv_bind1 … H) -H *
[4: #J ] #H1 #H2 #H3 [3,4: #Hb ] #H destruct
∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓑ[p,I]V1.T1 = T2
| ❪G1,L1,V1❫ ⬂* ❪G2,L2,T2❫
| ❪G1,L1.ⓑ[I]V1,T1❫ ⬂* ❪G2,L2,T2❫
- | ∃∃J,L,T. ❪G1,L,T❫ ⬂* ❪G2,L2,T2❫ & ⇧*[1] T ≘ ⓑ[p,I]V1.T1 & L1 = L.ⓘ[J].
+ | ∃∃J,L,T. ❪G1,L,T❫ ⬂* ❪G2,L2,T2❫ & ⇧[1] T ≘ ⓑ[p,I]V1.T1 & L1 = L.ⓘ[J].
#p #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_bind1 … H) -H [1,3,4: * ]
/3 width=1 by and3_intro, or4_intro0, or4_intro1, or4_intro2, or4_intro3/
#_ #H destruct
∨∨ ∧∧ G1 = G2 & L1 = L2 & ⓕ[I]V1.T1 = T2
| ❪G1,L1,V1❫ ⬂*[b] ❪G2,L2,T2❫
| ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫
- | ∃∃J,L,T. ❪G1,L,T❫ ⬂*[b] ❪G2,L2,T2❫ & ⇧*[1] T ≘ ⓕ[I]V1.T1 & L1 = L.ⓘ[J].
+ | ∃∃J,L,T. ❪G1,L,T❫ ⬂*[b] ❪G2,L2,T2❫ & ⇧[1] T ≘ ⓕ[I]V1.T1 & L1 = L.ⓘ[J].
#b #I #G1 #G2 #L1 #L2 #V1 #T1 #T2 #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or4_intro0/
#G #L #T #H elim (fqu_inv_flat1 … H) -H *
[3: #J ] #H1 #H2 #H3 #H destruct
(* Properties with generic slicing for local environments *******************)
-lemma fqus_drops: ∀b,G,L,K,T,U,i. ⇩*[i] L ≘ K → ⇧*[i] T ≘ U →
+lemma fqus_drops: ∀b,G,L,K,T,U,i. ⇩[i] L ≘ K → ⇧[i] T ≘ U →
❪G,L,U❫ ⬂*[b] ❪G,K,T❫.
#b #G #L #K #T #U * /3 width=3 by fqup_drops_succ, fqup_fqus/
#HLK #HTU <(lifts_fwd_isid … HTU) -U // <(drops_fwd_isid … HLK) -K //
| fqu_bind_dx: ∀p,I,G,L,V,T. b = Ⓣ → fqu b G L (ⓑ[p,I]V.T) G (L.ⓑ[I]V) T
| fqu_clear : ∀p,I,G,L,V,T. b = Ⓕ → fqu b G L (ⓑ[p,I]V.T) G (L.ⓧ) T
| fqu_flat_dx: ∀I,G,L,V,T. fqu b G L (ⓕ[I]V.T) G L T
-| fqu_drop : ∀I,G,L,T,U. ⇧*[1] T ≘ U → fqu b G (L.ⓘ[I]) U G L T
+| fqu_drop : ∀I,G,L,T,U. ⇧[1] T ≘ U → fqu b G (L.ⓘ[I]) U G L T
.
interpretation
∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
| ∧∧ G1 = G2 & L1.ⓑ[I]V1 = L2 & U1 = T2 & b = Ⓣ
| ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ
- | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧*[1] T2 ≘ ⓑ[p,I]V1.U1.
+ | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧[1] T2 ≘ ⓑ[p,I]V1.U1.
#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
[ #I #G #L #T #q #J #V0 #U0 #H destruct
| #I #G #L #V #T #q #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or4_intro0/
∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
| ∧∧ G1 = G2 & L1.ⓑ[I]V1 = L2 & U1 = T2 & b = Ⓣ
| ∧∧ G1 = G2 & L1.ⓧ = L2 & U1 = T2 & b = Ⓕ
- | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧*[1] T2 ≘ ⓑ[p,I]V1.U1.
+ | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧[1] T2 ≘ ⓑ[p,I]V1.U1.
/2 width=4 by fqu_inv_bind1_aux/ qed-.
lemma fqu_inv_bind1_true: ∀p,I,G1,G2,L1,L2,V1,U1,T2. ❪G1,L1,ⓑ[p,I]V1.U1❫ ⬂ ❪G2,L2,T2❫ →
∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
| ∧∧ G1 = G2 & L1.ⓑ[I]V1 = L2 & U1 = T2
- | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧*[1] T2 ≘ ⓑ[p,I]V1.U1.
+ | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧[1] T2 ≘ ⓑ[p,I]V1.U1.
#p #I #G1 #G2 #L1 #L2 #V1 #U1 #T2 #H elim (fqu_inv_bind1 … H) -H
/3 width=1 by or3_intro0, or3_intro2/
* #HG #HL #HU #H destruct
∀I,V1,U1. T1 = ⓕ[I]V1.U1 →
∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
| ∧∧ G1 = G2 & L1 = L2 & U1 = T2
- | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧*[1] T2 ≘ ⓕ[I]V1.U1.
+ | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧[1] T2 ≘ ⓕ[I]V1.U1.
#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
[ #I #G #L #T #J #V0 #U0 #H destruct
| #I #G #L #V #T #J #V0 #U0 #H destruct /3 width=1 by and3_intro, or3_intro0/
lemma fqu_inv_flat1: ∀b,I,G1,G2,L1,L2,V1,U1,T2. ❪G1,L1,ⓕ[I]V1.U1❫ ⬂[b] ❪G2,L2,T2❫ →
∨∨ ∧∧ G1 = G2 & L1 = L2 & V1 = T2
| ∧∧ G1 = G2 & L1 = L2 & U1 = T2
- | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧*[1] T2 ≘ ⓕ[I]V1.U1.
+ | ∃∃J. G1 = G2 & L1 = L2.ⓘ[J] & ⇧[1] T2 ≘ ⓕ[I]V1.U1.
/2 width=4 by fqu_inv_flat1_aux/ qed-.
(* Advanced inversion lemmas ************************************************)
(* Advanced properties ******************************************************)
(* Basic_2A1: was: aaa_lref *)
-lemma aaa_lref_drops: ∀I,G,K,V,B,i,L. ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ⁝ B → ❪G,L❫ ⊢ #i ⁝ B.
+lemma aaa_lref_drops: ∀I,G,K,V,B,i,L. ⇩[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ⁝ B → ❪G,L❫ ⊢ #i ⁝ B.
#I #G #K #V #B #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H //
#H destruct /2 width=1 by aaa_zero/
(* Basic_2A1: was: aaa_inv_lref *)
lemma aaa_inv_lref_drops: ∀G,A,i,L. ❪G,L❫ ⊢ #i ⁝ A →
- ∃∃I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ V ⁝ A.
+ ∃∃I,K,V. ⇩[i] L ≘ K.ⓑ[I]V & ❪G,K❫ ⊢ V ⁝ A.
#G #A #i elim i -i
[ #L #H elim (aaa_inv_zero … H) -H /3 width=5 by drops_refl, ex2_3_intro/
| #i #IH #L #H elim (aaa_inv_lref … H) -H
qed-.
lemma aaa_pair_inv_lref (G) (L) (i):
- ∀A. ❪G,L❫ ⊢ #i ⁝ A → ∀I,K,V. ⇩*[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ⁝ A.
+ ∀A. ❪G,L❫ ⊢ #i ⁝ A → ∀I,K,V. ⇩[i] L ≘ K.ⓑ[I]V → ❪G,K❫ ⊢ V ⁝ A.
#G #L #i #A #H #I #K #V #HLK
elim (aaa_inv_lref_drops … H) -H #J #Y #X #HLY #HX
lapply (drops_mono … HLY … HLK) -L -i #H destruct //
lemma frees_pair_drops:
∀f,K,V. K ⊢ 𝐅+❪V❫ ≘ f →
- ∀i,I,L. ⇩*[i] L ≘ K.ⓑ[I]V → L ⊢ 𝐅+❪#i❫ ≘ ⫯*[i] ↑f.
+ ∀i,I,L. ⇩[i] L ≘ K.ⓑ[I]V → L ⊢ 𝐅+❪#i❫ ≘ ⫯*[i] ↑f.
#f #K #V #Hf #i elim i -i
[ #I #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_pair/
| #i #IH #I #L #H elim (drops_inv_succ … H) -H /3 width=2 by frees_lref/
qed.
lemma frees_unit_drops:
- ∀f. 𝐈❪f❫ → ∀I,K,i,L. ⇩*[i] L ≘ K.ⓤ[I] →
+ ∀f. 𝐈❪f❫ → ∀I,K,i,L. ⇩[i] L ≘ K.ⓤ[I] →
L ⊢ 𝐅+❪#i❫ ≘ ⫯*[i] ↑f.
#f #Hf #I #K #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_unit/
lemma frees_lref_pushs:
∀f,K,j. K ⊢ 𝐅+❪#j❫ ≘ f →
- ∀i,L. ⇩*[i] L ≘ K → L ⊢ 𝐅+❪#(i+j)❫ ≘ ⫯*[i] f.
+ ∀i,L. ⇩[i] L ≘ K → L ⊢ 𝐅+❪#(i+j)❫ ≘ ⫯*[i] f.
#f #K #j #Hf #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H //
| #i #IH #L #H elim (drops_inv_succ … H) -H
lemma frees_inv_lref_drops:
∀L,i,f. L ⊢ 𝐅+❪#i❫ ≘ f →
∨∨ ∃∃g. ⇩*[Ⓕ,𝐔❨i❩] L ≘ ⋆ & 𝐈❪g❫ & f = ⫯*[i] ↑g
- | ∃∃g,I,K,V. K ⊢ 𝐅+❪V❫ ≘ g & ⇩*[i] L ≘ K.ⓑ[I]V & f = ⫯*[i] ↑g
- | ∃∃g,I,K. ⇩*[i] L ≘ K.ⓤ[I] & 𝐈❪g❫ & f = ⫯*[i] ↑g.
+ | ∃∃g,I,K,V. K ⊢ 𝐅+❪V❫ ≘ g & ⇩[i] L ≘ K.ⓑ[I]V & f = ⫯*[i] ↑g
+ | ∃∃g,I,K. ⇩[i] L ≘ K.ⓤ[I] & 𝐈❪g❫ & f = ⫯*[i] ↑g.
#L elim L -L
[ #i #g | #L #I #IH * [ #g cases I -I [ #I | #I #V ] -IH | #i #g ] ] #H
[ elim (frees_inv_atom … H) -H #f #Hf #H destruct
qed-.
lemma frees_lifts_SO:
- ∀b,L,K. ⇩*[b,𝐔❨1❩] L ≘ K → ∀T,U. ⇧*[1] T ≘ U →
+ ∀b,L,K. ⇩*[b,𝐔❨1❩] L ≘ K → ∀T,U. ⇧[1] T ≘ U →
∀f. K ⊢ 𝐅+❪T❫ ≘ f → L ⊢ 𝐅+❪U❫ ≘ ⫯f.
#b #L #K #HLK #T #U #HTU #f #Hf
@(frees_lifts b … Hf … HTU) // (**) (* auto fails *)
lemma frees_inv_lifts_SO:
∀b,f,L,U. L ⊢ 𝐅+❪U❫ ≘ f →
- ∀K. ⇩*[b,𝐔❨1❩] L ≘ K → ∀T. ⇧*[1] T ≘ U →
+ ∀K. ⇩*[b,𝐔❨1❩] L ≘ K → ∀T. ⇧[1] T ≘ U →
K ⊢ 𝐅+❪T❫ ≘ ⫱f.
#b #f #L #U #H #K #HLK #T #HTU elim(frees_inv_lifts_ex … H … HLK … HTU) -b -L -U
#f1 #Hf #Hf1 elim (coafter_inv_nxx … Hf) -Hf
(* Note: this is used by rex_conf and might be modified *)
lemma frees_inv_drops_next:
∀f1,L1,T1. L1 ⊢ 𝐅+❪T1❫ ≘ f1 →
- ∀I2,L2,V2,n. ⇩*[n] L1 ≘ L2.ⓑ[I2]V2 →
- ∀g1. ↑g1 = ⫱*[n] f1 →
+ ∀I2,L2,V2,i. ⇩[i] L1 ≘ L2.ⓑ[I2]V2 →
+ ∀g1. ↑g1 = ⫱*[i] f1 →
∃∃g2. L2 ⊢ 𝐅+❪V2❫ ≘ g2 & g2 ⊆ g1.
#f1 #L1 #T1 #H elim H -f1 -L1 -T1
-[ #f1 #L1 #s #Hf1 #I2 #L2 #V2 #n #_ #g1 #H1 -I2 -L1 -s
- lapply (isid_tls n … Hf1) -Hf1 <H1 -f1 #Hf1
+[ #f1 #L1 #s #Hf1 #I2 #L2 #V2 #j #_ #g1 #H1 -I2 -L1 -s
+ lapply (isid_tls j … Hf1) -Hf1 <H1 -f1 #Hf1
elim (isid_inv_next … Hf1) -Hf1 //
-| #f1 #i #_ #I2 #L2 #V2 #n #H
+| #f1 #i #_ #I2 #L2 #V2 #j #H
elim (drops_inv_atom1 … H) -H #H destruct
| #f1 #I1 #L1 #V1 #Hf1 #IH #I2 #L2 #V2 *
[ -IH #HL12 lapply (drops_fwd_isid … HL12 ?) -HL12 //
#H destruct #g1 #Hgf1 >(injective_next … Hgf1) -g1
/2 width=3 by ex2_intro/
- | -Hf1 #n #HL12 lapply (drops_inv_drop1 … HL12) -HL12
+ | -Hf1 #j #HL12 lapply (drops_inv_drop1 … HL12) -HL12
#HL12 #g1 <tls_xn <tl_next_rew #Hgf1 elim (IH … HL12 … Hgf1) -IH -HL12 -Hgf1
/2 width=3 by ex2_intro/
]
| #f1 #I1 #L1 #Hf1 #I2 #L2 #V2 *
[ #HL12 lapply (drops_fwd_isid … HL12 ?) -HL12 // #H destruct
- | #n #_ #g1 #Hgf1 elim (isid_inv_next … Hgf1) -Hgf1 <tls_xn /2 width=1 by isid_tls/
+ | #j #_ #g1 #Hgf1 elim (isid_inv_next … Hgf1) -Hgf1 <tls_xn /2 width=1 by isid_tls/
]
| #f1 #I1 #L1 #i #_ #IH #I2 #L2 #V2 *
[ -IH #_ #g1 #Hgf1 elim (discr_next_push … Hgf1)
- | #n #HL12 lapply (drops_inv_drop1 … HL12) -HL12
+ | #j #HL12 lapply (drops_inv_drop1 … HL12) -HL12
#HL12 #g1 <tls_xn #Hgf1 elim (IH … HL12 … Hgf1) -IH -HL12 -Hgf1
/2 width=3 by ex2_intro/
]
-| #f1 #L1 #l #Hf1 #I2 #L2 #V2 #n #_ #g1 #H1 -I2 -L1 -l
- lapply (isid_tls n … Hf1) -Hf1 <H1 -f1 #Hf1
+| #f1 #L1 #l #Hf1 #I2 #L2 #V2 #j #_ #g1 #H1 -I2 -L1 -l
+ lapply (isid_tls j … Hf1) -Hf1 <H1 -f1 #Hf1
elim (isid_inv_next … Hf1) -Hf1 //
-| #fV1 #fT1 #f1 #p #I1 #L1 #V1 #T1 #_ #_ #Hf1 #IHV1 #IHT1 #I2 #L2 #V2 #n #HL12 #g1 #Hgf1
- lapply (sor_tls … Hf1 n) -Hf1 <Hgf1 -Hgf1 #Hf1
+| #fV1 #fT1 #f1 #p #I1 #L1 #V1 #T1 #_ #_ #Hf1 #IHV1 #IHT1 #I2 #L2 #V2 #j #HL12 #g1 #Hgf1
+ lapply (sor_tls … Hf1 j) -Hf1 <Hgf1 -Hgf1 #Hf1
elim (sor_xxn_tl … Hf1) [1,2: * |*: // ] -Hf1
#gV1 #gT1 #Hg1
[ -IHT1 #H1 #_ elim (IHV1 … HL12 … H1) -IHV1 -HL12 -H1
| -IHV1 #_ >tls_xn #H2 elim (IHT1 … H2) -IHT1 -H2
/3 width=6 by drops_drop, sor_inv_sle_dx_trans, ex2_intro/
]
-| #fV1 #fT1 #f1 #I1 #L1 #V1 #T1 #_ #_ #Hf1 #IHV1 #IHT1 #I2 #L2 #V2 #n #HL12 #g1 #Hgf1
- lapply (sor_tls … Hf1 n) -Hf1 <Hgf1 -Hgf1 #Hf1
+| #fV1 #fT1 #f1 #I1 #L1 #V1 #T1 #_ #_ #Hf1 #IHV1 #IHT1 #I2 #L2 #V2 #j #HL12 #g1 #Hgf1
+ lapply (sor_tls … Hf1 j) -Hf1 <Hgf1 -Hgf1 #Hf1
elim (sor_xxn_tl … Hf1) [1,2: * |*: // ] -Hf1
#gV1 #gT1 #Hg1
[ -IHT1 #H1 #_ elim (IHV1 … HL12 … H1) -IHV1 -HL12 -H1
(* Advanced properties ******************************************************)
-lemma fsle_lifts_sn: ∀T1,U1. ⇧*[1] T1 ≘ U1 → ∀L1,L2. |L2| ≤ |L1| →
+lemma fsle_lifts_sn: ∀T1,U1. ⇧[1] T1 ≘ U1 → ∀L1,L2. |L2| ≤ |L1| →
∀T2. ❪L1,T1❫ ⊆ ❪L2,T2❫ → ❪L1.ⓧ,U1❫ ⊆ ❪L2,T2❫.
#T1 #U1 #HTU1 #L1 #L2 #H1L #T2
* #n #m #f #g #Hf #Hg #H2L #Hfg
qed-.
lemma fsle_lifts_dx (L1) (L2):
- |L1| ≤ |L2| → ∀T2,U2. ⇧*[1]T2 ≘ U2 →
+ |L1| ≤ |L2| → ∀T2,U2. ⇧[1]T2 ≘ U2 →
∀T1. ❪L1,T1❫ ⊆ ❪L2,T2❫ → ❪L1,T1❫ ⊆ ❪L2.ⓧ,U2❫.
#L1 #L2 #HL21 #T2 #U2 #HTU2 #T1
* #n #m #f #g #Hf #Hg #H2L #Hfg
qed-.
lemma fsle_lifts_SO_sn: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ❪K1,V1❫ ⊆ ❪K2,V2❫ →
- ∀W1. ⇧*[1] V1 ≘ W1 → ∀I1,I2. ❪K1.ⓘ[I1],W1❫ ⊆ ❪K2.ⓑ[I2]V2,#O❫.
+ ∀W1. ⇧[1] V1 ≘ W1 → ∀I1,I2. ❪K1.ⓘ[I1],W1❫ ⊆ ❪K2.ⓑ[I2]V2,#O❫.
#K1 #K2 #HK #V1 #V2
* #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
#W1 #HVW1 #I1 #I2
qed.
lemma fsle_lifts_SO: ∀K1,K2. |K1| = |K2| → ∀T1,T2. ❪K1,T1❫ ⊆ ❪K2,T2❫ →
- ∀U1,U2. ⇧*[1] T1 ≘ U1 → ⇧*[1] T2 ≘ U2 →
+ ∀U1,U2. ⇧[1] T1 ≘ U1 → ⇧[1] T2 ≘ U2 →
∀I1,I2. ❪K1.ⓘ[I1],U1❫ ⊆ ❪K2.ⓘ[I2],U2❫.
#K1 #K2 #HK #T1 #T2
* #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
(* Advanced inversion lemmas ************************************************)
-lemma fsle_inv_lifts_sn: ∀T1,U1. ⇧*[1] T1 ≘ U1 →
+lemma fsle_inv_lifts_sn: ∀T1,U1. ⇧[1] T1 ≘ U1 →
∀I1,I2,L1,L2,V1,V2,U2. ❪L1.ⓑ[I1]V1,U1❫ ⊆ ❪L2.ⓑ[I2]V2,U2❫ →
∀p. ❪L1,T1❫ ⊆ ❪L2,ⓑ[p,I2]V2.U2❫.
#T1 #U1 #HTU1 #I1 #I2 #L1 #L2 #V1 #V2 #U2
C G L (ⒶVs.ⓓ[a]ⓝW.V.T) → C G L (ⒶVs.ⓐV.ⓛ[a]W.T).
definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i.
- C G L (ⒶVs.V2) → ⇧*[↑i] V1 ≘ V2 →
- ⇩*[i] L ≘ K.ⓑ[I]V1 → C G L (ⒶVs.#i).
+ C G L (ⒶVs.V2) → ⇧[↑i] V1 ≘ V2 →
+ ⇩[i] L ≘ K.ⓑ[I]V1 → C G L (ⒶVs.#i).
definition S6 ≝ λRP,C:candidate.
- ∀G,L,V1b,V2b. ⇧*[1] V1b ≘ V2b →
+ ∀G,L,V1b,V2b. ⇧[1] V1b ≘ V2b →
∀a,V,T. C G (L.ⓓV) (ⒶV2b.T) → RP G L V → C G L (ⒶV1b.ⓓ[a]V.T).
definition S7 ≝ λC:candidate.
∀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.
+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.
+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 →
+ ∀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-.
definition f_transitive_next: relation3 … ≝ λR1,R2,R3.
∀f,L,T. L ⊢ 𝐅+❪T❫ ≘ f →
- ∀g,I,K,n. ⇩*[n] L ≘ K.ⓘ[I] → ↑g = ⫱*[n] f →
+ ∀g,I,K,i. ⇩[i] L ≘ K.ⓘ[I] → ↑g = ⫱*[i] f →
sex_transitive (cext2 R1) (cext2 R2) (cext2 R3) (cext2 R1) cfull g K I.
(* Properties with generic slicing for local environments *******************)
qed-.
lemma rex_inv_lref_pair_sn (R):
- ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K1,V1. ⇩*[i] L1 ≘ K1.ⓑ[I]V1 →
- ∃∃K2,V2. ⇩*[i] L2 ≘ K2.ⓑ[I]V2 & K1 ⪤[R,V1] K2 & R K1 V1 V2.
+ ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 →
+ ∃∃K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 & K1 ⪤[R,V1] K2 & R K1 V1 V2.
#R #L1 #L2 #i #HL12 #I #K1 #V1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 //
#Y #HY #HLK2 elim (rex_inv_zero_pair_sn … HY) -HY
#K2 #V2 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/
qed-.
lemma rex_inv_lref_pair_dx (R):
- ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K2,V2. ⇩*[i] L2 ≘ K2.ⓑ[I]V2 →
- ∃∃K1,V1. ⇩*[i] L1 ≘ K1.ⓑ[I]V1 & K1 ⪤[R,V1] K2 & R K1 V1 V2.
+ ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I]V2 →
+ ∃∃K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I]V1 & K1 ⪤[R,V1] K2 & R K1 V1 V2.
#R #L1 #L2 #i #HL12 #I #K2 #V2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 //
#Y #HLK1 #HY elim (rex_inv_zero_pair_dx … HY) -HY
#K1 #V1 #HK12 #HV12 #H destruct /2 width=5 by ex3_2_intro/
lemma rex_inv_lref_pair_bi (R) (L1) (L2) (i):
L1 ⪤[R,#i] L2 →
- ∀I1,K1,V1. ⇩*[i] L1 ≘ K1.ⓑ[I1]V1 →
- ∀I2,K2,V2. ⇩*[i] L2 ≘ K2.ⓑ[I2]V2 →
+ ∀I1,K1,V1. ⇩[i] L1 ≘ K1.ⓑ[I1]V1 →
+ ∀I2,K2,V2. ⇩[i] L2 ≘ K2.ⓑ[I2]V2 →
∧∧ K1 ⪤[R,V1] K2 & R K1 V1 V2 & I1 = I2.
#R #L1 #L2 #i #H12 #I1 #K1 #V1 #H1 #I2 #K2 #V2 #H2
elim (rex_inv_lref_pair_sn … H12 … H1) -L1 #Y2 #X2 #HLY2 #HK12 #HV12
qed-.
lemma rex_inv_lref_unit_sn (R):
- ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K1. ⇩*[i] L1 ≘ K1.ⓤ[I] →
- ∃∃f,K2. ⇩*[i] L2 ≘ K2.ⓤ[I] & K1 ⪤[cext2 R,cfull,f] K2 & 𝐈❪f❫.
+ ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K1. ⇩[i] L1 ≘ K1.ⓤ[I] →
+ ∃∃f,K2. ⇩[i] L2 ≘ K2.ⓤ[I] & K1 ⪤[cext2 R,cfull,f] K2 & 𝐈❪f❫.
#R #L1 #L2 #i #HL12 #I #K1 #HLK1 elim (rex_dropable_sn … HLK1 … HL12 (#0)) -HLK1 -HL12 //
#Y #HY #HLK2 elim (rex_inv_zero_unit_sn … HY) -HY
#f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/
qed-.
lemma rex_inv_lref_unit_dx (R):
- ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K2. ⇩*[i] L2 ≘ K2.ⓤ[I] →
- ∃∃f,K1. ⇩*[i] L1 ≘ K1.ⓤ[I] & K1 ⪤[cext2 R,cfull,f] K2 & 𝐈❪f❫.
+ ∀L1,L2,i. L1 ⪤[R,#i] L2 → ∀I,K2. ⇩[i] L2 ≘ K2.ⓤ[I] →
+ ∃∃f,K1. ⇩[i] L1 ≘ K1.ⓤ[I] & K1 ⪤[cext2 R,cfull,f] K2 & 𝐈❪f❫.
#R #L1 #L2 #i #HL12 #I #K2 #HLK2 elim (rex_dropable_dx … HL12 … HLK2 … (#0)) -HLK2 -HL12 //
#Y #HLK1 #HY elim (rex_inv_zero_unit_dx … HY) -HY
#f #K2 #Hf #HK12 #H destruct /2 width=5 by ex3_2_intro/
class "orange"
[ { "relocation" * } {
[ { "generic and uniform slicing" * } {
- [ [ "for lenvs" ] "drops" + "( ⇩*[?,?] ? ≘ ? )" + "( ⇩*[?] ? ≘ ? )" "drops_ctc" + "drops_ltc" + "drops_weight" + "drops_length" + "drops_cext2" + "drops_sex" + "drops_lex" + "drops_seq" + "drops_drops" + "drops_vector" * ]
+ [ [ "for lenvs" ] "drops" + "( ⇩*[?,?] ? ≘ ? )" + "( ⇩[?] ? ≘ ? )" "drops_ctc" + "drops_ltc" + "drops_weight" + "drops_length" + "drops_cext2" + "drops_sex" + "drops_lex" + "drops_seq" + "drops_drops" + "drops_vector" * ]
}
]
[ { "basic relocation" * } {
}
]
[ { "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 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" * ]
}
]
[ { "syntactic equivalence" * } {