]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpx_etc.ma
update in ground_2 and basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cpx_etc.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/static/fsle_drops.ma".
16 include "basic_2/static/fsle_fqup.ma".
17 include "basic_2/static/fsle_fsle.ma".
18 include "basic_2/static/lfxs_length.ma".
19 include "basic_2/static/lfxs_fsle.ma".
20 include "basic_2/rt_transition/cpx.ma".
21
22 (* UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS *************)
23
24 (* Properties with context-sensitive free variables *************************)
25
26 (* Note: "⦃L2, T1⦄ ⊆ ⦃L0, T1⦄" may not hold *)
27 axiom cpx_lfxs_conf_fsle: ∀R,h. c_reflexive … R →
28                           (∨∨ (∀G. (cpx h G) = R) | R_fsle_compatible R) →
29                           ∀G,L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ⬈[h] T1 →
30                           ∀L2. L0 ⪤*[R, T0] L2 →
31                           ∧∧ ⦃L2, T0⦄ ⊆ ⦃L0, T0⦄ & ⦃L2, T1⦄ ⊆ ⦃L2, T0⦄
32                            & ⦃L0, T1⦄ ⊆ ⦃L0, T0⦄.
33 (*
34 #R #h #H1R #H2R #G #L0 #T0 @(fqup_wf_ind_eq (Ⓕ) … G L0 T0) -G -L0 -T0
35 #G #L #T #IH #G0 #L0 * *
36 [ #s #HG #HL #HT #X #HX #Y #HY destruct -IH
37   lapply (lfxs_fwd_length … HY) -HY #H0
38   elim (cpx_inv_sort1 … HX) -HX #H destruct
39   /3 width=1 by fsle_sort_length, and3_intro/
40 | * [| #i ] #HG #HL #HT #X #HX #Y #HY destruct
41   [ elim (cpx_inv_zero1 … HX) -HX
42     [ #H destruct
43       elim (lfxs_inv_zero … HY) -HY *
44       [ #H1 #H2 destruct -IH /2 width=1 by and3_intro/
45       | #I #K0 #K2 #V0 #V2 #HK02 #HV02 #H1 #H2 destruct
46         lapply (lfxs_fwd_length … HK02) #HK
47         elim H2R -H2R #H2R
48         [ <(H2R G0) in HV02; -H2R #HV02
49           elim (IH … HV02 … HK02) /2 width=2 by fqu_fqup, fqu_lref_O/ -IH -HV02 -HK02 #H1V #H2V #_
50           /4 width=1 by fsle_trans_tc, fsle_zero_bi, and3_intro/
51         | lapply (H2R … HV02 … HK02) -H2R -HV02 -HK02 -IH #HKV20
52           /3 width=1 by fsle_zero_bi, and3_intro/
53         ]
54       | #f #I #K0 #K2 #Hf #HK02 #H1 #H2 destruct
55       ]
56     | * #I0 #K0 #V0 #V1 #HV01 #HV1X #H destruct
57       elim (lfxs_inv_zero_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
58     ]
59   | elim (cpx_inv_lref1 … HX) -HX
60     [ #H destruct
61       elim (lfxs_inv_lref … HY) -HY *
62       [ #H0 #H1 destruct /2 width=1 by and3_intro/
63       | #I0 #I2 #K0 #K2 #HK02 #H1 #H2 destruct
64         lapply (lfxs_fwd_length … HK02) #HK
65         elim (IH … HK02) [|*: /2 width=4 by fqu_fqup/ ] -IH -HK02
66         /3 width=5 by and3_intro, fsle_lifts_SO/
67       ]
68     | * #I0 #K0 #V1 #HV1 #HV1X #H0 destruct
69       elim (lfxs_inv_lref_bind_sn … HY) -HY #I2 #K2 #HK02 #H destruct
70       lapply (lfxs_fwd_length … HK02) #HK
71       elim (IH … HK02) [|*: /2 width=4 by fqu_fqup/ ] -IH -HV1 -HK02
72       /3 width=5 by fsle_lifts_SO, and3_intro/
73     ]
74   ]
75 | #l #HG #HL #HT #X #HX #Y #HY destruct -IH
76   lapply (lfxs_fwd_length … HY) -HY #H0
77   >(cpx_inv_gref1 … HX) -X
78   /3 width=1 by fsle_gref_length, and3_intro/
79 | #p #I #V0 #T0 #HG #HL #HT #X #HX #Y #HY destruct
80   lapply (lfxs_fwd_length … HY) #H0
81   elim (lfxs_inv_bind … V0 ? HY) -HY // #HV0 #HT0
82   elim (cpx_inv_bind1 … HX) -HX *
83   [ #V1 #T1 #HV01 #HT01 #H destruct
84     elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
85     elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
86     /4 width=3 by fsle_bind_eq, fsle_fwd_pair_sn, and3_intro/
87   | #T #HT #HXT #H1 #H2 destruct
88     elim (IH G0 … V0… V0 … HV0) -HV0 // #H1V #H2V #H3V
89     elim (IH … HT … HT0) -HT -HT0 -IH // #H1T #H2T #H3T
90     /3 width=5 by fsle_bind, fsle_inv_lifts_sn, and3_intro/
91   ]
92 | #I #V0 #X0 #HG #HL #HT #X #HX #Y #HY destruct
93   elim (lfxs_inv_flat … HY) -HY #HV0 #HX0
94   elim (cpx_inv_flat1 … HX) -HX *
95   [ #V1 #T1 #HV01 #HT01 #H destruct
96     elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
97     elim (IH … HT01 … HX0) -HT01 -HX0 -IH // #H1T #H2T #H3T
98     /3 width=3 by fsle_flat, and3_intro/
99   | #HX #H destruct
100     elim (IH G0 … V0… V0 … HV0) -HV0 // #H1V #H2V #H3V
101     elim (IH … HX … HX0) -HX -HX0 -IH // #H1T #H2T #H3T
102     /4 width=3 by fsle_flat_sn, fsle_flat_dx_dx, fsle_flat_dx_sn, and3_intro/
103   | #HX #H destruct
104     elim (IH … HX … HV0) -HX -HV0 // #H1V #H2V #H3V
105     elim (IH G0 … X0… X0 … HX0) -HX0 -IH // #H1T #H2T #H3T
106     /4 width=3 by fsle_flat_sn, fsle_flat_dx_dx, fsle_flat_dx_sn, and3_intro/
107   | #p #V1 #W0 #W1 #T0 #T1 #HV01 #HW01 #HT01 #H1 #H2 #H3 destruct
108     elim (lfxs_inv_bind … W0 ? HX0) -HX0 // #HW0 #HT0
109     elim (IH … HV01 … HV0) -HV01 -HV0 // #H1V #H2V #H3V
110     elim (IH … HW01 … HW0) -HW01 -HW0 // #H1W #H2W #H3W
111     elim (IH … HT01 … HT0) -HT01 -HT0 -IH // #H1T #H2T #H3T
112     lapply (fsle_fwd_pair_sn … H2T) -H2T #H2T
113     lapply (fsle_fwd_pair_sn … H3T) -H3T #H3T
114     @and3_intro [ /3 width=5 by fsle_flat, fsle_bind/ ] (**) (* full auto too slow *)
115     @fsle_bind_sn_ge /4 width=1 by fsle_shift, fsle_flat_sn, fsle_flat_dx_dx, fsle_flat_dx_sn, fsle_bind_dx_sn/
116   | #p #V1 #X1 #W0 #W1 #T0 #T1 #HV01 #HVX1 #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 (fsle_fwd_pair_sn … H2T) -H2T #H2T
122     lapply (fsle_fwd_pair_sn … H3T) -H3T #H3T
123     @and3_intro[ /3 width=5 by fsle_flat, fsle_bind/ ] (**) (* full auto too slow *)
124     @fsle_bind_sn_ge //
125     [1,3: /3 width=1 by fsle_flat_dx_dx, fsle_bind_dx_sn/
126     |2,4: /4 width=3 by fsle_flat_sn, fsle_flat_dx_sn, fsle_flat_dx_dx, fsle_shift, fsle_lifts_sn/
127     ]
128   ]
129 ]
130 *)