1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/logic/equality/".
17 include "higher_order_defs/relations.ma".
18 include "logic/connectives.ma".
20 inductive eq (A:Type) (x:A) : A \to Prop \def
23 (*CSC: the URI must disappear: there is a bug now *)
24 interpretation "leibnitz's equality"
25 'eq x y = (cic:/matita/logic/equality/eq.ind#xpointer(1/1) _ x y).
26 (*CSC: the URI must disappear: there is a bug now *)
27 interpretation "leibnitz's non-equality"
28 'neq x y = (cic:/matita/logic/connectives/Not.con
29 (cic:/matita/logic/equality/eq.ind#xpointer(1/1) _ x y)).
31 theorem reflexive_eq : \forall A:Type. reflexive A (eq A).
32 simplify.intros.apply refl_eq.
35 theorem symmetric_eq: \forall A:Type. symmetric A (eq A).
36 simplify.intros.elim H. apply refl_eq.
39 theorem sym_eq : \forall A:Type.\forall x,y:A. x=y \to y=x
42 theorem transitive_eq : \forall A:Type. transitive A (eq A).
43 simplify.intros.elim H1.assumption.
46 theorem trans_eq : \forall A:Type.\forall x,y,z:A. x=y \to y=z \to x=z
50 \forall A:Type.\forall x:A. \forall P: A \to Prop.
51 P x \to \forall y:A. y=x \to P y.
52 intros. elim sym_eq ? ? ? H1.assumption.
56 cic:/matita/logic/equality/eq.ind
57 cic:/matita/logic/equality/sym_eq.con
58 cic:/matita/logic/equality/trans_eq.con
59 cic:/matita/logic/equality/eq_ind.con
60 cic:/matita/logic/equality/eq_elim_r.con.
62 theorem eq_f: \forall A,B:Type.\forall f:A\to B.
63 \forall x,y:A. x=y \to f x = f y.
64 intros.elim H.reflexivity.
67 theorem eq_f2: \forall A,B,C:Type.\forall f:A\to B \to C.
68 \forall x1,x2:A. \forall y1,y2:B.
69 x1=x2 \to y1=y2 \to f x1 y1 = f x2 y2.
70 intros.elim H1.elim H.reflexivity.