Demonic composition

In mathematics, demonic composition is an operation on binary relations that is somewhat comparable to ordinary composition of relations but is robust to refinement of the relations into (partial) functions or injective relations.

Unlike ordinary composition of relations, demonic composition is not associative.

Definition

Suppose R is a binary relation between X and Y and S is a relation between Y and Z. Their right demonic composition R ; S is a relation between X and Z. Its graph is defined as

\{ (x, z) \ | \ x \, (S \circ R) \, z \wedge \forall y \in Y \ (x \, R \, y \Rightarrow y \, S \, z) \}.

Conversely, their left demonic composition R ; S is defined by

\{ (x, z) \  | \ x \, (S \circ R) \, z \wedge \forall y \in Y \ (y \, S \, z \Rightarrow x \, R \, y )\}.

References