<s>
In	O
mathematics	O
,	O
specifically	O
in	O
category	O
theory	O
,	O
F-algebras	B-Application
generalize	O
the	O
notion	O
of	O
algebraic	O
structure	O
.	O
</s>
<s>
Rewriting	O
the	O
algebraic	O
laws	O
in	O
terms	O
of	O
morphisms	O
eliminates	O
all	O
references	O
to	O
quantified	O
elements	O
from	O
the	O
axioms	O
,	O
and	O
these	O
algebraic	O
laws	O
may	O
then	O
be	O
glued	O
together	O
in	O
terms	O
of	O
a	O
single	O
functor	B-Language
F	O
,	O
the	O
signature	O
.	O
</s>
<s>
F-algebras	B-Application
can	O
also	O
be	O
used	O
to	O
represent	O
data	B-General_Concept
structures	I-General_Concept
used	O
in	O
programming	O
,	O
such	O
as	O
lists	O
and	O
trees	B-Application
.	O
</s>
<s>
The	O
main	O
related	O
concepts	O
are	O
initial	O
F-algebras	B-Application
which	O
may	O
serve	O
to	O
encapsulate	O
the	O
induction	O
principle	O
,	O
and	O
the	O
dual	O
construction	O
F-coalgebras	O
.	O
</s>
<s>
Thus	O
a	O
group	O
is	O
a	O
-algebra	O
where	O
is	O
the	O
functor	B-Language
.	O
</s>
<s>
Some	O
-algebra	O
where	O
is	O
the	O
functor	B-Language
are	O
not	O
groups	O
.	O
</s>
<s>
Going	O
one	O
step	O
ahead	O
of	O
universal	O
algebra	O
,	O
most	O
algebraic	O
structures	O
are	O
F-algebras	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
abelian	O
groups	O
are	O
F-algebras	B-Application
for	O
the	O
same	O
functor	B-Language
F(G )	O
=	O
1	O
+	O
G	O
+	O
G×G	O
as	O
for	O
groups	O
,	O
with	O
an	O
additional	O
axiom	O
for	O
commutativity	O
:	O
m∘t	O
=	O
m	O
,	O
where	O
t(x,y )	O
=	O
(	O
y	O
,	O
x	O
)	O
is	O
the	O
transpose	O
on	O
GxG	O
.	O
</s>
<s>
Monoids	O
are	O
F-algebras	B-Application
of	O
signature	O
F(M )	O
=	O
1	O
+	O
M×M	O
.	O
</s>
<s>
Rings	O
,	O
domains	O
and	O
fields	O
are	O
also	O
F-algebras	B-Application
with	O
a	O
signature	O
involving	O
two	O
laws	O
+	O
,	O
•	O
:	O
R×R	O
R	O
,	O
an	O
additive	O
identity	O
0	O
:	O
1	O
R	O
,	O
a	O
multiplicative	O
identity	O
1	O
:	O
1	O
R	O
,	O
and	O
an	O
additive	O
inverse	O
for	O
each	O
element	O
-	O
:	O
R	O
R	O
.	O
As	O
all	O
these	O
functions	O
share	O
the	O
same	O
codomain	B-Algorithm
R	O
they	O
can	O
be	O
glued	O
into	O
a	O
single	O
signature	O
function	O
1	O
+	O
1	O
+	O
R	O
+	O
R×R	O
+	O
R×R	O
R	O
,	O
with	O
axioms	O
to	O
express	O
associativity	O
,	O
distributivity	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
This	O
makes	O
rings	O
F-algebras	B-Application
on	O
the	O
category	O
of	O
sets	O
with	O
signature	O
1	O
+	O
1	O
+	O
R	O
+	O
R×R	O
+	O
R×R	O
.	O
</s>
<s>
Alternatively	O
,	O
we	O
can	O
look	O
at	O
the	O
functor	B-Language
F(R )	O
=	O
1	O
+	O
R×R	O
in	O
the	O
category	O
of	O
abelian	O
groups	O
.	O
</s>
<s>
Therefore	O
,	O
a	O
ring	O
is	O
an	O
F-algebra	B-Application
of	O
signature	O
1	O
+	O
R×R	O
over	O
the	O
category	O
of	O
abelian	O
groups	O
which	O
satisfies	O
two	O
axioms	O
(	O
associativity	O
and	O
identity	O
for	O
the	O
multiplication	O
)	O
.	O
</s>
<s>
When	O
we	O
come	O
to	O
vector	O
spaces	O
and	O
modules	O
,	O
the	O
signature	O
functor	B-Language
includes	O
a	O
scalar	O
multiplication	O
k×E	O
E	O
,	O
and	O
the	O
signature	O
F(E )	O
=	O
1	O
+	O
E	O
+	O
k×E	O
is	O
parametrized	O
by	O
k	O
over	O
the	O
category	O
of	O
fields	O
,	O
or	O
rings	O
.	O
</s>
<s>
Algebras	O
over	O
a	O
field	O
can	O
be	O
viewed	O
as	O
F-algebras	B-Application
of	O
signature	O
1	O
+	O
1	O
+	O
A	O
+	O
A×A	O
+	O
A×A	O
+	O
k×A	O
over	O
the	O
category	O
of	O
sets	O
,	O
of	O
signature	O
1	O
+	O
A×A	O
over	O
the	O
category	O
of	O
modules	O
(	O
a	O
module	O
with	O
an	O
internal	O
multiplication	O
)	O
,	O
and	O
of	O
signature	O
k×A	O
over	O
the	O
category	O
of	O
rings	O
(	O
a	O
ring	O
with	O
a	O
scalar	O
multiplication	O
)	O
,	O
when	O
they	O
are	O
associative	O
and	O
unitary	O
.	O
</s>
<s>
Not	O
all	O
mathematical	O
structures	O
are	O
F-algebras	B-Application
.	O
</s>
<s>
However	O
,	O
as	O
the	O
codomain	B-Algorithm
of	O
s	O
is	O
Ω	O
and	O
not	O
P	O
,	O
it	O
is	O
not	O
an	O
F-algebra	B-Application
.	O
</s>
<s>
However	O
,	O
lattices	O
,	O
which	O
are	O
partial	O
orders	O
in	O
which	O
every	O
two	O
elements	O
have	O
a	O
supremum	O
and	O
an	O
infimum	O
,	O
and	O
in	O
particular	O
total	O
orders	O
,	O
are	O
F-algebras	B-Application
.	O
</s>
<s>
Thus	O
they	O
are	O
F-algebras	B-Application
of	O
signature	O
P	O
x	O
P	O
+	O
P	O
x	O
P	O
.	O
It	O
is	O
often	O
said	O
that	O
lattice	O
theory	O
draws	O
on	O
both	O
order	O
theory	O
and	O
universal	O
algebra	O
.	O
</s>
<s>
Consider	O
the	O
functor	B-Language
that	O
sends	O
a	O
set	O
to	O
.	O
</s>
<s>
Then	O
,	O
the	O
set	O
of	O
natural	O
numbers	O
together	O
with	O
the	O
function	O
—	O
which	O
is	O
the	O
coproduct	O
of	O
the	O
functions	O
and	O
—	O
is	O
an	O
F-algebra	B-Application
.	O
</s>
<s>
If	O
the	O
category	O
of	O
F-algebras	B-Application
for	O
a	O
given	O
endofunctor	O
F	O
has	O
an	O
initial	O
object	O
,	O
it	O
is	O
called	O
an	O
initial	O
algebra	O
.	O
</s>
<s>
Various	O
finite	O
data	B-General_Concept
structures	I-General_Concept
used	O
in	O
programming	O
,	O
such	O
as	O
lists	O
and	O
trees	B-Application
,	O
can	O
be	O
obtained	O
as	O
initial	O
algebras	O
of	O
specific	O
endofunctors	O
.	O
</s>
<s>
Types	O
defined	O
by	O
using	O
least	O
fixed	O
point	O
construct	O
with	O
functor	B-Language
F	O
can	O
be	O
regarded	O
as	O
an	O
initial	O
F-algebra	B-Application
,	O
provided	O
that	O
parametricity	O
holds	O
for	O
the	O
type	O
.	O
</s>
<s>
each	O
program	O
terminates	O
in	O
it	O
)	O
,	O
coinductive	B-Application
data	O
types	O
can	O
be	O
used	O
to	O
achieve	O
surprising	O
results	O
,	O
enabling	O
the	O
definition	O
of	O
lookup	B-Data_Structure
constructs	O
to	O
implement	O
such	O
“	O
strong	O
”	O
functions	O
like	O
the	O
Ackermann	O
function	O
.	O
</s>
