Is it possible to define relations in terms of functions?

61 Views Asked by At

The usual way is to define relations first, then functions in terms of relations.

Is it possible to reverse this, and define functions first, and then relations in terms of functions?

2

There are 2 best solutions below

1
On BEST ANSWER

Surely. Given sets $X$ and $Y$, a relation is a family of functions $$\{f_i: X_i\rightarrow Y|i\in I, X_i\subset X\}$$

To interpret this in the usual definition of relations, $(x,y)$ is said to satisfy this relation iff there is $i\in I$, $x\in X_i$ such that $f_i(x)=y$.

To make it intuitive, say we want to describe father-son relation, then $f_i$ could be the $i$-th son of a father. $X_i$ has to be a susbset, as not everyone has $i$ sons.

However, in this way, we need to define an equivalence between different families of functions that essentially describe the same relation.

Or a relation is a function $f:X\rightarrow 2^Y$. And $(x,y)$ is said to satisfy this relation iff $y\in f(x)$. In this case we can assume the domain is just $X$, as if no $y$ has the relation with $x$, we may just define $f(x)=\emptyset$. In the above example, we just map a father to the set of his sons, without worrying about which son is represented by which $f_i$.

Anyway, a relation is just a multivalue function.

0
On

Some computer languages do this.

A "relation" on sets $A_1,\dots,A_n$ is a function with domain $A_1 \times \dots \times A_n$ and codomain $\{\text{true},\text{false}\}$.
Also $A_1\times \dots \times A_n$ is the set of functions $p$ with domain $\{1,2,\dots,n\}$ such that $p(k) \in A_k$ for all $k$.