HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, specifically in
category theory Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
, ''F''-algebras generalize the notion of
algebraic structure In mathematics, an algebraic structure or algebraic system consists of a nonempty set ''A'' (called the underlying set, carrier set or domain), a collection of operations on ''A'' (typically binary operations such as addition and multiplicatio ...
. Rewriting the algebraic laws in terms of
morphism In mathematics, a morphism is a concept of category theory that generalizes structure-preserving maps such as homomorphism between algebraic structures, functions from a set to another set, and continuous functions between topological spaces. Al ...
s eliminates all references to quantified elements from the axioms, and these algebraic laws may then be glued together in terms of a single
functor In mathematics, specifically category theory, a functor is a Map (mathematics), mapping between Category (mathematics), categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) ar ...
''F'', the ''
signature A signature (; from , "to sign") is a depiction of someone's name, nickname, or even a simple "X" or other mark that a person writes on documents as a proof of identity and intent. Signatures are often, but not always, Handwriting, handwritt ...
''. ''F''-algebras can also be used to represent
data structures In computer science, a data structure is a data organization and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, and the functi ...
used in programming, such as
list A list is a Set (mathematics), set of discrete items of information collected and set forth in some format for utility, entertainment, or other purposes. A list may be memorialized in any number of ways, including existing only in the mind of t ...
s and
trees In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, e.g., including only woody plants with secondary growth, only p ...
. The main related concepts are
initial In a written or published work, an initial is a letter at the beginning of a word, a chapter (books), chapter, or a paragraph that is larger than the rest of the text. The word is ultimately derived from the Latin ''initiālis'', which means '' ...
''F''-algebras which may serve to encapsulate the induction principle, and the dual construction ''F''-coalgebras.


Definition

If C is a
category Category, plural categories, may refer to: General uses *Classification, the general act of allocating things to classes/categories Philosophy * Category of being * ''Categories'' (Aristotle) * Category (Kant) * Categories (Peirce) * Category ( ...
, and F : C \rightarrow C is an endofunctor of C, then an F-algebra is a tuple (A, \alpha), where A is an
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an a ...
of C and \alpha is a C-
morphism In mathematics, a morphism is a concept of category theory that generalizes structure-preserving maps such as homomorphism between algebraic structures, functions from a set to another set, and continuous functions between topological spaces. Al ...
F(A) \rightarrow A. The object A is called the ''carrier'' of the algebra. When it is permissible from context, algebras are often referred to by their carrier only instead of the tuple. A
homomorphism In algebra, a homomorphism is a morphism, structure-preserving map (mathematics), map between two algebraic structures of the same type (such as two group (mathematics), groups, two ring (mathematics), rings, or two vector spaces). The word ''homo ...
from an F-algebra (A, \alpha) to an F-algebra (B, \beta) is a C-morphism f : A \rightarrow B such that f \circ \alpha = \beta \circ F(f), according to the following
commutative diagram 350px, The commutative diagram used in the proof of the five lemma In mathematics, and especially in category theory, a commutative diagram is a diagram such that all directed paths in the diagram with the same start and endpoints lead to the s ...
: Equipped with these morphisms, F-algebras constitute a category. The dual construction are F-coalgebras, which are objects A^* together with a morphism \alpha^* : A^* \rightarrow F(A^*).


Examples


Groups

Classically, a
group A group is a number of persons or things that are located, gathered, or classed together. Groups of people * Cultural group, a group whose members share the same cultural identity * Ethnic group, a group whose members share the same ethnic iden ...
is a set G with a ''group law'' m : G \times G \rightarrow G, with m(x,y)=x\cdot y, satisfying three axioms: the existence of an identity element, the existence of an inverse for each element of the group, and associativity. To put this in a categorical framework, first define the identity and inverse as functions (morphisms of the set G) by e :1 \rightarrow G with e(*)=1, and i : G \rightarrow G with i(x)=x^. Here 1 denotes the set with one element 1=\left\, which allows one to identify elements x\in G with morphisms 1 \rightarrow G. It is then possible to write the axioms of a group in terms of functions (note how the existential quantifier is absent): :* \forall x\in G, \forall y\in G, \forall z\in G, m(m(x, y), z) = m(x, m(y, z)), :* \forall x\in G, m(e(*), x) = m(x, e(*)) = x, :* \forall x\in G, m(i(x), x) = m(x, i(x)) = e(*). Then this can be expressed with commutative diagrams: Now use the
coproduct In category theory, the coproduct, or categorical sum, is a construction which includes as examples the disjoint union of sets and of topological spaces, the free product of groups, and the direct sum of modules and vector spaces. The cop ...
(the
disjoint union In mathematics, the disjoint union (or discriminated union) A \sqcup B of the sets and is the set formed from the elements of and labelled (indexed) with the name of the set from which they come. So, an element belonging to both and appe ...
of sets) to glue the three morphisms in one: \alpha = e + i + m according to ::\begin \alpha: +G+G \times G & \to & G,\\ * & \mapsto & 1,\\ x & \mapsto & x^,\\ (x,y) & \mapsto & x \cdot y. \end Thus a group is an F-algebra where F is the functor F(G) = 1 + G + G \times G. However the reverse is not necessarily true. Some F-algebra where F is the functor F(G) = 1 + G + G \times G are not groups. The above construction is used to define
group object In category theory, a branch of mathematics, group objects are certain generalizations of group (mathematics), groups that are built on more complicated structures than Set (mathematics), sets. A typical example of a group object is a topological gr ...
s over an arbitrary category with finite products and a
terminal object In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism . The dual notion is that of a terminal object (also called terminal element): ...
1. When the category admits finite
coproduct In category theory, the coproduct, or categorical sum, is a construction which includes as examples the disjoint union of sets and of topological spaces, the free product of groups, and the direct sum of modules and vector spaces. The cop ...
s, the group objects are F-algebras. For example,
finite group In abstract algebra, a finite group is a group whose underlying set is finite. Finite groups often arise when considering symmetry of mathematical or physical objects, when those objects admit just a finite number of structure-preserving tra ...
s are F-algebras in the category of
finite set In mathematics, particularly set theory, a finite set is a set that has a finite number of elements. Informally, a finite set is a set which one could in principle count and finish counting. For example, is a finite set with five elements. Th ...
s and
Lie group In mathematics, a Lie group (pronounced ) is a group (mathematics), group that is also a differentiable manifold, such that group multiplication and taking inverses are both differentiable. A manifold is a space that locally resembles Eucli ...
s are F-algebras in the category of
smooth manifold In mathematics, a differentiable manifold (also differential manifold) is a type of manifold that is locally similar enough to a vector space to allow one to apply calculus. Any manifold can be described by a collection of charts (atlas). One may ...
s with
smooth map In mathematical analysis, the smoothness of a function is a property measured by the number of continuous derivatives (''differentiability class)'' it has over its domain. A function of class C^k is a function of smoothness at least ; t ...
s.


Algebraic structures

Going one step ahead of
universal algebra Universal algebra (sometimes called general algebra) is the field of mathematics that studies algebraic structures in general, not specific types of algebraic structures. For instance, rather than considering groups or rings as the object of stud ...
, most algebraic structures are ''F''-algebras. For example,
abelian group In mathematics, an abelian group, also called a commutative group, is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written. That is, the group operation is commu ...
s are ''F''-algebras for the same functor ''F''(''G'') = 1 + ''G'' + ''G''×''G'' as for groups, with an additional axiom for commutativity: m \circ t = m ''m''∘''t'' = ''m'', where ''t''(''x'',''y'') = (''y'',''x'') is the transpose on ''G''x''G''.
Monoid In abstract algebra, a monoid is a set equipped with an associative binary operation and an identity element. For example, the nonnegative integers with addition form a monoid, the identity element being . Monoids are semigroups with identity ...
s are ''F''-algebras of signature ''F''(''M'') = 1 + ''M''×''M''. In the same vein,
semigroup In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative internal binary operation on it. The binary operation of a semigroup is most often denoted multiplicatively (just notation, not necessarily th ...
s are ''F''-algebras of signature ''F''(''S'') = ''S''×''S'' Rings, domains and
fields Fields may refer to: Music *Fields (band), an indie rock band formed in 2006 * Fields (progressive rock band), a progressive rock band formed in 1971 * ''Fields'' (album), an LP by Swedish-based indie rock band Junip (2010) * "Fields", a song by ...
are also ''F''-algebras with a signature involving two laws +,•: ''R''×''R'' → R, an additive identity 0: 1 → ''R'', a multiplicative identity 1: 1 → ''R'', and an additive inverse for each element -: ''R'' → ''R''. As all these functions share the same
codomain In mathematics, a codomain, counter-domain, or set of destination of a function is a set into which all of the output of the function is constrained to fall. It is the set in the notation . The term '' range'' is sometimes ambiguously used to ...
''R'' they can be glued into a single signature function 1 + 1 + ''R'' + ''R''×''R'' + ''R''×''R'' → ''R'', with axioms to express associativity,
distributivity In mathematics, the distributive property of binary operations is a generalization of the distributive law, which asserts that the equality x \cdot (y + z) = x \cdot y + x \cdot z is always true in elementary algebra. For example, in elementary ...
, and so on. This makes rings ''F''-algebras on the
category of sets In the mathematical field of category theory, the category of sets, denoted by Set, is the category whose objects are sets. The arrows or morphisms between sets ''A'' and ''B'' are the functions from ''A'' to ''B'', and the composition of mor ...
with signature 1 + 1 + ''R'' + ''R''×''R'' + ''R''×''R''. Alternatively, we can look at the functor ''F''(''R'') = 1 + ''R''×''R'' in the
category of abelian groups In mathematics, the category Ab has the abelian groups as objects and group homomorphisms as morphisms. This is the prototype of an abelian category: indeed, every small abelian category can be embedded in Ab. Properties The zero object o ...
. In that context, the multiplication is a homomorphism, meaning ''m''(''x'' + ''y'', ''z'') = ''m''(''x'',''z'') + ''m''(''y'',''z'') and ''m''(''x'',''y'' + ''z'') = ''m''(''x'',''y'') + ''m''(''x'',''z''), which are precisely the distributivity conditions. Therefore, a ring is an ''F''-algebra of signature 1 + ''R''×''R'' over the category of abelian groups which satisfies two axioms (associativity and identity for the multiplication). When we come to
vector space In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
s and modules, the signature functor includes a
scalar multiplication In mathematics, scalar multiplication is one of the basic operations defining a vector space in linear algebra (or more generally, a module in abstract algebra). In common geometrical contexts, scalar multiplication of a real Euclidean vector ...
''k''×''E'' → ''E'', and the signature ''F''(''E'') = 1 + ''E'' + ''k''×''E'' is parametrized by ''k'' over the category of fields, or rings.
Algebras over a field In mathematics, an algebra over a field (often simply called an algebra) is a vector space equipped with a bilinear product. Thus, an algebra is an algebraic structure consisting of a set together with operations of multiplication and addition ...
can be viewed as ''F''-algebras of signature 1 + 1 + ''A'' + ''A''×''A'' + ''A''×''A'' + ''k''×''A'' over the category of sets, of signature 1 + ''A''×''A'' over the
category of modules In algebra, given a ring ''R'', the category of left modules over ''R'' is the category whose objects are all left modules over ''R'' and whose morphisms are all module homomorphisms between left ''R''-modules. For example, when ''R'' is the ...
(a module with an internal multiplication), and of signature ''k''×''A'' over the
category of rings In mathematics, the category of rings, denoted by Ring, is the category whose objects are rings (with identity) and whose morphisms are ring homomorphisms (that preserve the identity). Like many categories in mathematics, the category of rings i ...
(a ring with a scalar multiplication), when they are associative and unitary.


Lattice

Not all mathematical structures are ''F''-algebras. For example, a
poset In mathematics, especially order theory, a partial order on a Set (mathematics), set is an arrangement such that, for certain pairs of elements, one precedes the other. The word ''partial'' is used to indicate that not every pair of elements need ...
''P'' may be defined in categorical terms with a morphism ''s'':''P'' × ''P'' → Ω, on a
subobject classifier In mathematics, especially in category theory, a subobject classifier is a special object Ω of a category such that, intuitively, the subobjects of any object ''X'' in the category correspond to the morphisms from ''X'' to Ω. In typical examples, ...
(Ω = in the category of sets and ''s''(''x'',''y'')=1 precisely when ''x''≤''y''). The axioms restricting the morphism ''s'' to define a poset can be rewritten in terms of morphisms. However, as the codomain of ''s'' is Ω and not ''P'', it is not an ''F''-algebra. However, lattices, which are partial orders in which every two elements have a supremum and an infimum, and in particular
total order In mathematics, a total order or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation \leq on some set X, which satisfies the following for all a, b and c in X: # a \leq a ( re ...
s, are ''F''-algebras. This is because they can equivalently be defined in terms of the algebraic operations: ''x''∨''y'' = inf(''x'',''y'') and ''x''∧''y'' = sup(''x'',''y''), subject to certain axioms (commutativity, associativity, absorption and idempotency). Thus they are ''F''-algebras of signature ''P'' x ''P'' + ''P'' x ''P''. It is often said that lattice theory draws on both order theory and universal algebra.


Recurrence

Consider the functor F: \mathrm \to \mathrm that sends a set X to 1+X. Here, \mathrm denotes the category of sets, + denotes the usual
coproduct In category theory, the coproduct, or categorical sum, is a construction which includes as examples the disjoint union of sets and of topological spaces, the free product of groups, and the direct sum of modules and vector spaces. The cop ...
given by the
disjoint union In mathematics, the disjoint union (or discriminated union) A \sqcup B of the sets and is the set formed from the elements of and labelled (indexed) with the name of the set from which they come. So, an element belonging to both and appe ...
, and 1 is a terminal object (i.e. any singleton set). Then, the set \mathbb of
natural number In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. Some start counting with 0, defining the natural numbers as the non-negative integers , while others start with 1, defining them as the positive in ...
s together with the function mathrm,\mathrm: 1+\mathbb \to \mathbb—which is the coproduct of the functions \mathrm : 1 \mapsto 0 and \mathrm : n \mapsto n+1—is an ''F''-algebra.


Initial ''F''-algebra

If the category of ''F''-algebras for a given endofunctor ''F'' has an
initial object In category theory, a branch of mathematics, an initial object of a category is an object in such that for every object in , there exists precisely one morphism . The dual notion is that of a terminal object (also called terminal element) ...
, it is called an initial algebra. The algebra (\mathbb, mathrm,\mathrm in the above example is an initial algebra. Various
finite Finite may refer to: * Finite set, a set whose cardinality (number of elements) is some natural number * Finite verb, a verb form that has a subject, usually being inflected or marked for person and/or tense or aspect * "Finite", a song by Sara Gr ...
data structures In computer science, a data structure is a data organization and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, and the functi ...
used in programming, such as
list A list is a Set (mathematics), set of discrete items of information collected and set forth in some format for utility, entertainment, or other purposes. A list may be memorialized in any number of ways, including existing only in the mind of t ...
s and
trees In botany, a tree is a perennial plant with an elongated stem, or trunk, usually supporting branches and leaves. In some usages, the definition of a tree may be narrower, e.g., including only woody plants with secondary growth, only p ...
, can be obtained as initial algebras of specific endofunctors. Types defined by using
least fixed point In order theory, a branch of mathematics, the least fixed point (lfp or LFP, sometimes also smallest fixed point) of a function from a partially ordered set ("poset" for short) to itself is the fixed point which is less than each other fixed po ...
construct with functor ''F'' can be regarded as an initial ''F''-algebra, provided that
parametricity In programming language theory, parametricity is an abstract uniformity property enjoyed by parametrically polymorphic functions, which captures the intuition that all instances of a polymorphic function act the same way. Idea Consider this ex ...
holds for the type.Philip Wadler
Recursive types for free!
University of Glasgow, June 1990. Draft.
See also
Universal algebra Universal algebra (sometimes called general algebra) is the field of mathematics that studies algebraic structures in general, not specific types of algebraic structures. For instance, rather than considering groups or rings as the object of stud ...
.


Terminal ''F''-coalgebra

In a dual way, a similar relationship exists between notions of
greatest fixed point In order theory, a branch of mathematics, the least fixed point (lfp or LFP, sometimes also smallest fixed point) of a function (mathematics), function from a partially ordered set ("poset" for short) to itself is the fixed point (mathematics), f ...
and terminal ''F''-coalgebra. These can be used for allowing potentially infinite objects while maintaining strong normalization property. In the strongly normalizing
Charity Charity may refer to: Common meanings * Charitable organization or charity, a non-profit organization whose primary objectives are philanthropy and social well-being of persons * Charity (practice), the practice of being benevolent, giving and sha ...
programming language (i.e. each program terminates in it), coinductive data types can be used to achieve surprising results, enabling the definition of
lookup In computer science, a lookup table (LUT) is an array that replaces runtime computation of a mathematical function with a simpler array indexing operation, in a process termed as ''direct addressing''. The savings in processing time can be sig ...
constructs to implement such “strong” functions like the
Ackermann function In computability theory, the Ackermann function, named after Wilhelm Ackermann, is one of the simplest and earliest-discovered examples of a total function, total computable function that is not Primitive recursive function, primitive recursive. ...
. Robin Cockett: Charitable Thoughts ( tp://ftp.cpsc.ucalgary.ca/pub/projects/charity/literature/papers_and_reports/charitable.ps psand tp://ftp.cpsc.ucalgary.ca/pub/projects/charity/literature/papers_and_reports/charitable.ps.gz ps.gz


See also

* Algebras for a monad *
Algebraic data type In computer programming, especially functional programming and type theory, an algebraic data type (ADT) is a kind of composite data type, i.e., a data type formed by combining other types. Two common classes of algebraic types are product ty ...
*
Catamorphism In functional programming, the concept of catamorphism (from the Ancient Greek: "downwards" and "form, shape") denotes the unique homomorphism from an initial algebra into some other algebra. Catamorphisms provide generalizations of '' folds'' o ...
* Dialgebra


Notes


References

* *


External links


Categorical programming with inductive and coinductive types
() by Varmo Vene * Philip Wadler
Recursive types for free!
() University of Glasgow, June 1990. Draft.

() from CLiki * B. Jacobs, J. Rutten
A Tutorial on (Co) Algebras and (Co) Induction. Bulletin of the European Association for Theoretical Computer Science
vol. 62, 1997,
Understanding F-Algebras
({{Webarchive, url=https://web.archive.org/web/20200804134826/https://www.schoolofhaskell.com/user/bartosz/understanding-algebras , date=2020-08-04 ) by Bartosz Milewski Category theory Functional programming