Jump to content

Set Theory/Relations

From Wikibooks, open books for an open world

Note on axioms used. In this section we rely only on the ZF axioms: Extensionality, Pairing, Separation (schema), Union, and Power Set. We do not use Replacement, Choice, or Regularity here. (Choice and Regularity will be introduced later and not used until those chapters.)

Ordered pairs

[edit | edit source]

To define relations on sets we must have a concept of an ordered pair, as opposed to the unordered pairs the Axiom of Pairing gives. We want a coding that satisfies (a,b)=(c,d)⟺a=c ∧ b=d.

A standard definition is the Kuratowski pair (a,b)={{a},{a,b}}.

Theorem

(a,b)=(c,d)⟺a=c ∧ b=d

Proof

(⇐) If a=c and b=d, then the two Kuratowski pairs have the same elements, hence are equal by Extensionality.

(⇒) Suppose {{a},{a,b}}={{c},{c,d}}. Then {a} is one of {c},{c,d}. If {a}={c} then a=c; if {a}={c,d} then c=d=a, hence again a=c. Next, {a,b} is one of {c},{c,d}; it cannot equal {c} unless a=b=c, otherwise {a,b}={c,d} and with a=c we get b=d.

Existence note. The sets {a} and {a,b} exist by Pairing, and then {{a},{a,b}} exists by Pairing again; hence every ordered pair exists.

We extend to longer tuples by recursion: (a,b,c)=((a,b),c), etc.

Relations

[edit | edit source]

Using ordered pairs we define the Cartesian product and relations.

Definition (Cartesian product). For sets A,B, A×B={(a,b)∣a∈A ∧ b∈B}.

Existence of A×B. For any a∈A,b∈B, the Kuratowski pair (a,b) is a subset of 𝒫(A∪B), hence (a,b)∈𝒫(𝒫(A∪B)). Therefore A×B⊆𝒫(𝒫(A∪B)), and by Separation on that ambient set with the formula “∃a∈A,∃b∈B (u=(a,b))”, the subset A×B exists. (Axioms used: Pairing, Union, Power Set, Separation.)

Definition (relation). A (binary) relation is any set all of whose elements are ordered pairs. If R⊆A×B we say the source is A and the target is B; we write (x,y)∈R or x R y.

Domain, range, field. For a relation R define dom R={x:∃y (x,y)∈R},ran R={y:∃x (x,y)∈R},fieldR=dom R∪ran R.

Existence of domain/range. Since R is a set, so are ⋃R and ⋃⋃R (Union twice). Then dom R,ran R⊆⋃⋃R, and both are obtained by Separation inside ⋃⋃R using “∃y ((x,y)∈R)” and “∃x ((x,y)∈R)”. Hence the field is a set as well.

Converse. The (relational) converse of R⊆A×B is RT={(y,x)∈B×A∣(x,y)∈R}, a set by Separation on B×A.

Image and preimage. For E⊆A, R[E]={y∈ran R:∃x∈E(x,y)∈R}. For F⊆B, RT[F]={x∈dom R:∃y∈F(x,y)∈R}. Both exist by Separation (on ran R and dom R respectively).

Composition. If R⊆A×B and S⊆B×C, their composition is S∘R={(x,z)∈A×C: ∃y∈B,((x,y)∈R ∧ (y,z)∈S)}, a set by Separation on A×C.

Benchmark relations.

  1. Identity on A: IA={(a,a):a∈A} (Separation on A×A).
  1. Universal relation on A: A×A.

Elementary properties on a set X. A relation R⊆X×X is: reflexive if (∀x∈X) xRx; symmetric if xRy⇒yRx; antisymmetric if (xRy∧yRx)⇒x=y; transitive if (xRy∧yRz)⇒xRz; total (on X) if dom R=X.

Exercise. Show every relation from A to B is a subset of A×B and therefore a set (by Separation).

Heterogeneous relations

[edit | edit source]

When A and B are different sets, the relation R⊆A×B is heterogeneous. Relations on a single set A (i.e. R⊆A×A) are homogeneous.

Let U be a universe of discourse. By the Power Set axiom, 𝒫(U) exists. The membership relation x∈A (with A⊆U) is a frequently used heterogeneous relation with domain U and range 𝒫(U). Its converse is denoted A∋x.

Functions

[edit | edit source]

Definitions

[edit | edit source]

A relation f⊆X×Y is univalent (a partial function from X to Y) if (x,y)∈f ∧ (x,z)∈f ⇒ y=z. Equivalently (purely relationally), f∘fT⊆IY.

A function f:X→Y is a univalent relation with total domain, i.e. dom f=X. Here X is the domain and Y the codomain.

For a function f:X→Y and A⊆X, the (direct) image is f(A)={y∈Y:∃x∈A, f(x)=y}. The range is f(X). For B⊆Y, the preimage is f−1(B)={x∈X:f(x)∈B}. (Beware: f−1 here denotes the preimage operator; an actual inverse function may not exist.)

Existence of the set of all functions

[edit | edit source]

Let ℛ=𝒫(X×Y) be the set of all relations between X and Y. Then YX={f∈ℛ: dom f=X ∧ f is univalent} is a set by Separation on ℛ. Thus the collection of all functions X→Y is a set in ZF (no Replacement or Choice needed).

Composition of functions

[edit | edit source]

If f:X→Y and g:Y→Z, then (g∘f)(x)=g(f(x)), and g∘f:X→Z is again a function. (Existence as a set follows from the relational composition above; univalence and totality are routine checks.)

Injective, surjective, bijective

[edit | edit source]

A function f:X→Y is surjective if f(X)=Y. It is injective if f(x)=f(x′)⇒x=x′; equivalently (relationally), fT∘f⊆IX. A function is bijective if it is both.

Inverses of functions

[edit | edit source]

For any function f:X→Y, the converse relation fT⊆Y×X always exists. It is a (total) function Y→X iff f is bijective; in that case we write f−1 for the inverse function.

Exercises.

  • If a function has both a left inverse g (g∘f=IX) and a right inverse h (f∘h=IY), show that g=h=f−1.
  • Prove that a function is invertible iff it is bijective.

← Zermelo-Fraenkel (ZF) Axioms · Constructing Numbers →