Skip to content
The Lumenary
Advanced undergraduateUndergraduate 110 min

Quotient groups and quotient rings

Declare a whole subgroup to be the identity, or an ideal to be zero, and a new structure appears — clock arithmetic, the complex numbers, the field with four elements. Normality and ideals are exactly what makes this work.

Formally verified · 21 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review
MotivationH

Forgetting on purpose

A clock forgets. At 99 o'clock, adding 55 hours gives 22, not 1414, because the clock treats multiples of 1212 as if they were 00. The arithmetic that results, Z/12Z\Z/12\Z, is not a part of Z\Z. It is Z\Z seen through a lens that cannot tell 22 from 1414. Gauss built the theory of congruences on this idea in 1801, and it is everywhere in computing, from check digits to cryptography.

The same move creates new number systems. Take the real polynomials R[x]\R[x] and declare x2+1=0x^2 + 1 = 0. Every polynomial collapses to a remainder a+bxa + bx, and xx behaves exactly like ii: the result is C\C. Augustin-Louis Cauchy defined the complex numbers this way in 1847. Take polynomials over F2={0,1}\mathbb{F}_2 = \{0, 1\} and declare x2+x+1=0x^2 + x + 1 = 0: the result is a field with four elements, used in error-correcting codes. Take the symmetries of a square and ignore the difference between a symmetry and its composite with the half-turn: the eight symmetries collapse to four.

Each time we form a quotient: we declare a whole subgroup to be the identity, or a whole ideal to be zero, and keep the operations. The question this lesson answers is when this is legitimate. A coset cannot be multiplied by multiplying representatives unless the answer is independent of the representatives chosen. For groups this happens exactly when the subgroup is normal, and for rings exactly when the subgroup is an ideal. Once quotients exist, the isomorphism theorems identify them, and the correspondence "R/IR/I is a field   ⟺  I\iff I is maximal" becomes a machine for building fields.

IntuitionH

Collapsing a subgroup to a point

In Z\Z, collapse the subgroup 3Z3\Z to 00. Every integer becomes equivalent to its remainder, and the integers fall into three remainder families: 3Z3\Z, 1+3Z1 + 3\Z, 2+3Z2 + 3\Z. Adding families by adding representatives works: "(remainder 1) + (remainder 2) = (remainder 0)" holds however the representatives are chosen.

Now try the same thing in the symmetric group S3S_3 with the subgroup H={e,(1 2)}H = \{e, (1\,2)\}. Its three left cosets are

H={e,(1 2)},(1 3)H={(1 3),(1 2 3)},(2 3)H={(2 3),(1 3 2)}.H = \{e, (1\,2)\}, \qquad (1\,3)H = \{(1\,3), (1\,2\,3)\}, \qquad (2\,3)H = \{(2\,3), (1\,3\,2)\}.

Try to define (aH)(bH)=abH(aH)(bH) = abH. Take a=ea = e or a′=(1 2)a' = (1\,2), both in HH, and b=(1 3)b = (1\,3). Then ab=(1 3)ab = (1\,3) lies in (1 3)H(1\,3)H, but a′b=(1 2)(1 3)=(1 3 2)a'b = (1\,2)(1\,3) = (1\,3\,2) lies in (2 3)H(2\,3)H. The "product" of HH and (1 3)H(1\,3)H depends on which representative of HH we picked, so it is not defined at all. The subgroup {e,(1 2)}\{e, (1\,2)\} is not normal, and the first experiment below confirms for every subgroup of three small groups that this is the only obstruction.

Ideals play the same role for rings. Collapsing an additive subgroup II to 00 always gives a well-defined addition, since addition is commutative. For multiplication to survive, II must absorb products: if x≡0x \equiv 0 then rx≡r⋅0=0rx \equiv r \cdot 0 = 0, so rx∈Irx \in I.

DefinitionsH

Quotient groups and quotient rings

Recall from groups that the left cosets aNaN of a subgroup NN partition GG, with aN=bN  ⟺  a−1b∈NaN = bN \iff a^{-1}b \in N, and that NN is normal (N⊴GN \trianglelefteq G) if gNg−1=NgNg^{-1} = N for all gg. Recall from rings that rings have a 11, homomorphisms preserve it, and an ideal is an additive subgroup absorbing multiplication.

Definition— quotient group

For N⊴GN \trianglelefteq G, the quotient group G/NG/N is the set of left cosets of NN with the product (aN)(bN)=abN(aN)(bN) = abN. The quotient map is π:G→G/N\pi : G \to G/N, π(g)=gN\pi(g) = gN. Its order is ∣G/N∣=[G:N]|G/N| = [G : N].

Definition— quotient ring

For a two-sided ideal II of a ring RR, the quotient ring R/IR/I is the set of cosets a+Ia + I with (a+I)+(b+I)=(a+b)+I(a + I) + (b + I) = (a + b) + I and (a+I)(b+I)=ab+I(a + I)(b + I) = ab + I. The quotient map is π(a)=a+I\pi(a) = a + I. We write a≡b(modI)a \equiv b \pmod I when a−b∈Ia - b \in I.

Definition— commutator subgroup and simple group

The commutator subgroup [G,G][G, G] is the subgroup generated by all commutators [a,b]=a−1b−1ab[a, b] = a^{-1}b^{-1}ab. The quotient Gab=G/[G,G]G^{\mathrm{ab}} = G/[G, G] is the abelianisation of GG. A non-trivial group is simple if its only normal subgroups are {e}\{e\} and GG, that is, if it has no non-trivial quotients.

Note

G/NG/N is not a subgroup of GG. Its elements are subsets of GG (cosets), and it is the image of GG under π\pi, not a part of GG. Z\Z has no subgroup of order 22, yet Z/2Z\Z/2\Z has order 22.

Worked examplesH

A gallery of quotients

The identifications below are justified by the first isomorphism theorem (Theorem 3 and Theorem 7). In each case we name the surjective homomorphism whose kernel is the subgroup or ideal.

quotientis isomorphic tovia the homomorphism
Z/nZ\Z/n\Zthe integers modulo nnreduction modulo nn
R/Z\R/\Zthe circle group S1⊂C×S^1 \subset \C^\timest↦e2πitt \mapsto e^{2\pi i t}
C×/R>0\C^\times/\R_{\gt 0}S1S^1z↦z/∣z∣z \mapsto z/\lvert z\rvert
C×/μn\C^\times/\mu_nC×\C^\timesz↦znz \mapsto z^n
Sn/AnS_n/A_n (n≥2n \ge 2){±1}≅Z/2Z\{\pm 1\} \cong \Z/2\Zthe sign
Dn/⟨r⟩D_n/\langle r \rangleZ/2Z\Z/2\Zrotation ↦0\mapsto 0, reflection ↦1\mapsto 1
D4/⟨r2⟩D_4/\langle r^2 \ranglethe Klein four-group(Example below)
GLn(k)/SLn(k)\mathrm{GL}_n(k)/\mathrm{SL}_n(k)k×k^\timesthe determinant
S4/VS_4/VS3S_3action on the three pairings of {1,2,3,4}\{1,2,3,4\}
Z[x]/(x)\Z[x]/(x)Z\Zf↦f(0)f \mapsto f(0)
Z[x]/(2,x)\Z[x]/(2, x)F2\mathbb{F}_2f↦f(0) mod 2f \mapsto f(0) \bmod 2
R[x]/(x2+1)\R[x]/(x^2 + 1)C\Cf↦f(i)f \mapsto f(i)
Z[i]/(2+i)\Z[i]/(2 + i)F5\mathbb{F}_5a+bi↦a−2b mod 5a + bi \mapsto a - 2b \bmod 5
k[x,y]/(y−x2)k[x, y]/(y - x^2)k[t]k[t]x↦tx \mapsto t, y↦t2y \mapsto t^2

Example— The determinant and the special linear group

det⁡:GLn(k)→k×\det : \mathrm{GL}_n(k) \to k^\times is a homomorphism, and it is surjective: det⁡diag⁡(t,1,…,1)=t\det \operatorname{diag}(t, 1, \dots, 1) = t. Its kernel is SLn(k)\mathrm{SL}_n(k), which is therefore normal, and GLn(k)/SLn(k)≅k×\mathrm{GL}_n(k)/\mathrm{SL}_n(k) \cong k^\times. Two matrices lie in the same coset exactly when they have the same determinant: the quotient remembers only the determinant.

Example— Dihedral quotients

In D4D_4, the half-turn r2r^2 commutes with everything, so N={e,r2}N = \{e, r^2\} is normal (it is the centre). D4/ND_4/N has four elements, N,rN,sN,rsNN, rN, sN, rsN, and each squares to the identity: (rN)2=r2N=N(rN)^2 = r^2N = N and (sN)2=N(sN)^2 = N. So D4/ND_4/N is the Klein four-group. By contrast D4/⟨r⟩≅Z/2ZD_4/\langle r \rangle \cong \Z/2\Z only records whether a symmetry flips the square over.

Example— Rings with nilpotents and with idempotents

R[x]/(x2)\R[x]/(x^2) is the ring of dual numbers a+bεa + b\varepsilon with ε2=0\varepsilon^2 = 0. Here (a+bε)(c+dε)=ac+(ad+bc)ε(a + b\varepsilon)(c + d\varepsilon) = ac + (ad + bc)\varepsilon, and f(a+ε)=f(a)+f′(a)εf(a + \varepsilon) = f(a) + f'(a)\varepsilon for every polynomial ff, which gives automatic differentiation. R[x]/(x2−1)\R[x]/(x^2 - 1) looks similar but has idempotents 1±x2\frac{1 \pm x}{2} and is isomorphic to R×R\R \times \R, by the Chinese remainder theorem below. Which quotient you get depends delicately on the polynomial, which is why the theorems that follow matter.

ProofH

Quotient groups and the isomorphism theorems

Theorem— Theorem 1 (when cosets multiply)

Let H≤GH \le G. The rule (aH)(bH)=abH(aH)(bH) = abH is well defined — independent of the representatives a,ba, b — if and only if HH is normal. In that case G/HG/H is a group with identity HH and inverses (aH)−1=a−1H(aH)^{-1} = a^{-1}H, and π:G→G/H\pi : G \to G/H is a surjective homomorphism with kernel HH.

Proof

Normal implies well defined. Suppose aH=a′HaH = a'H and bH=b′HbH = b'H, i.e. a−1a′∈Ha^{-1}a' \in H and b−1b′∈Hb^{-1}b' \in H. Then

(ab)−1(a′b′)=b−1a−1a′b′=(b−1(a−1a′)b)(b−1b′).(ab)^{-1}(a'b') = b^{-1}a^{-1}a'b' = \big(b^{-1}(a^{-1}a')b\big)\big(b^{-1}b'\big).

The first factor is a conjugate of an element of HH, hence in HH by normality, and the second factor is in HH. So abH=a′b′HabH = a'b'H.

Well defined implies normal. Let n∈Hn \in H and g∈Gg \in G. Since eH=nHeH = nH, well-definedness gives (eH)(g−1H)=(nH)(g−1H)(eH)(g^{-1}H) = (nH)(g^{-1}H), that is, g−1H=ng−1Hg^{-1}H = ng^{-1}H. So (g−1)−1(ng−1)=gng−1∈H(g^{-1})^{-1}(ng^{-1}) = gng^{-1} \in H.

Group axioms. Associativity, the identity and inverses are inherited: (aH)(bH)(cH)=abcH(aH)(bH)(cH) = abcH however we bracket, (eH)(aH)=aH(eH)(aH) = aH, and (aH)(a−1H)=H(aH)(a^{-1}H) = H. By definition π(ab)=abH=π(a)π(b)\pi(ab) = abH = \pi(a)\pi(b), π\pi is surjective, and π(g)=H\pi(g) = H iff g∈Hg \in H.

∎

In particular every normal subgroup is the kernel of a homomorphism, namely π\pi. (The groups lesson proved this differently, through the action on cosets.)

Theorem— Theorem 2 (universal property)

Let N⊴GN \trianglelefteq G and let φ:G→H\varphi : G \to H be a homomorphism with N⊆ker⁡φN \subseteq \ker\varphi. Then there is exactly one homomorphism φˉ:G/N→H\bar\varphi : G/N \to H with φˉ∘π=φ\bar\varphi \circ \pi = \varphi, namely φˉ(gN)=φ(g)\bar\varphi(gN) = \varphi(g). Its image is im⁡φ\operatorname{im}\varphi, and its kernel is ker⁡φ/N=π(ker⁡φ)\ker\varphi / N = \pi(\ker\varphi).

GG
G/NG/N
HH
φ\varphi
π\pi
φˉ\bar\varphi
Every homomorphism killing NN factors uniquely through the quotient map: φˉ∘π=φ\bar\varphi \circ \pi = \varphi.

Proof

Uniqueness. Any such φˉ\bar\varphi must satisfy φˉ(gN)=φˉ(π(g))=φ(g)\bar\varphi(gN) = \bar\varphi(\pi(g)) = \varphi(g), and every element of G/NG/N is some gNgN. Existence. If gN=g′NgN = g'N then g−1g′∈N⊆ker⁡φg^{-1}g' \in N \subseteq \ker\varphi, so φ(g)=φ(g′)\varphi(g) = \varphi(g'): the formula is well defined. It is a homomorphism because φˉ(gN g′N)=φ(gg′)=φ(g)φ(g′)\bar\varphi(gN\,g'N) = \varphi(gg') = \varphi(g)\varphi(g'). Its image is clearly im⁡φ\operatorname{im}\varphi, and φˉ(gN)=e  ⟺  g∈ker⁡φ\bar\varphi(gN) = e \iff g \in \ker\varphi.

∎

Theorem— Theorem 3 (first isomorphism theorem)

For every homomorphism φ:G→H\varphi : G \to H,   G/ker⁡φ≅im⁡φ\;G/\ker\varphi \cong \operatorname{im}\varphi, via gker⁡φ↦φ(g)g\ker\varphi \mapsto \varphi(g).

Proof

Apply Theorem 2 with N=ker⁡φN = \ker\varphi. The induced φˉ\bar\varphi has kernel ker⁡φ/ker⁡φ\ker\varphi/\ker\varphi, which is trivial, so it is injective. Its image is im⁡φ\operatorname{im}\varphi.

∎

≅
GG
im⁡φ\operatorname{im}\varphi
G/ker⁡φG/\ker\varphi
HH
φ\varphi
π\pi
φˉ\bar\varphi
Every homomorphism is a surjection, followed by an isomorphism, followed by an inclusion.

For example, t↦e2πitt \mapsto e^{2\pi i t} maps (R,+)(\R, +) onto the circle with kernel Z\Z, so R/Z≅S1\R/\Z \cong S^1. Reduction Z→Z/nZ\Z \to \Z/n\Z has kernel nZn\Z, which recovers the classification of cyclic groups from the groups lesson.

Theorem— Theorem 4 (second isomorphism theorem)

Let H≤GH \le G and N⊴GN \trianglelefteq G. Then HN={hn}HN = \{hn\} is a subgroup of GG, H∩N⊴HH \cap N \trianglelefteq H, and H/(H∩N)≅HN/NH/(H \cap N) \cong HN/N.

Proof

HNHN is a subgroup: (hn)(h′n′)=hh′ (h′−1nh′) n′∈HN(hn)(h'n') = hh'\,(h'^{-1}nh')\,n' \in HN and (hn)−1=h−1(hn−1h−1)∈HN(hn)^{-1} = h^{-1}(hn^{-1}h^{-1}) \in HN, by normality of NN. Also N⊴HNN \trianglelefteq HN. The map H→HN/NH \to HN/N, h↦hNh \mapsto hN, is a homomorphism. It is surjective because hnN=hNhnN = hN, and its kernel is {h∈H∣h∈N}=H∩N\{h \in H \mid h \in N\} = H \cap N. Apply Theorem 3.

∎

Theorem— Theorem 5 (correspondence and third isomorphism theorems)

Let N⊴GN \trianglelefteq G. Then K↦K/N=π(K)K \mapsto K/N = \pi(K) is an inclusion-preserving bijection from subgroups KK of GG containing NN to subgroups of G/NG/N, with inverse Kˉ↦π−1(Kˉ)\bar K \mapsto \pi^{-1}(\bar K). It matches normal subgroups with normal subgroups. If N⊆MN \subseteq M are both normal in GG, then

(G/N) / (M/N)≅G/M.(G/N)\,/\,(M/N) \cong G/M.

Proof

π−1(Kˉ)\pi^{-1}(\bar K) is a subgroup containing ker⁡π=N\ker\pi = N, and π(π−1(Kˉ))=Kˉ\pi(\pi^{-1}(\bar K)) = \bar K since π\pi is surjective. For K⊇NK \supseteq N, we have π−1(π(K))=KN=K\pi^{-1}(\pi(K)) = KN = K. Both maps preserve inclusion. Normality corresponds because π(gkg−1)=π(g)π(k)π(g)−1\pi(gkg^{-1}) = \pi(g)\pi(k)\pi(g)^{-1} and π\pi is surjective. For the third theorem, the map G/N→G/MG/N \to G/M, gN↦gMgN \mapsto gM, is well defined because N⊆MN \subseteq M (Theorem 2 applied to G→G/MG \to G/M). It is surjective, and its kernel is {gN∣g∈M}=M/N\{gN \mid g \in M\} = M/N. Apply Theorem 3.

∎

Theorem— Proposition 6 (abelian quotients)

For N⊴GN \trianglelefteq G, the quotient G/NG/N is abelian if and only if [G,G]⊆N[G, G] \subseteq N. In particular [G,G][G, G] is normal, GabG^{\mathrm{ab}} is the largest abelian quotient of GG, and every quotient of an abelian group is abelian.

Proof

aN bN=bN aN  ⟺  abN=baN  ⟺  (ba)−1(ab)=a−1b−1ab∈NaN\,bN = bN\,aN \iff abN = baN \iff (ba)^{-1}(ab) = a^{-1}b^{-1}ab \in N. So G/NG/N is abelian iff every commutator lies in NN, iff [G,G]⊆N[G, G] \subseteq N. [G,G][G, G] is normal because a conjugate of a commutator is a commutator: g[a,b]g−1=[gag−1,gbg−1]g[a, b]g^{-1} = [gag^{-1}, gbg^{-1}].

∎

For example, [Sn,Sn]=An[S_n, S_n] = A_n for n≥2n \ge 2, so Snab≅Z/2ZS_n^{\mathrm{ab}} \cong \Z/2\Z. The groups AnA_n (n≥5n \ge 5) are simple and have no non-trivial quotients at all. That fact is the group-theoretic core of the insolubility of the quintic in Galois theory.

ProofH

Quotient rings, the Chinese remainder theorem, and fields

From here on RR is commutative, except in Theorem 7, which holds for two-sided ideals in any ring.

Theorem— Theorem 7 (quotient rings)

Let II be an additive subgroup of a ring RR. The rule (a+I)(b+I)=ab+I(a + I)(b + I) = ab + I is well defined if and only if II is a two-sided ideal. In that case R/IR/I is a ring, π:R→R/I\pi : R \to R/I is a surjective ring homomorphism with kernel II, and the universal property and the first isomorphism theorem R/ker⁡f≅im⁡fR/\ker f \cong \operatorname{im} f hold exactly as for groups.

Proof

Addition is well defined because (R,+)(R, +) is abelian, so II is normal in it. If II is an ideal and a−a′,b−b′∈Ia - a', b - b' \in I, then ab−a′b′=a(b−b′)+(a−a′)b′∈Iab - a'b' = a(b - b') + (a - a')b' \in I. Conversely, if multiplication is well defined and x∈Ix \in I, compare (r+I)(x+I)(r + I)(x + I) with (r+I)(0+I)(r + I)(0 + I): since x+I=0+Ix + I = 0 + I, we get rx+I=0+Irx + I = 0 + I, so rx∈Irx \in I; similarly xr∈Ixr \in I. The ring axioms are inherited from RR, and π\pi is a homomorphism by construction. The universal property is proved as in Theorem 2, with every step now also respecting multiplication.

∎

So the kernels of ring homomorphisms are exactly the two-sided ideals. One direction was proved in the rings lesson; the other is ker⁡π=I\ker\pi = I. As before, the correspondence theorem identifies the ideals of R/IR/I with the ideals of RR containing II.

Example— The complex numbers as a quotient

Let ε:R[x]→C\varepsilon : \R[x] \to \C, f↦f(i)f \mapsto f(i). It is surjective, since ε(a+bx)=a+bi\varepsilon(a + bx) = a + bi. Its kernel is (x2+1)(x^2 + 1). Clearly x2+1∈ker⁡εx^2 + 1 \in \ker\varepsilon; conversely, if f(i)=0f(i) = 0, divide f=(x2+1)q+(a+bx)f = (x^2 + 1)q + (a + bx) with a,b∈Ra, b \in \R. Then 0=f(i)=a+bi0 = f(i) = a + bi forces a=b=0a = b = 0. Hence R[x]/(x2+1)≅C\R[x]/(x^2 + 1) \cong \C, and the coset of xx is ii. In the same way Q[x]/(x2−2)≅Q(2)={a+b2∣a,b∈Q}\Q[x]/(x^2 - 2) \cong \Q(\sqrt 2) = \{a + b\sqrt2 \mid a, b \in \Q\}.

Theorem— Theorem 8 (Chinese remainder theorem)

If I,JI, J are ideals of RR with I+J=RI + J = R, then R/(I∩J)≅R/I×R/JR/(I \cap J) \cong R/I \times R/J, via r+I∩J↦(r+I,r+J)r + I \cap J \mapsto (r + I, r + J). In particular, for coprime m,nm, n,   Z/mnZ≅Z/mZ×Z/nZ\;\Z/mn\Z \cong \Z/m\Z \times \Z/n\Z as rings.

Proof

The map ρ:R→R/I×R/J\rho : R \to R/I \times R/J, r↦(r+I,r+J)r \mapsto (r + I, r + J), is a ring homomorphism with kernel I∩JI \cap J. It is surjective: write 1=e+f1 = e + f with e∈Ie \in I, f∈Jf \in J. Given (x+I,y+J)(x + I, y + J), let r=xf+yer = xf + ye. Then r−x=x(f−1)+ye=−xe+ye∈Ir - x = x(f - 1) + ye = -xe + ye \in I and r−y=xf+y(e−1)=xf−yf∈Jr - y = xf + y(e - 1) = xf - yf \in J. Apply the first isomorphism theorem. For Z\Z: if gcd⁡(m,n)=1\gcd(m, n) = 1, Bézout gives (m)+(n)=Z(m) + (n) = \Z, and (m)∩(n)=(lcm⁡(m,n))=(mn)(m) \cap (n) = (\operatorname{lcm}(m, n)) = (mn).

∎

Taking unit groups gives (Z/mnZ)×≅(Z/mZ)××(Z/nZ)×(\Z/mn\Z)^\times \cong (\Z/m\Z)^\times \times (\Z/n\Z)^\times, so Euler's function is multiplicative. Without coprimality the theorem fails: Z/4Z≇Z/2Z×Z/2Z\Z/4\Z \not\cong \Z/2\Z \times \Z/2\Z, since the first has an element of additive order 44. The theorem is named after the Sunzi Suanjing (3rd–5th century), which asks for a number leaving remainders 2,3,22, 3, 2 on division by 3,5,73, 5, 7; the answer is 2323, unique modulo 105105.

Theorem— Theorem 9 (fields and domains as quotients)

Let RR be commutative and II an ideal. Then R/IR/I is a field if and only if II is maximal, and R/IR/I is an integral domain if and only if II is prime. Consequently every maximal ideal is prime.

Proof

Field. R/IR/I is the zero ring iff I=RI = R, so assume I≠RI \ne R. By the correspondence theorem, the ideals of R/IR/I correspond to the ideals JJ with I⊆J⊆RI \subseteq J \subseteq R. A commutative ring with 0≠10 \ne 1 is a field iff its only ideals are 00 and itself (rings lesson, Proposition 3). So R/IR/I is a field iff the only ideals containing II are II and RR, iff II is maximal.

Domain. R/I≠0R/I \ne 0 iff I≠RI \ne R, and (a+I)(b+I)=0+I(a + I)(b + I) = 0 + I means ab∈Iab \in I. So "no zero divisors" in R/IR/I says exactly: ab∈I⇒a∈Iab \in I \Rightarrow a \in I or b∈Ib \in I. Finally, a field is a domain, so maximal ideals are prime.

∎

Theorem— Corollary 10 (building fields)

(a) Z/nZ\Z/n\Z (n≥2n \ge 2) is a field iff nn is prime. (b) For a field kk and f∈k[x]f \in k[x] of degree d≥1d \ge 1, the quotient k[x]/(f)k[x]/(f) is a vector space over kk with basis 1,xˉ,…,xˉd−11, \bar x, \dots, \bar x^{d-1}. It is a field iff ff is irreducible. If k=Fpk = \mathbb{F}_p, it has pdp^d elements.

Proof

(a) The ideals of Z\Z containing (n)(n) are the (m)(m) with m∣nm \mid n, so (n)(n) is maximal iff nn is prime. (b) Division with remainder writes every gg uniquely as qf+rqf + r with deg⁡r<d\deg r \lt d. So every coset has exactly one representative r=c0+c1x+⋯+cd−1xd−1r = c_0 + c_1x + \dots + c_{d-1}x^{d-1}, which gives the basis and the count pdp^d. In the PID k[x]k[x], (f)(f) is maximal iff ff is irreducible: the ideals containing (f)(f) are the (g)(g) with g∣fg \mid f (rings lesson, Proposition 4), and (g)(g) is all of k[x]k[x] iff gg is a unit, and equals (f)(f) iff gg is an associate of ff. Apply Theorem 9.

∎

Example— The fields with four and nine elements

Over F2\mathbb{F}_2, x2+x+1x^2 + x + 1 has no root, since its values at 00 and 11 are both 11. A polynomial of degree 22 or 33 with no root has no linear factor, so it is irreducible. Hence F4=F2[x]/(x2+x+1)={0,1,α,α+1}\mathbb{F}_4 = \mathbb{F}_2[x]/(x^2 + x + 1) = \{0, 1, \alpha, \alpha + 1\} with α2=α+1\alpha^2 = \alpha + 1, and its multiplication table is

×\times11α\alphaα+1\alpha + 1
1111α\alphaα+1\alpha + 1
α\alphaα\alphaα+1\alpha + 111
α+1\alpha + 1α+1\alpha + 111α\alpha

Every non-zero element has an inverse, and α\alpha generates the multiplicative group (cyclic of order 33). Over F3\mathbb{F}_3, x2+1x^2 + 1 has no root (0,1,4≡0,1,20, 1, 4 \equiv 0, 1, 2 are the values x2x^2 takes, and none is −1≡2-1 \equiv 2), so F9=F3[i]\mathbb{F}_9 = \mathbb{F}_3[i] with i2=−1i^2 = -1: "complex numbers modulo 33". By contrast, F2[x]/(x2+1)\mathbb{F}_2[x]/(x^2 + 1) is not a field, because x2+1=(x+1)2x^2 + 1 = (x + 1)^2 over F2\mathbb{F}_2, so x+1‾\overline{x + 1} is a non-zero nilpotent. And Z/4Z\Z/4\Z, which also has four elements, is not a field at all (2⋅2=02 \cdot 2 = 0).

Formal mathematicsF

Quotients in Lean and Mathlib

In Mathlib, G ⧸ N is defined for any subgroup as the type of left cosets (a quotient type by the relation a−1b∈Na^{-1}b \in N). It receives a group structure only when an instance N.Normal is available, which is exactly Theorem 1. Likewise R ⧸ I for an ideal I is a ring. QuotientGroup.mk' N : G →* G ⧸ N is the quotient map, and QuotientGroup.lift is the universal property. AdjoinRoot f is Mathlib's name for K[X]/(f)K[X]/(f).

Theorem 1, both directions, proved here:

coset_mul_well_definedLean 4Proved here from basic factsFormally verified
/-- **Coset multiplication is well defined when `N` is normal.** If `aN = a'N` and `bN = b'N`
(that is, `a⁻¹a' ∈ N` and `b⁻¹b' ∈ N`), then `abN = a'b'N`:
`(ab)⁻¹(a'b') = (b⁻¹ (a⁻¹a') b) (b⁻¹b')`, a conjugate of an element of `N` times an element
of `N`. -/
theorem coset_mul_well_defined {G : Type*} [Group G] (N : Subgroup G) [hN : N.Normal]
    {a a' b b' : G} (ha : a⁻¹ * a' ∈ N) (hb : b⁻¹ * b' ∈ N) : (a * b)⁻¹ * (a' * b') ∈ N := by
  have hconj : b⁻¹ * (a⁻¹ * a') * b ∈ N := by
    simpa using hN.conj_mem _ ha b⁻¹
  have key : (a * b)⁻¹ * (a' * b') = (b⁻¹ * (a⁻¹ * a') * b) * (b⁻¹ * b') := by group
  rw [key]
  exact N.mul_mem hconj hb
Axioms used: propextformal/Lumenary/Quotients.leanTry it in the Lean web editor
normal_of_coset_mul_well_definedLean 4Proved here from basic factsFormally verified
/-- **Conversely, if coset multiplication is well defined, the subgroup is normal.** Given
`n ∈ H` and `g`, compare the products `1 · g⁻¹` and `n · g⁻¹`: since `1H = nH`, well-definedness
gives `g⁻¹H = ng⁻¹H`, i.e. `(g⁻¹)⁻¹ (n g⁻¹) = g n g⁻¹ ∈ H`. -/
theorem normal_of_coset_mul_well_defined {G : Type*} [Group G] (H : Subgroup G)
    (h : ∀ a a' b b' : G, a⁻¹ * a' ∈ H → b⁻¹ * b' ∈ H → (a * b)⁻¹ * (a' * b') ∈ H) :
    H.Normal where
  conj_mem n hn g := by
    have := h 1 n g⁻¹ g⁻¹ (by simpa using hn) (by simp)
    simpa [mul_assoc] using this
Axioms used: propextformal/Lumenary/Quotients.leanTry it in the Lean web editor

The kernel of the quotient map, and the universal property (existence from Mathlib's lift, uniqueness proved here):

ker_mkLean 4Applies a library theoremFormally verified
/-- The kernel of the quotient map `G → G ⧸ N` is exactly `N` — so every normal subgroup is a
kernel. This is Mathlib's `QuotientGroup.ker_mk'`. -/
theorem ker_mk {G : Type*} [Group G] (N : Subgroup G) [N.Normal] :
    (QuotientGroup.mk' N).ker = N :=
  QuotientGroup.ker_mk' N
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
universal_propertyLean 4Proved here from basic factsFormally verified
/-- **Universal property of the quotient.** A homomorphism `φ : G → H` with `N ⊆ ker φ` factors
through the quotient map by exactly one homomorphism `ψ : G ⧸ N → H`, namely `ψ(gN) = φ(g)`.
Existence is Mathlib's `QuotientGroup.lift`; uniqueness holds because every element of `G ⧸ N`
is some `gN` (`QuotientGroup.monoidHom_ext`). -/
theorem universal_property {G H : Type*} [Group G] [Group H] (N : Subgroup G) [N.Normal]
    (φ : G →* H) (hN : N ≤ φ.ker) :
    ∃! ψ : G ⧸ N →* H, ψ.comp (QuotientGroup.mk' N) = φ := by
  refine ⟨QuotientGroup.lift N φ hN, ?_, ?_⟩
  · ext g
    simp
  · intro ψ hψ
    apply QuotientGroup.monoidHom_ext
    rw [hψ]
    ext g
    simp
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor

The three isomorphism theorems, cited from Mathlib (each is an explicit MulEquiv; we record that one exists):

first_isoLean 4Applies a library theoremFormally verified
/-- **First isomorphism theorem**: `G ⧸ ker φ ≅ im φ`. This applies Mathlib's
`QuotientGroup.quotientKerEquivRange`, built (as in the lesson) from the universal property and
the fact that the induced map has trivial kernel. -/
theorem first_iso {G H : Type*} [Group G] [Group H] (φ : G →* H) :
    Nonempty (G ⧸ φ.ker ≃* φ.range) :=
  ⟨QuotientGroup.quotientKerEquivRange φ⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
second_isoLean 4Applies a library theoremFormally verified
/-- **Second isomorphism theorem**: for `H ≤ G` and `N` normal, `H/(H ∩ N) ≅ HN/N`. Mathlib
writes `H ∩ N` as `N.subgroupOf H` (viewed inside `H`) and `HN` as `H ⊔ N`. This is
`QuotientGroup.quotientInfEquivProdNormalQuotient`. -/
theorem second_iso {G : Type*} [Group G] (H N : Subgroup G) [N.Normal] :
    Nonempty (H ⧸ N.subgroupOf H ≃* (H ⊔ N : Subgroup G) ⧸ N.subgroupOf (H ⊔ N)) :=
  ⟨QuotientGroup.quotientInfEquivProdNormalQuotient H N⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
third_isoLean 4Applies a library theoremFormally verified
/-- **Third isomorphism theorem**: for normal `N ≤ M`, `(G/N)/(M/N) ≅ G/M`. Here `M/N` is the
image of `M` under the quotient map. This is `QuotientGroup.quotientQuotientEquivQuotient`. -/
theorem third_iso {G : Type*} [Group G] (N M : Subgroup G) [N.Normal] [M.Normal] (h : N ≤ M) :
    Nonempty ((G ⧸ N) ⧸ M.map (QuotientGroup.mk' N) ≃* G ⧸ M) :=
  ⟨QuotientGroup.quotientQuotientEquivQuotient N M h⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
quotient_commLean 4Proved here from basic factsFormally verified
/-- A quotient of an abelian group is abelian: `(aN)(bN) = abN = baN = (bN)(aN)`. (The converse
fails: `S₃/A₃` is abelian although `S₃` is not.) -/
theorem quotient_comm {G : Type*} [CommGroup G] (N : Subgroup G) (x y : G ⧸ N) :
    x * y = y * x := by
  induction x using QuotientGroup.induction_on with
  | H a =>
    induction y using QuotientGroup.induction_on with
    | H b => rw [← QuotientGroup.mk_mul, ← QuotientGroup.mk_mul, mul_comm]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor

Theorem 7 for commutative rings, both directions, and the first isomorphism theorem for rings:

ideal_mul_well_definedLean 4Proved here from basic factsFormally verified
/-- **Multiplication of residues is well defined modulo an ideal.** If `a ≡ a'` and `b ≡ b'`
modulo `I`, then `ab - a'b' = a(b - b') + (a - a')b' ∈ I`. -/
theorem ideal_mul_well_defined {R : Type*} [CommRing R] (I : Ideal R) {a a' b b' : R}
    (ha : a - a' ∈ I) (hb : b - b' ∈ I) : a * b - a' * b' ∈ I := by
  have key : a * b - a' * b' = a * (b - b') + (a - a') * b' := by ring
  rw [key]
  exact I.add_mem (I.mul_mem_left a hb) (I.mul_mem_right b' ha)
Axioms used: propext, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
ideal_of_mul_well_definedLean 4Proved here from basic factsFormally verified
/-- **Conversely, only ideals work.** If `I` is an additive subgroup for which multiplication of
residues is well defined, then `I` absorbs multiplication: for `x ∈ I`, compare `r · x` with
`r · 0` (since `x ≡ 0`), giving `r * x - r * 0 = r * x ∈ I`. -/
theorem ideal_of_mul_well_defined {R : Type*} [CommRing R] (I : AddSubgroup R)
    (h : ∀ a a' b b' : R, a - a' ∈ I → b - b' ∈ I → a * b - a' * b' ∈ I)
    (r x : R) (hx : x ∈ I) : r * x ∈ I := by
  have := h r r x 0 (by simp) (by simpa using hx)
  simpa using this
Axioms used: propextformal/Lumenary/Quotients.leanTry it in the Lean web editor
ring_first_isoLean 4Applies a library theoremFormally verified
/-- **First isomorphism theorem for rings**: `R ⧸ ker f ≅ im f`. Mathlib's
`RingHom.quotientKerEquivRange`. -/
theorem ring_first_iso {R S : Type*} [CommRing R] [CommRing S] (f : R →+* S) :
    Nonempty (R ⧸ RingHom.ker f ≃+* f.range) :=
  ⟨RingHom.quotientKerEquivRange f⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor

Z/(n)\Z/(n) and the Chinese remainder theorem:

int_quotient_zmodLean 4Applies a library theoremFormally verified
/-- `ℤ ⧸ (n)` is the ring `ZMod n` of residues modulo `n` — by the first isomorphism theorem for
the reduction map `ℤ → ZMod n`, whose kernel is `(n)`. Mathlib's `Int.quotientSpanEquivZMod`. -/
theorem int_quotient_zmod (n : ℕ) : Nonempty (ℤ ⧸ Ideal.span {(n : ℤ)} ≃+* ZMod n) :=
  ⟨Int.quotientSpanEquivZMod n⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
crtLean 4Applies a library theoremFormally verified
/-- **Chinese remainder theorem**: for coprime `m` and `n`, `ℤ/mnℤ ≅ ℤ/mℤ × ℤ/nℤ` as rings.
Mathlib's `ZMod.chineseRemainder`, proved from the first isomorphism theorem for
`x ↦ (x mod m, x mod n)`. -/
theorem crt {m n : ℕ} (h : m.Coprime n) : Nonempty (ZMod (m * n) ≃+* ZMod m × ZMod n) :=
  ⟨ZMod.chineseRemainder h⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor

Theorem 9 (from Mathlib) and Corollary 10(a) (proved here, by producing a zero divisor when nn is composite):

maximal_iff_fieldLean 4Applies a library theoremFormally verified
/-- For a commutative ring `R`, `R ⧸ I` is a field exactly when `I` is a maximal ideal.
Mathlib's `Ideal.Quotient.maximal_ideal_iff_isField_quotient`. -/
theorem maximal_iff_field {R : Type*} [CommRing R] (I : Ideal R) :
    I.IsMaximal ↔ IsField (R ⧸ I) :=
  Ideal.Quotient.maximal_ideal_iff_isField_quotient I
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
prime_iff_domainLean 4Applies a library theoremFormally verified
/-- `R ⧸ I` is an integral domain exactly when `I` is a prime ideal.
Mathlib's `Ideal.Quotient.isDomain_iff_prime`. -/
theorem prime_iff_domain {R : Type*} [CommRing R] (I : Ideal R) :
    IsDomain (R ⧸ I) ↔ I.IsPrime :=
  Ideal.Quotient.isDomain_iff_prime I
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
zmod_isField_iffLean 4Proved here from basic factsFormally verified
/-- `ℤ/nℤ` (for `n > 1`) is a field exactly when `n` is prime. If `n` is prime, Mathlib's field
structure on `ZMod n` applies. If `n = m * k` with `1 < m, k < n`, then `m · k = 0` in `ZMod n`
with `m ≠ 0`; an inverse `b` of `m` would give `k = b · (m · k) = 0`, but `0 < k < n`. -/
theorem zmod_isField_iff (n : ℕ) (hn : 1 < n) : IsField (ZMod n) ↔ n.Prime := by
  constructor
  · intro hF
    by_contra hp
    obtain ⟨m, hmn, hm1, hmn'⟩ : ∃ m, m ∣ n ∧ m ≠ 1 ∧ m ≠ n := by
      by_contra hcon
      simp only [not_exists, not_and, ne_eq, not_not] at hcon
      exact hp (Nat.prime_def.mpr ⟨hn, fun m hm => by
        by_cases h1 : m = 1
        · exact Or.inl h1
        · exact Or.inr (hcon m hm h1)⟩)
    obtain ⟨k, rfl⟩ := hmn
    have hm0 : 0 < m := Nat.pos_of_ne_zero (by rintro rfl; simp at hn)
    have hk0 : 0 < k := Nat.pos_of_ne_zero (by rintro rfl; simp at hn)
    have hmlt : m < m * k := by
      rcases Nat.lt_or_ge 1 k with h | h
      · exact lt_mul_of_one_lt_right hm0 h
      · exact absurd (by nlinarith : k = 1) (by rintro rfl; simp at hmn')
    have hklt : k < m * k := by
      rcases Nat.lt_or_ge 1 m with h | h
      · exact lt_mul_of_one_lt_left hk0 h
      · omega
    have hmz : (m : ZMod (m * k)) ≠ 0 := by
      rw [Ne, ZMod.natCast_eq_zero_iff]
      exact fun hd => absurd (Nat.le_of_dvd hm0 hd) (by omega)
    obtain ⟨b, hb⟩ := hF.mul_inv_cancel hmz
    have hk : (k : ZMod (m * k)) = 0 := by
      calc (k : ZMod (m * k)) = (m * b) * k := by rw [hb, one_mul]
        _ = b * ((m * k : ℕ) : ZMod (m * k)) := by push_cast; ring
        _ = 0 := by rw [ZMod.natCast_self, mul_zero]
    rw [ZMod.natCast_eq_zero_iff] at hk
    exact absurd (Nat.le_of_dvd hk0 hk) (by omega)
  · intro hp
    have := Fact.mk hp
    exact Field.toIsField (ZMod n)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
zmod_four_not_domainLean 4Proved here from basic factsFormally verified
/-- `ℤ/4ℤ` is not a field — not even a domain: `2 · 2 = 0`. (Compare `𝔽₄` below, the field with
four elements, which is a different ring.) -/
theorem zmod_four_not_domain : (2 : ZMod 4) * 2 = 0 ∧ (2 : ZMod 4) ≠ 0 := by
  decide
Axioms used: propext, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor

Finally, F4\mathbb{F}_4 as a quotient. The irreducibility of X2+X+1X^2 + X + 1 over ZMod 2 is proved by checking both elements; once it is recorded as an instance, Lean finds the field structure on the quotient by itself:

f4_irreducibleLean 4Proved here from basic factsFormally verified
/-- `X² + X + 1` is irreducible over `𝔽₂ = ZMod 2`: it has degree 2 and no root, since its
values at `0` and `1` are `1` and `3 = 1`. (Mathlib's
`Polynomial.irreducible_of_degree_le_three_of_not_isRoot` turns "no root" into irreducibility for
degrees 2 and 3.) -/
theorem f4_irreducible : Irreducible (X ^ 2 + X + 1 : (ZMod 2)[X]) := by
  apply Polynomial.irreducible_of_degree_le_three_of_not_isRoot
  · have : (X ^ 2 + X + 1 : (ZMod 2)[X]).natDegree = 2 := by compute_degree!
    rw [this]
    decide
  · intro x hx
    rw [IsRoot.def, eval_add, eval_add, eval_pow, eval_X, eval_one] at hx
    revert hx
    fin_cases x <;> decide
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
F4Lean 4Formally verified
/-- The field with four elements, built as the quotient `𝔽₂[X] ⧸ (X² + X + 1)`
(`AdjoinRoot f` is Mathlib's name for `K[X] ⧸ (f)`). -/
abbrev F4 : Type := AdjoinRoot (X ^ 2 + X + 1 : (ZMod 2)[X])
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
f4_factLean 4Formally verified
/-- Record the irreducibility proof as an instance, so that Lean can find the field structure
`AdjoinRoot.instField` on `F4`. -/
instance f4_fact : Fact (Irreducible (X ^ 2 + X + 1 : (ZMod 2)[X])) :=
  ⟨f4_irreducible⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor
f4_isFieldLean 4Applies a library theoremFormally verified
/-- `F4` is a field: the ideal generated by an irreducible polynomial over a field is maximal
(`AdjoinRoot.span_maximal_of_irreducible`), so the quotient is a field. -/
theorem f4_isField : IsField F4 :=
  Field.toIsField F4
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/Quotients.leanTry it in the Lean web editor

What is and is not formalised. Proved independently here: both directions of Theorem 1 and of Theorem 7 (commutative case), the uniqueness half of the universal property, the commutativity of quotients of abelian groups, Corollary 10(a), and the irreducibility behind F4\mathbb{F}_4. Cited from Mathlib: the three isomorphism theorems for groups, the first for rings, Z/(n)≅\Z/(n) \cong ZMod n, the Chinese remainder theorem for Z\Z, and Theorem 9. Not formalised here: the correspondence theorem (Mathlib has it as the order isomorphism QuotientGroup.comapMk'OrderIso), R[x]/(x2+1)≅C\R[x]/(x^2 + 1) \cong \C, the general Chinese remainder theorem for coprime ideals (Mathlib's Ideal.quotientInfRingEquivPiQuotient), and the count ∣F4∣=4\lvert\mathbb{F}_4\rvert = 4.

ComputationC

Testing well-definedness, and building fields

The first program tests, for every subgroup of S3S_3, D4D_4 and A4A_4, whether "multiply representatives" gives a well-defined product of cosets, and separately whether the subgroup is normal. It lists the quotient groups and prints a witness of failure.

Cosets that multiply, and cosets that do notPythonExact computationExhaustive finite checkCounterexampleComputationally tested
"""When is "multiply the cosets" a well-defined operation?

For every subgroup H of the groups S3, D4 and A4 (as permutation groups), the
program tests the rule (aH)(bH) = abH against every choice of representatives,
and separately tests whether H is normal (gHg^-1 = H for all g). The two tests
always agree, as the lesson proves. For each normal subgroup it reports the
order of the quotient group G/H and the orders of its elements; for each
non-normal one it prints a witness showing the rule depends on the choice of
representative. Exact and exhaustive for these three groups.
"""

from collections import Counter

def compose(p, q):
    """The permutation 'first q, then p'."""
    return tuple(p[i] for i in q)

def inverse(p):
    """Inverse permutation."""
    inv = [0] * len(p)
    for i, image in enumerate(p):
        inv[image] = i
    return tuple(inv)

def closure(gens):
    """The group generated by a list of permutations of the same degree."""
    identity = tuple(range(len(gens[0])))
    elements, frontier = {identity}, [identity]
    while frontier:
        new = []
        for x in frontier:
            for g in gens:
                y = compose(g, x)
                if y not in elements:
                    elements.add(y)
                    new.append(y)
        frontier = new
    return frozenset(elements)

def subgroups(group):
    """All subgroups, as iterated joins of cyclic subgroups (exhaustive)."""
    found = {closure([g]) for g in group}
    frontier = list(found)
    while frontier:
        new = []
        for h in frontier:
            for k in list(found):
                join = closure(sorted(h | k))
                if join not in found:
                    found.add(join)
                    new.append(join)
        frontier = new
    return sorted(found, key=lambda s: (len(s), sorted(s)))

def coset(a, sub):
    """The left coset aH as a frozenset."""
    return frozenset(compose(a, h) for h in sub)

def is_normal(sub, group):
    """gHg^-1 = H for every g in the group."""
    return all(compose(compose(g, h), inverse(g)) in sub
               for g in group for h in sub)

def product_witness(sub, group):
    """Return (a, a2, b) with aH = a2H but abH != a2bH, or None if the
    coset product is well defined. Left factors are varied; right factors
    are fixed, which already detects every failure (see the lesson)."""
    for a in sorted(group):
        for h in sorted(sub):
            a2 = compose(a, h)
            for b in sorted(group):
                if coset(compose(a, b), sub) != coset(compose(a2, b), sub):
                    return a, a2, b
    return None

def quotient_orders(sub, group):
    """Orders of the elements of G/N, computed on cosets."""
    cosets = {coset(g, sub) for g in group}
    identity = frozenset(sub)
    orders = []
    for c in cosets:
        rep = next(iter(c))
        power, k = rep, 1
        while coset(power, sub) != identity:
            power, k = compose(rep, power), k + 1
        orders.append(k)
    return sorted(Counter(orders).items())

def groups():
    """The three groups, as (name, generators)."""
    return [
        ("S3", [(1, 0, 2), (1, 2, 0)]),
        ("D4", [(1, 2, 3, 0), (0, 3, 2, 1)]),
        ("A4", [(1, 2, 0, 3), (1, 0, 3, 2)]),
    ]

def main():
    agree = True
    witness_shown = False
    for name, gens in groups():
        group = closure(gens)
        print(f"{name} (order {len(group)}): |H|  normal  product defined  G/H")
        for sub in subgroups(group):
            normal = is_normal(sub, group)
            witness = product_witness(sub, group)
            agree &= normal == (witness is None)
            info = f"order {len(group) // len(sub)}, orders "
            info += str(quotient_orders(sub, group)) if normal else "-"
            print(f"   {len(sub):>3}  {str(normal):<6}  {str(witness is None):<15}"
                  f"  {info if normal else 'not a group'}")
            if witness and not witness_shown:
                witness_shown = True
                a, a2, b = witness
                print(f"     e.g. a={a}, a'={a2} lie in one coset, but ab and")
                print(f"     a'b lie in different cosets (b={b})")
    print(f"'product well defined' agrees with 'normal' every time: {agree}")
    print()
    print("Epistemic status: exact and exhaustive for every subgroup of S3, D4")
    print("and A4. It illustrates the theorem (well defined <=> normal), which")
    print("the lesson proves for all groups; the witnesses are genuine proofs")
    print("that those particular subgroups are not normal.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The two columns always agree, as Theorem 1 says they must. Note the quotient D4/⟨r2⟩D_4/\langle r^2 \rangle with three elements of order 22 (the Klein group) and A4/V≅Z/3ZA_4/V \cong \Z/3\Z. A witness of failure is a complete proof that that particular subgroup is not normal. The agreement on all 2626 subgroups is evidence, and the proof is Theorem 1.

The second program builds Fp[x]/(f)\mathbb{F}_p[x]/(f) for several pp and ff, searches every element for an inverse, compares with an exhaustive irreducibility test, and looks for a generator of the multiplicative group.

Finite fields as quotient rings F_p[x]/(f)PythonExact computationExhaustive finite checkComputationally tested
"""Building finite fields as quotients F_p[x]/(f), and watching some fail.

Elements of F_p[x]/(f), for f of degree n, are the p^n polynomials of degree
below n, multiplied by reducing modulo f. The program checks, exhaustively,
whether every non-zero element has an inverse (so the quotient is a field) and
whether f has a root or factors, and confirms in each case: field exactly when f
is irreducible. For the fields it finds an element whose powers give every
non-zero element (the multiplicative group is cyclic), and it checks the
Chinese remainder isomorphism Z/12 = Z/3 x Z/4 against Z/4 versus Z/2 x Z/2.
"""

from itertools import product

def poly_mulmod(a, b, f, p):
    """Multiply coefficient lists a, b (lowest degree first) modulo f and p.

    f is monic of degree n; the result has length n."""
    n = len(f) - 1
    prod = [0] * (2 * n)
    for i, x in enumerate(a):
        for j, y in enumerate(b):
            prod[i + j] = (prod[i + j] + x * y) % p
    for k in range(2 * n - 1, n - 1, -1):      # reduce using x^n = -(lower terms)
        c = prod[k]
        if c:
            for t in range(n + 1):
                prod[k - n + t] = (prod[k - n + t] - c * f[t]) % p
    return tuple(prod[:n])

def elements(p, n):
    """All p^n residues: coefficient tuples of length n."""
    return [tuple(c) for c in product(range(p), repeat=n)]

def units(f, p):
    """Residues with a multiplicative inverse modulo f."""
    n = len(f) - 1
    one = tuple([1] + [0] * (n - 1))
    elems = elements(p, n)
    return [a for a in elems if any(poly_mulmod(a, b, f, p) == one for b in elems)]

def has_root(f, p):
    """True when f has a root in F_p."""
    return any(sum(c * pow(x, k, p) for k, c in enumerate(f)) % p == 0
               for x in range(p))

def is_irreducible(f, p):
    """Exhaustive: f (monic, degree n) has no monic factor of degree 1..n//2."""
    n = len(f) - 1
    for d in range(1, n // 2 + 1):
        for tail in product(range(p), repeat=d):
            g = list(tail) + [1]
            # long division of f by g over F_p
            r = list(f)
            for k in range(n - d, -1, -1):
                c = r[k + d]
                for t in range(d + 1):
                    r[k + t] = (r[k + t] - c * g[t]) % p
            if not any(r[:d]):
                return False
    return True

def generator(f, p):
    """A residue whose powers run through all non-zero residues, or None."""
    n = len(f) - 1
    one = tuple([1] + [0] * (n - 1))
    size = p ** n - 1
    for g in elements(p, n):
        if not any(g):
            continue
        power, k = g, 1
        while power != one and k <= size:
            power, k = poly_mulmod(power, g, f, p), k + 1
        if k == size:
            return g
    return None

def show_poly(f):
    """Coefficients listed lowest degree first, as text: [1, 1, 0, 1] -> x^3+x+1."""
    terms = []
    for k in range(len(f) - 1, -1, -1):
        c = f[k]
        if not c:
            continue
        mono = "" if k == 0 else ("x" if k == 1 else f"x^{k}")
        coef = str(c) if (c != 1 or k == 0) else ""
        terms.append(coef + mono)
    return "+".join(terms) if terms else "0"

def crt_is_isomorphism(m, n):
    """x -> (x mod m, x mod n) is a bijective ring map Z/mn -> Z/m x Z/n."""
    images = {(x % m, x % n) for x in range(m * n)}
    mult = all(((x * y) % m, (x * y) % n) == ((x % m) * (y % m) % m,
                                              (x % n) * (y % n) % n)
               for x in range(m * n) for y in range(m * n))
    return len(images) == m * n and mult

CASES = [(2, [1, 1, 1]), (2, [1, 0, 1]), (3, [1, 0, 1]), (3, [1, 1, 1]),
         (2, [1, 1, 0, 1]), (2, [1, 1, 0, 0, 1]), (5, [2, 0, 1])]

def main():
    print(" p  f            irreducible  root  units / non-zero  field  generator")
    for p, f in CASES:
        n = len(f) - 1
        u = units(f, p)
        field = len(u) == p ** n - 1
        g = generator(f, p) if field else None
        print(f"{p:>2}  {show_poly(f):<12} {str(is_irreducible(f, p)):<12} "
              f"{str(has_root(f, p)):<5} {len(u):>5} / {p ** n - 1:<9} "
              f"{str(field):<6} {show_poly(g) if g else '-'}")
    print("Field <=> f irreducible in every case:",
          all((len(units(f, p)) == p ** (len(f) - 1) - 1) == is_irreducible(f, p)
              for p, f in CASES))
    print(f"CRT: Z/12 -> Z/3 x Z/4 is an isomorphism: {crt_is_isomorphism(3, 4)}")
    print(f"     Z/4 -> Z/2 x Z/2 is an isomorphism: {crt_is_isomorphism(2, 2)}")
    print()
    print("Epistemic status: exact and exhaustive for the seven quotients and")
    print("the two maps shown. That k[x]/(f) is a field exactly when f is")
    print("irreducible, and that the unit group of a finite field is cyclic,")
    print("are theorems; these computations illustrate them, they do not prove")
    print("them.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Two rows deserve attention. x2+x+1x^2 + x + 1 over F3\mathbb{F}_3 has a root (x=1x = 1), and the quotient has zero divisors. x4+x+1x^4 + x + 1 over F2\mathbb{F}_2 gives F16\mathbb{F}_{16}, and here "no root" alone would not have been enough evidence of irreducibility: (x2+x+1)2=x4+x2+1(x^2 + x + 1)^2 = x^4 + x^2 + 1 also has no root in F2\mathbb{F}_2 but is reducible. That is why the program tests all factors up to degree n/2n/2. That a generator always exists — the multiplicative group of a finite field is cyclic — is proved in number theory for Fp\mathbb{F}_p and in fields and Galois theory in general.

Explore

Explore: are the families well behaved?

Choose a modulus and two remainder families, then draw random representatives and add them. However you choose, the sum always lands in the same family. That is the statement that addition on Z/kZ\Z/k\Z is well defined, the abelian case of Theorem 1 (every subgroup of an abelian group is normal). Ask yourself why the same experiment for products also always works: kZk\Z is an ideal of Z\Z (Theorem 7).

Remainder families

Colour each integer by its remainder after dividing by k. Every integer lands in exactly one family.

  • [0]{ …, −15, −12, −9, −6, −3, 0, … }
  • [1]{ …, −14, −11, −8, −5, −2, 1, … }
  • [2]{ …, −13, −10, −7, −4, −1, 2, … }

Add a member of one family to a member of another…

+

    The clock is the quotient group Z/kZ\Z/k\Z made visible. In the multiplication tab, the residues with partners are the units. For prime kk they are all the non-zero residues, which is Corollary 10(a).

    The clock laboratory

    On a clock with k hours, counting wraps around. Explore adding and multiplying.

    01234567891011

    9 + 5 = 14 ≡ 2 (mod 12)

    14 hours forward on a 12-hour clock lands on 2: the remainder when 14 is divided by 12.

    Exercises

    Exercises

    1. Quotient groups and quotient rings

    Warm-upHuman

    The Klein four-group V={e,(1 2)(3 4),(1 3)(2 4),(1 4)(2 3)}V = \{e, (1\,2)(3\,4), (1\,3)(2\,4), (1\,4)(2\,3)\} is normal in S4S_4. What is the order of the quotient group S4/VS_4/V?

    2. Quotient groups and quotient rings

    Warm-upHuman

    Let H={0,4,8}H = \{0, 4, 8\}, a subgroup of Z/12Z\Z/12\Z. What is the order of the element 5+H5 + H in the quotient group (Z/12Z)/H(\Z/12\Z)/H?

    3. Quotient groups and quotient rings

    CoreHuman

    To show that (aN)(bN)=abN(aN)(bN) = abN is well defined, suppose a−1a′∈Na^{-1}a' \in N and b−1b′∈Nb^{-1}b' \in N and write (ab)−1(a′b′)=(b−1(a−1a′)b)(b−1b′)(ab)^{-1}(a'b') = \big(b^{-1}(a^{-1}a')b\big)\big(b^{-1}b'\big). At which point is the normality of NN needed?

    Choose one

    4. Quotient groups and quotient rings

    CoreHuman

    Which of these quotient rings are fields? (Select all that apply.)

    Choose all that apply

    5. Quotient groups and quotient rings

    CoreHuman

    Which homomorphism, combined with the first isomorphism theorem, proves R[x]/(x2+1)≅C\R[x]/(x^2 + 1) \cong \C?

    Choose one

    6. Quotient groups and quotient rings

    StretchHuman

    How many residues x∈Z/35Zx \in \Z/35\Z satisfy x2=xx^2 = x? (Use the Chinese remainder theorem.)

    7. Quotient groups and quotient rings

    CoreFormal

    Which Lean statement formalises “for a commutative ring RR and an ideal II, the quotient R/IR/I is a field if and only if II is maximal”?

    Choose one

    8. Quotient groups and quotient rings

    Warm-upHuman

    A student says: “Z/2Z\Z/2\Z is a subgroup of Z\Z, namely {0,1}\{0, 1\}.” What is wrong?

    Choose one

    9. Quotient groups and quotient rings

    StretchComputational

    Write cosets(n, k) returning the cosets of the subgroup H=⟨k⟩H = \langle k \rangle of Z/nZ\Z/n\Z, as a list of sorted lists, ordered by their smallest element. Then write coset_sum(n, k, a, b) returning the coset (as a sorted list) of a+ba + b. Check that the coset of a+ba + b does not change when aa or bb is replaced by another element of its coset.

    Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
    Common misconceptionsH

    Common misconceptions

    Misconception

    "G/NG/N is a subgroup of GG." Its elements are cosets, which are subsets of GG, and it is the image of GG under the quotient map. Z/2Z\Z/2\Z is not isomorphic to any subgroup of Z\Z, since Z\Z has no elements of finite order other than 00. Quotients and subgroups are dual notions: images versus subsets.

    Misconception

    "Define the operation on representatives and you are done." An operation on cosets defined through representatives must be checked to be independent of the choice. For {e,(1 2)}≤S3\{e, (1\,2)\} \le S_3 the check fails (see the intuition section); for normal subgroups and ideals it succeeds (Theorems 1 and 7). The same caution applies to maps out of a quotient: gN↦φ(g)gN \mapsto \varphi(g) is well defined only if N⊆ker⁡φN \subseteq \ker\varphi.

    Misconception

    "Every non-zero Z/nZ\Z/n\Z is a field." Only for prime nn. Z/6Z\Z/6\Z has 2⋅3=02 \cdot 3 = 0, and Z/4Z\Z/4\Z has 2⋅2=02 \cdot 2 = 0. The field with four elements is F2[x]/(x2+x+1)\mathbb{F}_2[x]/(x^2 + x + 1), a different ring from Z/4Z\Z/4\Z.

    Misconception

    "A quotient of a non-abelian group is non-abelian." S3/A3≅Z/2ZS_3/A_3 \cong \Z/2\Z is abelian, and so is every quotient by a subgroup containing [G,G][G, G] (Proposition 6). What is true is the other direction: quotients of abelian groups are abelian.

    Misconception

    "If N≅N′N \cong N' then G/N≅G/N′G/N \cong G/N'." In Z/4Z×Z/2Z\Z/4\Z \times \Z/2\Z, the subgroups ⟨(2,0)⟩\langle (2, 0) \rangle and ⟨(0,1)⟩\langle (0, 1) \rangle both have order 22. The quotients are Z/2Z×Z/2Z\Z/2\Z \times \Z/2\Z and Z/4Z\Z/4\Z, which are not isomorphic. The quotient depends on how NN sits inside GG, not just on NN.

    Misconception

    "The first isomorphism theorem says G≅ker⁡φ×im⁡φG \cong \ker\varphi \times \operatorname{im}\varphi." It says G/ker⁡φ≅im⁡φG/\ker\varphi \cong \operatorname{im}\varphi. A group need not split as a product of a normal subgroup and the quotient: Z/4Z\Z/4\Z has the subgroup {0,2}\{0, 2\} with quotient Z/2Z\Z/2\Z, but Z/4Z≇Z/2Z×Z/2Z\Z/4\Z \not\cong \Z/2\Z \times \Z/2\Z.

    ViewpointsH

    Many ways of seeing

    Topology— Quotient spaces

    Topologists form quotients by gluing. The real line modulo the action of Z\Z by translations is the circle: the quotient group R/Z\R/\Z and the quotient space R/∼\R/{\sim} (with x∼x+nx \sim x + n) are the same object, a topological group. The plane modulo Z2\Z^2 is the torus, and a square with opposite sides glued is the same picture. More generally, if a group Γ\Gamma acts freely and properly discontinuously on a simply connected space XX, then X→X/ΓX \to X/\Gamma is a covering map and π1(X/Γ)≅Γ\pi_1(X/\Gamma) \cong \Gamma (see the fundamental group). Under the Galois correspondence for coverings, normal subgroups of π1\pi_1 correspond to regular coverings, whose deck group is the quotient group. So normality is not only an algebraic accident: it is the condition for the intermediate covering to be symmetric.

    Geometry— Homogeneous spaces

    If GG acts transitively on a space XX, and HH is the stabiliser of a point, then orbit–stabiliser identifies XX with G/HG/H. For example, the rotation group SO(3)\mathrm{SO}(3) acts transitively on the sphere with stabiliser SO(2)\mathrm{SO}(2), so S2≅SO(3)/SO(2)S^2 \cong \mathrm{SO}(3)/\mathrm{SO}(2); and the hyperbolic plane is SL2(R)/SO(2)\mathrm{SL}_2(\R)/\mathrm{SO}(2). These coset spaces are geometric objects, not groups, unless HH is normal. Projective space is a quotient too: Pn(k)=(kn+1∖{0})/k×\mathbb{P}^n(k) = (k^{n+1} \setminus \{0\})/k^\times, lines through the origin. Klein's Erlangen programme reads a geometry as a pair (G,G/H)(G, G/H). Quotients by discrete groups of isometries produce new spaces: by the uniformisation theorem, every closed surface is a quotient of the sphere, the Euclidean plane or the hyperbolic plane by such a group — flat tori are R2/Z2\R^2/\Z^2-type quotients, and surfaces of genus at least 22 are quotients of the hyperbolic plane by surface groups (transformation geometry).

    Number theory— Residue rings and residue fields

    Z/nZ\Z/n\Z is the stage of elementary number theory, and the Chinese remainder theorem reduces it to prime powers Z/pkZ\Z/p^k\Z. In a ring of algebraic integers O\mathcal{O}, a non-zero prime ideal p\mathfrak{p} is maximal, and O/p\mathcal{O}/\mathfrak{p} is a finite residue field. In Z[i]\Z[i], for example, Z[i]/(2+i)≅F5\Z[i]/(2 + i) \cong \mathbb{F}_5 while Z[i]/(3)≅F9\Z[i]/(3) \cong \mathbb{F}_9. How a prime pp of Z\Z behaves in O\mathcal{O} is read off from the quotient O/pO\mathcal{O}/p\mathcal{O}, which is a product of residue fields by the Chinese remainder theorem. The prime pp splits, stays inert or ramifies according to whether that quotient looks like Fp×Fp\mathbb{F}_p \times \mathbb{F}_p, like Fp2\mathbb{F}_{p^2}, or has nilpotents, like Fp[x]/(x2)\mathbb{F}_p[x]/(x^2). In Z[i]\Z[i]: 55 splits, 33 is inert and 22 ramifies. See algebraic number theory.

    Category theory— Quotients are coequalisers

    In the category of groups, the quotient map π:G→G/N\pi : G \to G/N is the coequaliser of two homomorphisms N⇉GN \rightrightarrows G: the inclusion and the trivial map. Theorem 2 is exactly the universal property that defines a coequaliser: every map out of GG that equalises them (kills NN) factors uniquely through π\pi. The first isomorphism theorem says that in Grp\mathbf{Grp} every homomorphism factors as a regular epimorphism followed by a monomorphism, a property shared by all regular categories. In an abelian category, every epimorphism is the cokernel of its kernel. Quotients are colimits, as subgroups and kernels are limits (limits and colimits). Rings work the same way, with the coequaliser of a pair f,g:A⇉Rf, g : A \rightrightarrows R being RR modulo the ideal generated by all f(a)−g(a)f(a) - g(a).

    Logic— Quotients as a way of building mathematics

    Much of mathematics is built by quotients. Z\Z is pairs of natural numbers modulo (a,b)∼(c,d)  ⟺  a+d=b+c(a, b) \sim (c, d) \iff a + d = b + c, Q\Q is fractions modulo cross-multiplication, and R\R is Cauchy sequences of rationals modulo null sequences (see constructing ℤ, ℚ and ℝ). In logic, the Lindenbaum–Tarski algebra of a theory is the set of formulas modulo provable equivalence; it is a Boolean algebra, and the completeness theorem can be read through its quotients by maximal filters. Lean has quotient types built into its foundations, with the rule that a function on representatives descends to the quotient only when accompanied by a proof that it respects the relation. That rule is the formal version of "check that the operation is well defined", and it is why the Lean proofs above must supply normality.

    Wonder Trails

    Wonder Trails

    History & global context

    History and global context

    • Remainders. The Sunzi Suanjing (China, 3rd–5th century) posed the remainder problem behind the Chinese remainder theorem. Āryabhaṭa (499) gave the kuṭṭaka ("pulveriser") method for linear congruences, and Qin Jiushao's Mathematical Treatise in Nine Sections (1247) gave a general algorithm (dayan) for simultaneous congruences. Gauss's Disquisitiones Arithmeticae (1801) introduced the notation a≡b(modn)a \equiv b \pmod n and made congruence classes into objects of calculation.
    • New numbers from quotients. Cauchy (1847) defined the complex numbers as real polynomials computed modulo i2+1i^2 + 1. Leopold Kronecker (1887) showed in general how to adjoin a root of any polynomial by computing modulo an irreducible factor. That is Corollary 10, and it is the modern construction of finite fields.
    • Quotient groups. Galois (1830–32) recognised the importance of what we call normal subgroups ("proper decompositions"). Camille Jordan (1870) studied composition series, and Otto Hölder (1889) introduced the quotient group (Faktorgruppe) explicitly in proving the Jordan–Hölder theorem.
    • Ideals and isomorphism theorems. Dedekind's ideals (1871) and their quotients were developed by Hilbert, Lasker and Macaulay. Emmy Noether's papers of 1921 and 1927 gave the isomorphism theorems their modern general form, and B. L. van der Waerden's Moderne Algebra (1930–31), based on lectures by Noether and Emil Artin, made them standard.
    Further reading

    Further reading

    • David S. Dummit and Richard M. Foote, Abstract Algebra (3rd edition, 2004), §3.1–3.3 (quotient groups and isomorphism theorems) and §7.3–7.6 (quotient rings, the Chinese remainder theorem, maximal and prime ideals).
    • Michael Artin, Algebra (2nd edition, 2011), the sections on quotient groups and on adjoining elements to rings.
    • Joseph J. Rotman, Advanced Modern Algebra (2nd edition, 2010) — isomorphism and correspondence theorems in groups, rings and modules.
    • Rudolf Lidl and Harald Niederreiter, Introduction to Finite Fields and their Applications (revised edition, 1994) — finite fields built as polynomial quotients, with applications to coding.
    • Emily Riehl, Category Theory in Context (2016), chapter 3 — quotients as colimits.