X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Flogic%2Fequality.ma;h=f4f12ec6c103a8290765517c95b151985e04cbab;hb=2dc6ec0db2156431948014a6498c9901f8759e39;hp=1f68503df37cdb4cb6d31003da083a42fb51052b;hpb=38aca08eb6a2385504947c96a1cfcd19f71ec0e4;p=helm.git diff --git a/helm/software/matita/library/logic/equality.ma b/helm/software/matita/library/logic/equality.ma index 1f68503df..f4f12ec6c 100644 --- a/helm/software/matita/library/logic/equality.ma +++ b/helm/software/matita/library/logic/equality.ma @@ -1,5 +1,5 @@ (**************************************************************************) -(* ___ *) +(* ___ *) (* ||M|| *) (* ||A|| A project by Andrea Asperti *) (* ||T|| *) @@ -12,20 +12,14 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/logic/equality/". - 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: the URI must disappear: there is a bug now *) -interpretation "leibnitz's non-equality" - 'neq x y = (cic:/matita/logic/connectives/Not.con - (cic:/matita/logic/equality/eq.ind#xpointer(1/1) _ x y)). +interpretation "leibnitz's equality" 'eq t x y = (eq t x y). + +interpretation "leibnitz's non-equality" 'neq t x y = (Not (eq t x y)). theorem eq_rect': \forall A. \forall x:A. \forall P: \forall y:A. x=y \to Type. @@ -54,12 +48,31 @@ qed. variant trans_eq : \forall A:Type.\forall x,y,z:A. x=y \to y=z \to x=z \def transitive_eq. +theorem symmetric_not_eq: \forall A:Type. symmetric A (λx,y.x ≠ y). +unfold symmetric.simplify.intros.unfold.intro.apply H.apply sym_eq.assumption. +qed. + +variant sym_neq: ∀A:Type.∀x,y.x ≠ y →y ≠ x +≝ symmetric_not_eq. + theorem eq_elim_r: \forall A:Type.\forall x:A. \forall P: A \to Prop. P x \to \forall y:A. y=x \to P y. intros. elim (sym_eq ? ? ? H1).assumption. qed. +theorem eq_elim_r': + \forall A:Type.\forall x:A. \forall P: A \to Set. + P x \to \forall y:A. y=x \to P y. +intros. elim (sym_eq ? ? ? H).assumption. +qed. + +theorem eq_elim_r'': + \forall A:Type.\forall x:A. \forall P: A \to Type. + P x \to \forall y:A. y=x \to P y. +intros. elim (sym_eq ? ? ? H).assumption. +qed. + theorem eq_f: \forall A,B:Type.\forall f:A\to B. \forall x,y:A. x=y \to f x = f y. intros.elim H.apply refl_eq. @@ -70,19 +83,28 @@ theorem eq_f': \forall A,B:Type.\forall f:A\to B. intros.elim H.apply refl_eq. qed. -(* -coercion cic:/matita/logic/equality/sym_eq.con. -coercion cic:/matita/logic/equality/eq_f.con. -*) +(* *) +coercion sym_eq. +coercion eq_f. +(* *) default "equality" cic:/matita/logic/equality/eq.ind - cic:/matita/logic/equality/symmetric_eq.con + cic:/matita/logic/equality/sym_eq.con cic:/matita/logic/equality/transitive_eq.con cic:/matita/logic/equality/eq_ind.con cic:/matita/logic/equality/eq_elim_r.con + cic:/matita/logic/equality/eq_rec.con + cic:/matita/logic/equality/eq_elim_r'.con + cic:/matita/logic/equality/eq_rect.con + cic:/matita/logic/equality/eq_elim_r''.con cic:/matita/logic/equality/eq_f.con +(* *) + cic:/matita/logic/equality/eq_OF_eq.con. +(* *) +(* cic:/matita/logic/equality/eq_f'.con. (* \x.sym (eq_f x) *) + *) theorem eq_f2: \forall A,B,C:Type.\forall f:A\to B \to C. \forall x1,x2:A. \forall y1,y2:B.