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