---
tag: 4RB8834SEJ
kind: concept
name: F-algebra
msc: ["18C15", "08C05", "08A70"]
sources:
  - url: https://en.wikipedia.org/wiki/F-algebra
same_as:
  wikidata: Q1386213
  wikipedia: F-algebra
---

## Summary

For an endofunctor $F$ of a category $\mathcal{C}$, an $F$-algebra is an object $A$ with a morphism $F A \to A$.
For a suitable functor on sets, $F$-algebras are exactly the algebras of a given signature, so the notion generalizes universal algebra without equations.
Inductive data types are [[initial F-algebras|R76EC56V9R]], and the dual notion, [[F-coalgebra|6BS0300CMV]], models state-based systems.
Unlike an algebra over a monad, an $F$-algebra need not satisfy any unit or associativity law.

## Explanations

### L1 human

A structure map $F A \to A$ says how to combine data of the "shape" $F$ into a single element of $A$.
For $F X = 1 \sqcup X$, an $F$-algebra is a set with a chosen element and a function from the set to itself.
The natural numbers with $0$ and $n \mapsto n + 1$ are such an algebra.
For $F X = 1 \sqcup X \times X$, an $F$-algebra is a set with a constant and a binary operation, which is the signature of monoids.
