---
tag: J6X65C2W4P
kind: definition
name: Generated subalgebra
msc: [08A30, 03C07]
defines: 2TQD8NMG9P
uses: [983GZBQYT4, 676H7EGTKJ, 0ZNMMA9TF5]
sources:
  - url: https://en.wikipedia.org/wiki/Substructure_(mathematics)
---

## Definition

Let $\mathbf{A}$ be a [[structure|983GZBQYT4]] with domain $A$ for a signature $\sigma$, and let $X \subseteq A$.
A subset $B \subseteq A$ is *closed* if it contains $c^{\mathbf{A}}$ for each constant symbol $c$ and $f^{\mathbf{A}}(b_1, \dots, b_n) \in B$ for each $n$-ary function symbol $f$ and all $b_1, \dots, b_n \in B$.
The set generated by $X$ is
$$\operatorname{Sg}(X) = \bigcap \set{B \subseteq A : X \subseteq B \text{ and } B \text{ is closed}},$$
the [[intersection|0ZNMMA9TF5]] of all closed subsets that contain $X$.
When $\operatorname{Sg}(X)$ is nonempty, the *subalgebra generated by $X$* is the [[substructure|676H7EGTKJ]] of $\mathbf{A}$ with domain $\operatorname{Sg}(X)$.

## Remarks

The set $A$ itself is closed and an intersection of closed sets is closed, so $\operatorname{Sg}(X)$ is the smallest closed subset containing $X$.
For finitary operations, $\operatorname{Sg}(X) = \bigcup_{k \ge 0} X_k$, where $X_0 = X$ and $X_{k+1}$ is $X_k$ together with the constants and all values $f^{\mathbf{A}}(b_1, \dots, b_n)$ with $b_1, \dots, b_n \in X_k$.

Example: in $(\Z, +, -, 0)$, $\operatorname{Sg}(\set{4, 6}) = 2\Z$.
The set $2\Z$ is closed and contains $4$ and $6$; and any closed set containing $4$ and $6$ contains $6 - 4 = 2$, hence all multiples of $2$.

Non-example: the set $4\Z \cup 6\Z$ contains $\set{4, 6}$ and $0$ but is not $\operatorname{Sg}(\set{4, 6})$, because it is not closed: $4 + 6 = 10$ is not in it.

When $\sigma$ has no constants, $\operatorname{Sg}(\emptyset) = \emptyset$.
