(* v GNU General Public License Version 2 *)
(* *)
(**************************************************************************)
-(*
-include "basic_2/multiple/frees_lreq.ma".
-include "basic_2/multiple/frees_lift.ma".
-*)
-include "basic_2/s_computation/fqup_weight.ma".
+
+include "basic_2/relocation/drops_lexs.ma".
+include "basic_2/static/frees_drops.ma".
+include "basic_2/static/lsubf_frees.ma".
+include "basic_2/static/lfxs.ma".
include "basic_2/rt_transition/cpx_drops.ma".
-include "basic_2/rt_transition/lfpx.ma".
(* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****)
-(* Properties with context-sensitive free variables ***************************)
+(* Properties with context-sensitive free variables *************************)
-lemma lpx_cpx_frees_fwd_sge: ∀h,G,L1,U1,U2. ⦃G, L1⦄ ⊢ U1 ⬈[h] U2 →
- ∀L2. ⦃G, L1⦄ ⊢ ⬈[h, U1] L2 →
- ∀g1. L1 ⊢ 𝐅*⦃U1⦄ ≡ g1 → ∀g2. L2 ⊢ 𝐅*⦃U2⦄ ≡ g2 →
- g2 ⊆ g1.
-#h #G #L1 #U1 @(fqup_wf_ind_eq … G L1 U1) -G -L1 -U1
+(* Basic_2A1: uses: lpx_cpx_frees_trans *)
+lemma cpx_frees_conf_lfpx: ∀h,G,L1,T1,f1. L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 →
+ ∀L2. L1 ⪤*[cpx h G, cfull, f1] L2 →
+ ∀T2. ⦃G, L1⦄ ⊢ T1 ⬈[h] T2 →
+ ∃∃f2. L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & f2 ⊆ f1.
+#h #G #L1 #T1 @(fqup_wf_ind_eq … G L1 T1) -G -L1 -T1
#G0 #L0 #U0 #IH #G #L1 * *
-[ #s #HG #HL #HU #U2 #H0 #L2 #_ #g1 #H1 #g2 #H2 -IH -G0 -L0 -U0
+[ -IH #s #HG #HL #HU #g1 #H1 #L2 #_ #U2 #H0 destruct
+ lapply (frees_inv_sort … H1) -H1 #Hg1
elim (cpx_inv_sort1 … H0) -H0 #H destruct
- /3 width=3 by frees_inv_sort, sle_isid_sn/
-| #i #HG #HL #HU #U2 #H0 #L2 #HL12 #g1 #H1 #g2 #H2 destruct
- elim (cpx_inv_lref1_drops … H0) -H0
- [ #H destruct
- lapply (frees_inv_lref … H1) -H1 #Hg1
- lapply (frees_inv_sort … H2) -H2 #Hg2 /2 width=1 by sle_isid_sn/
-
-
-
-| #l #HG #HL #HU #U2 #H0 #L2 #_ #g1 #H1 #g2 #H2 -IH -G0 -L0 -U0
- lapply (cpx_inv_gref1 … H0) -H0 #H destruct
- /3 width=3 by frees_inv_gref, sle_isid_sn/
-
-| #j #HG #HL #HU #U2 #H1 #L2 #HL12 #i #H2 elim (cpx_inv_lref1 … H1) -H1
- [ #H destruct elim (frees_inv_lref … H2) -H2 //
- * #I #K2 #W2 #Hj #Hji #HLK2 #HW2
- elim (lpx_drop_trans_O1 … HL12 … HLK2) -HL12 #Y #HLK1 #H
- elim (lpx_inv_pair2 … H) -H #K1 #W1 #HK12 #HW12 #H destruct
- /4 width=11 by frees_lref_be, fqup_lref/
- | * #I #K1 #W1 #W0 #HLK1 #HW10 #HW0U2
- lapply (drop_fwd_drop2 … HLK1) #H0
- elim (lpx_drop_conf … H0 … HL12) -H0 -HL12 #K2 #HK12 #HLK2
- elim (ylt_split i (j+1)) >yplus_SO2 #Hji
- [ -IH elim (frees_inv_lift_be … H2 … HLK2 … HW0U2) /2 width=1 by ylt_fwd_succ2/
- | lapply (frees_inv_lift_ge … H2 … HLK2 … HW0U2 ?) -L2 -U2 // destruct
- /4 width=11 by frees_lref_be, fqup_lref, yle_succ1_inj/
+ /3 width=3 by frees_sort_gen, sle_refl, ex2_intro/
+| #i #HG #HL #HU #g1 #H1 #L2 #H2 #U2 #H0 destruct
+ elim (frees_inv_lref_drops … H1) -H1 *
+ [ -IH #HL1 #Hg1
+ elim (cpx_inv_lref1_drops … H0) -H0
+ [ #H destruct
+ /5 width=9 by frees_lref_atom, drops_atom2_lexs_conf, coafter_isuni_isid, sle_refl, ex2_intro/
+ | * -H2 -Hg1 #I #K1 #V1 #V2 #HLK1
+ lapply (drops_TF … HLK1) -HLK1 #HLK1
+ lapply (drops_mono … HLK1 … HL1) -L1 #H destruct
+ ]
+ | #f1 #I #K1 #V1 #Hf1 #HLK1 #H destruct
+ elim (cpx_inv_lref1_drops … H0) -H0
+ [ #H destruct
+ elim (lexs_drops_conf_next … H2 … HLK1) -H2 [ |*: // ] #K2 #V2 #HLK2 #HK12 #HV12
+ elim (IH … Hf1 … HK12 … HV12) /2 width=2 by fqup_lref/ -L1 -K1 -V1 #f2 #Hf2 #Hf21
+ /4 width=7 by frees_lref_pushs, frees_lref_pair, drops_refl, sle_next, ex2_intro, sle_pushs/
+ | * #J #Y #X #V2 #H #HV12 #HVU2
+ lapply (drops_mono … H … HLK1) -H #H destruct
+ elim (lexs_drops_conf_next … H2 … HLK1) -H2 [ |*: // ] #K2 #V0 #HLK2 #HK12 #_
+ lapply (drops_isuni_fwd_drop2 … HLK2) // -V0 #HLK2
+ elim (IH … Hf1 … HK12 … HV12) /2 width=2 by fqup_lref/ -I -L1 -K1 -V1 #f2 #Hf2 #Hf21
+ lapply (frees_lifts … Hf2 … HLK2 … HVU2 ??) /4 width=7 by sle_weak, ex2_intro, sle_pushs/
]
]
-| -IH #p #HG #HL #HU #U2 #H1 >(cpx_inv_gref1 … H1) -H1 destruct
- #L2 #_ #i #H2 elim (frees_inv_gref … H2)
-| #a #I #W1 #U1 #HG #HL #HU #X #HX #L2 #HL12 #i #Hi destruct
- elim (cpx_inv_bind1 … HX) -HX *
- [ #W2 #U2 #HW12 #HU12 #H destruct
- elim (frees_inv_bind_O … Hi) -Hi
- /4 width=7 by frees_bind_dx_O, frees_bind_sn, lpx_pair/
- | #U2 #HU12 #HXU2 #H1 #H2 destruct
- lapply (frees_lift_ge … Hi (L2.ⓓW1) (Ⓕ) … HXU2 ?)
- /4 width=7 by frees_bind_dx_O, lpx_pair, drop_drop/
+| -IH #l #HG #HL #HU #g1 #H1 #L2 #_ #U2 #H0 destruct
+ lapply (frees_inv_gref … H1) -H1 #Hg1
+ lapply (cpx_inv_gref1 … H0) -H0 #H destruct
+ /3 width=3 by frees_gref_gen, sle_refl, ex2_intro/
+| #p #I #V1 #T1 #HG #HL #HU #g1 #H1 #L2 #H2 #U2 #H0 destruct
+ elim (frees_inv_bind … H1) -H1 #gV1 #gT1 #HgV1 #HgT1 #Hg1
+ elim (cpx_inv_bind1 … H0) -H0 *
+ [ #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (sle_lexs_trans … H2 gV1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12V
+ lapply (sle_lexs_trans … H2 (⫱gT1) ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
+ lapply (lexs_inv_tl … I … HL12T … HV12 ?) // -HL12T #HL12T
+ elim (IH … HgV1 … HL12V … HV12) // -HgV1 -HL12V -HV12 #gV2 #HgV2 #HgV21
+ elim (IH … HgT1 … HL12T … HT12) // -IH -HgT1 -HL12T -HT12 #gT2 #HgT2 #HgT21
+ elim (sor_isfin_ex gV2 (⫱gT2)) /3 width=3 by frees_fwd_isfin, isfin_tl/
+ /4 width=10 by frees_bind, monotonic_sle_sor, sle_tl, ex2_intro/
+ | #T2 #HT12 #HUT2 #H0 #H1 destruct -HgV1
+ lapply (sle_lexs_trans … H2 (⫱gT1) ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
+ lapply (lexs_inv_tl … Abbr … V1 V1 HL12T ??) // -HL12T #HL12T
+ elim (IH … HgT1 … HL12T … HT12) // -L1 -T1 #gT2 #HgT2 #HgT21
+ lapply (frees_inv_lifts_SO (Ⓣ) … HgT2 … L2 … HUT2) [ /3 width=1 by drops_refl, drops_drop/ ] -V1 -T2
+ /5 width=6 by sor_inv_sle_dx, sle_trans, sle_tl, ex2_intro/
]
-| #I #W1 #X1 #HG #HL #HU #X2 #HX2 #L2 #HL12 #i #Hi destruct
- elim (cpx_inv_flat1 … HX2) -HX2 *
- [ #W2 #U2 #HW12 #HU12 #H destruct
- elim (frees_inv_flat … Hi) -Hi /3 width=7 by frees_flat_dx, frees_flat_sn/
- | #HU12 #H destruct /3 width=7 by frees_flat_dx/
- | #HW12 #H destruct /3 width=7 by frees_flat_sn/
- | #b #W2 #V1 #V2 #U1 #U2 #HW12 #HV12 #HU12 #H1 #H2 #H3 destruct
- elim (frees_inv_bind … Hi) -Hi #Hi
- [ elim (frees_inv_flat … Hi) -Hi
- /4 width=7 by frees_flat_dx, frees_flat_sn, frees_bind_sn/
- | lapply (lreq_frees_trans … Hi (L2.ⓛV2) ?) /2 width=1 by lreq_succ/ -Hi #HU2
- lapply (frees_weak … HU2 0 ?) -HU2
- /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/
- ]
- | #b #W2 #W0 #V1 #V2 #U1 #U2 #HW12 #HW20 #HV12 #HU12 #H1 #H2 #H3 destruct
- elim (frees_inv_bind_O … Hi) -Hi #Hi
- [ /4 width=7 by frees_flat_dx, frees_bind_sn/
- | elim (frees_inv_flat … Hi) -Hi
- [ #HW0 lapply (frees_inv_lift_ge … HW0 L2 (Ⓕ) … HW20 ?) -W0
- /3 width=7 by frees_flat_sn, drop_drop/
- | /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/
- ]
+| #I #V1 #T0 #HG #HL #HU #g1 #H1 #L2 #H2 #U2 #H0 destruct
+ elim (frees_inv_flat … H1) -H1 #gV1 #gT0 #HgV1 #HgT0 #Hg1
+ elim (cpx_inv_flat1 … H0) -H0 *
+ [ #V2 #T2 #HV12 #HT12 #H destruct
+ lapply (sle_lexs_trans … H2 gV1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12V
+ lapply (sle_lexs_trans … H2 gT0 ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
+ elim (IH … HgV1 … HL12V … HV12) // -HgV1 -HL12V -HV12 #gV2 #HgV2 #HgV21
+ elim (IH … HgT0 … HL12T … HT12) // -IH -HgT0 -HL12T -HT12 #gT2 #HgT2 #HgT21
+ elim (sor_isfin_ex gV2 gT2) /2 width=3 by frees_fwd_isfin/
+ /3 width=10 by frees_flat, monotonic_sle_sor, ex2_intro/
+ | #HU2 #H destruct -HgV1
+ lapply (sle_lexs_trans … H2 gT0 ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
+ elim (IH … HgT0 … HL12T … HU2) // -L1 -T0 -V1
+ /4 width=6 by sor_inv_sle_dx, sle_trans, ex2_intro/
+ | #HU2 #H destruct -HgT0
+ lapply (sle_lexs_trans … H2 gV1 ?) /2 width=2 by sor_inv_sle_sn/ -H2 #HL12V
+ elim (IH … HgV1 … HL12V … HU2) // -L1 -T0 -V1
+ /4 width=6 by sor_inv_sle_sn, sle_trans, ex2_intro/
+ | #p #V2 #W1 #W2 #T1 #T2 #HV12 #HW12 #HT12 #H0 #H1 #H destruct
+ elim (frees_inv_bind … HgT0) -HgT0 #gW1 #gT1 #HgW1 #HgT1 #HgT0
+ lapply (sle_lexs_trans … H2 gV1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12V
+ lapply (sle_lexs_trans … H2 gT0 ?) /2 width=2 by sor_inv_sle_dx/ -H2 #H2
+ lapply (sle_lexs_trans … H2 gW1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12W
+ lapply (sle_lexs_trans … H2 (⫱gT1) ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
+ lapply (lexs_inv_tl … Abst … HL12T … HW12 ?) // -HL12T #HL12T
+ elim (sor_isfin_ex gV1 gW1) /2 width=3 by frees_fwd_isfin/ #g0 #Hg0 #_
+ lapply (sor_trans2 … Hg1 … HgT0 … Hg0) -Hg1 -HgT0 #Hg1
+ lapply (sor_sym … Hg0) -Hg0 #Hg0
+ elim (IH … HgV1 … HL12V … HV12) // -HgV1 -HL12V -HV12 #gV2 #HgV2 #HgV21
+ elim (IH … HgW1 … HL12W … HW12) // -HgW1 -HL12W -HW12 #gW2 #HgW2 #HgW21
+ elim (IH … HgT1 … HL12T … HT12) // -IH -HgT1 -HL12T -HT12 #gT2 #HgT2 #HgT21
+ elim (sor_isfin_ex gV2 (⫱gT2)) /3 width=3 by frees_fwd_isfin, isfin_tl/ #gVT2 #HgVT2 #_
+ elim (lsubf_frees_trans … HgT2 (⫯gVT2) … (L2.ⓓⓝW2.V2))
+ [2: /4 width=4 by lsubf_refl, lsubf_beta, sor_inv_sle_dx, sor_inv_sle_sn, sle_inv_tl_sn/ ]
+ -HgT2 #gT0 #HgT0 #HgT20
+ elim (sor_isfin_ex gW2 gV2) /2 width=3 by frees_fwd_isfin/ #gV0 #HgV0 #H
+ elim (sor_isfin_ex gV0 (⫱gT0)) /3 width=3 by frees_fwd_isfin, isfin_tl/ -H #g2 #Hg2 #_
+ @(ex2_intro … g2)
+ [ @(frees_bind … Hg2) /2 width=5 by frees_flat/
+ | -L2 @(sor_inv_sle … Hg2) -Hg2
+ [ /3 width=11 by sor_inv_sle_sn_trans, monotonic_sle_sor/
+ | @sle_xn_tl [2:|*: // ] @(sle_trans … HgT20) -HgT20
+ /4 width=8 by monotonic_sle_sor, sor_inv_sle_dx_trans, sle_tl, sle_next/
+ ] (**) (* full auto too slow *)
]
+ | #p #V2 #V #W1 #W2 #T1 #T2 #HV12 #HV2 #HW12 #HT12 #H0 #H1 #H destruct
+ elim (frees_inv_bind … HgT0) -HgT0 #gW1 #gT1 #HgW1 #HgT1 #HgT0
+ lapply (sle_lexs_trans … H2 gV1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12V
+ lapply (sle_lexs_trans … H2 gT0 ?) /2 width=2 by sor_inv_sle_dx/ -H2 #H2
+ lapply (sle_lexs_trans … H2 gW1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12W
+ lapply (sle_lexs_trans … H2 (⫱gT1) ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
+ lapply (lexs_inv_tl … Abbr … HL12T … HW12 ?) // -HL12T #HL12T
+ elim (sor_isfin_ex gV1 gW1) /2 width=3 by frees_fwd_isfin/ #g0 #Hg0 #_
+ lapply (sor_trans2 … Hg1 … HgT0 … Hg0) -Hg1 -HgT0 #Hg1
+ elim (IH … HgV1 … HL12V … HV12) // -HgV1 -HL12V -HV12 #gV2 #HgV2 #HgV21
+ elim (IH … HgW1 … HL12W … HW12) // -HgW1 -HL12W -HW12 #gW2 #HgW2 #HgW21
+ elim (IH … HgT1 … HL12T … HT12) // -IH -HgT1 -HL12T -HT12 #gT2 #HgT2 #HgT21
+ elim (sor_isfin_ex (↑gV2) gT2) /3 width=3 by frees_fwd_isfin, isfin_push/ #gV0 #HgV0 #H
+ elim (sor_isfin_ex gW2 (⫱gV0)) /3 width=3 by frees_fwd_isfin, isfin_tl/ -H #g2 #Hg2 #_
+ elim (sor_isfin_ex gW2 gV2) /2 width=3 by frees_fwd_isfin/ #g #Hg #_
+ lapply (sor_trans2 … Hg2 … (⫱gT2) … Hg) /2 width=1 by sor_tl/ #Hg2
+ lapply (frees_lifts (Ⓣ) … HgV2 … (L2.ⓓW2) … HV2 ??)
+ [4: lapply (sor_sym … Hg) |*: /3 width=3 by drops_refl, drops_drop/ ] -V2 (**) (* full auto too slow *)
+ /4 width=10 by frees_flat, frees_bind, monotonic_sle_sor, sle_tl, ex2_intro/
]
]
qed-.
-lemma cpx_frees_trans: ∀h,o,G. frees_trans (cpx h o G).
-/2 width=8 by lpx_cpx_frees_trans/ qed-.
+(* Basic_2A1: uses: cpx_frees_trans *)
+lemma cpx_frees_conf: ∀h,G. R_frees_confluent (cpx h G).
+/3 width=7 by cpx_frees_conf_lfpx, lexs_refl/ qed-.
-lemma lpx_frees_trans: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 →
- ∀U,i. L2 ⊢ i ϵ 𝐅*[0]⦃U⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U⦄.
-/2 width=8 by lpx_cpx_frees_trans/ qed-.
+(* Basic_2A1: uses: lpx_frees_trans *)
+lemma lfpx_frees_conf: ∀h,G. lexs_frees_confluent (cpx h G) cfull.
+/2 width=7 by cpx_frees_conf_lfpx/ qed-.