]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/lsubr/lpss_cpss.etc
- extended multiple substitutions now uses bounds in ynat (ie. they
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / lsubr / lpss_cpss.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 include "basic_2/grammar/lpx_sn_lpx_sn.ma".
16 include "basic_2/substitution/fsupp.ma".
17 include "basic_2/substitution/lpss_ldrop.ma".
18
19 (* SN PARALLEL SUBSTITUTION FOR LOCAL ENVIRONMENTS **************************)
20
21 (* Main properties on context-sensitive parallel substitution for terms *****)
22
23 theorem cpss_trans_lpss: lpx_sn_transitive cpss cpss.
24 #L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L0 #T0 #IH #L1 * [|*]
25 [ #I #HL #HT #T #H1 #L2 #HL12 #T2 #HT2 destruct
26   elim (cpss_inv_atom1 … H1) -H1
27   [ #H destruct
28     elim (cpss_inv_atom1 … HT2) -HT2
29     [ #H destruct //
30     | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
31       elim (lpss_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
32       elim (lpss_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
33       lapply (fsupp_lref … HLK1) /3 width=9/
34     ]
35   | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
36     elim (lpss_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
37     elim (lpss_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
38     lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
39     elim (cpss_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
40     lapply (fsupp_lref … HLK1) /3 width=9/
41   ]
42 | #a #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
43   elim (cpss_inv_bind1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
44   elim (cpss_inv_bind1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
45 | #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
46   elim (cpss_inv_flat1 … H1) -H1 #V #T #HV1 #HT1 #H destruct
47   elim (cpss_inv_flat1 … H2) -H2 #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
48 ]
49 qed-.
50
51 (* Basic_1: was only: subst1_trans *)
52 theorem cpss_trans: ∀L. Transitive … (cpss L).
53 /2 width=5 by cpss_trans_lpss/ qed-.
54
55 (* Properties on context-sensitive parallel substitution for terms **********)
56
57 (* Basic_1: was only: subst1_subst1 *)
58 lemma lpss_cpss_trans: ∀L1,L2. L1 ⊢ ▶* L2 →
59                        ∀T1,T2. L2 ⊢ T1 ▶* T2 → L1 ⊢ T1 ▶* T2.
60 /2 width=5 by cpss_trans_lpss/ qed-.