]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cprs_lpr.ma
milestone update in basic_2
[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): s_r_transitive … (λL. cpm h G L 0) (λ_. lpr h G).
25 /3 width=4 by cprs_inv_CTC, lpr_cpm_trans, ltc_inv_CTC/
26 qed-.
27
28 (* Basic_1: uses: pr3_pr2_pr3_t pr3_wcpr0_t *)
29 lemma lpr_cprs_trans (h) (G): s_rs_transitive … (λL. cpm h G L 0) (λ_. lpr h G).
30 #h #G @s_r_trans_CTC1 /2 width=3 by lpr_cpr_trans/ (**) (* full auto fails *)
31 qed-.
32
33 lemma cprs_lpr_conf_dx (h) (G):
34                        ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡*[h] T1 → ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 →
35                        ∃∃T. ⦃G, L1⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
36 #h #G #L0 #T0 #T1 #H
37 @(cprs_ind_dx … H) -T1 /2 width=3 by ex2_intro/
38 #T #T1 #_ #HT1 #IHT0 #L1 #HL01
39 elim (IHT0 … HL01) #T2 #HT2 #HT02
40 elim (lpr_cpr_conf_dx … HT1 … HL01) -L0 #T3 #HT3 #HT13
41 elim (cprs_strip … HT2 … HT3) -T
42 /3 width=5 by cprs_step_dx, cprs_step_sn, ex2_intro/
43 qed-.
44
45 lemma cprs_lpr_conf_sn (h) (G):
46                        ∀L0,T0,T1. ⦃G, L0⦄ ⊢ T0 ➡*[h] T1 →
47                        ∀L1. ⦃G, L0⦄ ⊢ ➡[h] L1 →
48                        ∃∃T. ⦃G, L0⦄ ⊢ T1 ➡*[h] T & ⦃G, L1⦄ ⊢ T0 ➡*[h] T.
49 #h #G #L0 #T0 #T1 #HT01 #L1 #HL01
50 elim (cprs_lpr_conf_dx … HT01 … HL01) -HT01 #T #HT1 #HT0
51 /3 width=3 by lpr_cpms_trans, ex2_intro/
52 qed-.