# Heap (mathematics)

In abstract algebra, a semiheap is an algebraic structure consisting of a non-empty set H with a ternary operation denoted $\left[x,y,z\right]in H$ that satisfies a modified associativity property:

:$forall a,b,c,d,e in H \left[\left[a,b,c\right],d,e\right] = \left[a,\left[d,c,b\right],e\right] = \left[a,b,\left[c,d,e\right]\right].$

A biunitary element h of a semiheap satisfies [h,h,k] = k = [k,h,h] for every k in H.

A heap is a semiheap in which every element is biunitary.

The term heap is derived from груда, Russian for "heap", "pile", or "stack". Anton Sushkevich used the term in his Theory of Generalized Groups (1937) which influenced Viktor Wagner, promulgator of semiheaps, heaps, and generalized heaps. Груда contrasts with группа (group) which was taken into Russian by transliteration. Indeed, a heap has been called a groud in English text.)

## Examples

#### Two element heap

Turn $H=\left\{a,b\right\}$ into the cyclic group $C_2$, by defining $a$ the identity element, and $bb = a$. Then it produces the following heap:

:$\left[a,a,a\right]=a,, \left[a,a,b\right]=b,, \left[b,a,a\right]=b,, \left[b,a,b\right]=a,$ :$\left[a,b,a\right]=b,, \left[a,b,b\right]=a,, \left[b,b,a\right]=a,, \left[b,b,b\right]=b.$

Defining $b$ as the identity element and $aa=b$ would have given the same heap.

#### Heap of integers

If $x,y,z$ are integers, we can set $\left[x,y,z\right]=x-y+z$ to produce a heap. We can then choose any integer $k$ to be the identity of a new group on the set of integers, with the operation $*$ :$x*y = x+y-k$ and inverse :$x^\left\{-1\right\} = 2k-x$.

### Heap of a groupoid with two objects

One may generalize the notion of the heap of a group to the case of a groupoid which has two objects A and B when viewed as a category. The elements of the heap may be identified with the morphisms from A to B, such that three morphisms x, y, z define a heap operation according to: :$\left[x,y,z\right] = x y^\left\{-1\right\} z .$ This reduces to the heap of a group if a particular morphism between the two objects is chosen as the identity. This intuitively relates the description of isomorphisms between two objects as a heap and the description of isomorphisms between multiple objects as a groupoid.

### Heterogeneous relations

Let A and B be different sets and $mathcal\left\{B\right\}\left(A,B\right)$ the collection of heterogeneous relations between them. For $p, q, r in mathcal\left\{B\right\}\left(A,B\right)$ define the ternary operator $\left[p, q, r\right] = p q^T r$ where q is the converse relation of q. The result of this composition is also in $mathcal\left\{B\right\}\left(A,B\right)$ so a mathematical structure has been formed by the ternary operation. Viktor Wagner was motivated to form this heap by his study of transition maps in an atlas which are partial functions. Thus a heap is more than a tweak of a group: it is a general concept including a group as a trivial case.

## Theorems

Theorem: A semiheap with a biunitary element e may be considered an involuted semigroup with operation give by ab = [a, e, b] and involution by a = [e, a, e].

Theorem: Every semiheap may be embedded in an involuted semigroup.

As in the study of semigroups, the structure of semiheaps is described in terms of ideals with an "i-simple semiheap" being one with no proper ideals. Mustafaeva translated the Green's relations of semigroup theory to semiheaps and defined a ρ class to be those elements generating the same principle two-sided ideal. He then proved that no i-simple semiheap can have more than two ρ classes.

He also described regularity classes of a semiheap S: :$D\left(m,n\right) = \left\{a: exists xin S a = a^n x a^m \right\}$ where n and m have the same parity and the ternary operation of the semiheap applies at the left of a string from S. He proves that S can have at most 5 regularity classes. Mustafaev calls an ideal B "isolated" when $a^n in B implies a in B .$ He then proves that when S = D(2,2), then every ideal is isolated and conversely.

Studying the semiheap Z(A, B) of heterogeneous relations between sets A and B, in 1974 K. A. Zareckii followed Mustafaev's lead to describe ideal equivalence, regularity classes, and ideal factors of a semiheap.

## Generalizations and related concepts

• A pseudoheap or pseudogroud satisfies the partial para-associative condition :$\left[\left[a,b,c\right],d,e\right] = \left[a,b,\left[c,d,e\right]\right] .$
• A Malcev operation satisfies the identity law but not necessarily the para-associative law, that is, a ternary operation $f$ on a set $X$ satisfying the identity $f\left(x, x, y\right) = f\left(y, x, x\right) = y$.
• 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 :::$\left[x,y,z\right] = x cdot y^mathrm\left\{T\right\} cdot z$ ::where • denotes matrix multiplication and T denotes matrix transpose.
• An idempotent semiheap is a semiheap where $\left[a,a,a\right] = a$ for all a.
• A generalised heap or generalised groud is an idempotent semiheap where

::$\left[a,a,\left[b,b,x\right]\right] = \left[b,b,\left[a,a,x\right]\right]$ and $\left[\left[x,a,a\right],b,b\right] = \left[\left[x,b,b\right],a,a\right]$ for all a and b.

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

:$a ightarrow b Leftrightarrow \left[a,b,a\right] = a$

is reflexive (idempotence) and anti-symmetric. In a generalised groud, → is an order relation.