]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/lfsx_csx.ma
862858c4af0fd07648b0e833509b70cc8460a748
[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_cpxs.ma".
16 include "basic_2/rt_computation/csx_lsubr.ma".
17 include "basic_2/rt_computation/lsubsx_lfsx.ma".
18
19 (* STRONGLY NORMALIZING LOCAL ENV.S FOR UNCOUNTED PARALLEL RT-TRANSITION ****)
20
21 (* Advanced properties ******************************************************)
22
23 (* Basic_2A1: uses: lsx_lref_be_lpxs *)
24 lemma lfsx_pair_lfpxs: ∀h,o,G,K1,V. ⦃G, K1⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ →
25                        ∀K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ → ⦃G, K1⦄ ⊢ ⬈*[h, V] K2 →
26                        ∀I. G ⊢ ⬈*[h, o, #0] 𝐒⦃K2.ⓑ{I}V⦄.
27 #h #o #G #K1 #V #H
28 @(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
29 @(lfsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
30 @lfsx_intro #Y #HY #HnY
31 elim (lfpx_inv_zero_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
32 elim (tdeq_dec h o V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
33 [ /5 width=5 by lfsx_lfdeq_trans, lfpxs_step_dx, lfdeq_pair/
34 | @lfsx_lfpx_trans
35   [2: @(IHV0 … HnV02 K0 … I) -IHV0 -HnV02
36       [ /2 width=3 by lfpxs_cpx_trans/
37       | /2 width=3 by lfsx_cpx_trans/
38       | 
39       ]
40   |1: skip
41   |3: @lfpx_pair /2 width=3 by lfpx_cpx_conf/
42   ]
43 ]
44 qed.
45
46 (* Basic_2A1: uses: lsx_lref_be *)
47 lemma lfsx_lref_pair: ∀h,o,G,K,V. ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄ → G ⊢ ⬈*[h, o, V] 𝐒⦃K⦄ →
48                       ∀I,L,i. ⬇*[i] L ≡ K.ⓑ{I}V → G ⊢ ⬈*[h, o, #i] 𝐒⦃L⦄.
49 #h #o #G #K #V #HV #HK #I #L #i #HLK
50 @(lfsx_lifts … (#0) … HLK) -L /2 width=3 by lfsx_pair_lpxs/
51 qed.
52
53 (* Main properties **********************************************************)
54
55 theorem csx_lsx: ∀h,o,G,L,T. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃T⦄ → G ⊢ ⬈*[h, o, T] 𝐒⦃L⦄.
56 #h #o #G #L #T @(fqup_wf_ind_eq (Ⓕ) … G L T) -G -L -T
57 #Z #Y #X #IH #G #L * * //
58 [ #i #HG #HL #HT #H destruct
59   elim (csx_inv_lref … H) -H [ |*: * ]
60   [ /2 width=1 by lfsx_lref_atom/
61   | /2 width=3 by lfsx_lref_unit/
62   | /4 width=6 by lfsx_lref_pair, fqup_lref/
63   ]
64 | #a #I #V #T #HG #HL #HT #H destruct
65   elim (csx_fwd_bind_unit … H Void) -H /3 width=1 by lfsx_bind_void/
66 | #I #V #T #HG #HL #HT #H destruct
67   elim (csx_fwd_flat … H) -H /3 width=1 by lfsx_flat/
68 ]
69 qed.