]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/basic_2/equivalence/cpcs_ltpss.ma
6dc6714a9c5348e3b6b5a36877573440c814f703
[helm.git] / matita / matita / contribs / lambda_delta / basic_2 / equivalence / cpcs_ltpss.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/equivalence/cpcs_cpcs.ma".
16
17 (* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
18
19 (* Properties concerning partial unfold on local environments ***************)
20
21 lemma ltpss_cpr_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
22                       ∀T1,T2. L1 ⊢ T1 ➡ T2 → L2 ⊢ T1 ⬌* T2.
23 #L1 #L2 #d #e #HL12 #T1 #T2 *
24 lapply (ltpss_weak_all … HL12)
25 >(ltpss_fwd_length … HL12) -HL12 #HL12 #T #HT1 #HT2
26 elim (ltpss_tpss_conf … HT2 … HL12) -L1 #T0 #HT0 #HT20
27 @(cprs_div … T0) /3 width=3/ (**) (* /4/ is too slow *)
28 qed.
29
30 lemma ltpss_cprs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
31                        ∀T1,T2. L1 ⊢ T1 ➡* T2 → L2 ⊢ T1 ⬌* T2.
32 #L1 #L2 #d #e #HL12 #T1 #T2 #H @(cprs_ind … H) -T2 //
33 #T #T2 #_ #HT2 #IHT1
34 @(cpcs_trans … IHT1) -T1 /2 width=5/
35 qed.
36
37 lemma ltpss_cpcs_conf: ∀L1,L2,d,e. L1 ▶* [d, e] L2 →
38                        ∀T1,T2. L1 ⊢ T1 ⬌* T2 → L2 ⊢ T1 ⬌* T2.
39 #L1 #L2 #d #e #HL12 #T1 #T2 #H
40 elim (cpcs_inv_cprs … H) -H #T #HT1 #HT2
41 @(cpcs_canc_dx … T) /2 width=5/
42 qed.