1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/multiple/frees_lreq.ma".
16 include "basic_2/multiple/frees_lift.ma".
18 include "basic_2/relocation/drops_lexs.ma".
19 include "basic_2/s_computation/fqup_weight.ma".
20 include "basic_2/static/frees_drops.ma".
21 include "basic_2/rt_transition/cpx_drops.ma".
23 (* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****)
25 (* Properties with context-sensitive free variables *************************)
27 axiom pippo: ∀RN,RP,L1,i. ⬇*[Ⓕ, 𝐔❴i❵] L1 ≡ ⋆ →
28 ∀f,L2. L1 ⦻*[RN, RP, f] L2 →
31 #RN #RP #L1 #i #H1 #f #L2 #H2
32 lapply (lexs_co_dropable_sn … H1 … H2) // -HL1 -H2
35 lemma coafter_uni_sn: ∀i,f. 𝐔❴i❵ ~⊚ f ≡ ↑*[i] f.
36 #i elim i -i /2 width=5 by coafter_isid_sn, coafter_next/
39 lemma sle_pushs: ∀f1,f2. f1 ⊆ f2 → ∀i. ↑*[i] f1 ⊆ ↑*[i] f2.
40 #f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_push/
43 axiom monotonic_sle_sor: ∀f1,g1. f1 ⊆ g1 → ∀f2,g2. f2 ⊆ g2 →
44 ∀f. f1 ⋓ f2 ≡ f → ∀g. g1 ⋓ g2 ≡ g → f ⊆ g.
46 axiom sle_tl: ∀f1,f2. f1 ⊆ f2 → ⫱f1 ⊆ ⫱f2.
48 axiom frees_inv_lifts_SO: ∀b,f,L,U. L ⊢ 𝐅*⦃U⦄ ≡ f →
49 ∀K. ⬇*[b, 𝐔❴1❵] L ≡ K → ∀T. ⬆*[1] T ≡ U →
52 (* Basic_2A1: was: lpx_cpx_frees_trans *)
53 lemma cpx_frees_trans_lexs: ∀h,G,L1,T1,f1. L1 ⊢ 𝐅*⦃T1⦄ ≡ f1 →
54 ∀L2. L1 ⦻*[cpx h G, cfull, f1] L2 →
55 ∀T2. ⦃G, L1⦄ ⊢ T1 ⬈[h] T2 →
56 ∃∃f2. L2 ⊢ 𝐅*⦃T2⦄ ≡ f2 & f2 ⊆ f1.
57 #h #G #L1 #T1 @(fqup_wf_ind_eq … G L1 T1) -G -L1 -T1
58 #G0 #L0 #U0 #IH #G #L1 * *
59 [ -IH #s #HG #HL #HU #g1 #H1 #L2 #_ #U2 #H0 destruct
60 lapply (frees_inv_sort … H1) -H1 #Hg1
61 elim (cpx_inv_sort1 … H0) -H0 #H destruct
62 /3 width=3 by frees_sort_gen, sle_refl, ex2_intro/
63 | #i #HG #HL #HU #g1 #H1 #L2 #H2 #U2 #H0 destruct
64 elim (frees_inv_lref_drops … H1) -H1 *
66 elim (cpx_inv_lref1_drops … H0) -H0
67 [ #H destruct lapply (pippo … HL1 … H2) -HL1 -H2
68 /3 width=3 by frees_lref_atom, sle_refl, ex2_intro/
69 | * -H2 -Hg1 #I #K1 #V1 #V2 #HLK1
70 lapply (drops_TF … HLK1) -HLK1 #HLK1
71 lapply (drops_mono … HLK1 … HL1) -L1 #H destruct
73 | #f1 #I #K1 #V1 #Hf1 #HLK1 #H destruct
74 elim (cpx_inv_lref1_drops … H0) -H0
76 elim (lexs_drops_conf_next … H2 … HLK1) -H2 [ |*: // ] #K2 #V2 #HLK2 #HK12 #HV12
77 elim (IH … Hf1 … HK12 … HV12) /2 width=2 by fqup_lref/ -L1 -K1 -V1 #f2 #Hf2 #Hf21
78 /4 width=7 by frees_lref_pushs, frees_lref_pair, drops_refl, sle_next, ex2_intro, sle_pushs/
79 | * #J #Y #X #V2 #H #HV12 #HVU2
80 lapply (drops_mono … H … HLK1) -H #H destruct
81 elim (lexs_drops_conf_next … H2 … HLK1) -H2 [ |*: // ] #K2 #V0 #HLK2 #HK12 #_
82 lapply (drops_isuni_fwd_drop2 … HLK2) // -V0 #HLK2
83 elim (IH … Hf1 … HK12 … HV12) /2 width=2 by fqup_lref/ -I -L1 -K1 -V1 #f2 #Hf2 #Hf21
84 lapply (frees_lifts … Hf2 … HLK2 … HVU2 ??) /4 width=7 by sle_weak, ex2_intro, sle_pushs/
87 | -IH #l #HG #HL #HU #g1 #H1 #L2 #_ #U2 #H0 destruct
88 lapply (frees_inv_gref … H1) -H1 #Hg1
89 lapply (cpx_inv_gref1 … H0) -H0 #H destruct
90 /3 width=3 by frees_gref_gen, sle_refl, ex2_intro/
91 | #p #I #V1 #T1 #HG #HL #HU #g1 #H1 #L2 #H2 #U2 #H0 destruct
92 elim (frees_inv_bind … H1) -H1 #gV1 #gT1 #HgV1 #HgT1 #Hg1
93 elim (cpx_inv_bind1 … H0) -H0 *
94 [ #V2 #T2 #HV12 #HT12 #H destruct
95 lapply (sle_lexs_trans … H2 gV1 ?) /2 width=2 by sor_inv_sle_sn/ #HL12V
96 lapply (sle_lexs_trans … H2 (⫱gT1) ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
97 lapply (lexs_inv_tl … I … HL12T … HV12 ?) // -HL12T #HL12T
98 elim (IH … HgV1 … HL12V … HV12) // -HgV1 -HL12V -HV12 #gV2 #HgV2 #HgV21
99 elim (IH … HgT1 … HL12T … HT12) // -IH -HgT1 -HL12T -HT12 #gT2 #HgT2 #HgT21
100 elim (sor_isfin_ex gV2 (⫱gT2)) /3 width=3 by frees_fwd_isfin, isfin_tl/
101 /4 width=10 by frees_bind, monotonic_sle_sor, sle_tl, ex2_intro/
102 | #T2 #HT12 #HUT2 #H0 #H1 destruct -HgV1
103 lapply (sle_lexs_trans … H2 (⫱gT1) ?) /2 width=2 by sor_inv_sle_dx/ -H2 #HL12T
104 lapply (lexs_inv_tl … Abbr … V1 V1 HL12T ??) // -HL12T #HL12T
105 elim (IH … HgT1 … HL12T … HT12) // -IH -HgT1 -HL12T -HT12 #gT2 #HgT2 #HgT21
106 lapply (frees_inv_lifts_SO (Ⓣ) … HgT2 … L2 … HUT2) [ /3 width=1 by drops_refl, drops_drop/ ]
108 lemma cpx_frees_trans: ∀h,o,G. frees_trans (cpx h o G).
109 /2 width=8 by lpx_cpx_frees_trans/ qed-.
111 lemma lpx_frees_trans: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 →
112 ∀U,i. L2 ⊢ i ϵ 𝐅*[0]⦃U⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U⦄.
113 /2 width=8 by lpx_cpx_frees_trans/ qed-.