]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/teq_ext.ma
partial commit in static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / teq_ext.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 "static_2/notation/relations/ideq_3.ma".
16 include "static_2/syntax/teqg_ext.ma".
17 include "static_2/syntax/teq.ma".
18
19 (* SYNTACTIC EQUIVALENCE ****************************************************)
20
21 definition ceq: relation3 lenv term term ≝
22            ceqg (pr_eq …).
23
24 definition ceq_ext: lenv → relation bind ≝
25            ceqg_ext (pr_eq …).
26
27 interpretation
28   "context-dependent syntactic equivalence (term)"
29   'IdEq L T1 T2 = (ceq L T1 T2).
30
31 interpretation
32   "context-dependent syntactic equivalence (binder)"
33   'IdEq L I1 I2 = (ceq_ext L I1 I2).
34
35 (* Basic properties *********************************************************)
36
37 lemma ceq_ext_refl (L):
38      reflexive … (ceq_ext L).
39 /2 width=1 by ext2_refl/ qed.
40
41 lemma ceq_ext_sym (L):
42       symmetric … (ceq_ext L).
43 #L @ext2_sym (**) (* full auto does not work *)
44 /2 width=1 by teq_sym/
45 qed-.
46
47 (* Basic inversion lemmas ***************************************************)
48
49 lemma ceq_ext_inv_eq (L):
50       ∀I1,I2. L ⊢ I1 ≡ I2 → I1 = I2.
51 #L #I1 #I2 * -I1 -I2
52 /3 width=4 by teq_inv_eq, eq_f3/
53 qed-.