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