The `definition' parts of this section are a formal specification
of those parts of the mathematical tool-kit which do not depend on numbers.
All objects are defined before they are used,
and all are defined explicitly.
Sets
Name
| -- | Inequality |
| -- | Non-membership |
Definition
relation (_ _) |
_ _ [X] == { x, y: X | ( x = y ) } |
relation (_ _) |
_ _ [X] == { x: X; S: X | ( x S ) } |
Name
| -- | Empty set |
| -- | Subset relation |
| -- | Proper subset relation |
1 | -- | Non-empty subsets |
Definition
[X] == { x: X | false } |
relation (_ _) |
_ _ [X] == { S, T: X | ( x: S x T ) } |
relation (_ _) |
_ _ [X] == { S, T: X | S T S T } |
Name
| -- | Set union |
| -- | Set intersection |
\ | -- | Set difference |
| -- | Set symmetric difference |
Definition
function 30 leftassoc (_ _) |
_ _ [X] == S, T: X { x: X | x S x T } |
function 40 leftassoc (_ _) |
_ _ [X] == S, T: X { x: X | x S x T } |
function 30 leftassoc (_ \ _) |
_ \ _ [X] == S, T: X { x: X | x S x T } |
function 25 leftassoc (_ _) |
_ _ [X] == S, T: X { x: X | (x S x T) } |
Description
These four functions are the only possible non-degenerate functions
between two sets using only the information that they are of the same type
as each other and that the result is of that same common type.
The four functions form a closed family, in that
if we take any two starting sets of the same type, and form any
expression using any number of occurrences of those two sets
and these four functions, the result
will be one which could be expressed by a single use of one of these
functions.
Name
| -- | Generalized union |
| -- | Generalized intersection |
[X] == A: ( X) { x: X | ( S: A x S) } |
[X] == A: ( X) { x: X | ( S: A x S) } |
Name
| -- | Finite sets |
1 | -- | Non-empty finite sets |
generic ( _) |
X == |
{ A: ( X) | |
A a: A; x: X a { x } A } |
finite _ [X] == X |
Description
A subset S of X is finite if and only if it is a member of the set of
finite subsets of X, S
X.
The finite subsets of X form the smallest set which contains the empty set and is closed
under the action of adding single elements of X.
The non-empty finite subsets of X form the smallest set which contains the singleton sets of
X and is closed under the action of adding single elements of X.
The sets in
1 X are the non-empty members of
X.
Name
Definition
id X == x: X x |
Relations
Name
| -- | Binary relations |
| -- | Maplet |
first, second | -- | Projection functions for ordered pairs |
Definition
generic 5 rightassoc (_ _) |
function 10 leftassoc (_ _) |
first [X,Y] == p: X Y p.1 |
second [X,Y] == p: X Y p.2 |
Name
dom, ran | -- | Domain and range of a relation |
Definition
dom [X,Y] == R: X Y { p: R p . 1 } |
ran [X,Y] == R: X Y { p: R p . 2 } |
Name
| -- | Domain restriction |
| -- | Range restriction |
Definition
function 61 rightassoc (_ _) |
_ _ [X,Y] == S: X; R: X Y { p: R | p . 1 S } |
function 60 leftassoc (_ _) |
_ _ [X,Y] == R: X Y; T: Y { p: R | p . 2 T } |
Name
| -- | Domain subtraction |
| -- | Range subtraction |
Definition
function 61 rightassoc (_ _) |
_ _ [X,Y] == S: X; R: X Y { p: R | p . 1 S } |
function 60 leftassoc (_ _) |
_ _ [X,Y] == R: X Y; T: Y { p: R | p . 2 T } |
Name
_~ | -- | Relational inversion |
Definition
_ ~ [X,Y] == R: X Y { p: R p . 2 p . 1 } |
Name
_ _ | -- | Relational image |
Definition
function (_ _ ) |
_ _ [X,Y] == R: X Y; S: X { p: R | p . 1 S p . 2 } |
Name
Definition
upperBound [X,Y] == R: X Y  |
S: X { y: Y | S { y } R } |
Description
The upper bound upperBound R S of a set S through a relation R is the
set of all objects y to which R relates every member x of S.
Name
| -- | Relational composition |
| -- | Functional composition |
Definition
function 40 leftassoc (_ _) |
_ _ [X,Y,Z] == Q: X Y; R: Y Z  |
{ q: Q; r: R | q . 2 = r . 1 q . 1 r . 2 } |
function 40 leftassoc (_ _) |
_ _ [X,Y,Z] == R: Y Z; Q: X Y  |
{ q: Q; r: R | q . 2 = r . 1 q . 1 r . 2 } |
Name
disjoint | -- | Disjointness |
partition | -- | Partitions |
Definition
disjoint _ [I,X] == |
{ S: I X | p, q: S | p q p . 2 q . 2 = } |
_ partition _ [I,X] == |
{ S: I X; T: X | disjoint S (ran S) = T } |
Name
| -- | Overriding |
Definition
function 50 leftassoc (_ _) |
_ _ [X,Y] == Q, R: X Y ( dom R Q) R |
Orders
Name
transitive | -- | Transitive relations |
antisymmetric | -- | Antisymmetric relations |
reflexive | -- | Reflexive relations |
irreflexive | -- | Irreflexive relations |
preOrder | -- | Preorders |
order | -- | Partial orders |
reflexiveOrder | -- | Reflexive partial orders |
irreflexiveOrder | -- | Irreflexive partial orders |
totalOrder | -- | Total orders |
reflexiveTotalOrder | -- | Reflexive total orders |
irreflexiveTotalOrder | -- | Irreflexive total orders |
reflexiveChain | -- | Reflexive chains |
irreflexiveChain | -- | Irreflexive chains |
Definition
transitive X == { R: X X | R R R } |
generic (antisymmetric _) |
antisymmetric X == { R: X X | R R~ id X } |
reflexive X == { R: X X | id X R } |
irreflexive X == { R: X X | R id X = } |
preOrder X == transitive X reflexive X |
order X == transitive X antisymmetric X |
generic (reflexiveOrder _) |
reflexiveOrder X == reflexive X order X |
generic (irreflexiveOrder _) |
irreflexiveOrder X == irreflexive X order X |
totalOrder X == { R: order X | R R~ id X = X X } |
generic (reflexiveTotalOrder _) |
reflexiveTotalOrder X == reflexive X totalOrder X |
generic (irreflexiveTotalOrder _) |
irreflexiveTotalOrder X == irreflexive X totalOrder X |
reflexiveChain [X] == R: X X |
{ S: X | S R S reflexiveTotalOrder S } |
irreflexiveChain [X] == R: X X |
{ S: X | S R S irreflexiveTotalOrder S } |
Name
_+ | -- | Transitive closure |
_* | -- | Reflexive-transitive closure |
do | -- | Functional closure |
Definition
_ + [X] == R: X X  |
{ Q: X X | R Q R Q Q } |
_ * [X] == R: X X id X R + |
do [X] == R: X X  |
{ Q: X X | id (X \ dom R) Q R Q Q } |
Functions
Name
| -- | Partial functions |
| -- | Total functions |
| -- | Partial injections |
| -- | Total injections |
| -- | Partial surjections |
| -- | Total surjections |
| -- | Bijections |
Definition
generic 5 rightassoc (_ _) |
X Y == { f: X Y | p, q: f | p . 1 = q . 1 p = q } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | dom f = X } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | p, q: f p . 1 = q . 1 p . 2 = q . 2 } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | dom f = X } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | ran f = Y } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | ran f = Y } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | ran f = Y } |
Name
| -- | Finite functions |
| -- | Finite injections |
Definition
generic 5 rightassoc (_ _) |
X Y == { f: X Y | finite f } |
generic 5 rightassoc (_ _) |
X Y == { f: X Y | finite f } |
IT 5-Jan-2002