From: Stefano Zacchiroli Date: Mon, 26 Sep 2005 16:27:18 +0000 (+0000) Subject: function composition notation X-Git-Tag: V_0_7_2_3~310 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=4c002f24d149e7db6525a463268feab09ec8a938;p=helm.git function composition notation --- diff --git a/helm/matita/library/higher_order_defs/functions.ma b/helm/matita/library/higher_order_defs/functions.ma index 321ae46b7..78c2e2f89 100644 --- a/helm/matita/library/higher_order_defs/functions.ma +++ b/helm/matita/library/higher_order_defs/functions.ma @@ -16,6 +16,17 @@ set "baseuri" "cic:/matita/higher_order_defs/functions/". include "logic/equality.ma". +definition compose \def + \lambda A,B,C:Type.\lambda f:(B\to C).\lambda g:(A\to B).\lambda x:A. + f (g x). + +notation "hvbox(a break \circ b)" + left associative with precedence 70 +for @{ 'compose $a $b }. + +interpretation "function composition" 'compose f g = + (cic:/matita/higher_order_defs/functions/compose.con _ _ _ f g). + definition injective: \forall A,B:Type.\forall f:A \to B.Prop \def \lambda A,B.\lambda f. \forall x,y:A.f x = f y \to x=y. @@ -33,6 +44,14 @@ definition symmetric2: \forall A,B:Type.\forall f:A \to A\to B.Prop definition associative: \forall A:Type.\forall f:A \to A\to A.Prop \def \lambda A.\lambda f.\forall x,y,z.f (f x y) z = f x (f y z). +theorem eq_f_g_h: + \forall A,B,C,D:Type. + \forall f:C \to D.\forall g:B \to C.\forall h:A \to B. + f \circ (g \circ h) = (f \circ g) \circ h. + intros. + reflexivity. +qed. + (* functions and relations *) definition monotonic : \forall A:Type.\forall R:A \to A \to Prop. \forall f:A \to A.Prop \def