1.2.7: Operations on Relations
It is often useful to modify or combine relations. In Proposition 2.5.1 , we considered the union of relations, which is just the union of two relations considered as sets of pairs. Similarly, in Proposition 2.5.2 , we considered the relative difference of relations. Here are some other operations we can perform on relations.
Let \(R\) , \(S\) be relations, and \(A\) be any set.
The inverse of \(R\) is \(R^{-1} = \Setabs{\tuple{y, x}}{\tuple{x, y} \in R}\) .
The relative product of \(R\) and \(S\) is \((R \mid S) = \{\tuple{x, z} : \exists y(Rxy \land Syz)\}\) .
The restriction of \(R\) to \(A\) is \(\funrestrictionto{R}{A}= R \cap A^2\) .
The application of \(R\) to \(A\) is \(\funimage{R}{A} = \{y : (\exists x \in A)Rxy\}\)
Let \(S \subseteq \Int^2\) be the successor relation on \(\Int\) , i.e., \(S = \Setabs{\tuple{x, y} \in \Int^2}{x + 1 = y}\) , so that \(Sxy\) iff \(x + 1 = y\) .
\(S^{-1}\) is the predecessor relation on \(\Int\) , i.e., \(\Setabs{\tuple{x,y}\in\Int^2}{x -1 =y}\) .
\(S\mid S\) is \(\Setabs{\tuple{x,y}\in\Int^2}{x + 2 =y}\)
\(\funrestrictionto{S}{\Nat}\) is the successor relation on \(\Nat\) .
\(\funimage{S}{\{1,2,3\}}\) is \(\{2, 3, 4\}\) .
Let \(R \subseteq A^2\) be a binary relation.
The transitive closure of \(R\) is \(R^+ = \bigcup_{0 < n \in \Nat} R^n\) , where we recursively define \(R^1 = R\) and \(R^{n+1} = R^n \mid R\) .
The reflexive transitive closure of \(R\) is \(R^* = R^+ \cup \Id{X}\) .
Take the successor relation \(S \subseteq \Int^2\) . \(S^2xy\) iff \(x + 2 = y\) , \(S^3xy\) iff \(x + 3 = y\) , etc. So \(S^+xy\) iff \(x + n = y\) for some \(n > 1\) . In other words, \(S^+xy\) iff \(x < y\) , and \(S^*xy\) iff \(x \le y\) .
Show that the transitive closure of \(R\) is in fact transitive.