]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/lfsx_csx.ma
long awaited update in basic_2
[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/lpxs_lpx.ma".
16 include "basic_2/rt_computation/lpxs_cpxs.ma".
17 include "basic_2/rt_computation/csx_cpxs.ma".
18 include "basic_2/rt_computation/csx_lsubr.ma".
19 include "basic_2/rt_computation/lfsx_lpx.ma".
20 include "basic_2/rt_computation/lsubsx_lfsx.ma".
21
22 (* STRONGLY NORMALIZING LOCAL ENV.S FOR UNCOUNTED PARALLEL RT-TRANSITION ****)
23
24 (* Advanced properties ******************************************************)
25
26 (* Basic_2A1: uses: lsx_lref_be_lpxs *)
27 lemma lfsx_pair_lpxs: ∀h,o,G,K1,V. ⦃G, K1⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ →
28                       ∀K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ → ⦃G, K1⦄ ⊢ ⬈*[h] K2 →
29                       ∀I. G ⊢ ⬈*[h, o, #0] 𝐒⦃K2.ⓑ{I}V⦄.
30 #h #o #G #K1 #V #H
31 @(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
32 @(lfsx_ind_lpx … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
33 @lfsx_intro_lpx #Y #HY #HnY
34 elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
35 elim (tdeq_dec h o V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
36 [ /5 width=5 by lfsx_lfdeq_trans, lpxs_step_dx, lfdeq_pair/
37 | @(IHV0 … HnV02) -IHV0 -HnV02
38   [ /2 width=3 by lpxs_cpx_trans/
39   | /3 width=3 by lfsx_lpx_trans, lfsx_cpx_trans/
40   | /2 width=3 by lpxs_step_dx/
41   ]
42 ]
43 qed.
44
45 (* Basic_2A1: uses: lsx_lref_be *)
46 lemma lfsx_lref_pair_drops: ∀h,o,G,K,V. ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄ →
47                             ∀I,i,L. ⬇*[i] L ≡ K.ⓑ{I}V → G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄.
48 #h #o #G #K #V #HV #HK #I #i elim i -i
49 [ #L #H >(drops_fwd_isid … H) -H /2 width=3 by lfsx_pair_lpxs/
50 | #i #IH #L #H
51   elim (drops_inv_bind2_isuni_next … H) -H // #J #Y #HY #H destruct
52   @(lfsx_lifts … (𝐔❴1❵)) /3 width=6 by drops_refl, drops_drop/ (**) (* full auto fails *)
53 ]
54 qed.
55
56 (* Main properties **********************************************************)
57
58 (* Basic_2A1: uses: csx_lsx *)
59 theorem csx_lfsx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
60 #h #o #G #L #T @(fqup_wf_ind_eq (Ⓕ) … G L T) -G -L -T
61 #Z #Y #X #IH #G #L * * //
62 [ #i #HG #HL #HT #H destruct
63   elim (csx_inv_lref … H) -H [ |*: * ]
64   [ /2 width=1 by lfsx_lref_atom/
65   | /2 width=3 by lfsx_lref_unit/
66   | /4 width=6 by lfsx_lref_pair_drops, fqup_lref/
67   ]
68 | #p #I #V #T #HG #HL #HT #H destruct
69   elim (csx_fwd_bind_unit … H Void) -H /3 width=1 by lfsx_bind_void/
70 | #I #V #T #HG #HL #HT #H destruct
71   elim (csx_fwd_flat … H) -H /3 width=1 by lfsx_flat/
72 ]
73 qed.