~/writing/math-foundations-for-reasoning-models $ ls
Sets, Relations, and Functions
Relation
A relation is a set of ordered pairs that describes which objects are connected.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
Relation
Definition
A relation is a set of ordered pairs.
It describes which objects are connected.
Example:
Relation: lessThan
Pairs: {(1, 2), (1, 3), (2, 3)}
The pair:
(1, 2)
means:
1 is less than 2
Relation = structured connection between objects.
Relation As Selected Pairs
A Cartesian product gives all possible ordered pairs.
Example:
A = {1, 2}
B = {a, b}
A x B = {(1, a), (1, b), (2, a), (2, b)}
A relation selects some of those pairs.
Example:
R = {(1, a), (2, b)}
A relation is a subset of a Cartesian product.
Relation vs Predicate
A predicate can describe a relationship.
Example:
GreaterThan(x, y)
A relation stores the pairs where the predicate is true.
Example:
GreaterThan = {(5, 3), (4, 2)}
Predicate gives the test; relation gives the true pairs.
Relations Can Connect A Set To Itself
Some relations connect elements from one set to elements in the same set.
Example:
A = {1, 2, 3}
R = {(1, 2), (2, 3)}
Here R relates elements of A to other elements of A.
This kind of relation is common when studying ordering, reachability, and graph structure.
Relations can describe internal structure inside a set.
Final Summary
- A relation is a set of ordered pairs.
- A relation describes which objects are connected.
- A relation is a subset of a Cartesian product.
- Predicates and relations are closely connected.
- Relations can connect elements across sets or within the same set.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Ordered Pair