F-algebra
   HOME

TheInfoList



OR:

In mathematics, specifically in category theory, ''F''-algebras generalize the notion of algebraic structure. Rewriting the algebraic laws in terms of morphisms 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 mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, and m ...
''F'', the ''
signature A signature (; from la, signare, "to sign") is a handwritten (and often stylized) 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. The writer of a ...
''. ''F''-algebras can also be used to represent
data structures In computer science, a data structure is a data organization, management, 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, a ...
used in programming, such as
list A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby unio ...
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, including only woody plants with secondary growth, plants that are u ...
. The main related concepts are
initial In a written or published work, an initial capital, also referred to as a drop capital or simply an initial cap, initial, initcapital, initcap or init or a drop cap or drop, is a letter at the beginning of a word, a chapter, or a paragraph that ...
''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: Philosophy and general uses *Categorization, categories in cognitive science, information science and generally * Category of being * ''Categories'' (Aristotle) * Category (Kant) * Categories (Peirce) ...
, and F : C \rightarrow C is an
endofunctor In mathematics, specifically category theory, a functor is a mapping between categories. Functors were first considered in algebraic topology, where algebraic objects (such as the fundamental group) are associated to topological spaces, and ...
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 ...
of C and \alpha is a C- morphism 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 structure-preserving map between two algebraic structures of the same type (such as two groups, two rings, or two vector spaces). The word ''homomorphism'' comes from the Ancient Greek language: () meaning "same" ...
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: 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 ide ...
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 coproduc ...
(the
disjoint union In mathematics, a disjoint union (or discriminated union) of a family of sets (A_i : i\in I) is a set A, often denoted by \bigsqcup_ A_i, with an injection of each A_i into A, such that the images of these injections form a partition of A ( ...
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 a 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 groups that are built on more complicated structures than sets. A typical example of a group object is a topological group, a group whose underlying set is ...
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 coproduc ...
s, the group objects are F-algebras. For example, finite groups 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. T ...
s and Lie groups 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 ma ...
s with
smooth map In mathematical analysis, the smoothness of a function is a property measured by the number of continuous derivatives it has over some domain, called ''differentiability class''. At the very minimum, a function could be considered smooth if ...
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 themselves, not examples ("models") of algebraic structures. For instance, rather than take particular groups as the object of stu ...
, 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 comm ...
s are ''F''-algebras for the same functor ''F''(''G'') = 1 + ''G'' + ''G''×''G'' as for groups, with an additional axiom for commutativity: ''m''∘''t'' = ''m'', where ''t''(''x'',''y'') = (''y'',''x'') is the transpose on ''G''x''G''.
Monoid In abstract algebra, a branch of mathematics, 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 0. Monoid ...
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: ''x''·''y'', or simply ''xy'', ...
s are ''F''-algebras of signature ''F''(''S'') = ''S''×''S''
Rings Ring may refer to: * Ring (jewellery), a round band, usually made of metal, worn as ornamental jewelry * To make a sound with a bell, and the sound made by a bell :(hence) to initiate a telephone connection Arts, entertainment and media Film and ...
, 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 b ...
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, the codomain or set of destination of a function is the 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 refer to either th ...
''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 generalizes 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 arithmeti ...
, 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 as Set, is the category whose objects are sets. The arrows or morphisms between sets ''A'' and ''B'' are the total functions from ''A'' to ''B'', and the composition o ...
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 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 whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called ''scalars''. Scalars are often real numbers, but can ...
s and
module Module, modular and modularity may refer to the concept of modularity. They may also refer to: Computing and engineering * Modular design, the engineering discipline of designing complex devices using separately designed sub-components * Mo ...
s, 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 b ...
''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 a ...
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 (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 ring ...
(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 partially ordered set (also poset) formalizes and generalizes the intuitive concept of an ordering, sequencing, or arrangement of the elements of a set. A poset consists of a set together with a binary r ...
''P'' may be defined in categorical terms with a morphism ''s'':''P'' × ''P'' → Ω, on a
subobject classifier 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, that morphism assigns "true ...
(Ω = 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 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 ( reflex ...
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 coproduc ...
given by the
disjoint union In mathematics, a disjoint union (or discriminated union) of a family of sets (A_i : i\in I) is a set A, often denoted by \bigsqcup_ A_i, with an injection of each A_i into A, such that the images of these injections form a partition of A ( ...
, and 1 is a terminal object (i.e. any
singleton Singleton may refer to: Sciences, technology Mathematics * Singleton (mathematics), a set with exactly one element * Singleton field, used in conformal field theory Computing * Singleton pattern, a design pattern that allows only one instance ...
set). Then, the set \mathbb of
natural number In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country"). Numbers used for counting are called ''cardinal ...
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 is the opposite of infinite. It may refer to: * Finite number (disambiguation) * 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 marke ...
data structures In computer science, a data structure is a data organization, management, 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, a ...
used in programming, such as
list A ''list'' is any set of items in a row. List or lists may also refer to: People * List (surname) Organizations * List College, an undergraduate division of the Jewish Theological Seminary of America * SC Germania List, German rugby unio ...
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, including only woody plants with secondary growth, plants that are u ...
, 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 to itself is the fixed point which is less than each other fixed point, according to the ...
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 themselves, not examples ("models") of algebraic structures. For instance, rather than take particular groups as the object of stu ...
.


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 from a partially ordered set to itself is the fixed point which is less than each other fixed point, according to the ...
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: Giving * 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 sharing * C ...
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 with a simpler array indexing operation. The process is termed as "direct addressing" and LUTs differ from hash tables in a way that, to retrieve a value v wi ...
constructs to implement such “strong” functions like the Ackermann function.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 type, i.e., a type formed by combining other types. Two common classes of algebraic types are product types (i.e., ...
* Catamorphism * 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