]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/lfsx_csx.ma
lfsx_drops completed
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / lfsx_csx.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/rt_computation/csx_lsubr.ma".
16 include "basic_2/rt_computation/lfsx_lfpxs.ma".
17
18 (* STRONGLY NORMALIZING LOCAL ENV.S FOR UNCOUNTED PARALLEL RT-TRANSITION ****)
19 (*
20 (* Advanced properties ******************************************************)
21
22 lemma lsx_lref_be_lpxs: ∀h,o,I,G,K1,V,i,l. l ≤ yinj i → ⦃G, K1⦄ ⊢ ⬊*[h, o] V →
23                         ∀K2. G ⊢ ⬊*[h, o, V, 0] K2 → ⦃G, K1⦄ ⊢ ➡*[h, o] K2 →
24                         ∀L2. ⬇[i] L2 ≡ K2.ⓑ{I}V → G ⊢ ⬊*[h, o, #i, l] L2.
25 #h #o #I #G #K1 #V #i #l #Hli #H @(csx_ind_alt … H) -V
26 #V0 #_ #IHV0 #K2 #H @(lsx_ind … H) -K2
27 #K0 #HK0 #IHK0 #HK10 #L0 #HLK0 @lsx_intro
28 #L2 #HL02 #HnL02 elim (lpx_drop_conf … HLK0 … HL02) -HL02
29 #Y #H #HLK2 elim (lpx_inv_pair1 … H) -H
30 #K2 #V2 #HK02 #HV02 #H destruct
31 elim (eq_term_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnL02 -HLK0 ]
32 [ /4 width=8 by lpxs_strap1, lleq_lref/
33 | @(IHV0 … HnV02 … HLK2) -IHV0 -HnV02 -HLK2
34   /3 width=4 by lsx_cpx_trans_O, lsx_lpx_trans, lpxs_cpx_trans, lpxs_strap1/ (**) (* full auto too slow *)
35 ]
36 qed.
37
38 lemma lsx_lref_be: ∀h,o,I,G,K,V,i,l. l ≤ yinj i → ⦃G, K⦄ ⊢ ⬊*[h, o] V →
39                    G ⊢ ⬊*[h, o, V, 0] K →
40                    ∀L. ⬇[i] L ≡ K.ⓑ{I}V → G ⊢ ⬊*[h, o, #i, l] L.
41 /2 width=8 by lsx_lref_be_lpxs/ qed.
42 *)
43 (* Main properties **********************************************************)
44
45 theorem csx_lsx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
46 #h #o #G #L #T @(fqup_wf_ind_eq (Ⓕ) … G L T) -G -L -T
47 #Z #Y #X #IH #G #L * * //
48 [ #i #HG #HL #HT #H destruct
49   elim (csx_inv_lref … H) -H [ |*: * ]
50   [ #HL
51   | #I #K #HLK
52   | #I #K #V #HLK #HV
53   ]
54 (*
55   elim (lt_or_ge i (|L|)) /2 width=1 by lsx_lref_free/
56   elim (ylt_split i l) /2 width=1 by lsx_lref_skip/
57   #Hli #Hi elim (drop_O1_lt (Ⓕ) … Hi) -Hi
58   #I #K #V #HLK lapply (csx_inv_lref_bind … HLK … H) -H
59   /4 width=6 by lsx_lref_be, fqup_lref/
60 *)
61 | #a #I #V #T #HG #HL #HT #H destruct
62   elim (csx_fwd_bind_unit … H Void) -H /3 width=1 by lfsx_bind_void/
63 | #I #V #T #HG #HL #HT #H destruct
64   elim (csx_fwd_flat … H) -H /3 width=1 by lfsx_flat/
65 ]
66 qed.