]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/lsubr/lpqs.etc
- extended multiple substitutions now uses bounds in ynat (ie. they
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / lsubr / lpqs.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 notation "hvbox( T1 ⊢ ➤ * break term 46 T2 )"
16    non associative with precedence 45
17    for @{ 'PRestStarSn $T1 $T2 }.
18
19 include "basic_2/substitution/lpss.ma".
20 include "basic_2/unfold/cpqs.ma".
21
22 (* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
23
24 definition lpqs: relation lenv ≝ lpx_sn cpqs. 
25
26 interpretation "restricted parallel computation (local environment, sn variant)"
27    'PRestStarSn L1 L2 = (lpqs L1 L2).
28
29 (* Basic inversion lemmas ***************************************************)
30
31 lemma lpqs_inv_atom1: ∀L2. ⋆ ⊢ ➤* L2 → L2 = ⋆.
32 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
33
34 lemma lpqs_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ➤* L2 →
35                       ∃∃K2,V2. K1 ⊢ ➤* K2 & K1 ⊢ V1 ➤* V2 & L2 = K2. ⓑ{I} V2.
36 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
37
38 lemma lpqs_inv_atom2: ∀L1. L1 ⊢ ➤* ⋆ → L1 = ⋆.
39 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
40
41 lemma lpqs_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ➤* K2. ⓑ{I} V2 →
42                       ∃∃K1,V1. K1 ⊢ ➤* K2 & K1 ⊢ V1 ➤* V2 & L1 = K1. ⓑ{I} V1.
43 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
44
45 (* Basic properties *********************************************************)
46
47 lemma lpqs_refl: ∀L. L ⊢ ➤* L.
48 /2 width=1 by lpx_sn_refl/ qed.
49
50 lemma lpqs_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ➤* K2 → K1 ⊢ V1 ➤* V2 →
51                  K1.ⓑ{I}V1 ⊢ ➤* K2.ⓑ{I}V2.
52 /2 width=1/ qed.
53
54 lemma lpqs_append: ∀K1,K2. K1 ⊢ ➤* K2 → ∀L1,L2. L1 ⊢ ➤* L2 →
55                    L1 @@ K1 ⊢ ➤* L2 @@ K2.
56 /3 width=1 by lpx_sn_append, cpqs_append/ qed.
57
58 lemma lpss_lpqs: ∀L1,L2. L1 ⊢ ▶* L2 → L1 ⊢ ➤* L2.
59 #L1 #L2 #H elim H -L1 -L2 // /3 width=1/
60 qed.
61
62 (* Basic forward lemmas *****************************************************)
63
64 lemma lpqs_fwd_length: ∀L1,L2. L1 ⊢ ➤* L2 → |L1| = |L2|.
65 /2 width=2 by lpx_sn_fwd_length/ qed-.
66
67 (* Advanced forward lemmas **************************************************)
68
69 lemma lpqs_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ➤* L →
70                         ∃∃K2,L2. K1 ⊢ ➤* K2 & L = K2 @@ L2.
71 /2 width=2 by lpx_sn_fwd_append1/ qed-.
72
73 lemma lpqs_fwd_append2: ∀L,K2,L2. L ⊢ ➤* K2 @@ L2 →
74                         ∃∃K1,L1. K1 ⊢ ➤* K2 & L = K1 @@ L1.
75 /2 width=2 by lpx_sn_fwd_append2/ qed-.