]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/equivalence/cpcs.ma
49f490bce96967fd7b4a8b8f1dd7fa8c08fd5c3e
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / equivalence / cpcs.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/conversion/cpc.ma".
16
17 (* CONTEXT-SENSITIVE PARALLEL EQUIVALENCE ON TERMS **************************)
18
19 definition cpcs: lenv → relation term ≝ LTC … cpc.
20
21 interpretation "context-sensitive parallel equivalence (term)"
22    'PConvStar L T1 T2 = (cpcs L T1 T2).
23
24 (* Basic eliminators ********************************************************)
25
26 lemma cpcs_ind: ∀L,T1. ∀R:predicate term. R T1 →
27                 (∀T,T2. L ⊢ T1 ⬌* T → L ⊢ T ⬌ T2 → R T → R T2) →
28                 ∀T2. L ⊢ T1 ⬌* T2 → R T2.
29 #L #T1 #R #HT1 #IHT1 #T2 #HT12 @(TC_star_ind … HT1 IHT1 … HT12) //
30 qed-.
31
32 lemma cpcs_ind_dx: ∀L,T2. ∀R:predicate term. R T2 →
33                    (∀T1,T. L ⊢ T1 ⬌ T → L ⊢ T ⬌* T2 → R T → R T1) →
34                    ∀T1. L ⊢ T1 ⬌* T2 → R T1.
35 #L #T2 #R #HT2 #IHT2 #T1 #HT12
36 @(TC_star_ind_dx … HT2 IHT2 … HT12) //
37 qed-.
38
39 (* Basic properties *********************************************************)
40
41 (* Basic_1: was: pc3_refl *)
42 lemma cpcs_refl: ∀L. reflexive … (cpcs L).
43 /2 width=1/ qed.
44
45 (* Basic_1: was: pc3_s *)
46 lemma cpcs_sym: ∀L. symmetric … (cpcs L).
47 #L @TC_symmetric // qed.
48
49 lemma cpc_cpcs: ∀L,T1,T2. L ⊢ T1 ⬌ T2 → L ⊢ T2 ⬌* T2.
50 /2 width=1/ qed.
51
52 lemma cpcs_strap1: ∀L,T1,T,T2. L ⊢ T1 ⬌* T → L ⊢ T ⬌ T2 → L ⊢ T1 ⬌* T2.
53 #L @step qed.
54
55 lemma cpcs_strap2: ∀L,T1,T,T2. L ⊢ T1 ⬌ T → L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
56 #L @TC_strap qed.
57
58 (* Basic_1: was: pc3_pr2_r *)
59 lemma cpr_cpcs_dx: ∀L,T1,T2. L ⊢ T1 ➡ T2 → L ⊢ T1 ⬌* T2.
60 /3 width=1/ qed.
61
62 (* Basic_1: was: pc3_pr2_x *)
63 lemma cpr_cpcs_sn: ∀L,T1,T2. L ⊢ T2 ➡ T1 → L ⊢ T1 ⬌* T2.
64 /3 width=1/ qed.
65
66 lemma cpcs_cpr_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ➡ T2 → L ⊢ T1 ⬌* T2.
67 /3 width=3/ qed.
68
69 (* Basic_1: was: pc3_pr2_u *)
70 lemma cpcs_cpr_strap2: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
71 /3 width=3/ qed.
72
73 lemma cpcs_cpr_div: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
74 /3 width=3/ qed.
75
76 lemma cpr_div: ∀L,T1,T. L ⊢ T1 ➡ T → ∀T2. L ⊢ T2 ➡ T → L ⊢ T1 ⬌* T2.
77 /3 width=3/ qed-.
78
79 (* Basic_1: was: pc3_pr2_u2 *)
80 lemma cpcs_cpr_conf: ∀L,T1,T. L ⊢ T ➡ T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
81 /3 width=3/ qed.
82
83 lemma cpcs_cpss_strap1: ∀L,T1,T. L ⊢ T1 ⬌* T → ∀T2. L ⊢ T ▶* T2 → L ⊢ T1 ⬌* T2.
84 #L #T1 #T #HT1 #T2 #HT2
85 @(cpcs_cpr_strap1 … HT1) -T1 /2 width=3/
86 qed-.
87
88 lemma cpcs_cpss_conf: ∀L,T,T1. L ⊢ T ▶* T1 → ∀T2. L ⊢ T ⬌* T2 → L ⊢ T1 ⬌* T2.
89 #L #T #T1 #HT1 #T2 #HT2
90 @(cpcs_cpr_conf … HT2) -T2 /2 width=3/
91 qed-.
92
93 (* Basic_1: removed theorems 9:
94             clear_pc3_trans pc3_ind_left
95             pc3_head_1 pc3_head_2 pc3_head_12 pc3_head_21
96             pc3_pr2_fsubst0 pc3_pr2_fsubst0_back pc3_fsubst0
97 *)
98 (* Basic_1: removed local theorems 6:
99             pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left
100             pc3_wcpr0_t_aux
101 *)