]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/Basic_2/reduction/cpr_lift.ma
cf046097120d698958ffcddaed048b6589d1f097
[helm.git] / matita / matita / contribs / lambda_delta / Basic_2 / reduction / cpr_lift.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/unfold/tpss_lift.ma".
16 include "Basic_2/reduction/tpr_lift.ma".
17 include "Basic_2/reduction/cpr.ma".
18
19 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
20
21 (* Advanced properties ******************************************************)
22
23 lemma cpr_delta: ∀L,K,V1,W1,W2,i.
24                  ↓[0, i] L ≡ K. 𝕓{Abbr} V1 → K ⊢ V1 [0, |L| - i - 1] ≫* W1 →
25                  ↑[0, i + 1] W1 ≡ W2 → L ⊢ #i ⇒ W2.
26 #L #K #V1 #W1 #W2 #i #HLK #HVW1 #HW12
27 @ex2_1_intro [2: // | skip | @tpss_subst /2 width=6/ ] (**) (* /4 width=6/ is too slow *)
28 qed.
29
30 (* Advanced inversion lemmas ************************************************)
31
32 (* Basic_1: was: pr2_gen_lref *)
33 lemma cpr_inv_lref1: ∀L,T2,i. L ⊢ #i ⇒ T2 →
34                      T2 = #i ∨
35                      ∃∃K,V1,T1. ↓[0, i] L ≡ K. 𝕓{Abbr} V1 &
36                                 K ⊢ V1 [0, |L| - i - 1] ≫* T1 &
37                                 ↑[0, i + 1] T1 ≡ T2 &
38                                 i < |L|.
39 #L #T2 #i * #X #H
40 >(tpr_inv_atom1 … H) -H #H
41 elim (tpss_inv_lref1 … H) -H /2/
42 * /3 width=6/
43 qed.
44
45 (* Basic_1: was: pr2_gen_abst *)
46 lemma cpr_inv_abst1: ∀V1,T1,U2. 𝕔{Abst} V1. T1 ⇒ U2 →
47                      ∃∃V2,T2. V1 ⇒ V2 & T1 ⇒ T2 & U2 = 𝕔{Abst} V2. T2.
48 /2/ qed.
49
50 (* Relocation properties ****************************************************)
51
52 (* Basic_1: was: pr2_lift *)
53
54 (* Basic_1: was: pr2_gen_lift *)
55