In mathematics, demonic composition is an operation on binary relations that is similar to the 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  is a binary relation between  and  and  is a relation between  and   Their   is a relation between  and   Its graph is defined as

Conversely, their   is defined by

References

 .

Algebraic logic
Binary operations
Mathematical relations