]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/reduction/lpx.ma
lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / reduction / lpx.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/notation/relations/predsn_4.ma".
16 include "basic_2/reduction/lpr.ma".
17 include "basic_2/reduction/cpx.ma".
18
19 (* SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ********************)
20
21 definition lpx: ∀h. sd h → relation lenv ≝ λh,g. lpx_sn (cpx h g). 
22
23 interpretation "extended parallel reduction (local environment, sn variant)"
24    'PRedSn h g L1 L2 = (lpx h g L1 L2).
25
26 (* Basic inversion lemmas ***************************************************)
27
28 lemma lpx_inv_atom1: ∀h,g,L2. ⦃h, ⋆⦄ ⊢ ➡[g] L2 → L2 = ⋆.
29 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
30
31 lemma lpx_inv_pair1: ∀h,g,I,K1,V1,L2. ⦃h, K1.ⓑ{I}V1⦄ ⊢ ➡[g] L2 →
32                      ∃∃K2,V2. ⦃h, K1⦄ ⊢ ➡[g] K2 & ⦃h, K1⦄ ⊢ V1 ➡[g] V2 &
33                              L2 = K2. ⓑ{I} V2.
34 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
35
36 lemma lpx_inv_atom2: ∀h,g,L1.  ⦃h, L1⦄ ⊢ ➡[g] ⋆ → L1 = ⋆.
37 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
38
39 lemma lpx_inv_pair2: ∀h,g,I,L1,K2,V2.  ⦃h, L1⦄ ⊢ ➡[g] K2.ⓑ{I}V2 →
40                      ∃∃K1,V1. ⦃h, K1⦄ ⊢ ➡[g] K2 & ⦃h, K1⦄ ⊢ V1 ➡[g] V2 &
41                              L1 = K1. ⓑ{I} V1.
42 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
43
44 (* Basic properties *********************************************************)
45
46 lemma lpx_refl: ∀h,g,L.  ⦃h, L⦄ ⊢ ➡[g] L.
47 /2 width=1 by lpx_sn_refl/ qed.
48
49 lemma lpx_pair: ∀h,g,I,K1,K2,V1,V2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ⦃h, K1⦄ ⊢ V1 ➡[g] V2 →
50                 ⦃h, K1.ⓑ{I}V1⦄ ⊢ ➡[g] K2.ⓑ{I}V2.
51 /2 width=1/ qed.
52
53 lemma lpx_append: ∀h,g,K1,K2. ⦃h, K1⦄ ⊢ ➡[g] K2 → ∀L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 →
54                   ⦃h, L1 @@ K1⦄ ⊢ ➡[g] L2 @@ K2.
55 /3 width=1 by lpx_sn_append, cpx_append/ qed.
56
57 lemma lpr_lpx: ∀h,g,L1,L2. L1 ⊢ ➡ L2 → ⦃h, L1⦄ ⊢ ➡[g] L2.
58 #h #g #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
59 qed.
60
61 (* Basic forward lemmas *****************************************************)
62
63 lemma lpx_fwd_length: ∀h,g,L1,L2. ⦃h, L1⦄ ⊢ ➡[g] L2 → |L1| = |L2|.
64 /2 width=2 by lpx_sn_fwd_length/ qed-.
65
66 (* Advanced forward lemmas **************************************************)
67
68 lemma lpx_fwd_append1: ∀h,g,K1,L1,L. ⦃h, K1 @@ L1⦄ ⊢ ➡[g] L →
69                        ∃∃K2,L2. ⦃h, K1⦄ ⊢ ➡[g] K2 & L = K2 @@ L2.
70 /2 width=2 by lpx_sn_fwd_append1/ qed-.
71
72 lemma lpx_fwd_append2: ∀h,g,L,K2,L2. ⦃h, L⦄ ⊢ ➡[g] K2 @@ L2 →
73                        ∃∃K1,L1. ⦃h, K1⦄ ⊢ ➡[g] K2 & L = K1 @@ L1.
74 /2 width=2 by lpx_sn_fwd_append2/ qed-.