Skip to main content
KetQat

Appearance

Theorem · intermediate

Euler–Poincaré formula

For a finite chain complex over a field, the alternating sum of the dimensions of the chain spaces equals the alternating sum of the Betti numbers. For a cellulated surface it gives V − E + F = b0 − b1 + b2, which counts the logical qubits of a surface code from the numbers of qubits and checks.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

With ni=dim⁡Cin_i = \dim C_i and Betti numbers bi=dim⁡Hib_i = \dim H_i,

∑i=0m(−1)i ni  =  ∑i=0m(−1)i bi.\sum_{i=0}^{m} (-1)^{i}\, n_i \;=\; \sum_{i=0}^{m} (-1)^{i}\, b_i .

For the complex of a cellulated closed surface, ∣V∣−∣E∣+∣F∣=b0−b1+b2\abs{V} - \abs{E} + \abs{F} = b_0 - b_1 + b_2. Over F2\F_2, a connected closed surface has b0=b2=1b_0 = b_2 = 1 (whether or not it is orientable), so

b1=2−χ(Σ)=2−∣V∣+∣E∣−∣F∣.b_1 = 2 - \chi(\Sigma) = 2 - \abs{V} + \abs{E} - \abs{F} .

For an orientable surface of genus gg this is b1=2gb_1 = 2g; for a non-orientable surface with hh cross-caps (χ=2−h\chi = 2 - h) it is b1=hb_1 = h. Since the homological code has n=∣E∣n = \abs{E} qubits and k=b1k = b_1, the formula reads k=n−∣V∣−∣F∣+2k = n - \abs{V} - \abs{F} + 2: the two "missing" checks are the product of all vertex checks and the product of all face checks, each of which is the identity. The formula and the computation of the homology of surfaces are in Munkres.

Holds when

  • A chain complex 0→Cm→⋯→C0→00 \to C_m \to \cdots \to C_0 \to 0 of finite-dimensional vector spaces over a field.

Proof

Proof of the Euler–Poincaré formulaDraft

General formula. Let ri=rank⁡∂ir_i = \operatorname{rank} \partial_i, with r0=rm+1=0r_0 = r_{m+1} = 0. Rank–nullity for ∂i:Ci→Ci−1\partial_i : C_i \to C_{i-1} gives dim⁡ker⁡∂i=ni−ri\dim \ker \partial_i = n_i - r_i, and bi=dim⁡ker⁡∂i−dim⁡im⁡∂i+1=ni−ri−ri+1b_i = \dim\ker\partial_i - \dim \operatorname{im}\partial_{i+1} = n_i - r_i - r_{i+1}. Hence

∑i(−1)ibi=∑i(−1)ini−∑i(−1)iri−∑i(−1)iri+1.\sum_i (-1)^{i} b_i = \sum_i (-1)^{i} n_i - \sum_i (-1)^{i} r_i - \sum_i (-1)^{i} r_{i+1} .

Reindexing the last sum, ∑i(−1)iri+1=−∑j(−1)jrj\sum_i (-1)^{i} r_{i+1} = -\sum_j (-1)^{j} r_j (the boundary terms r0r_0 and rm+1r_{m+1} vanish), so the two rank sums cancel.

Degree 0 and degree 2 for a connected surface. ∂1\partial_1 maps an edge to the sum of its endpoints, so im⁡∂1\operatorname{im} \partial_1 lies in the even-weight subspace of F2V\F_2^{V}, which has dimension ∣V∣−1\abs{V} - 1; conversely, because the graph of a cellulation of a connected surface is connected, the sum of any two vertices is the boundary of a path between them, and these sums span the even-weight subspace. So b0=∣V∣−(∣V∣−1)=1b_0 = \abs{V} - (\abs{V} - 1) = 1. For b2=dim⁡ker⁡∂2b_2 = \dim \ker \partial_2: a set SS of faces has ∂2S=0\partial_2 S = 0 exactly when every edge has both sides in SS or both outside SS (an edge with the same face on both sides contributes nothing either way). Two faces adjacent across an edge are therefore both in or both out, and since the faces of a connected surface are linked by such adjacencies, ker⁡∂2={0,F}\ker \partial_2 = \{0, F\}, where the set of all faces FF is a cycle because each edge borders it twice. So b2=1b_2 = 1.

Substituting into the general formula with m=2m = 2 gives ∣V∣−∣E∣+∣F∣=2−b1\abs{V} - \abs{E} + \abs{F} = 2 - b_1. The values χ=2−2g\chi = 2 - 2g and χ=2−h\chi = 2 - h for the standard surfaces with g,h≥1g, h \ge 1 are computed from any one cellulation (for example a 4g4g-gon or 2h2h-gon with identified sides, which has one face, 2g2g or hh edges and one vertex), and independence of the cellulation is the topological invariance of homology (Munkres).

Stated in

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. James R. Munkres (2018). Elements of Algebraic Topology. CRC Press (reissue of the 1984 Addison-Wesley edition). doi:10.1201/9780429493911

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Re-derived the formula from rank-nullity (n_i = dim Z_i + rank d_i, b_i = dim Z_i - rank d_{i+1}, telescoping), b_0 = b_2 = 1 over F_2 for connected closed surfaces orientable or not, b_1 = 2g (chi = 2 - 2g) and b_1 = h (chi = 2 - h), and k = n - |V| - |F| + 2 from the two dependent check products. Checked by hand on the L x L toric code: n = 2L^2, |V| = |F| = L^2 gives k = 2. Munkres (not openly readable) is cited as background; Crossref metadata match.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision a69723c452207b1f. Source file knowledge/records/theorem/euler-poincare-formula.md in the content repository (readable there once it is public).