In mathematics, a partial equivalence relation (often abbreviated as PER, in older literature also called restricted equivalence relation[1]) is a homogeneous binary relation that is symmetric and transitive.
Formally, a relation
is a PER if it holds for all
that: Another more intuitive definition is that
is a PER if there is some subset
is an equivalence relation on
The two definitions are seen to be equivalent by taking
[2] The following properties hold for a partial equivalence relation
: None of these properties is sufficient to imply that the relation is a PER.
[note 3] In type theory, constructive mathematics and their applications to computer science, constructing analogues of subsets is often problematic[4]—in these contexts PERs are therefore more commonly used, particularly to define setoids, sometimes called partial setoids.
Forming a partial setoid from a type and a PER is analogous to forming subsets and quotients in classical set-theoretic mathematics.
The algebraic notion of congruence can also be generalized to partial equivalences, yielding the notion of subcongruence, i.e. a homomorphic relation that is symmetric and transitive, but not necessarily reflexive.
[5] A simple example of a PER that is not an equivalence relation is the empty relation
is a partial function on a set
defined by is a partial equivalence relation, since it is clearly symmetric and transitive.
is undefined on some elements, then
It follows immediately that the largest subset of
is an equivalence relation is precisely the subset on which
Let X and Y be sets equipped with equivalence relations (or PERs)
means that f induces a well-defined function of the quotients
captures both the idea of definedness on the quotients and of two functions inducing the same function on the quotient.
The IEEE 754:2008 standard for floating-point numbers defines an "EQ" relation for floating point values.
This predicate is symmetric and transitive, but is not reflexive because of the presence of NaN values that are not EQ to themselves.