]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lfprs.ma
- lambda_delta: programmed renaming to lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / cprs_lfprs.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/computation/cprs_cprs.ma".
16 include "basic_2/computation/lfprs_lfprs.ma".
17
18 (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
19
20 (* Properties on focalized computation for local environments ***************)
21
22 (* Basic_1: was just: pr3_pr3_pr3_t *)
23 lemma lfprs_cprs_trans: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ →
24                         ∀T1,T2. L2 ⊢ T1 ➡* T2 → L1 ⊢ T1 ➡* T2.
25 #L1 #L2 #HL12 @(lfprs_ind … HL12) -L2 // /3 width=3/
26 qed.
27
28 lemma lfprs_cpr_trans: ∀L1,L2. ⦃L1⦄ ➡* ⦃L2⦄ →
29                        ∀T1,T2. L2 ⊢ T1 ➡ T2 → L1 ⊢ T1 ➡* T2.
30 /3 width=3 by lfprs_cprs_trans, inj/ qed.
31
32 (* Advanced inversion lemmas ************************************************)
33
34 (* Basic_1: was pr3_gen_abbr *)
35 lemma cprs_inv_abbr1: ∀a,L,V1,T1,U2. L ⊢ ⓓ{a}V1. T1 ➡* U2 →
36                       (∃∃V2,T2. L ⊢ V1 ➡* V2 & L. ⓓV1 ⊢ T1 ➡* T2 &
37                                 U2 = ⓓ{a}V2. T2
38                       ) ∨
39                       ∃∃T2. L. ⓓV1 ⊢ T1 ➡* T2 & ⇧[0, 1] U2 ≡ T2 & a = true.
40 #a #L #V1 #T1 #U2 #H @(cprs_ind … H) -U2 /3 width=5/
41 #U0 #U2 #_ #HU02 * *
42 [ #V0 #T0 #HV10 #HT10 #H destruct
43   elim (cpr_inv_abbr1 … HU02) -HU02 *
44   [ #V #V2 #T2 #HV0 #HV2 #HT02 #H destruct
45     lapply (cpr_intro … HV0 … HV2) -HV2 #HV02
46     lapply (ltpr_cpr_trans (L.ⓓV0) … HT02) /2 width=1/ -V #HT02
47     lapply (lfprs_cprs_trans (L. ⓓV1) … HT02) -HT02 /2 width=1/ /4 width=5/
48   | #T2 #HT02 #HUT2
49     lapply (lfprs_cpr_trans (L.ⓓV1) … HT02) -HT02 /2 width=1/ -V0 #HT02
50     lapply (cprs_trans … HT10 … HT02) -T0 /3 width=3/
51   ]
52 | #U1 #HTU1 #HU01
53   elim (lift_total U2 0 1) #U #HU2
54   lapply (cpr_lift (L.ⓓV1) … HU01 … HU2 HU02) -U0 /2 width=1/ /4 width=3/
55 ]
56 qed-.