]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/reduction/lpr.ma
04d5d1a294f09cd6c0f75334945950372e0d6abe
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / 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/unfold/lpqs.ma".
16 include "basic_2/reduction/cpr.ma".
17
18 (* SN PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS *****************************)
19
20 definition lpr: relation lenv ≝ lpx_sn cpr. 
21
22 interpretation "parallel reduction (local environment, sn variant)"
23    'PRedSn L1 L2 = (lpr L1 L2).
24
25 (* Basic inversion lemmas ***************************************************)
26
27 (* Basic_1: includes: wcpr0_gen_sort *)
28 lemma lpr_inv_atom1: ∀L2. ⋆ ⊢ ➡ L2 → L2 = ⋆.
29 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
30
31 (* Basic_1: includes: wcpr0_gen_head *)
32 lemma lpr_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ➡ L2 →
33                      ∃∃K2,V2. K1 ⊢ ➡ K2 & K1 ⊢ V1 ➡ V2 & L2 = K2. ⓑ{I} V2.
34 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
35
36 lemma lpr_inv_atom2: ∀L1. L1 ⊢ ➡ ⋆ → L1 = ⋆.
37 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
38
39 lemma lpr_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ➡ K2. ⓑ{I} V2 →
40                      ∃∃K1,V1. K1 ⊢ ➡ K2 & K1 ⊢ V1 ➡ V2 & L1 = K1. ⓑ{I} V1.
41 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
42
43 (* Basic properties *********************************************************)
44
45 (* Note: lemma 250 *)
46 lemma lpr_refl: ∀L. L ⊢ ➡ L.
47 /2 width=1 by lpx_sn_refl/ qed.
48
49 lemma lpr_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ➡ K2 → K1 ⊢ V1 ➡ V2 →
50                 K1.ⓑ{I}V1 ⊢ ➡ K2.ⓑ{I}V2.
51 /2 width=1/ qed.
52
53 lemma lpr_append: ∀K1,K2. K1 ⊢ ➡ K2 → ∀L1,L2. L1 ⊢ ➡ L2 →
54                   L1 @@ K1 ⊢ ➡ L2 @@ K2.
55 /3 width=1 by lpx_sn_append, cpr_append/ qed.
56
57 lemma lpqs_lpr: ∀L1,L2. L1 ⊢ ➤* L2 → L1 ⊢ ➡ L2.
58 #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
59 qed.
60
61 lemma lpss_lpr: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➡ L2.
62 /3 width=1/ qed.
63
64 (* Basic forward lemmas *****************************************************)
65
66 lemma lpr_fwd_length: ∀L1,L2. L1 ⊢ ➡ L2 → |L1| = |L2|.
67 /2 width=2 by lpx_sn_fwd_length/ qed-.
68
69 (* Advanced forward lemmas **************************************************)
70
71 lemma lpr_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ➡ L →
72                        ∃∃K2,L2. K1 ⊢ ➡ K2 & L = K2 @@ L2.
73 /2 width=2 by lpx_sn_fwd_append1/ qed-.
74
75 lemma lpr_fwd_append2: ∀L,K2,L2. L ⊢ ➡ K2 @@ L2 →
76                        ∃∃K1,L1. K1 ⊢ ➡ K2 & L = K1 @@ L1.
77 /2 width=2 by lpx_sn_fwd_append2/ qed-.
78
79 (* Basic_1: removed theorems 3: wcpr0_getl wcpr0_getl_back
80                                 pr0_subst1_back
81 *)