1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 notation "hvbox( T1 ⊢ ▶ * break term 46 T2 )"
16 non associative with precedence 45
17 for @{ 'PSubstStarSn $T1 $T2 }.
19 include "basic_2/grammar/lpx_sn.ma".
20 include "basic_2/substitution/cpss.ma".
22 (* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
24 (* Basic_1: includes: csubst1_bind *)
25 definition lpss: relation lenv ≝ lpx_sn cpss.
27 interpretation "parallel substitution (local environment, sn variant)"
28 'PSubstStarSn L1 L2 = (lpss L1 L2).
30 (* Basic inversion lemmas ***************************************************)
32 lemma lpss_inv_atom1: ∀L2. ⋆ ⊢ ▶* L2 → L2 = ⋆.
33 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
35 lemma lpss_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* L2 →
36 ∃∃K2,V2. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L2 = K2. ⓑ{I} V2.
37 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
39 lemma lpss_inv_atom2: ∀L1. L1 ⊢ ▶* ⋆ → L1 = ⋆.
40 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
42 lemma lpss_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ▶* K2. ⓑ{I} V2 →
43 ∃∃K1,V1. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L1 = K1. ⓑ{I} V1.
44 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
46 (* Basic properties *********************************************************)
48 (* Basic_1: was by definition: csubst1_refl *)
49 lemma lpss_refl: ∀L. L ⊢ ▶* L.
50 /2 width=1 by lpx_sn_refl/ qed.
52 lemma lpss_pair: ∀I,K1,K2,V1,V2. K1 ⊢ ▶* K2 → K1 ⊢ V1 ▶* V2 →
53 K1.ⓑ{I}V1 ⊢ ▶* K2.ⓑ{I}V2.
56 lemma lpss_append: ∀K1,K2. K1 ⊢ ▶* K2 → ∀L1,L2. L1 ⊢ ▶* L2 →
57 L1 @@ K1 ⊢ ▶* L2 @@ K2.
58 /3 width=1 by lpx_sn_append, cpss_append/ qed.
60 (* Basic forward lemmas *****************************************************)
62 lemma lpss_fwd_length: ∀L1,L2. L1 ⊢ ▶* L2 → |L1| = |L2|.
63 /2 width=2 by lpx_sn_fwd_length/ qed-.
65 (* Advanced forward lemmas **************************************************)
67 lemma lpss_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ▶* L →
68 ∃∃K2,L2. K1 ⊢ ▶* K2 & L = K2 @@ L2.
69 /2 width=2 by lpx_sn_fwd_append1/ qed-.
71 lemma lpss_fwd_append2: ∀L,K2,L2. L ⊢ ▶* K2 @@ L2 →
72 ∃∃K1,L1. K1 ⊢ ▶* K2 & L = K1 @@ L1.
73 /2 width=2 by lpx_sn_fwd_append2/ qed-.
75 (* Basic_1: removed theorems 28:
76 csubst0_clear_O csubst0_drop_lt csubst0_drop_gt csubst0_drop_eq
77 csubst0_clear_O_back csubst0_clear_S csubst0_clear_trans
78 csubst0_drop_gt_back csubst0_drop_eq_back csubst0_drop_lt_back
79 csubst0_gen_sort csubst0_gen_head csubst0_getl_ge csubst0_getl_lt
80 csubst0_gen_S_bind_2 csubst0_getl_ge_back csubst0_getl_lt_back
81 csubst0_snd_bind csubst0_fst_bind csubst0_both_bind
82 csubst1_head csubst1_flat csubst1_gen_head
83 csubst1_getl_ge csubst1_getl_lt csubst1_getl_ge_back getl_csubst1