Set Theory/Relations

From testwiki
Jump to navigation Jump to search

Ordered pairs

To define relations on sets we must have a concept of an ordered pair, as opposed to the unordered pairs the axiom of pair gives. To have a rigorous definition of ordered pair, we aim to satisfy one important property, namely, for elements in a set a,b,c and d, (a,b)=(c,d)a=c  b=d.

As it stands, there are many ways to define an ordered pair to satisfy this property. A definition, then is (a,b)={{a},{a,b}}. (This is simply a definition or a convention that can be useful for set theory.)

Template:Theorem and proof

Relations

Using the definition of ordered pairs, we now introduce the notion of a binary relation. The Cartesian Product of two sets is A×B={(a,b)aAbB},

The simplest definition of a binary relation is a set of ordered pairs. More formally, a set  R  is a relation if zRz=(x,y) for some x,y. We can simplify the notation and write (x,y)R or simply xRy.

We give a few useful definitions of sets used when speaking of relations.

  • The set A is the source and B is the target, with RA×B.
  • The domain of a relation R is defined as dom R={xAy,(x,y)R}, or the set of initial members of ordered pairs contained in R.
  • The range of a relation R is defined as ran R={yBx,(x,y)R}, or the set of all final members of ordered pairs contained in R.
  • The union of the domain and range, field R=dom Rran R, is called the field of R.
  • A relation R is a relation on a set X if field RX.
  • The converse or inverse of R is the set RT={(y,x)(x,y)R}
  • The image of a set E under a relation R is defined as R[E]={yran RxE,(x,y)R}.
  • The preimage of a set F under a relation R is the image of F under RT or RT[F]={xdom RyF,(x,y)R}

The kinship relations uncle of and aunt of show that there are compositions of relations parent of and sibling of. Such compositions express relative multiplication:

We can compose two relations R and S to form one relation SR={(x,z)y,(x,y)R(y,z)S}. So xSRz means that there is some y such that xRyySz.

Benchmark binary relations:

  1. The identity relation on A, IA={(a,b)a,bA,a=b}
  2. The universal relation or the set where each element of A is related to every other element of A. Notation:, A×A is written A2.

The following properties may or may not hold for a relation R on a set X:

  • R is reflexive if xRx holds for all x in X.
  • R is symmetric if xRy implies yRx for all x and y in X.
  • R is antisymmetric if xRy and yRx together imply that x=y for all x and y in X.
  • R is transitive if xRy and yRz together imply that xRz holds for all x, y, and z in X.
  • R is total if the domain of R is A, the source
  • R is univalent if xRy and xRz imply y = z.
  • A relation that is both total and univalent is called a function.

Heterogeneous relations

When A and B are different sets, the relation is heterogeneous. Then relations on a single set A are called homogeneous relations.

Let U be a universe of discourse in a given context. By the power set axiom, there is a set of all the subsets of U called the power set of U written 𝒫(U).

The set membership relation x  A,  AU is a frequently used heterogeneous relation where the domain is U and the range is 𝒫(U).

The converse of set membership is denoted by reflecting the membership glyph: A  x.

As an exercise, show that all relations from A to B are subsets of A×B.

Functions

Definitions

A function may be defined as a particular type of relation. We define a partial function f:XY as some mapping from a set X to another set Y that assigns to each xX no more than one yY. Alternatively, f is a function if and only if ff1IY

If for each xX, f assigns exactly one yY, then f is called a function. The following definitions are commonly used when discussing functions.

  • If fX×Y and f is a function, then we can denote this by writing f:XY. The set X is known as the domain and the set Y is known as the codomain.
  • For a function f:XY, the image of an element xX is yY such that f(x)=y. Alternatively, we can say that y is the value of f evaluated at x.
  • For a function f:XY, the image of a subset A of X is the set {yY:f(x)=y for some xA}. This set is denoted by f(A). Be careful not to confuse this with f(x) for xX, which is an element of Y.
  • The range of a function f:XY is f(X), or all of the values yY where we can find an xX such that f(x)=y.
  • For a function f:XY, the preimage of a subset B of Y is the set {xX:f(x)B}. This is denoted by f1(B).

Properties of functions

A function f:XY is onto, or surjective, if for each yY exists xX such that f(x)=y. It is easy to show that a function is surjective if and only if its codomain is equal to its range. It is one-to-one, or injective, if different elements of X are mapped to different elements of Y, that is f(x)=f(y)x=y. A function that is both injective and surjective is intuitively termed bijective.

Composition of functions

Given two functions f:XY and g:YZ, we may be interested in first evaluating f at some xX and then evaluating g at f(x). To this end, we define the composition of these functions, written gf, as

(gf)(x)=g(f(x))

Note that the composition of these functions maps an element in X to an element in Z, so we would write gf:XZ.

Inverses of functions

If there exists a function g:YX such that for f:XY, gf=IX, we call g a left inverse of f. If a left inverse for f exists, we say that f is left invertible. Similarly, if there exists a function h:YX such that fh=IY then we call h a right inverse of f. If such an h exists, we say that f is right invertible. If there exists an element which is both a left and right inverse of f, we say that such an element is the inverse of f and denote it by f1. Be careful not to confuse this with the preimage of f; the preimage of f always exists while the inverse may not. Proof of the following theorems is left as an exercise to the reader.

Theorem: If a function has both a left inverse g and a right inverse h, then g=h=f1.

Theorem: A function is invertible if and only if it is bijective.

Template:Chapnav Template:BookCat