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/s_computation/fqup_weight.ma".
19 include "basic_2/rt_transition/cpx_drops.ma".
20 include "basic_2/rt_transition/lfpx.ma".
22 (* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****)
24 (* Properties with context-sensitive free variables ***************************)
26 lemma lpx_cpx_frees_fwd_sge: ∀h,G,L1,U1,U2. ⦃G, L1⦄ ⊢ U1 ⬈[h] U2 →
27 ∀L2. ⦃G, L1⦄ ⊢ ⬈[h, U1] L2 →
28 ∀g1. L1 ⊢ 𝐅*⦃U1⦄ ≡ g1 → ∀g2. L2 ⊢ 𝐅*⦃U2⦄ ≡ g2 →
30 #h #G #L1 #U1 @(fqup_wf_ind_eq … G L1 U1) -G -L1 -U1
31 #G0 #L0 #U0 #IH #G #L1 * *
32 [ #s #HG #HL #HU #U2 #H0 #L2 #_ #g1 #H1 #g2 #H2 -IH -G0 -L0 -U0
33 elim (cpx_inv_sort1 … H0) -H0 #H destruct
34 /3 width=3 by frees_inv_sort, sle_isid_sn/
35 | #i #HG #HL #HU #U2 #H0 #L2 #HL12 #g1 #H1 #g2 #H2 destruct
36 elim (cpx_inv_lref1_drops … H0) -H0
38 lapply (frees_inv_lref … H1) -H1 #Hg1
39 lapply (frees_inv_sort … H2) -H2 #Hg2 /2 width=1 by sle_isid_sn/
43 | #l #HG #HL #HU #U2 #H0 #L2 #_ #g1 #H1 #g2 #H2 -IH -G0 -L0 -U0
44 lapply (cpx_inv_gref1 … H0) -H0 #H destruct
45 /3 width=3 by frees_inv_gref, sle_isid_sn/
47 | #j #HG #HL #HU #U2 #H1 #L2 #HL12 #i #H2 elim (cpx_inv_lref1 … H1) -H1
48 [ #H destruct elim (frees_inv_lref … H2) -H2 //
49 * #I #K2 #W2 #Hj #Hji #HLK2 #HW2
50 elim (lpx_drop_trans_O1 … HL12 … HLK2) -HL12 #Y #HLK1 #H
51 elim (lpx_inv_pair2 … H) -H #K1 #W1 #HK12 #HW12 #H destruct
52 /4 width=11 by frees_lref_be, fqup_lref/
53 | * #I #K1 #W1 #W0 #HLK1 #HW10 #HW0U2
54 lapply (drop_fwd_drop2 … HLK1) #H0
55 elim (lpx_drop_conf … H0 … HL12) -H0 -HL12 #K2 #HK12 #HLK2
56 elim (ylt_split i (j+1)) >yplus_SO2 #Hji
57 [ -IH elim (frees_inv_lift_be … H2 … HLK2 … HW0U2) /2 width=1 by ylt_fwd_succ2/
58 | lapply (frees_inv_lift_ge … H2 … HLK2 … HW0U2 ?) -L2 -U2 // destruct
59 /4 width=11 by frees_lref_be, fqup_lref, yle_succ1_inj/
62 | -IH #p #HG #HL #HU #U2 #H1 >(cpx_inv_gref1 … H1) -H1 destruct
63 #L2 #_ #i #H2 elim (frees_inv_gref … H2)
64 | #a #I #W1 #U1 #HG #HL #HU #X #HX #L2 #HL12 #i #Hi destruct
65 elim (cpx_inv_bind1 … HX) -HX *
66 [ #W2 #U2 #HW12 #HU12 #H destruct
67 elim (frees_inv_bind_O … Hi) -Hi
68 /4 width=7 by frees_bind_dx_O, frees_bind_sn, lpx_pair/
69 | #U2 #HU12 #HXU2 #H1 #H2 destruct
70 lapply (frees_lift_ge … Hi (L2.ⓓW1) (Ⓕ) … HXU2 ?)
71 /4 width=7 by frees_bind_dx_O, lpx_pair, drop_drop/
73 | #I #W1 #X1 #HG #HL #HU #X2 #HX2 #L2 #HL12 #i #Hi destruct
74 elim (cpx_inv_flat1 … HX2) -HX2 *
75 [ #W2 #U2 #HW12 #HU12 #H destruct
76 elim (frees_inv_flat … Hi) -Hi /3 width=7 by frees_flat_dx, frees_flat_sn/
77 | #HU12 #H destruct /3 width=7 by frees_flat_dx/
78 | #HW12 #H destruct /3 width=7 by frees_flat_sn/
79 | #b #W2 #V1 #V2 #U1 #U2 #HW12 #HV12 #HU12 #H1 #H2 #H3 destruct
80 elim (frees_inv_bind … Hi) -Hi #Hi
81 [ elim (frees_inv_flat … Hi) -Hi
82 /4 width=7 by frees_flat_dx, frees_flat_sn, frees_bind_sn/
83 | lapply (lreq_frees_trans … Hi (L2.ⓛV2) ?) /2 width=1 by lreq_succ/ -Hi #HU2
84 lapply (frees_weak … HU2 0 ?) -HU2
85 /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/
87 | #b #W2 #W0 #V1 #V2 #U1 #U2 #HW12 #HW20 #HV12 #HU12 #H1 #H2 #H3 destruct
88 elim (frees_inv_bind_O … Hi) -Hi #Hi
89 [ /4 width=7 by frees_flat_dx, frees_bind_sn/
90 | elim (frees_inv_flat … Hi) -Hi
91 [ #HW0 lapply (frees_inv_lift_ge … HW0 L2 (Ⓕ) … HW20 ?) -W0
92 /3 width=7 by frees_flat_sn, drop_drop/
93 | /5 width=7 by frees_bind_dx_O, frees_flat_dx, lpx_pair/
100 lemma cpx_frees_trans: ∀h,o,G. frees_trans (cpx h o G).
101 /2 width=8 by lpx_cpx_frees_trans/ qed-.
103 lemma lpx_frees_trans: ∀h,o,G,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, o] L2 →
104 ∀U,i. L2 ⊢ i ϵ 𝐅*[0]⦃U⦄ → L1 ⊢ i ϵ 𝐅*[0]⦃U⦄.
105 /2 width=8 by lpx_cpx_frees_trans/ qed-.