1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "logic/connectives.ma".
16 include "properties/relations.ma".
18 ninductive eq (A: Type[0]) (a: A) : A → CProp[0] ≝
21 nlemma eq_rect_CProp0_r':
22 ∀A.∀a,x.∀p:eq ? x a.∀P: ∀x:A. eq ? x a → CProp[0]. P a (refl A a) → P x p.
23 #A; #a; #x; #p; ncases p; #P; #H; nassumption.
26 nlemma eq_rect_CProp0_r:
27 ∀A.∀a.∀P: ∀x:A. eq ? x a → CProp[0]. P a (refl A a) → ∀x.∀p:eq ? x a.P x p.
28 #A; #a; #x; #p; #x0; #p0; napply eq_rect_CProp0_r'; nassumption.
31 interpretation "leibnitz's equality" 'eq t x y = (eq t x y).
33 interpretation "leibnitz's non-equality" 'neq t x y = (Not (eq t x y)).
35 ndefinition EQ: ∀A:Type[0]. equivalence_relation A.
36 #A; napply mk_equivalence_relation
39 | #x; #y; #H; nrewrite < H; napply refl
40 | #x; #y; #z; #Hyx; #Hxz; nrewrite < Hxz; nassumption]