]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/rsx_csx.ma
more additions and corrections for the article
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / rsx_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/csx_cpxs.ma".
17 include "basic_2/rt_computation/jsx_rsx.ma".
18
19 (* STRONGLY NORMALIZING REFERRED LOCAL ENV.S FOR UNBOUND RT-TRANSITION ******)
20
21 (* Advanced properties ******************************************************)
22
23 (* Note: swapping the eliminations to avoid rsx_cpx_trans: no solution found *)
24 (* Basic_2A1: uses: lsx_lref_be_lpxs *)
25 lemma rsx_pair_lpxs (h) (G):
26       ∀K1,V. ⦃G,K1⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ →
27       ∀K2. G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ → ⦃G,K1⦄ ⊢ ⬈*[h] K2 →
28       ∀I. G ⊢ ⬈*[h,#0] 𝐒⦃K2.ⓑ{I}V⦄.
29 #h #G #K1 #V #H
30 @(csx_ind_cpxs … H) -V #V0 #_ #IHV0 #K2 #H
31 @(rsx_ind … H) -K2 #K0 #HK0 #IHK0 #HK10 #I
32 @rsx_intro #Y #HY #HnY
33 elim (lpx_inv_pair_sn … HY) -HY #K2 #V2 #HK02 #HV02 #H destruct
34 elim (tdeq_dec V0 V2) #HnV02 destruct [ -IHV0 -HV02 -HK0 | -IHK0 -HnY ]
35 [ /5 width=5 by rsx_rdeq_trans, lpxs_step_dx, rdeq_pair/
36 | @(IHV0 … HnV02) -IHV0 -HnV02
37   [ /2 width=3 by lpxs_cpx_trans/
38   | /3 width=3 by rsx_lpx_trans, rsx_cpx_trans/
39   | /2 width=3 by lpxs_step_dx/
40   ]
41 ]
42 qed.
43
44 (* Basic_2A1: uses: lsx_lref_be *)
45 lemma rsx_lref_pair_drops (h) (G):
46       ∀K,V. ⦃G,K⦄ ⊢ ⬈*[h] 𝐒⦃V⦄ → G ⊢ ⬈*[h,V] 𝐒⦃K⦄ →
47       ∀I,i,L. ⬇*[i] L ≘ K.ⓑ{I}V → G ⊢ ⬈*[h,#i] 𝐒⦃L⦄.
48 #h #G #K #V #HV #HK #I #i elim i -i
49 [ #L #H >(drops_fwd_isid … H) -H /2 width=3 by rsx_pair_lpxs/
50 | #i #IH #L #H
51   elim (drops_inv_bind2_isuni_next … H) -H // #J #Y #HY #H destruct
52   @(rsx_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_rsx (h): ∀G,L,T. ⦃G,L⦄ ⊢ ⬈*[h] 𝐒⦃T⦄ → G ⊢ ⬈*[h,T] 𝐒⦃L⦄.
60 #h #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 rsx_lref_atom/
65   | /2 width=3 by rsx_lref_unit/
66   | /4 width=6 by rsx_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 rsx_bind_void/
70 | #I #V #T #HG #HL #HT #H destruct
71   elim (csx_fwd_flat … H) -H /3 width=1 by rsx_flat/
72 ]
73 qed.