]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_lpr.ma
205ed41209b13bd2b7629f423ccfac741cc54ae7
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cprs_lpr.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/cpms_lpr.ma".
16 include "basic_2/rt_computation/cprs_cpr.ma".
17
18 (* CONTEXT-SENSITIVE PARALLEL R-COMPUTATION FOR TERMS ***********************)
19
20 (* Properties concerning sn parallel reduction on local environments ********)
21
22 (* Basic_1: uses: pr3_pr2_pr2_t *)
23 (* Basic_1: includes: pr3_pr0_pr2_t *)
24 lemma lpr_cpr_trans (h) (G):
25       s_r_transitive … (λL. cpm h G L 0) (λ_. lpr h 0 G).
26 /3 width=4 by cprs_inv_CTC, lpr_cpm_trans, ltc_inv_CTC/
27 qed-.
28
29 (* Basic_1: uses: pr3_pr2_pr3_t pr3_wcpr0_t *)
30 lemma lpr_cprs_trans (h) (G):
31       s_rs_transitive … (λL. cpm h G L 0) (λ_. lpr h 0 G).
32 #h #G @s_r_trans_CTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *)
33 qed-.
34
35 lemma cprs_lpr_conf_dx (h) (G):
36       ∀L0,T0,T1. ❨G,L0❩ ⊢ T0 ➡*[h,0] T1 → ∀L1. ❨G,L0❩ ⊢ ➡[h,0] L1 →
37       ∃∃T. ❨G,L1❩ ⊢ T1 ➡*[h,0] T & ❨G,L1❩ ⊢ T0 ➡*[h,0] T.
38 #h #G #L0 #T0 #T1 #H
39 @(cprs_ind_dx … H) -T1 /2 width=3 by ex2_intro/
40 #T #T1 #_ #HT1 #IHT0 #L1 #HL01
41 elim (IHT0 … HL01) #T2 #HT2 #HT02
42 elim (lpr_cpr_conf_dx … HT1 … HL01) -L0 #T3 #HT3 #HT13
43 elim (cprs_strip … HT2 … HT3) -T
44 /3 width=5 by cprs_step_dx, cprs_step_sn, ex2_intro/
45 qed-.
46
47 lemma cprs_lpr_conf_sn (h) (G):
48       ∀L0,T0,T1. ❨G,L0❩ ⊢ T0 ➡*[h,0] T1 →
49       ∀L1. ❨G,L0❩ ⊢ ➡[h,0] L1 →
50       ∃∃T. ❨G,L0❩ ⊢ T1 ➡*[h,0] T & ❨G,L1❩ ⊢ T0 ➡*[h,0] T.
51 #h #G #L0 #T0 #T1 #HT01 #L1 #HL01
52 elim (cprs_lpr_conf_dx … HT01 … HL01) -HT01 #T #HT1 #HT0
53 /3 width=3 by lpr_cpms_trans, ex2_intro/
54 qed-.