As mentioned far too many times, my favourite book is Invisible Cities by Italo Calvino. It's a bible of dreams and interpretations. And as we do as humans, I reach for that which I know, find solace and trust in our era of speed-running intelligence.

The book is designed around numbers. Marco Polo sits with Kublai Khan and tells him about fifty-five cities: eleven kinds, five of each, laid across nine chapters in a strict order (five kinds are in play at any time). Perinthia is the fourth of the cities of the sky. In it, astronomers are asked to build a city. They choose a site and the day by the patterns of the stars. They lay out the two main streets as a cross, one along the path of the sun and one along the axis on which the skies turn. They divide the ground into twelve for the signs of the zodiac, and they cut the gates where, at some hour in the next thousand years, each will perfectly frame an eclipse of the moon. Perinthia, they promise, will mirror the harmony of the heavens.

The city was built perfectly. Calvino is careful about this. No mason cuts a corner and no blade of grass drifts from the plan. People arrive from around the world. The first generation born inside the walls grows up, marries and has children of its own, and this is where trouble begins. Walk the streets of Perinthia today and the bodies you meet are bent, stunted and misshapen. The worst are never seen at all. They are kept in cellars and attics, three-headed and six-legged, known only by the howls that come through the floorboards.

The astronomers are left with two ways to explain this slow slouch into ruin. Either their sums were wrong, and the sky is beyond their describing. Or their sums were right, and this is what the order of the heavens looks like once it is laid out in streets and filled with people. Calvino stops there.

Much of the current rhetoric around machines going wrong assumes the first answer. The objective was badly written; the data was wrong; someone or some function was leaky. These are boring explanations because each comes with a possible fix. Perinthia is the other case. It was built to the letter, every check passed, and still nobody saw the horror coming. You can verify every step of a thing and still have no idea what you have made.

And this week it happened in mathematics. On 20 November Levent Alpöge published a proof of the Riemann hypothesis in Lean (17 million lines of it) found working with Claude, for a question open since 1859. Lean is a language in which every step is checked by another program. The Lean community judged this to be correct within 24 hours. The most famous question in mathematics has an answer that is most likely true and that no person has read fully.

So here is Perinthia in flesh and numbers. The astronomers at least understood what they had built. We are thrilled with the answer and cannot read it. A proof has always been two things at once: a guarantee that a statement is true, and an account of why. We have the first and are waiting on the second. Perhaps the proof is long because the first route to anything is complex, whether it be hypotheses, mountaintops or the moon. Perhaps the dancing primes are like this, and seventeen million lines is what their order looks like when it is written down faithfully.

What the astronomers lacked was the ability to think in a manner not prescribed by the heavens. They knew the sky to the second of an eclipse a thousand years off, and nothing about families, love, grief, wit, hate and death. They got the sky right, and it was the wrong thing to get right. Lean has got the primes right, as far as anyone can tell, and we still do not know what we are holding.

Checking the steps is the easy part now. Working out what they mean is still our job, and it may take years. Which is, I suppose, why I keep reaching for a book from 1972 about imaginary cities, the heavens and, it turns out, maths.