Phil 735: Relations

Whereas we talk of functions’ having a value for a given argument (or for given arguments, which we’re thinking of as a single tuple), a relation is instead something we talk about as holding (or not holding) between certain arguments. The most familiar kinds of relations are binary relations, like the relation that holds between x and z when x is a parent of z. But there are also ternary relations, like the relation that holds between x and y and z when y is intermediate in size between x and z. And quaternary relations, and so on. Sometimes properties are called “unary relations.”

For a binary relation R, we’d generally write xRy or Rxy to mean that the relation holds between x and y (in that direction; it might not hold between y and x). Often we use symbols (=, <, , ~, , …) to express relations, rather than letters like R.

Notice that unlike functions, relations are permitted to be one-to-many. One x can stand in the parent relation to many zs. But some binary relations are such that whenever they hold between an x and z, they don’t also hold between x and a distinct z′. These relations are called functional or right-unique. This generalizes to the ternary case like this: if the relation holds between x and y and z, it doesn’t also hold between x and y and a z′ distinct from z.

Correspondences between Relations, Functions, and Sets

There is a close affinity between (partial) functions and functional relations. If you have a (n+1)-ary functional relation R, you can define the n-ary partial function which maps an n-tuple (x₁,x₂,...,xn) to a value z iff R holds between x₁,x₂,...,xn and z. (In general, you cannot rely on this being a total function; since R may not hold between every choice of arguments in the domain you’re considering and any value z.) And vice versa: given the function, you can define the corresponding functional relation.

The notion of a relation is more general though, since we can have (n+1)-ary relations to which no n-ary function correponds, like the parent relation. In general, there is no function that returns, for any x, the z that x is a parent of, since there may be several such zs — x may have several children. (Restricted to certain domains of xs, there may be such a function; but in general there won’t be.)

Another way an (n+1)-ary relation could be associated with a function is with the (n+1)-ary (rather than n-ary) function that maps a tuple (x₁,x₂,...,xn,xn+1) to the truth-value true if R holds between x₁,x₂,...,xn and xn+1, and to the truth-value false otherwise.

Earlier, we described a translation between a function and the function’s graph, which is a set. There is a similar translation between a relation and its graph. The graph of an n-ary function is a set of (n+1)-tuples, and that would also be the graph of an (n+1)-ary relation (not an n-ary relation).

So some sets, those whose members are tuples, can be “translated” into corresponding functions and/or relations. If the set contains some tuples (x₁,x₂,...,xn,z) and (x₁,x₂,...,xn,z′), where z ≠ z′, then there is no corresponding n-ary function, but there is still an (n+1)-ary relation.

There’s a different way to translate between sets and functions, akin to our second translation between relations and functions. And this method applies to any set. We say that a set Γ, whose members may be tuples or not, corresponds to a function f: Γ → 𝟚, where 𝟚 is the set of truth-values, such that f(g) = true if g ∈ Γ, and f(g) = false otherwise. This is known as Γ’s characteristic function.

Given all these ways of moving back and forth between sets and functions and relations, it shouldn’t be surprising that many authors will propose to reduce or define some of these notions in terms of others. As I’ve suggested a few times, even if those proposals are correct, we might still reasonably hesitate to build them into our introductory definitions of the notions. And thus I’ve refrained from doing that. Nothing we go on to discuss will turn on whether functions, relations, and sets are three different notions, or they should all be defined in terms of sets, or in terms of functions, or a generalization of one of these notions, or anything else.

Vocabulary like “domain,” “injective,” “surjective,” “composition,” and so on is applied to relations in a way analogous to the way it’s applied to functions. If we talk of a relation’s domain, we’re usually assuming all its arguments come from the same set. x stands in the composition of relation R₁ and relation R₂ to z (which I’ll write as (R₂ ∘ R₁)xz, but there are other notations) iff there’s some y such that x stands in R₁ to y and y stands in R₂ to z.

The inverse of a relation R is defined to be the relation that holds between z and x iff R holds between x and z. Unlike functions, every relation has an inverse.

Sometimes this is instead called the “converse” of the relation. The “inverse” terminology better parallels the use of “inverse” when we talk about functions. The “converse” terminology better parallels our talk about conditionals: C ⊃ A is the converse, not the inverse, of A ⊃ C.

Categories of Relations

Relations can hold between elements of different domains. For example, there’s the binary relation between students and grades that holds iff the student ever was given that grade for a class. When a binary relation holds between elements of the same domain Α, the relation is called homogeneous (not “homogenous”), or just described as “a relation on Α” or “a relation over Α.” (This is akin to the notion of a function being an operation.)

Here is vocabulary describing various categories that a given homogeneous relation might fall under:

Equivalence Relations

A relation is called an equivalence relation iff it’s reflexive, symmetric, and transitive. The identity relation for a domain is an equivalence relation, but usually there will be other equivalence relations too. Authors often use the symbols or or ~ to represent an equivalence relation.

There is a close connection between equivalence relations and partitions of a set, which were defined as: divisions of the set into one or more (non-empty) “cells,” where everything from the original set gets to be in one of the cells, and none of the cells overlap.

Given a partition P of a set Α, there is an equivalence relation defined as “belong to the same cell of P.”

Given an equivalence relation R on domain Α, there is a partition of Α where elements belong to the same cell iff R holds between them. For a specific a ∈ Α, its cell in this partition is sometimes written as [a]R, other times as ⟦a⟧R. When R is clear from context, the subscript is sometimes omitted — though each of the notations [a] and ⟦a⟧ are also used in other ways in formal literature. (This sort of thing happens all the time. I regret it, but that’s how it is.)

Different varieties of totality/completeness for relations

When we talked about functions, we distinguished between “partial” and “total” functions on a domain. (When the qualifier is omitted, in this case it’s assumed to be “total.” We’ll see other cases where an omitted “partial” or “total” is assumed to be “partial.”) The idea here is, does the function give a value for every element of its domain?

When we think about a relation being “total” or “complete” on its domain, there’s a bunch of different properties that could claim to capture at least part of that idea. In this list, the quantifiers are all understood as ranging over R’s domain.

  1. R is serial or left-total: ∀x ∃y (xRy)
  2. ∀x ∀y (x ≠ y ⊃ (xRy ∨ yRx))
  3. ∀x ∀y (xRy ∨ yRx) — this is equivalent to the combination of property (b) plus reflexivity
  4. ∀x ∀y (exactly one of these three hold: x = y, xRy, yRx) — this is equivalent to the combination of property (b) plus asymmetry
  5. ∀x ∀y (xRy) — then R is the universal relation on its domain

The terms complete and total for relations, and also the term connected, don’t have uniform usages. Various authors use them for different items from this list (or for yet other notions). Sometimes (b) is called “weakly connected” and (c) is called “strongly connected”; I’ll use that vocabulary.

Note that property (b) doesn’t constrain whether elements of the domain have the relation to themselves. Maybe they always do; maybe they never do; maybe some do and some don’t.

When for a specific choice of x, y, at least one of xRy or yRx holds, we say that x and y are comparable by that relation. So another way to express property (b) is to say that all pairs of distinct objects from the domain are comparable.

Here are some further properties also capturing a kind of completeness for relations:

  1. ∀u ∀x ∀y ((uRx & uRy) ⊃ x and y have R to each other)
  2. ∀v ∀x ∀y ((xRv & yRv) ⊃ x and y have R to each other)

These are called Euclidean properties. This illustration may help:

Property (f) says that whenever the two relations at the bottom hold (from u to x and to y), then x and y have the relation to each other (the dotted arrows in the middle). Property (g) says that whenever the two relations at the top hold (from x and from y to v), then in that case x and y have the relation to each other. For symmetric relations, transitivity coincides with property (f) and with property (g); but in general being transitive and being Euclidean aren’t the same. One last kind of completeness for relations that we’ll be referring to is called being dense, and is defined like this:

  1. ∀x ∀z (xRz ⊃ ∃y (xRy & yRz))

Note that this allows that y may be identical to x or z.

Examples

In all cases the domain is assumed to be only humans:

Closures

Assume R is a binary relation on a domain Δ. Theorists then sometimes talk about a set Α ⊆ Δ being closed under relation R. This means: ∀a ∈ Α ∀x ∈ Δ (Rax ⊃ x ∈ Α). (Extrapolating, if R is an ternary relation on Δ, Α is closed under R iff ∀a ∈ Α ∀b ∈ Α ∀x ∈ Δ (Rabx ⊃ x ∈ Α). And so on.)

Theorists also sometimes talk about the closure of a set Α under a relation like R. This means the “smallest” superset of Α that is closed under that relation. (Here understanding one set to be smaller than the other when it’s a proper subset. We’ll discuss other ways of comparing the sizes of sets in later classes.) Equivalently, you could define this as the intersection of all supersets of Α that are closed under the relation.

Theorists also talk about closures of relations. For example, the reflexive closure of a relation R is the relation whose graph is {(x,y) | xRy ∨ x = y}. If R is already reflexive, this will be the same relation.

The symmetric closure of a relation R is the relation whose graph is {(x,y) | xRy ∨ yRx}. If R is already symmetric, this will be the same relation.

The transitive closure of a relation is a bit more complicated to define rigorously, but the intuitive idea is like what we’ve just done. Recall that x stands in the composition of relation R₁ and relation R₂ to z (written (R₂ ∘ R₁)xz) iff there’s some y such that x stands in R₁ to y and y stands in R₂ to z. Recall also we had the notation with functions that f¹ = f, f² = f ∘ f, f³ = f ∘ f ∘ f, and so on. Similarly, we can define R¹ = R, R² = R ∘ R, R³ = R ∘ R ∘ R. In general, Rk+1 = R ∘ Rk = Rk ∘ R.

Then the transitive closure of R (sometimes written as R+) can be defined as the relation whose graph is the union of all the Rks for k > 0. That is, .

Here’s another way to think about the transitive closure of a relation R on domain Α. Define a new relation ρ on pairs of As such that (a,b)ρ(a′,c) iff a = a′ & bRc. Above we explained the notion of a closure of a set under a relation. Consider the graph of R (which will be a subset of Α²) and take its closure under relation ρ. Call this resulting set Ρ. Then whenever aRb & bRc, (a,b) will be ∈ R’s graph (and so also its superset Ρ) and will bear ρ to (a,c) (by the definition of ρ), thus since Ρ is closed under ρ, (a,c) will be ∈ Ρ. The relation whose graph is Ρ will be the transitive closure of R.

Often theorists want to work with what’s both the transitive and reflexive closure of a relation. This is the relation whose graph is the union of the graphs of:

The transitive and reflexive closure of R is sometimes written as R*. The general idea behind these superscripts is that * means “0 or more times” and + means “1 or more times.” (Other times R* is used to mean what I’m writing as R+.)

Examples

  1. If R is the relation “is a parent of,” then R+ would be the relation “is an ancestor of”. (Indeed, another way of describing the transitive closure of R is as “the ancestral of R.”) R* would be the relation which is like R+, but which people also stand in to themselves.

  2. Let S be the successor relation on : that is, let xSy mean that y is a successor of x. So 0S1, 1S2, 2S3, and so on. But it’s not the case that 0S2, 0S3, and so on. However 0 will stand in S+ to 2 and to 3. Indeed S+ is equivalent to the relation < on . And S* is equivalent to the relation .