Telling whether a transformation can be undone — using topology and set theory instead of a derivative.
Imagine a machine that takes a point and moves it somewhere else. The question that matters: can you always run it backwards?
Usually yes. But sometimes the machine takes two different starting points and drops them in the exact same place. When that happens the information is gone — the machine itself no longer remembers which of the two you began with.
That failure breaks things people rely on. Image generators compute how likely an image is by running their transformation backwards. Medical imaging warps one brain scan onto another, and if the warp folds, two bits of tissue land on top of each other. Physics simulations need their meshes not to pass through themselves.
So everybody checks. The question is how.
The standard check looks at one point at a time: right here, does the machine squash space flat? That number is the Jacobian determinant. If it is never zero, people conclude nothing is being lost.
Picture a long strip of paper. Roll it into a tube.
At every single point on that paper, nothing bad happens — no crushing, no tearing, no folding. Every tiny patch is perfectly fine. But the two ends now touch. Two points that started far apart are in the same place.
A check that only ever looks at one point at a time cannot see this, because at no single point is anything wrong.
For 87 years mathematicians hoped this could not happen in the cleanest case. That hope was the Jacobian conjecture, and in July 2026 it was refuted. The counterexamples, in the paper's own words:
everywhere unramified, and fail to be injective only through points escaping to infinity
"Everywhere unramified" means the local check passes at every point. And the map still is not reversible. The local check is not weak. It is blind.
If one point cannot tell you, use two. Measure how far apart two points were before, and how far apart they are after, and divide. If the machine folds them together, that ratio collapses.
Then one more step, because "collapsed" needs a scale: compare the smallest such ratio to the typical one. A well-behaved machine's worst pair is not much worse than its average pair. A folding machine's worst pair is catastrophically worse.
from monodromy import collision_certificate
c = collision_certificate(F, sampler)
c["collision_found"] # True -> it found two points that collide
c["witness"] # ...and here they are
No derivative appears anywhere in that — only distances between points you already have. And the witness is the point: it does not merely score the machine, it hands you the pair that broke it.
Eight machines where the true answer is known in advance by algebra. The two the standard check misses are exactly the two the 2026 refutation predicts.
This is not a rigged fight. The derivative check is right six times out of eight, including on the fold it was designed to catch. It fails in one specific way, and that way is now known to be real rather than hypothetical.
| machine | truth | det check | monodromy |
|---|---|---|---|
| normalizing flow, w·u = −2 | not reversible | wrong | right |
| log-polar registration | not reversible | wrong | right |
| registration fold | not reversible | right | right |
| cubic fold | not reversible | right | right |
| tame automorphism, det ≡ 1 | reversible | right | right |
| area-preserving swirl | reversible | right | right |
| linear isomorphism | reversible | right | right |
| two stacked flow layers | reversible | right | right |
| you want to know | ask for | the idea |
|---|---|---|
| can this be undone? | collision_certificate | find the two points that collide |
| can you prove it? | certify_injective_on_box | interval arithmetic gives a real proof |
| does this shape have symmetry? | recover_dihedral | rotate it and see if it lands on itself |
| how crinkly is this data? | ph_dimension | how detail grows as you zoom in |
| is this system chaotic? | map_spectrum | how fast nearby paths separate |
| where do I put my cutoff? | minimax_threshold | the value an adversary can't exploit |
Every library says it works. Here is what this one cannot do:
There is a whole page of things this library got wrong and fixed — including a result that looked new, survived a week of excitement, and turned out to be published in 2019 with a statistic that collapsed under re-testing.
None of the mathematics is new. It is Kingman's subadditive theorem, covering spaces, interval arithmetic, Steele's theorem and Schweinhart's estimator — all decades old.
Whether anyone has pointed them at this problem before went to a literature sweep. Five things did not turn up in the machine-learning literature; one deliberate control correctly did. Every "not found" is a not-found over stated searches, not a proof that nobody has done it.
Asked how far this stands from genuinely new mathematics, the answer was blunt and worth keeping:
One good idea away. Five statements are new to ML only because ML never pointed known mathematics at this question. That is taste, not genius.
pip install -e .
pytest
numpy · scipy · ripser · persim · mpmath. Not torch — it was in here once, carrying eight lines of linear algebra that numpy does natively, and it is gone.