In abstract algebra, a semiheap is an algebraic structure consisting of a non-empty set H with a ternary operation denoted that satisfies a modified associativity property: 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 into the cyclic group , by defining the identity element, and . Then it produces the following heap: Defining as the identity element and would have given the same heap. Heap of integers If are integers, we can set to produce a heap. We can then choose any integer to be the identity of a new group on the set of integers, with the operation and inverse . 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: 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 the collection of heterogeneous relations between them. For define the ternary operator where qT is the converse relation of q. The result of this composition is also in 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