In abstract algebra, a magma, binar, or, rarely, groupoid is a basic kind of algebraic structure. Specifically, a magma consists of a set equipped with a single binary operation that must be closed by definition. No other properties are imposed.
The term groupoid was introduced in 1927 by Heinrich Brandt describing his Brandt groupoid. The term was then appropriated by B. A. Hausmann and Øystein Ore (1937)[1] in the sense (of a set with a binary operation) used in this article. In a couple of reviews of subsequent papers in Zentralblatt, Brandt strongly disagreed with this overloading of terminology. The Brandt groupoid is a groupoid in the sense used in category theory, but not in the sense used by Hausmann and Ore. Nevertheless, influential books in semigroup theory, including Clifford and Preston (1961) and Howie (1995) use groupoid in the sense of Hausmann and Ore. Hollings (2014) writes that the term groupoid is "perhaps most often used in modern mathematics" in the sense given to it in category theory.[2]
According to Bergman and Hausknecht (1996): "There is no generally accepted word for a set with a not necessarily associative binary operation. The word groupoid is used by many universal algebraists, but workers in category theory and related areas object strongly to this usage because they use the same word to mean 'category in which all morphisms are invertible'. The term magma was used by Serre [Lie Algebras and Lie Groups, 1965]."[3] It also appears in Bourbaki's French: [[Éléments de mathématique]], Algèbre, chapitres 1 à 3, 1970.[4]
A magma is a set M matched with an operation • that sends any two elements to another element, . The symbol • is a general placeholder for a properly defined operation. To qualify as a magma, the set and operation must satisfy the following requirement (known as the magma or closure property):
For all a, b in M, the result of the operation is also in M.
And in mathematical notation:
a,b\inM\impliesa ⋅ b\inM.
If • is instead a partial operation, then is called a partial magma[5] or, more often, a partial groupoid.[5] [6]
A morphism of magmas is a function that maps magma to magma that preserves the binary operation:
f (x • y) = f(x) ∗ f(y).
For example, with M equal to the positive real numbers and * as the geometric mean, N equal to the real number line, and • as the arithmetic mean, a logarithm f is a morphism of the magma (M, *) to (N, •).
proof:
log{\sqrt{xy}} =
logx+logy | |
2 |
The magma operation may be applied repeatedly, and in the general, non-associative case, the order matters, which is notated with parentheses. Also, the operation • is often omitted and notated by juxtaposition:
.
A shorthand is often used to reduce the number of parentheses, in which the innermost operations and pairs of parentheses are omitted, being replaced just with juxtaposition: . For example, the above is abbreviated to the following expression, still containing parentheses:
.A way to avoid completely the use of parentheses is prefix notation, in which the same expression would be written . Another way, familiar to programmers, is postfix notation (reverse Polish notation), in which the same expression would be written, in which the order of execution is simply left-to-right (no currying).
The set of all possible strings consisting of symbols denoting elements of the magma, and sets of balanced parentheses is called the Dyck language. The total number of different ways of writing applications of the magma operator is given by the Catalan number . Thus, for example,, which is just the statement that and are the only two ways of pairing three elements of a magma with two operations. Less trivially, :,,,, and .
There are magmas with elements, so there are 1, 1, 16, 19683,, ... magmas with 0, 1, 2, 3, 4, ... elements. The corresponding numbers of non-isomorphic magmas are 1, 1, 10, 3330,, ... and the numbers of simultaneously non-isomorphic and non-antiisomorphic magmas are 1, 1, 7, 1734,, ... .
A free magma MX on a set X is the "most general possible" magma generated by X (i.e., there are no relations or axioms imposed on the generators; see free object). The binary operation on MX is formed by wrapping each of the two operands in parentheses and juxtaposing them in the same order. For example:
MX can be described as the set of non-associative words on X with parentheses retained.[7]
It can also be viewed, in terms familiar in computer science, as the magma of full binary trees with leaves labelled by elements of X. The operation is that of joining trees at the root. It therefore has a foundational role in syntax.
A free magma has the universal property such that if is a function from X to any magma N, then there is a unique extension of f to a morphism of magmas ′
′ : MX → N.
See also: Free semigroup, Free group, Hall set and Wedderburn–Etherington number.
Magmas are not often studied as such; instead there are several different kinds of magma, depending on what axioms the operation is required to satisfy. Commonly studied types of magma include:
Note that each of divisibility and invertibility imply the cancellation property.
A magma, with ∈, is called
Idempotence | Commutative property | Associative property | Cancellation property | OEIS sequence (labeled) | OEIS sequence (isomorphism classes) | |
---|---|---|---|---|---|---|
add a(0)=1 | ||||||
add a(0)=1 | with a(0)=1 instead of 0 | |||||
a(n)=1 for n=0 and all odd n, a(n)=0 for all even n≥2 | ||||||
a(0)=a(1)=1, a(n)=0 for all n≥2 | a(0)=a(1)=1, a(n)=0 for all n≥2 | |||||
add a(0)=1 | add a(0)=1 | |||||
a(0)=a(1)=1, a(n)=0 for all n≥2 | a(0)=a(1)=1, a(n)=0 for all n≥2 |
The category of magmas, denoted Mag, is the category whose objects are magmas and whose morphisms are magma homomorphisms. The category Mag has direct products, and there is an inclusion functor: as trivial magmas, with operations given by projection .
An important property is that an injective endomorphism can be extended to an automorphism of a magma extension, just the colimit of the (constant sequence of the) endomorphism.
Because the singleton is the terminal object of Mag, and because Mag is algebraic, Mag is pointed and complete.[10]