---
tag: V389A4WGH9
kind: concept
name: Heap
msc: [20N10, 08A62]
sources:
  - url: https://en.wikipedia.org/wiki/Heap_(mathematics)
same_as:
  wikidata: Q5691503
  wikipedia: Heap (mathematics)
---

## Summary

A heap is a set with a [[ternary operation|WC47MFR6GW]] $[x, y, z]$ that behaves like $x y^{-1} z$ in a [[group|G5S1M9]].
It is a group in which no element has been chosen as the identity.
Every nonempty heap becomes a group as soon as one element is chosen to play the identity, and the groups for different choices are isomorphic.
Heaps describe structures without a natural identity, such as the set of bijections between two sets of the same size.
They are closely related to [[torsors|5CYEQY4SWR]].

## Explanations

### L1 human

Think of the points of a plane, where nothing marks an origin.
You cannot add two points, but from three points $x$, $y$, $z$ you can form $x - y + z$: move $z$ by the arrow that goes from $y$ to $x$.
A heap keeps exactly this three-point operation.
For example, the set of bijections from a set $A$ to a set $B$ is a heap with $[f, g, h] = f \circ g^{-1} \circ h$, though there is no natural "identity bijection" from $A$ to $B$.
