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/lpx_sn_lpx_sn.ma".
16 include "basic_2/substitution/lpss_ldrop.ma".
18 (* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
20 (* Main properties on context-sensitive parallel substitution for terms *****)
22 theorem cpss_trans_lpss: lpx_sn_transitive cpss cpss.
23 #L1 #T1 @(f2_ind … fw … L1 T1) -L1 -T1 #n #IH #L1 * [|*]
24 [ #I #Hn #T #H1 #L2 #HL12 #T2 #HT2 destruct
25 elim (cpss_inv_atom1 … H1) -H1
27 elim (cpss_inv_atom1 … HT2) -HT2
29 | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
30 elim (lpss_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
31 elim (lpss_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
32 lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) /3 width=9/
34 | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
35 elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
36 elim (lpss_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
37 lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
38 elim (cpss_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
39 lapply (ldrop_pair2_fwd_fw … HLK1 (#i)) /3 width=9/
41 | #a #I #V1 #T1 #Hn #X1 #H1 #L2 #HL12 #X2 #H2
42 elim (cpss_inv_bind1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
43 elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
44 | #I #V1 #T1 #Hn #X1 #H1 #L2 #HL12 #X2 #H2
45 elim (cpss_inv_flat1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
46 elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
50 (* Basic_1: was only: subst1_trans *)
51 theorem cpss_trans: ∀L. Transitive … (cpss L).
52 /2 width=5 by cpss_trans_lpss/ qed-.
54 (* Properties on context-sensitive parallel substitution for terms **********)
56 (* Basic_1: was only: subst1_subst1 *)
57 lemma lpss_cpss_trans: ∀L1,L2. L1 ⊢ ▶* L2 →
58 ∀T1,T2. L2 ⊢ T1 ▶* T2 → L1 ⊢ T1 ▶* T2.
59 /2 width=5 by cpss_trans_lpss/ qed-.