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 include "logic/equality.ma".
17 definition compose \def
18 \lambda A,B,C:Type.\lambda f:(B\to C).\lambda g:(A\to B).\lambda x:A.
21 interpretation "function composition" 'compose f g =
22 (cic:/matita/higher_order_defs/functions/compose.con _ _ _ f g).
24 definition injective: \forall A,B:Type.\forall f:A \to B.Prop
25 \def \lambda A,B.\lambda f.
26 \forall x,y:A.f x = f y \to x=y.
28 definition surjective: \forall A,B:Type.\forall f:A \to B.Prop
29 \def \lambda A,B.\lambda f.
30 \forall z:B. \exists x:A.z=f x.
32 definition symmetric: \forall A:Type.\forall f:A \to A\to A.Prop
33 \def \lambda A.\lambda f.\forall x,y.f x y = f y x.
35 definition symmetric2: \forall A,B:Type.\forall f:A \to A\to B.Prop
36 \def \lambda A,B.\lambda f.\forall x,y.f x y = f y x.
38 definition associative: \forall A:Type.\forall f:A \to A\to A.Prop
39 \def \lambda A.\lambda f.\forall x,y,z.f (f x y) z = f x (f y z).
43 \forall f:C \to D.\forall g:B \to C.\forall h:A \to B.
44 f \circ (g \circ h) = (f \circ g) \circ h.
49 (* functions and relations *)
50 definition monotonic : \forall A:Type.\forall R:A \to A \to Prop.
51 \forall f:A \to A.Prop \def
52 \lambda A. \lambda R. \lambda f. \forall x,y:A.R x y \to R (f x) (f y).
54 (* functions and functions *)
55 definition distributive: \forall A:Type.\forall f,g:A \to A \to A.Prop
56 \def \lambda A.\lambda f,g.\forall x,y,z:A. f x (g y z) = g (f x y) (f x z).
58 definition distributive2: \forall A,B:Type.\forall f:A \to B \to B.
59 \forall g: B\to B\to B. Prop
60 \def \lambda A,B.\lambda f,g.\forall x:A.\forall y,z:B. f x (g y z) = g (f x y) (f x z).