← mino.mobi

cohomology

art #1148 · the flow you cannot undo

geometry pack · temperley–lieb · meander · aztec · viazovska · borsuk · kakeya

A sheet of material with holes punched in it, cut into triangles. On every edge, one number — that is a 1-form, and the numbers here are random. Any such flow splits, uniquely and at right angles, into three pieces: a part that is just running downhill, a part that is just swirling, and a remainder that is neither and cannot be removed. Cancel the hills. Cancel the swirls. What is left circulates around the voids, one independent circulation per void, and it is there for no reason except that the holes are.

show
energy · ‖ω‖² = ‖dα‖² + ‖δβ‖² + ‖h‖²
voids · b₁
3
mesh
the 1-form ω
paper · ink

Colour is the direction of turn about the nearest void: amber counterclockwise, teal clockwise. Each field is drawn at its own scale so you can see it at all — the harmonic part is a fraction of a percent of the total energy, and the readout says by how much it has been magnified. It is small. It is also the only piece that no change of the material can ever get rid of.

Now measure. Walk a closed loop and add up the form along it — a period. For the harmonic field the answer depends on nothing about your loop except which voids it goes around: shift it, stretch it, take a wild detour, the number does not move. For the exact part every loop gives exactly zero. That invariance is the whole content of the word cohomology, and here it is a finite sum of numbers off edges, so it is exact to the last digit.

Click the canvas to drop anchors — the loop routes along mesh edges between them — then close it to record a row.

your loop
ready-made loops
the harmonic basis
One field per void, normalised so that it has period 1 around its own void and 0 around every other. Any harmonic field is a combination of these.
loopwinding∮ω∮dα∮δβ∮hΣ wₖcₖclass?

∮dα is zero to the last bit for every loop you can draw — that is the definition of exact. ∮δβ is not, which is why the total ∮ω tells you nothing on its own. Only ∮h is a function of the winding vector alone, and the last column checks it against Σ wₖcₖ.

Every claim the other tabs make, as a number. These are recomputed live from whatever mesh and form are currently loaded — nothing here is a stored constant. The same assertions run in CI over eighteen mesh configurations in cohomology/hodge.selftest.mjs, against this page's own hodge.js.

art #1148 · Cohomology. The harmonic part alone, at length. Nothing here was chosen: the number of circulations is the number of holes, their directions are whatever the random form happened to hand over, and the picture would be blank if the sheet were solid.

Hodge 1941 · Eckmann 1944 · discrete, finite, exact

Take a flat sheet with a few holes in it and cut the material into triangles. That triangulation is a simplicial complex: some vertices, some edges joining them, some triangles filling in. Three kinds of thing live on it.

Two operators move between them, and both are just subtraction:

d₀ : C⁰ → C¹ (d₀f)(a→b) = f(b) − f(a) d₁ : C¹ → C² (d₁ω)(△ijk) = ω(i→j) + ω(j→k) + ω(k→i)

d₀ takes a height map to the flow you get by walking downhill on it. d₁ takes a flow to its circulation around each little triangle. The one identity everything rests on is that doing both gives nothing:

d₁ ∘ d₀ = 0

which is true for a stupid reason — go around a triangle summing f(b) − f(a) and the terms cancel in pairs. A flow that came from a height map has no circulation anywhere.

The decomposition

Give each of the three spaces the ordinary dot product. Then d₀ and d₁ have adjoints, which are just their transposes, and the space of 1-forms splits into three mutually perpendicular pieces:

C¹ = im(d₀) ⊕ im(d₁ᵀ) ⊕ ker(Δ₁) exact coexact harmonic Δ₁ = d₀d₀ᵀ + d₁ᵀd₁

This is the discrete Hodge decomposition — Beno Eckmann's 1944 combinatorial version of W. V. D. Hodge's theorem for smooth manifolds, and unlike the smooth statement it is finite-dimensional linear algebra you can run on a laptop. Read the three parts as:

Why it is not zero

The dimension of the harmonic space is not a modelling choice. It is

dim ker Δ₁ = dim H¹(K; ℝ) = b₁ = number of holes

and you can read it straight off the Euler characteristic. For a triangulated planar region, V − E + F = 1 − b₁, so counting simplices counts holes. The ledger tab shows both this count and an independent one: decompose several random forms and measure the rank of the space their harmonic parts span. The two agree, every time, because they are the same number arrived at from opposite directions — one topological, one purely numerical.

A solid sheet has b₁ = 0 and its harmonic part is exactly the zero vector: on a simply connected domain, "no curl and no divergence" really does mean "nothing", and the decomposition collapses to the familiar Helmholtz split into gradient plus curl. Punch one hole and a one-dimensional space appears out of nowhere. Punch five and you get five. Move the hole, resize it, redraw the whole mesh at a different resolution — the dimension does not care. It is not measuring the geometry. It is counting the holes.

Periods: what cohomology actually means

The word cohomology is about pairing forms against loops. Take a closed loop of edges z and a 1-form ω, and sum ω along z with signs. Write it ∮z ω. Then:

So a harmonic field is completely described by g numbers, its periods c₁ … c_g, one per void. Sign is direction of circulation: amber for one way, teal for the other. Nothing else about it is observable by walking loops. The periods tab lets you draw loops by hand and check the identity ∮h = Σ wₖcₖ against the winding vector, on loops the page has never seen. It comes out to ten or eleven digits — not because the numerics are heroic but because both sides are finite sums of the same stored numbers.

Run it backwards and you get the deeper statement. The pairing H¹ × H₁ → ℝ is nondegenerate: the g × g matrix of periods of any basis is invertible, so there is a dual basis h₁ … h_g with ∮k hm = δkm. No harmonic field is invisible to every loop, and no loop class is invisible to every harmonic field. Forms and holes see each other perfectly. That is de Rham's theorem, in the one setting where it is a fact about a matrix you can print.

How the page computes it

Both projections are one sparse linear solve each, by conjugate gradients:

exact = d₀f where (d₀ᵀd₀) f = d₀ᵀω ← the graph Laplacian coexact = d₁ᵀg where (d₁d₁ᵀ) g = d₁ω ← the dual-graph Laplacian harmonic = ω − exact − coexact

The vertex Laplacian is singular — adding a constant to a height map does not change the water — so CG runs inside the mean-zero subspace. The face Laplacian is not singular, because the domain has a boundary. Nothing at all is done to find the harmonic part: it is defined as the leftover, which is exactly why the residuals ‖d₁h‖ and ‖d₀ᵀh‖ in the ledger are worth printing. They are not fitted; they are what is left when the two solves are subtracted off, and they come out at 10⁻¹¹.

The drawing uses Whitney forms. Inside a triangle the interpolant for edge (a,b) is Wab = λa∇λb − λb∇λa in barycentric coordinates, and the field is Σ ωeWe. Its defining property is that integrating Wab along edge (a,b) gives 1 and along the other two edges gives 0 — so the continuous picture you see integrates back to precisely the numbers on the edges. The selftest checks this to 10⁻⁹ on sampled edges, which is the difference between a visualisation and an illustration.

What is on the screen

Two ways to be surprised by the sliver

First: a random 1-form on a mesh with a few thousand edges has a harmonic component of a couple of percent, and that fraction goes up when you punch more holes and down when you refine the mesh — because it is roughly g/E, the fraction of the dimensions that are topological. It is small for the same reason a needle is thin.

Second: the smooth setting builds ω by integrating ∇φ + ∇⊥ψ along the edges, where φ and ψ are honest single-valued functions on the whole plane. That field is manifestly a gradient plus a curl. It still has a harmonic part, because ψ's sources sit inside the holes where the domain cannot see them, and the flux they push through each void has nowhere to be accounted for. Removing material from the middle of a sheet changes what the flow on the rest of it is allowed to be.

Connections in the pack

References