# Heap (mathematics)

In abstract algebra, a heap (sometimes also called a groud) is a mathematical generalization of a group. Informally speaking, a heap is obtained from a group by "forgetting" which element is the unit, in the same way that an affine space can be viewed as a vector space in which the 0 element has been "forgotten". A heap is essentially the same thing as a torsor, and the category of heaps is equivalent to the category of torsors, with morphisms given by transport of structure under group homomorphisms, but the theory of heaps emphasizes the intrinsic composition law, rather than global structures such as the geometry of bundles.

Formally, a heap is an algebraic structure consisting of a non-empty set H with a ternary operation denoted $[x,y,z]\in H$ that satisfies

• the para-associative law
$[[a,b,c],d,e]=[a,[d,c,b],e]=[a,b,[c,d,e]]\ \forall \ a,b,c,d,e\in H$ • the identity law
$[a,a,x]=[x,a,a]=x\ \forall \ a,x\in H.$ A group can be regarded as a heap under the operation $[x,y,z]=xy^{-1}z$ . Conversely, let H be a heap, and choose an element eH. The binary operation $x*y=[x,e,y]$ makes H into a group with identity e and inverse $x^{-1}=[e,x,e]$ . A heap can thus be regarded as a group in which the identity has yet to be decided.

Whereas the automorphisms of a single object form a group, the set of isomorphisms between two isomorphic objects naturally forms a heap, with the operation $[f,g,h]=fg^{-1}h$ (here juxtaposition denotes composition of functions). This heap becomes a group once a particular isomorphism by which the two objects are to be identified is chosen.

## Examples

### Two element heap

$[a,a,a]=a,\,[a,a,b]=b,\,[b,a,a]=b,\,[b,a,b]=a,$ $[a,b,a]=b,\,[a,b,b]=a,\,[b,b,a]=a,\,[b,b,b]=b.$ ### Heap of a group

As noted above, any group becomes a heap under the operation

$[x,y,z]=xy^{-1}z.$ One important special case:

#### Heap of integers

$x*y=x+y-k$ and inverse

$x^{-1}=2k-x$ .

## Generalizations and related concepts

• A pseudoheap or pseudogroud satisfies the partial para-associative condition
$[[a,b,c],d,e]=[a,b,[c,d,e]].$ • A semiheap or semigroud is required to satisfy only the para-associative law but need not obey the identity law.
An example of a semigroud that is not in general a groud is given by M a ring of matrices of fixed size with
$[x,y,z]=x\cdot y^{\top }\cdot z$ where • denotes matrix multiplication and ⊤ denotes matrix transpose.
$[a,a,[b,b,x]]=[b,b,[a,a,x]]$ and $[[x,a,a],b,b]=[[x,b,b],a,a]$ for all a and b.

A semigroud is a generalised groud if the relation → defined by

$a\rightarrow b\Leftrightarrow [a,b,a]=a$ is reflexive (idempotence) and anti-symmetric. In a generalised groud, → is an order relation.