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".
21 (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *************)
23 (* Properties with context-sensitive free variables *************************)
25 (* Note: "⦃L2, T1⦄ ⊆ ⦃L0, T1⦄" may not hold *)
26 axiom cpx_lfxs_conf_fle: ∀R,h. c_reflexive … R →
27 (∨∨ (∀G. (cpx h G) = R) | R_fle_compatible R) →
28 ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
29 ∀L2. L0 ⪤*[R, T0] L2 →
30 ∧∧ ⦃L2, T0⦄ ⊆ ⦃L0, T0⦄ & ⦃L2, T1⦄ ⊆ ⦃L2, T0⦄
31 & ⦃L0, T1⦄ ⊆ ⦃L0, T0⦄.
33 #R #h #H1R #H2R #G #L0 #T0 @(fqup_wf_ind_eq (Ⓕ) … G L0 T0) -G -L0 -T0
34 #G #L #T #IH #G0 #L0 * *
35 [ #s #HG #HL #HT #X #HX #Y #HY destruct -IH
36 lapply (lfxs_fwd_length … HY) -HY #H0
37 elim (cpx_inv_sort1 … HX) -HX #H destruct
38 /3 width=1 by fle_sort_length, and3_intro/
39 | * [| #i ] #HG #HL #HT #X #HX #Y #HY destruct
40 [ elim (cpx_inv_zero1 … HX) -HX
42 elim (lfxs_inv_zero … HY) -HY *
43 [ #H1 #H2 destruct -IH /2 width=1 by and3_intro/
44 | #I #K0 #K2 #V0 #V2 #HK02 #HV02 #H1 #H2 destruct
46 [ <(H2R G0) in HV02; -H2R #HV02
47 elim (IH … HV02 … HK02) /2 width=2 by fqu_fqup, fqu_lref_O/ -IH -HV02 -HK02 #H1V #H2V #H3V
48 | lapply (H2R … HV02) -H2R -HV02 #HV20
49 elim (IH … V0 … HK02) [|*: /2 width=4 by fqu_fqup, fqu_lref_O/ ] -IH -HK02 #H1V #_ #_
51 | #f #I #K0 #K2 #Hf #HK02 #H1 #H2 destruct
53 | * #I0 #K0 #V0 #V1 #HV01 #HV1X #H destruct
54 elim (lfxs_inv_zero_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
56 | elim (cpx_inv_lref1 … HX) -HX
58 elim (lfxs_inv_lref … HY) -HY *
59 [ #H0 #H1 destruct /2 width=1 by and3_intro/
60 | #I0 #I2 #K0 #K2 #HK02 #H1 #H2 destruct
61 lapply (lfxs_fwd_length … HK02) #HK
62 elim (IH … HK02) [|*: /2 width=4 by fqu_fqup/ ] -IH -HK02
63 /3 width=5 by and3_intro, fle_lifts_SO/
65 | * #I0 #K0 #V1 #HV1 #HV1X #H0 destruct
66 elim (lfxs_inv_lref_bind_sn … HY) -HY #I2 #K2 #HK02 #H destruct
67 lapply (lfxs_fwd_length … HK02) #HK
68 elim (IH … HK02) [|*: /2 width=4 by fqu_fqup/ ] -IH -HV1 -HK02
69 /3 width=5 by fle_lifts_SO, and3_intro/
72 | #l #HG #HL #HT #X #HX #Y #HY destruct -IH
73 lapply (lfxs_fwd_length … HY) -HY #H0
74 >(cpx_inv_gref1 … HX) -X
75 /3 width=1 by fle_gref_length, and3_intro/
76 | #p #I #V0 #T0 #HG #HL #HT #X #HX #Y #HY destruct
77 lapply (lfxs_fwd_length … HY) #H0
78 elim (lfxs_inv_bind … V0 ? HY) -HY // #HV0 #HT0
79 elim (cpx_inv_bind1 … HX) -HX *
80 [ #V1 #T1 #HV01 #HT01 #H destruct
81 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
82 elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
83 /4 width=3 by fle_bind_eq, fle_fwd_pair_sn, and3_intro/
84 | #T #HT #HXT #H1 #H2 destruct
85 elim (IH G0 … V0… V0 … HV0) -HV0 // #H1V #H2V #H3V
86 elim (IH … HT … HT0) -HT -HT0 -IH // #H1T #H2T #H3T
87 /3 width=5 by fle_bind, fle_inv_lifts_sn, and3_intro/
89 | #I #V0 #X0 #HG #HL #HT #X #HX #Y #HY destruct
90 elim (lfxs_inv_flat … HY) -HY #HV0 #HX0
91 elim (cpx_inv_flat1 … HX) -HX *
92 [ #V1 #T1 #HV01 #HT01 #H destruct
93 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
94 elim (IH … HT01 … HX0) -HT01 -HX0 -IH // #H1T #H2T #H3T
95 /3 width=3 by fle_flat, and3_intro/
97 elim (IH G0 … V0… V0 … HV0) -HV0 // #H1V #H2V #H3V
98 elim (IH … HX … HX0) -HX -HX0 -IH // #H1T #H2T #H3T
99 /4 width=3 by fle_flat_sn, fle_flat_dx_dx, fle_flat_dx_sn, and3_intro/
101 elim (IH … HX … HV0) -HX -HV0 // #H1V #H2V #H3V
102 elim (IH G0 … X0… X0 … HX0) -HX0 -IH // #H1T #H2T #H3T
103 /4 width=3 by fle_flat_sn, fle_flat_dx_dx, fle_flat_dx_sn, and3_intro/
104 | #p #V1 #W0 #W1 #T0 #T1 #HV01 #HW01 #HT01 #H1 #H2 #H3 destruct
105 elim (lfxs_inv_bind … W0 ? HX0) -HX0 // #HW0 #HT0
106 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
107 elim (IH … HW01 … HW0) -HW01 -HW0 // #H1W #H2W #H3W
108 elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
109 lapply (fle_fwd_pair_sn … H2T) -H2T #H2T
110 lapply (fle_fwd_pair_sn … H3T) -H3T #H3T
111 @and3_intro [ /3 width=5 by fle_flat, fle_bind/ ] (**) (* full auto too slow *)
112 @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/
113 | #p #V1 #X1 #W0 #W1 #T0 #T1 #HV01 #HVX1 #HW01 #HT01 #H1 #H2 #H3 destruct
114 elim (lfxs_inv_bind … W0 ? HX0) -HX0 // #HW0 #HT0
115 elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
116 elim (IH … HW01 … HW0) -HW01 -HW0 // #H1W #H2W #H3W
117 elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
118 lapply (fle_fwd_pair_sn … H2T) -H2T #H2T
119 lapply (fle_fwd_pair_sn … H3T) -H3T #H3T
120 @and3_intro[ /3 width=5 by fle_flat, fle_bind/ ] (**) (* full auto too slow *)
122 [1,3: /3 width=1 by fle_flat_dx_dx, fle_bind_dx_sn/
123 |2,4: /4 width=3 by fle_flat_sn, fle_flat_dx_sn, fle_flat_dx_dx, fle_shift, fle_lifts_sn/