]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/substitution/lpss_cpss.ma
- partial commit: refactoring in the components before "computation"
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / substitution / lpss_cpss.ma
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/grammar/lpx_sn_lpx_sn.ma".
16 include "basic_2/substitution/lpss_ldrop.ma".
17
18 (* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
19
20 (* Main properties on context-sensitive parallel substitution for terms *****)
21
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
26   [ #H destruct
27     elim (cpss_inv_atom1 … HT2) -HT2
28     [ #H destruct //
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/
33     ]
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/
40   ]
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/
47 ]
48 qed-.
49
50 (* Basic_1: was only: subst1_trans *)
51 theorem cpss_trans: ∀L. Transitive … (cpss L).
52 /2 width=5 by cpss_trans_lpss/ qed-.
53
54 (* Properties on context-sensitive parallel substitution for terms **********)
55
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-.