]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/etc/llpx/llpx.etc
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / etc / llpx / llpx.etc
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/lazypredsn_7.ma".
16 include "basic_2/relocation/llpx_sn.ma".
17 include "basic_2/reduction/cpx.ma".
18
19 (* LAZY SN EXTENDED PARALLEL REDUCTION FOR LOCAL ENVIRONMENTS ***************)
20
21 definition llpx: ∀h. sd h → genv → relation4 ynat term lenv lenv ≝
22                  λh,g,G. llpx_sn (cpx h g  G).
23
24 interpretation "lazy extended parallel reduction (local environment, sn variant)"
25    'LazyPRedSn G L1 L2 h g T d = (llpx h g G d T L1 L2).
26
27 (* Basic inversion lemmas ***************************************************)
28
29 lemma llpx_inv_flat: ∀h,g,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, ⓕ{I}V.T, d] L2 →
30                      ⦃G, L1⦄ ⊢ ➡[h, g, V, d] L2 ∧ ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L2.
31 /2 width=2 by llpx_sn_inv_flat/ qed-.
32
33 (* Basic forward lemmas *****************************************************)
34
35 lemma llpx_fwd_length: ∀h,g,G,L1,L2,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L2 → |L1| = |L2|.
36 /2 width=4 by llpx_sn_fwd_length/ qed-.
37
38 lemma llpx_fwd_flat_dx: ∀h,g,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, ⓕ{I}V.T, d] L2 →
39                      ⦃G, L1⦄ ⊢ ➡[h, g, T, d] L2.
40 /2 width=3 by llpx_sn_fwd_flat_dx/ qed-.
41
42 lemma llpx_fwd_pair_sn: ∀h,g,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, ②{I}V.T, d] L2 →
43                         ⦃G, L1⦄ ⊢ ➡[h, g, V, d] L2.
44 /2 width=3 by llpx_sn_fwd_pair_sn/ qed-.
45
46 (* Note: this might be removed *)
47 lemma llpx_fwd_bind_sn: ∀h,g,a,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, ⓑ{a,I}V.T, d] L2 →
48                         ⦃G, L1⦄ ⊢ ➡[h, g, V, d] L2.
49 /2 width=4 by llpx_sn_fwd_bind_sn/ qed-.
50
51 (* Note: this might be removed *)
52 lemma llpx_fwd_bind_dx: ∀h,g,a,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, ⓑ{a,I}V.T, d] L2 →
53                         ⦃G, L1.ⓑ{I}V⦄ ⊢ ➡[h, g, T, ⫯d] L2.ⓑ{I}V.
54 /2 width=2 by llpx_sn_fwd_bind_dx/ qed-.
55
56 (* Note: this might be removed *)
57 lemma llpx_fwd_flat_sn: ∀h,g,I,G,L1,L2,V,T,d. ⦃G, L1⦄ ⊢ ➡[h, g, ⓕ{I}V.T, d] L2 →
58                         ⦃G, L1⦄ ⊢ ➡[h, g, V, d] L2.
59 /2 width=3 by llpx_sn_fwd_flat_sn/ qed-.
60
61 (* Basic properties *********************************************************)
62
63 lemma llpx_lref: ∀h,g,I,G,L1,L2,K1,K2,V1,V2,d,i. d ≤ yinj i →
64                  ⇩[i] L1 ≡ K1.ⓑ{I}V1 → ⇩[i] L2 ≡ K2.ⓑ{I}V2 →
65                  ⦃G, K1⦄ ⊢ ➡[h, g, V1, 0] K2 → ⦃G, K1⦄ ⊢ V1 ➡[h, g] V2 → ⦃G, L1⦄ ⊢ ➡[h, g, #i, d] L2.
66 /2 width=9 by llpx_sn_lref/ qed.
67
68 lemma llpx_refl: ∀h,g,G,T,d. reflexive … (llpx h g G d T).
69 /2 width=1 by llpx_sn_refl/ qed.