]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/teq.ma
partial update in static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / teq.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/notation/relations/ideq_2.ma".
16 include "static_2/syntax/teqg.ma".
17
18 (* SYNTACTIC EQUIVALENCE ON TERMS *******************************************)
19
20 definition teq: relation term ≝
21            teqg (eq …).
22
23 interpretation
24   "context-free syntactic equivalence (term)"
25   'IdEq T1 T2 = (teq T1 T2).
26
27 (* Basic properties *********************************************************)
28
29 lemma teq_refl:
30       reflexive … teq.
31 /2 width=1 by teqg_refl/ qed.
32
33 lemma teq_sym:
34       symmetric … teq.
35 /2 width=1 by teqg_sym/ qed-.
36
37 (* Basic inversion lemmas ***************************************************)
38
39 lemma teq_inv_eq:
40       ∀T1,T2. T1 ≡ T2 → T1 = T2.
41 #T1 #T2 #H elim H -H //
42 qed-.
43
44 (* Advanced forward lemmas **************************************************)
45
46 lemma teq_repl_1 (R:predicate …):
47       ∀T1. R T1 → ∀T2. T1 ≡ T2 → R T2.
48 #R #T1 #HT1 #T2 #HT12
49 <(teq_inv_eq … HT12) -T2 //
50 qed-.
51
52 lemma teq_sym_repl_1 (R:predicate …):
53       ∀T1. R T1 → ∀T2. T2 ≡ T1 → R T2.
54 #R #T1 #HT1 #T2 #HT12
55 >(teq_inv_eq … HT12) -T2 //
56 qed-.