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/fle_drops.ma".
16 include "basic_2/static/fle_fqup.ma".
17 include "basic_2/static/fle_fle.ma".
18 include "basic_2/static/lfxs_length.ma".
19 include "basic_2/rt_transition/cpx.ma".
22 lemma fle_zero_bi: ∀K1,K2. |K1| = |K2| → ∀V1,V2. ⦃K1, V1⦄ ⊆ ⦃K2, V2⦄ →
23 ∀I1,I2. ⦃K1.ⓑ{I1}V1, #O⦄ ⊆ ⦃K2.ⓑ{I2}V2, #O⦄.
25 * #n1 #n2 #f1 #f2 #Hf1 #Hf2 #HK12 #Hf12
27 elim (lveq_inj_length … HK12) // -HK #H1 #H2 destruct
28 /3 width=12 by frees_pair, lveq_bind, sle_next, ex4_4_intro/
31 (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *************)
33 (* Properties with context-sensitive free variables *************************)
35 (* Note: "⦃L2, T1⦄ ⊆ ⦃L0, T1⦄" may not hold *)
36 axiom cpx_lfxs_conf_fle: ∀R,h. c_reflexive … R →
37 (∨∨ (∀G. (cpx h G) = R) | R_fle_compatible R) →
38 ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
39 ∀L2. L0 ⪤*[R, T0] L2 →
40 ∧∧ ⦃L2, T0⦄ ⊆ ⦃L0, T0⦄ & ⦃L2, T1⦄ ⊆ ⦃L2, T0⦄
41 & ⦃L0, T1⦄ ⊆ ⦃L0, T0⦄.
43 #R #h #H1R #H2R #G #L0 #T0 @(fqup_wf_ind_eq (Ⓕ) … G L0 T0) -G -L0 -T0
44 #G #L #T #IH #G0 #L0 * *
45 [ #s #HG #HL #HT #X #HX #Y #HY destruct -IH
46 lapply (lfxs_fwd_length … HY) -HY #H0
47 elim (cpx_inv_sort1 … HX) -HX #H destruct
48 /3 width=1 by fle_sort_length, and3_intro/
49 | * [| #i ] #HG #HL #HT #X #HX #Y #HY destruct
50 [ elim (cpx_inv_zero1 … HX) -HX
52 elim (lfxs_inv_zero … HY) -HY *
53 [ #H1 #H2 destruct -IH /2 width=1 by and3_intro/
54 | #I #K0 #K2 #V0 #V2 #HK02 #HV02 #H1 #H2 destruct
55 lapply (lfxs_fwd_length … HK02) #HK
57 [ <(H2R G0) in HV02; -H2R #HV02
58 elim (IH … HV02 … HK02) /2 width=2 by fqu_fqup, fqu_lref_O/ -IH -HV02 -HK02 #H1V #H2V #_
59 /4 width=1 by fle_trans_tc, fle_zero_bi, and3_intro/
60 | lapply (H2R … HV02 … HK02) -H2R -HV02 -HK02 -IH #HKV20
61 /3 width=1 by fle_zero_bi, and3_intro/
63 | #f #I #K0 #K2 #Hf #HK02 #H1 #H2 destruct
65 | * #I0 #K0 #V0 #V1 #HV01 #HV1X #H destruct
66 elim (lfxs_inv_zero_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
68 | elim (cpx_inv_lref1 … HX) -HX
70 elim (lfxs_inv_lref … HY) -HY *
71 [ #H0 #H1 destruct /2 width=1 by and3_intro/
72 | #I0 #I2 #K0 #K2 #HK02 #H1 #H2 destruct
73 lapply (lfxs_fwd_length … HK02) #HK
74 elim (IH … HK02) [|*: /2 width=4 by fqu_fqup/ ] -IH -HK02
75 /3 width=5 by and3_intro, fle_lifts_SO/
77 | * #I0 #K0 #V1 #HV1 #HV1X #H0 destruct
78 elim (lfxs_inv_lref_bind_sn … HY) -HY #I2 #K2 #HK02 #H destruct
79 lapply (lfxs_fwd_length … HK02) #HK
80 elim (IH … HK02) [|*: /2 width=4 by fqu_fqup/ ] -IH -HV1 -HK02
81 /3 width=5 by fle_lifts_SO, and3_intro/
84 | #l #HG #HL #HT #X #HX #Y #HY destruct -IH
85 lapply (lfxs_fwd_length … HY) -HY #H0
86 >(cpx_inv_gref1 … HX) -X
87 /3 width=1 by fle_gref_length, and3_intro/
88 | #p #I #V0 #T0 #HG #HL #HT #X #HX #Y #HY destruct
89 lapply (lfxs_fwd_length … HY) #H0
90 elim (lfxs_inv_bind … V0 ? HY) -HY // #HV0 #HT0
91 elim (cpx_inv_bind1 … HX) -HX *
92 [ #V1 #T1 #HV01 #HT01 #H destruct
93 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
94 elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
95 /4 width=3 by fle_bind_eq, fle_fwd_pair_sn, and3_intro/
96 | #T #HT #HXT #H1 #H2 destruct
97 elim (IH G0 … V0… V0 … HV0) -HV0 // #H1V #H2V #H3V
98 elim (IH … HT … HT0) -HT -HT0 -IH // #H1T #H2T #H3T
99 /3 width=5 by fle_bind, fle_inv_lifts_sn, and3_intro/
101 | #I #V0 #X0 #HG #HL #HT #X #HX #Y #HY destruct
102 elim (lfxs_inv_flat … HY) -HY #HV0 #HX0
103 elim (cpx_inv_flat1 … HX) -HX *
104 [ #V1 #T1 #HV01 #HT01 #H destruct
105 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
106 elim (IH … HT01 … HX0) -HT01 -HX0 -IH // #H1T #H2T #H3T
107 /3 width=3 by fle_flat, and3_intro/
109 elim (IH G0 … V0… V0 … HV0) -HV0 // #H1V #H2V #H3V
110 elim (IH … HX … HX0) -HX -HX0 -IH // #H1T #H2T #H3T
111 /4 width=3 by fle_flat_sn, fle_flat_dx_dx, fle_flat_dx_sn, and3_intro/
113 elim (IH … HX … HV0) -HX -HV0 // #H1V #H2V #H3V
114 elim (IH G0 … X0… X0 … HX0) -HX0 -IH // #H1T #H2T #H3T
115 /4 width=3 by fle_flat_sn, fle_flat_dx_dx, fle_flat_dx_sn, and3_intro/
116 | #p #V1 #W0 #W1 #T0 #T1 #HV01 #HW01 #HT01 #H1 #H2 #H3 destruct
117 elim (lfxs_inv_bind … W0 ? HX0) -HX0 // #HW0 #HT0
118 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
119 elim (IH … HW01 … HW0) -HW01 -HW0 // #H1W #H2W #H3W
120 elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
121 lapply (fle_fwd_pair_sn … H2T) -H2T #H2T
122 lapply (fle_fwd_pair_sn … H3T) -H3T #H3T
123 @and3_intro [ /3 width=5 by fle_flat, fle_bind/ ] (**) (* full auto too slow *)
124 @fle_bind_sn_ge /4 width=1 by fle_shift, fle_flat_sn, fle_flat_dx_dx, fle_flat_dx_sn, fle_bind_dx_sn/
125 | #p #V1 #X1 #W0 #W1 #T0 #T1 #HV01 #HVX1 #HW01 #HT01 #H1 #H2 #H3 destruct
126 elim (lfxs_inv_bind … W0 ? HX0) -HX0 // #HW0 #HT0
127 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
128 elim (IH … HW01 … HW0) -HW01 -HW0 // #H1W #H2W #H3W
129 elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
130 lapply (fle_fwd_pair_sn … H2T) -H2T #H2T
131 lapply (fle_fwd_pair_sn … H3T) -H3T #H3T
132 @and3_intro[ /3 width=5 by fle_flat, fle_bind/ ] (**) (* full auto too slow *)
134 [1,3: /3 width=1 by fle_flat_dx_dx, fle_bind_dx_sn/
135 |2,4: /4 width=3 by fle_flat_sn, fle_flat_dx_sn, fle_flat_dx_dx, fle_shift, fle_lifts_sn/