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/static/fsle_drops.ma".
16 include "basic_2/static/lfxs_fsle.ma".
17 include "basic_2/rt_transition/lfpx_length.ma".
18 include "basic_2/rt_transition/lfpx_fqup.ma".
20 (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *************)
22 (* Forward lemmas with free variables inclusion for restricted closures *****)
24 (* Note: "⦃L2, T1⦄ ⊆ ⦃L2, T0⦄" does not hold *)
25 (* Note: Take L0 = K0.ⓓ(ⓝW.V), L2 = K0.ⓓW, T0 = #0, T1 = ⬆*[1]V *)
26 (* Note: This invalidates lfpxs_cpx_conf: "∀h,G. s_r_confluent1 … (cpx h G) (lfpxs h G)" *)
27 (* Note: "⦃L2, T1⦄ ⊆ ⦃L0, T1⦄" may not hold *)
28 (* Basic_2A1: uses: lpx_cpx_frees_trans *)
29 lemma lfpx_cpx_conf_fsge: ∀h,G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
30 ∀L2. ⦃G, L0⦄ ⊢⬈[h, T0] L2 → ⦃L2, T1⦄ ⊆ ⦃L0, T0⦄.
31 #h #G0 #L0 #T0 @(fqup_wf_ind_eq (Ⓕ) … G0 L0 T0) -G0 -L0 -T0
32 #G #L #T #IH #G0 #L0 * *
33 [ #s #HG #HL #HT #X #HX #Y #HY destruct -IH
34 elim (cpx_inv_sort1 … HX) -HX #H destruct
35 lapply (lfpx_fwd_length … HY) -HY #H0
36 /2 width=1 by fsle_sort_bi/
37 | * [| #i ] #HG #HL #HT #X #HX #Y #HY destruct
38 [ elim (cpx_inv_zero1 … HX) -HX
40 elim (lfpx_inv_zero_length … HY) -HY *
41 [ #H1 #H2 destruct -IH //
42 | #I #K0 #K2 #V0 #V2 #HK02 #HV02 #H1 #H2 destruct
43 lapply (lfpx_fwd_length … HK02) #H0
44 /4 width=4 by fsle_pair_bi, fqu_fqup, fqu_lref_O/
45 | #I #K0 #K2 #HK02 #H1 #H2 destruct -IH
46 /2 width=1 by fsle_unit_bi/
48 | * #I0 #K0 #V0 #V1 #HV01 #HV1X #H destruct
49 elim (lfpx_inv_zero_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
50 lapply (lfpx_fwd_length … HK02) #H0
51 /4 width=4 by fsle_lifts_SO_sn, fqu_fqup, fqu_lref_O/
53 | elim (cpx_inv_lref1 … HX) -HX
55 elim (lfpx_inv_lref … HY) -HY *
57 | #I0 #I2 #K0 #K2 #HK02 #H1 #H2 destruct
58 lapply (lfpx_fwd_length … HK02) #H0
59 /4 width=5 by fsle_lifts_SO, fqu_fqup/
61 | * #I0 #K0 #V1 #HV1 #HV1X #H0 destruct
62 elim (lfpx_inv_lref_bind_sn … HY) -HY #I2 #K2 #HK02 #H destruct
63 lapply (lfpx_fwd_length … HK02) #H0
64 /4 width=5 by fsle_lifts_SO, fqu_fqup/
67 | #l #HG #HL #HT #X #HX #Y #HY destruct -IH
68 >(cpx_inv_gref1 … HX) -X
69 lapply (lfpx_fwd_length … HY) -HY #H0
70 /2 width=1 by fsle_gref_bi/
71 | #p #I #V0 #T0 #HG #HL #HT #X #HX #Y #HY destruct
72 elim (lfpx_inv_bind … V0 ? HY) -HY #HV0 #HT0
73 elim (cpx_inv_bind1 … HX) -HX *
74 [ #V1 #T1 #HV01 #HT01 #H destruct
75 lapply (lfpx_fwd_length … HV0) #H0
76 /4 width=6 by fsle_bind_eq, fsle_fwd_pair_sn/
77 | #T #HT #HXT #H1 #H2 destruct
78 lapply (lfpx_fwd_length … HV0) #H0
79 /3 width=8 by fsle_inv_lifts_sn/
81 | #I #V0 #X0 #HG #HL #HT #X #HX #Y #HY destruct
82 elim (lfxs_inv_flat … HY) -HY #HV0 #HX0
83 elim (cpx_inv_flat1 … HX) -HX *
84 [ #V1 #T1 #HV01 #HT01 #H destruct
85 /3 width=4 by fsle_flat/
87 /4 width=4 by fsle_flat_dx_dx/
89 /4 width=4 by fsle_flat_dx_sn/
90 | #p #V1 #W0 #W1 #T0 #T1 #HV01 #HW01 #HT01 #H1 #H2 #H3 destruct
91 elim (lfpx_inv_bind … W0 ? HX0) -HX0 #HW0 #HT0
92 lapply (lfpx_fwd_length … HV0) #H0
93 lapply (IH … HV01 … HV0) -HV01 -HV0 // #HV
94 lapply (IH … HW01 … HW0) -HW01 -HW0 // #HW
95 lapply (IH … HT01 … HT0) -HT01 -HT0 -IH // #HT
96 lapply (fsle_fwd_pair_sn … HT) -HT #HT
98 [ /4 width=1 by fsle_flat_sn, fsle_flat_dx_dx, fsle_flat_dx_sn, fsle_bind_dx_sn/
99 | /3 width=1 by fsle_flat_dx_dx, fsle_shift/
101 | #p #V1 #X1 #W0 #W1 #T0 #T1 #HV01 #HVX1 #HW01 #HT01 #H1 #H2 #H3 destruct
102 elim (lfpx_inv_bind … W0 ? HX0) -HX0 #HW0 #HT0
103 lapply (lfpx_fwd_length … HV0) #H0
104 lapply (IH … HV01 … HV0) -HV01 -HV0 // #HV
105 lapply (IH … HW01 … HW0) -HW01 -HW0 // #HW
106 lapply (IH … HT01 … HT0) -HT01 -HT0 -IH // #HT
107 lapply (fsle_fwd_pair_sn … HT) -HT #HT
109 [ /3 width=1 by fsle_flat_dx_dx, fsle_bind_dx_sn/
110 | /4 width=3 by fsle_flat_sn, fsle_flat_dx_sn, fsle_flat_dx_dx, fsle_shift, fsle_lifts_sn/
116 (* Basic_2A1: uses: cpx_frees_trans *)
117 lemma cpx_fsge_comp: ∀h,G. R_fsge_compatible (cpx h G).
118 /2 width=4 by lfpx_cpx_conf_fsge/ qed-.
120 (* Basic_2A1: uses: lpx_frees_trans *)
121 lemma lfpx_fsge_comp: ∀h,G. lfxs_fsge_compatible (cpx h G).
122 /2 width=4 by lfpx_cpx_conf_fsge/ qed-.
124 (* Properties with generic extension on referred entries ********************)
126 (* Note: lemma 1000 *)
127 (* Basic_2A1: uses: cpx_llpx_sn_conf *)
128 lemma cpx_lfxs_conf: ∀R,h,G. s_r_confluent1 … (cpx h G) (lfxs R).
129 /3 width=3 by fsge_lfxs_trans, cpx_fsge_comp/ qed-.
131 (* Advanced properties ******************************************************)
133 lemma lfpx_cpx_conf: ∀h,G. s_r_confluent1 … (cpx h G) (lfpx h G).
134 /2 width=5 by cpx_lfxs_conf/ qed-.