]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_equivalence/cpcs.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_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 "ground_2/lib/star.ma".
16 include "basic_2/notation/relations/pconvstar_5.ma".
17 include "basic_2/rt_conversion/cpc.ma".
18
19 (* CONTEXT-SENSITIVE PARALLEL R-EQUIVALENCE FOR TERMS ***********************)
20
21 definition cpcs: sh → relation4 genv lenv term term ≝
22            λh,G. CTC … (cpc h G).
23
24 interpretation "context-sensitive parallel r-equivalence (term)"
25    'PConvStar h G L T1 T2 = (cpcs h G L T1 T2).
26
27 (* Basic eliminators ********************************************************)
28
29 (* Basic_2A1: was: cpcs_ind_dx *)
30 lemma cpcs_ind_sn (h): ∀G,L,T2. ∀R:predicate term. R T2 →
31                        (∀T1,T. ⦃G, L⦄ ⊢ T1 ⬌[h] T → ⦃G, L⦄ ⊢ T ⬌*[h] T2 → R T → R T1) →
32                        ∀T1. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 → R T1.
33 normalize /3 width=6 by TC_star_ind_dx/
34 qed-.
35
36 (* Basic_2A1: was: cpcs_ind *)
37 lemma cpcs_ind_dx (h): ∀G,L,T1. ∀R:predicate term. R T1 →
38                        (∀T,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T → ⦃G, L⦄ ⊢ T ⬌[h] T2 → R T → R T2) →
39                        ∀T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T2 → R T2.
40 normalize /3 width=6 by TC_star_ind/
41 qed-.
42
43 (* Basic properties *********************************************************)
44
45 (* Basic_1: was: pc3_refl *)
46 lemma cpcs_refl (h): ∀G. c_reflexive … (cpcs h G).
47 /2 width=1 by inj/ qed.
48
49 (* Basic_1: was: pc3_s *)
50 lemma cpcs_sym (h): ∀G,L. symmetric … (cpcs h G L).
51 #h #G #L @TC_symmetric
52 /2 width=1 by cpc_sym/
53 qed-.
54
55 lemma cpc_cpcs (h): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ⬌[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
56 /2 width=1 by inj/ qed.
57
58 (* Basic_2A1: was: cpcs_strap2 *)
59 lemma cpcs_step_sn (h): ∀G,L,T1,T,T2. ⦃G, L⦄ ⊢ T1 ⬌[h] T → ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
60 normalize /2 width=3 by TC_strap/
61 qed-.
62
63 (* Basic_2A1: was: cpcs_strap1 *)
64 lemma cpcs_step_dx (h): ∀G,L,T1,T,T2. ⦃G, L⦄ ⊢ T1 ⬌*[h] T → ⦃G, L⦄ ⊢ T ⬌[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
65 normalize /2 width=3 by step/
66 qed-.
67
68 (* Basic_1: was: pc3_pr2_r *)
69 lemma cpr_cpcs_dx (h): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
70 /3 width=1 by cpc_cpcs, or_introl/ qed.
71
72 (* Basic_1: was: pc3_pr2_x *)
73 lemma cpr_cpcs_sn (h): ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T2 ➡[h] T1 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
74 /3 width=1 by cpc_cpcs, or_intror/ qed.
75
76 (* Basic_1: was: pc3_pr2_u *)
77 (* Basic_2A1: was: cpcs_cpr_strap2 *)
78 lemma cpcs_cpr_step_sn (h): ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T → ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
79 /3 width=3 by cpcs_step_sn, or_introl/ qed-.
80
81 (* Basic_2A1: was: cpcs_cpr_strap1 *)
82 lemma cpcs_cpr_step_dx (h): ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T → ∀T2. ⦃G, L⦄ ⊢ T ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
83 /3 width=3 by cpcs_step_dx, or_introl/ qed-.
84
85 lemma cpcs_cpr_div (h): ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ⬌*[h] T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
86 /3 width=3 by cpcs_step_dx, or_intror/ qed-.
87
88 lemma cpr_div (h): ∀G,L,T1,T. ⦃G, L⦄ ⊢ T1 ➡[h] T → ∀T2. ⦃G, L⦄ ⊢ T2 ➡[h] T → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
89 /3 width=3 by cpr_cpcs_dx, cpcs_step_dx, or_intror/ qed-.
90
91 (* Basic_1: was: pc3_pr2_u2 *)
92 lemma cpcs_cpr_conf (h): ∀G,L,T1,T. ⦃G, L⦄ ⊢ T ➡[h] T1 → ∀T2. ⦃G, L⦄ ⊢ T ⬌*[h] T2 → ⦃G, L⦄ ⊢ T1 ⬌*[h] T2.
93 /3 width=3 by cpcs_step_sn, or_intror/ qed-.
94
95 (* Basic_1: removed theorems 9:
96             clear_pc3_trans pc3_ind_left
97             pc3_head_1 pc3_head_2 pc3_head_12 pc3_head_21
98             pc3_pr2_fqubst0 pc3_pr2_fqubst0_back pc3_fqubst0
99             pc3_gen_abst pc3_gen_abst_shift
100 *)
101 (* Basic_1: removed local theorems 6:
102             pc3_left_pr3 pc3_left_trans pc3_left_sym pc3_left_pc3 pc3_pc3_left
103             pc3_wcpr0_t_aux
104 *)