CADiZ

Reference manual / Extended toolkit / section setdefs


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.

section setdefs

Sets

Name

\neq -- Inequality
\notin -- Non-membership

Definition

relation (_ \neq _)

_ \neq _ [X] == { x, y: X | \lnot ( x = y ) }

relation (_ \notin _)

_ \notin _ [X] == { x: X; S: \power X | \lnot ( x \in S ) }

Name

\emptyset -- Empty set
\subseteq -- Subset relation
\subset -- Proper subset relation
\power1 -- Non-empty subsets

Definition

\emptyset [X] == { x: X | false }

relation (_ \subseteq _)

_ \subseteq _ [X] == { S, T: \power X | ( \forall x: S @ x \in T ) }

relation (_ \subset _)

_ \subset _ [X] == { S, T: \power X | S \subseteq T \land S \neq T }

\power1 X == { a: \power X | a \neq \emptyset }

Name

\cup -- Set union
\cap -- Set intersection
\ -- Set difference
\symdiff -- Set symmetric difference

Definition

function 30 leftassoc  (_ \cup _)

_ \cup _ [X] == \lambda S, T: \power X @ { x: X | x \in S \lor x \in T }

function 40 leftassoc  (_ \cap _)

_ \cap _ [X] == \lambda S, T: \power X @ { x: X | x \in S \land x \in T }

function 30 leftassoc  (_ \ _)

_ \ _ [X] == \lambda S, T: \power X @ { x: X | x \in S \land x \notin T }

function 25 leftassoc  (_ \symdiff _)

_ \symdiff _ [X] == \lambda S, T: \power X @ { x: X | \lnot (x \in S \iff x \in 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

\bigcup -- Generalized union
\bigcap -- Generalized intersection

\bigcup [X] == \lambda A: \power (\power X) @ { x: X | (\exists S: A @ x \in S) }

\bigcap [X] == \lambda A: \power (\power X) @ { x: X | (\forall S: A @ x \in S) }

Name

\finset -- Finite sets
\finset1 -- Non-empty finite sets

generic (\finset _)

\finset X ==
\bigcap { A: \power (\power X) |
\emptyset \in A \land \forall a: A; x: X @ a \cup { x } \in A }

\finset1 X ==
\finset X \ { \emptyset }

relation (finite  _)

finite  _ [X] == \finset 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 \in \finset 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 \finset1 X are the non-empty members of \finset X.

Name

id -- Identity relation

Definition

generic (id _)

id X == \lambda x: X @ x

Relations

Name

\rel -- Binary relations
\mapsto -- Maplet
first, second -- Projection functions for ordered pairs

Definition

generic 5 rightassoc  (_ \rel _)

X \rel Y == \power(X \cross Y)

function 10 leftassoc  (_ \mapsto _)

_ \mapsto _ [X,Y] == \lambda p: X \cross Y @ p

first [X,Y] == \lambda p: X \cross Y @ p.1

second [X,Y] == \lambda p: X \cross Y @ p.2

Name

dom, ran -- Domain and range of a relation

Definition

dom [X,Y] == \lambda R: X \rel Y @ { p: R @ p . 1 }

ran [X,Y] == \lambda R: X \rel Y @ { p: R @ p . 2 }

Name

\dres -- Domain restriction
\rres -- Range restriction

Definition

function 61 rightassoc  (_ \dres _)

_ \dres _ [X,Y] == \lambda S: \power X; R: X \rel Y @ { p: R | p . 1 \in S }

function 60 leftassoc  (_ \rres _)

_ \rres _ [X,Y] == \lambda R: X \rel Y; T: \power Y @ { p: R | p . 2 \in T }

Name

\ndres -- Domain subtraction
\nrres -- Range subtraction

Definition

function 61 rightassoc  (_ \ndres _)

_ \ndres _ [X,Y] == \lambda S: \power X; R: X \rel Y @ { p: R | p . 1 \notin S }

function 60 leftassoc  (_ \nrres _)

_ \nrres _ [X,Y] == \lambda R: X \rel Y; T: \power Y @ { p: R | p . 2 \notin T }

Name

_~ -- Relational inversion

Definition

function (_ ~)

_ ~ [X,Y] == \lambda R: X \rel Y @ { p: R @ p . 2 \mapsto p . 1 }

Name

_ \limg _ \rimg -- Relational image

Definition

function (_ \limg _ \rimg)

_ \limg _ \rimg [X,Y] == \lambda R: X \rel Y; S: \power X @ { p: R | p . 1 \in S @ p . 2 }

Name

Upper Bound

Definition

upperBound [X,Y] == \lambda R: X \rel Y @
\lambda S: \power X @ { y: Y | S \cross { y } \subseteq 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

\comp -- Relational composition
\circ -- Functional composition

Definition

function 40 leftassoc  (_ \comp _)

_ \comp _ [X,Y,Z] == \lambda Q: X \rel Y; R: Y \rel Z @
{ q: Q; r: R | q . 2 = r . 1 @ q . 1 \mapsto r . 2 }

function 40 leftassoc  (_ \circ _)

_ \circ _ [X,Y,Z] == \lambda R: Y \rel Z; Q: X \rel Y @
{ q: Q; r: R | q . 2 = r . 1 @ q . 1 \mapsto r . 2 }

Name

disjoint -- Disjointness
partition -- Partitions

Definition

relation (disjoint _)

disjoint _ [I,X] ==
{ S: I \rel \power X | \forall p, q: S | p \neq q @ p . 2 \cap q . 2 = \emptyset }

relation (_ partition _)

_ partition _ [I,X] ==
{ S: I \rel \power X; T: \power X | disjoint S \land \bigcup (ran S) = T }

Name

\oplus -- Overriding

Definition

function 50 leftassoc  (_ \oplus _)

_ \oplus _ [X,Y] == \lambda Q, R: X \rel Y @ ( dom R \ndres Q) \cup 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

generic (transitive  _)

transitive  X == { R: X \rel X | R \comp R \subseteq R }

generic (antisymmetric  _)

antisymmetric  X == { R: X \rel X | R \cap R~ \subseteq id X }

generic (reflexive  _)

reflexive  X == { R: X \rel X | id X \subseteq R }

generic (irreflexive  _)

irreflexive  X == { R: X \rel X | R \cap id X = \emptyset }

generic (preOrder  _)

preOrder  X == transitive  X \cap reflexive  X

generic (order  _)

order  X == transitive  X \cap antisymmetric  X

generic (reflexiveOrder  _)

reflexiveOrder  X == reflexive  X \cap order  X

generic (irreflexiveOrder  _)

irreflexiveOrder  X == irreflexive  X \cap order  X

generic (totalOrder  _)

totalOrder  X == { R: order  X | R \cup R~ \cup id X = X \cross X }

generic (reflexiveTotalOrder  _)

reflexiveTotalOrder  X == reflexive  X \cap totalOrder  X

generic (irreflexiveTotalOrder  _)

irreflexiveTotalOrder  X == irreflexive  X \cap totalOrder  X

reflexiveChain [X] == \lambda R: X \rel X @
    { S: \power X | S \dres R \rres S \in reflexiveTotalOrder S }

irreflexiveChain [X] == \lambda R: X \rel X @
    { S: \power X | S \dres R \rres S \in irreflexiveTotalOrder S }

Name

_+ -- Transitive closure
_* -- Reflexive-transitive closure
do -- Functional closure

Definition

function (_ +)

_ + [X] == \lambda R: X \rel X @
\bigcap { Q: X \rel X | R \subseteq Q \land R \comp Q \subseteq Q }

function (_ *)

_ * [X] == \lambda R: X \rel X @ id X \cup R +

do [X] == \lambda R: X \rel X @
\bigcap { Q: X \rel X | id (X \ dom R) \subseteq Q \land R \comp Q \subseteq Q }

Functions

Name

\pfun -- Partial functions
\fun -- Total functions
\pinj -- Partial injections
\inj -- Total injections
\psurj -- Partial surjections
\surj -- Total surjections
\bij -- Bijections

Definition

generic 5 rightassoc  (_ \pfun _)

X \pfun Y == { f: X \rel Y | \forall p, q: f | p . 1 = q . 1 @ p = q }

generic 5 rightassoc  (_ \fun _)

X \fun Y == { f: X \pfun Y | dom f = X }

generic 5 rightassoc  (_ \pinj _)

X \pinj Y == { f: X \rel Y | \forall p, q: f @ p . 1 = q . 1 \iff p . 2 = q . 2 }

generic 5 rightassoc  (_ \inj _)

X \inj Y == { f: X \pinj Y | dom f = X }

generic 5 rightassoc  (_ \psurj _)

X \psurj Y == { f: X \pfun Y | ran f = Y }

generic 5 rightassoc  (_ \surj _)

X \surj Y == { f: X \fun Y | ran f = Y }

generic 5 rightassoc  (_ \bij _)

X \bij Y == { f: X \inj Y | ran f = Y }

Name

\ffun -- Finite functions
\finj -- Finite injections

Definition

generic 5 rightassoc  (_ \ffun _)

X \ffun Y == { f: X \pfun Y | finite  f }

generic 5 rightassoc  (_ \finj _)

X \finj Y == { f: X \pinj Y | finite  f }

IT 5-Jan-2002