X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Flibrary%2Flogic%2Fequality.ma;h=77ef0eb82ca2064213d49b0106cf82994a8917e0;hb=91a095f0686ee569ba035e4e30c7d071588cb8e7;hp=fb7e66edfb5fd84071751997cc9ff8a3812567fd;hpb=244d65f63ca6a736b871f9f91328fe8c5524ff05;p=helm.git diff --git a/helm/matita/library/logic/equality.ma b/helm/matita/library/logic/equality.ma index fb7e66edf..77ef0eb82 100644 --- a/helm/matita/library/logic/equality.ma +++ b/helm/matita/library/logic/equality.ma @@ -18,6 +18,13 @@ include "higher_order_defs/relations.ma". inductive eq (A:Type) (x:A) : A \to Prop \def refl_eq : eq A x x. + +(*CSC: the URI must disappear: there is a bug now *) +interpretation "leibnitz's equality" + 'eq x y = (cic:/matita/logic/equality/eq.ind#xpointer(1/1) _ x y). +(*CSC: this alias should disappear. It is now required because the notation for Coq is pre-loaded *) +alias symbol "eq" (instance 0) = "leibnitz's equality". + theorem reflexive_eq : \forall A:Type. reflexive A (eq A). simplify.intros.apply refl_eq. @@ -27,19 +34,19 @@ theorem symmetric_eq: \forall A:Type. symmetric A (eq A). simplify.intros.elim H. apply refl_eq. qed. -theorem sym_eq : \forall A:Type.\forall x,y:A. eq A x y \to eq A y x +theorem sym_eq : \forall A:Type.\forall x,y:A. x=y \to y=x \def symmetric_eq. theorem transitive_eq : \forall A:Type. transitive A (eq A). simplify.intros.elim H1.assumption. qed. -theorem trans_eq : \forall A:Type.\forall x,y,z:A. eq A x y \to eq A y z \to eq A x z +theorem trans_eq : \forall A:Type.\forall x,y,z:A. x=y \to y=z \to x=z \def transitive_eq. theorem eq_elim_r: \forall A:Type.\forall x:A. \forall P: A \to Prop. - P x \to \forall y:A. eq A y x \to P y. + P x \to \forall y:A. y=x \to P y. intros. elim sym_eq ? ? ? H1.assumption. qed. @@ -51,12 +58,12 @@ default "equality" cic:/matita/logic/equality/eq_elim_r.con. theorem eq_f: \forall A,B:Type.\forall f:A\to B. -\forall x,y:A. eq A x y \to eq B (f x) (f y). +\forall x,y:A. x=y \to f x = f y. intros.elim H.reflexivity. qed. theorem eq_f2: \forall A,B,C:Type.\forall f:A\to B \to C. \forall x1,x2:A. \forall y1,y2:B. -eq A x1 x2\to eq B y1 y2\to eq C (f x1 y1) (f x2 y2). +x1=x2 \to y1=y2 \to f x1 y1 = f x2 y2. intros.elim H1.elim H.reflexivity. -qed. \ No newline at end of file +qed.