Relations
Relations and Cartesian Products
Ordered Pair: A pair consisting of a first and a second element is denoted as (a, b).
Ordered Nature: The order is significant, thus (a, b) ≠ (b, a) unless a = b.
Equality of Pairs: Two pairs (a, b) and (x, y) are equal if and only if a = x and b = y.
n-tuple: An extension of a pair allowing for more than two elements.
Example: (a, b, c, d) is a 4-tuple.
Recursive Definition: Tuples can be recursively defined; for instance, (a, b, c, d) is represented as (a, (b, (c, d))).
Cartesian Product: The Cartesian product of two sets X and Y, denoted as X × Y, is defined as the set of all ordered pairs formed by taking one element from X and one from Y.
Formal Representation:
Definition for Tuples: For tuples, the Cartesian product can also be extended, for instance, X × Y × Z represents a 3-tuple.
Alternative Notation:
The product X × X can be written as X², and X × X × X can be written as X³.
Quantifiers can be rewritten:
can be written asFor existential quantification:
can be written as
Relations
Definition of Relation: A relation R between sets X and Y is defined as a set of pairs where
Membership Condition: The relation R between x and y holds if and only if (x, y) is an element of R:
Subset Relation: A relation R is a subset of the Cartesian product; denoted as
Example of Relation: For sets
Let X = {mary, john, fred} and Y = {fluffy, snowball, felix}.
The ownership relation R is given by:
Interpretation: In this case, Mary and Fred both own 'snowball', indicating they may share a household, while 'felix' is identified as a stray cat.
Sets in Relation
Sets Defined in Relation: For R ⊆ X × Y, we have:
Set of Departure (X): The set from which elements originate in the relation.
Set of Destination (Y): The set into which elements are mapped.
Domain (D): The set of all x in X such that there exists a y in Y for which (x, y) is in R:
Image (I): The set of all y in Y such that there exists an x in X for which (x, y) is in R:
Homogeneous Relation: A relation is homogeneous if the set of departure equals the set of destination, i.e., X = Y.
Properties of Homogeneous Relations
Reflexivity:
A relation is reflexive if every element relates to itself.
Formally:
Symmetry:
A relation is symmetric if for any elements x, y, if x relates to y, then y relates to x.
Formally:
Transitivity:
A relation is transitive if whenever x relates to y and y relates to z, then x relates to z.
Formally:
Irreflexivity:
A relation is irreflexive if no element relates to itself.
Formally:
Antisymmetry:
A relation is antisymmetric if x relates to y and y relates to x imply x equals y.
Formally:
Connexity:
A relation is connex if for any two elements, at least one relates to the other.
Formally:
Types of Relations and Their Properties
Equality (=):
Properties: Reflexive, Symmetric, Transitive.
At most (≤):
Properties: Reflexive, Antisymmetric, Transitive, Connex.
Less than (<):
Properties: Irreflexive, Antisymmetric, Transitive, Semi-Connex (connex when x ≠ y).
Subset (⊆):
Properties: Reflexive, Antisymmetric, Transitive.
Understanding Relation Notation
Relation Notation: Relations are often expressed as xRy to mean (x, y) ∈ R.
Partial Function: A relation R is a partial function if for every element x in X, there is at most one (x, y) ∈ R.
Formal definition is:
Multi-valued Function: A relation R is multi-valued if for every element x in X, there is at least one (x, y) ∈ R.
Formal definition:
Function: A relation R is a function if for every element x in X, there is exactly one (x, y) ∈ R.
Formal definition:
Functions
Common Symbolism: Letters such as f, g, h are frequently employed to denote functional relations. Instead of stating f ⊆ A × B, it is typically written as f: A → B.
Functional Relations Definition: If f is a functional relation, it is conventional to represent it as f(a) = b instead of (a, b) ∈ f.
Types of Functions:
Injective Functions: Defined such that
Surjective Functions: Ensures that
Bijective Functions: Defined as a function that is both injective and surjective.
Inverses and Composition of Functions
Inverse of a Function: A relation f⁻¹ that contains (a, b) if and only if (b, a) ∈ f.
If f is bijective, then f⁻¹ is also a function.
If f is injective/surjective, then f⁻¹ is a partial/multi-valued function, respectively.
Function Composition: If and , then the composition is defined such that
Operations as Functions: An operation is considered a function of type .
Binary Operations: Defined as
such as +, ·, ×, ∧.Alternate Representation: Usually written as
instead of or .
Closure of a Set: A set X is defined as closed under an operation when , if for all x in X, the operation satisfies:
Example: The result of adding two natural numbers is always a natural number.
Non-Closure Example: Natural numbers are not closed under subtraction since
.
Closure of a Set Under Operation: The closure of a set X under an operation ⊕ is the smallest superset of X which is closed under ⊕.
Example: The closure of natural numbers (N) under subtraction is the integers (Z).
Transitive Closure of a Relation: The transitive closure S of a relation R is defined by:
and