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 include "basic_2/grammar/lenv_px_sn.ma".
16 include "basic_2/substitution/cpss.ma".
18 (* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
20 (* Basic_1: includes: csubst1_bind *)
21 definition lpss: relation lenv ≝ lpx_sn cpss.
23 interpretation "parallel substitution (local environment, sn variant)"
24 'PSubstStarSn L1 L2 = (lpss L1 L2).
26 (* Basic inversion lemmas ***************************************************)
28 lemma lpss_inv_atom1: ∀L2. ⋆ ⊢ ▶* L2 → L2 = ⋆.
29 /2 width=4 by lpx_sn_inv_atom1_aux/ qed-.
31 lemma lpss_inv_pair1: ∀I,K1,V1,L2. K1. ⓑ{I} V1 ⊢ ▶* L2 →
32 ∃∃K2,V2. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L2 = K2. ⓑ{I} V2.
33 /2 width=3 by lpx_sn_inv_pair1_aux/ qed-.
35 lemma lpss_inv_atom2: ∀L1. L1 ⊢ ▶* ⋆ → L1 = ⋆.
36 /2 width=4 by lpx_sn_inv_atom2_aux/ qed-.
38 lemma lpss_inv_pair2: ∀I,L1,K2,V2. L1 ⊢ ▶* K2. ⓑ{I} V2 →
39 ∃∃K1,V1. K1 ⊢ ▶* K2 & K1 ⊢ V1 ▶* V2 & L1 = K1. ⓑ{I} V1.
40 /2 width=3 by lpx_sn_inv_pair2_aux/ qed-.
42 (* Basic properties *********************************************************)
44 (* Basic_1: was by definition: csubst1_refl *)
45 lemma lpss_refl: ∀L. L ⊢ ▶* L.
46 /2 width=1 by lpx_sn_refl/ qed.
48 lemma lpss_append: ∀K1,K2. K1 ⊢ ▶* K2 → ∀L1,L2. L1 ⊢ ▶* L2 →
49 L1 @@ K1 ⊢ ▶* L2 @@ K2.
50 /3 width=1 by lpx_sn_append, cpss_append/ qed.
52 (* Basic forward lemmas *****************************************************)
54 lemma lpss_fwd_length: ∀L1,L2. L1 ⊢ ▶* L2 → |L1| = |L2|.
55 /2 width=2 by lpx_sn_fwd_length/ qed-.
57 (* Advanced forward lemmas **************************************************)
59 lemma lpss_fwd_append1: ∀K1,L1,L. K1 @@ L1 ⊢ ▶* L →
60 ∃∃K2,L2. K1 ⊢ ▶* K2 & L = K2 @@ L2.
61 /2 width=2 by lpx_sn_fwd_append1/ qed-.
63 lemma lpss_fwd_append2: ∀L,K2,L2. L ⊢ ▶* K2 @@ L2 →
64 ∃∃K1,L1. K1 ⊢ ▶* K2 & L = K1 @@ L1.
65 /2 width=2 by lpx_sn_fwd_append2/ qed-.
67 (* Basic_1: removed theorems 28:
68 csubst0_clear_O csubst0_drop_lt csubst0_drop_gt csubst0_drop_eq
69 csubst0_clear_O_back csubst0_clear_S csubst0_clear_trans
70 csubst0_drop_gt_back csubst0_drop_eq_back csubst0_drop_lt_back
71 csubst0_gen_sort csubst0_gen_head csubst0_getl_ge csubst0_getl_lt
72 csubst0_gen_S_bind_2 csubst0_getl_ge_back csubst0_getl_lt_back
73 csubst0_snd_bind csubst0_fst_bind csubst0_both_bind
74 csubst1_head csubst1_flat csubst1_gen_head
75 csubst1_getl_ge csubst1_getl_lt csubst1_getl_ge_back getl_csubst1