My coauthors June Huh, Mario Kummer, Oliver Lorscheid, and I just posted a paper called Lorentzian polynomials and matroids over triangular hyperfields, Part 2: Analytic aspects on the arXiv preprint server. This is the first paper of mine to contain a substantial result proved by AI, and also the first to contain a proof formally verified in Lean. So I thought I would take this opportunity to tell a bit of the backstory.
Although our paper is motivated by the general theory of Lorentzian polynomials and matroids with coefficients, which are a bit daunting to explain in a short post, the parts in which AI played a decisive role can be explained in a completely elementary way. I will first state some of our main results, as well as our main open conjecture, in terms of basic linear algebra. Then I will discuss how AI—primarily Chat GPT-5.5—was able to prove a theorem that had previously eluded us.
The
-inequalities
We assume in what follows, to avoid trivialities.
Definition.
- We call an
real matrix
admissible if it is symmetric, has zero diagonal, and has strictly positive off-diagonal entries.
- We say that an admissible matrix
satisfies the
-inequalities if, for every quartet
with
, the maximum of the three products
is attained at least twice.
- Let
. We say that an admissible matrix
satisfies the
-inequalities if, for every quartet
with
, the three numbers
are the side lengths of a possibly degenerate Euclidean triangle.
In a precise sense, the -inequalities can be regarded as the
“tropical limit” of the
-inequalities for
. Also, if
, then every matrix satisfying the
-inequalities automatically satisfies the
-inequalities.
The
-inequalities and Lorentzian signature
It follows from a theorem of Brändén and Huh that an admissible matrix satisfying the
-inequalities is Lorentzian: it has at most one positive eigenvalue. The appendix to our new paper gives six proofs of the key fact underlying this statement: the leaf-to-leaf distance matrix of every metric tree is Lorentzian. (The
-inequalities are closely related to the celebrated four-point condition characterizing tree metrics in phylogenetic analysis.)
A natural generalization—and strengthening—is to ask whether, for each , there is a positive constant
such that every admissible
matrix satisfying the
-inequalities must be Lorentzian. One might imagine that this follows from a compactness argument, but the space of admissible matrices is not compact, and this noncompactness turns out to be a serious obstacle.
One of our theorems says that such a constant does exist:
Theorem A. For
, set
Let
be admissible, and suppose that
satisfies the
-inequalities. Then
is Lorentzian.
Our proof takes a perhaps-unexpected detour through a connection with Euclidean embeddings of metric spaces.
Schoenberg theory
The following result is a variant of a classical theorem of Schoenberg:
Theorem (Schoenberg). Let
be points in some Euclidean space
, and let
Then the associated Cayley–Menger matrix
has at most one positive eigenvalue.
(Although we will not need it here, an appropriately formulated converse is also true.)
Here is the connection with Theorem A. After rescaling by a positive diagonal matrix, we may arrange that every entry in its first row and first column, apart from the diagonal entry, is equal to
. Let
be the remaining
block, and define
. The
-inequalities for quartets containing the first index are exactly the triangle inequalities for
, so
is a metric on
points. If
embeds isometrically into Euclidean space, then
is its squared-distance matrix, and Schoenberg’s theorem applies.
Thus Theorem A reduces to the following result of Timothy Faver, Katelynn Kochalski, Mathav Kishore Murugan, Heidi Verheggen, Elizabeth Wesson, and Anthony Weston:
Theorem (FKMVWW). Let
, let
be an
-point metric space, and set
If
, then the snowflaked metric space
admits an isometric embedding into
.
Taking and
proves Theorem A when
. The endpoint
follows by a limiting argument.
The word snowflaked is used because, in metric geometry, replacing a metric by
for
is called taking a snowflake of the metric space. (The terminology alludes to the classical Koch snowflake curve.)
The bound is not optimal
For , Theorem A is easy to prove, and one can do better than
. If
is an admissible
matrix, an explicit calculation—closely related to Heron’s classical formula for the area of a triangle in terms of its side lengths—shows that
is Lorentzian if and only if it satisfies the
-inequalities. Closely related is the fact that the FKMVWW theorem is not optimal when
: every three-point metric space can be realized as a triangle in
, so in this case one can take
.
Define to be the supremum of all
such that every admissible
matrix satisfying the
-inequalities is Lorentzian. Theorem A says that
for all
, and the preceding calculation says that
.
An explicit construction in our paper gives the following general upper bound for :
Theorem B. For every
,
The upper and lower bounds supplied by Theorems A and B agree up to absolute constant factors, and thus
We believe that the upper bound gives the correct answer:
Conjecture A. For every
, we have
.
There are two distinct reasons that the lower bound in Theorem A is not sharp:
- The exponent in the FKMVWW theorem is not optimal. For example, when
—which corresponds to
—we have
. But a theorem of Blumenthal shows that, for every four-point metric space
, the snowflaked space
admits an isometric embedding into
for all
. To the best of our knowledge, the optimal general exponent remains open for
.
- The reduction of Theorem A to the FKMVWW theorem discards some of the extra structure supplied by the
-inequalities.
Evidence for the conjecture
As already mentioned, Conjecture A is true for . Our best additional evidence for the conjecture, aside from the general upper bound in Theorem B, is the following result whose original proof was produced by GPT-5.5 Pro:
Theorem C.
.
Note that Theorem A gives only the weaker lower bound
Combining Theorem C with Theorem B gives:
Corollary.
.
As previously mentioned, the proof of Theorem A discards some extra structure implied by the -inequalities. We now turn to a more in-depth discussion of this additional structure.
Definition. A metric space is Ptolemaic if, for every four points
,
The name refers, of course, to the classical Ptolemy inequality in Euclidean geometry. Ptolemaic metric spaces are quite natural objects to study; for example, Schoenberg proved that a real normed vector space is Ptolemaic if and only if its norm comes from an inner product.
The normalization described earlier explains why Ptolemaic spaces arise naturally in our setting: the -inequalities involving the distinguished first index give the triangle inequalities for
, while the remaining quartet inequalities are exactly the Ptolemy inequalities. From this one can show that Conjecture A is equivalent to the following statement:
Conjecture B. Let
and
. If
is an
-point Ptolemaic metric space, then the snowflaked space
admits an isometric embedding into
.
GPT-5.5 Pro produced a proof of Theorem C (which is equivalent to Conjecture B in the special case ) with no substantial mathematical assistance from my coauthors or me.
Brief outline of the proof
The key new idea in ChatGPT’s proof of Theorem C is a clever reduction from an arbitrary four-point Ptolemaic metric to a handful of boundary cases. Blumenthal’s theorem already covers , so the proof concentrates on
. By Schoenberg’s criterion, it is enough to prove that a certain
Gram matrix associated with the snowflaked metric is positive semidefinite; its
principal minors are automatically nonnegative, so the only issue is its determinant. Holding five of the six distances fixed and varying the sixth, ChatGPT observed that this determinant is a concave quadratic function of the
power of the varying distance. The values allowed by the triangle and Ptolemy inequalities form an interval, so concavity says that it is enough to check the two endpoints. At an endpoint, either a triangle inequality is an equality, meaning that one point lies on a geodesic between two others, or a Ptolemy inequality is an equality; in the latter case, an inversion of the metric turns the configuration into the former. A series of auxiliary lemmas, ultimately reducing matters to line and star metrics, handles these boundary configurations.
Checking and refining the proof
There were parts of the original proof that I did not understand, so I asked GPT-5.5 Pro and Claude Opus a number of questions. Those exchanges eventually produced a significantly simpler version of the argument.
The proof was still fairly complicated and difficult to check, so I enlisted David Renshaw’s help in formalizing it in Lean. David used Claude Code together with Lean to autoformalize the proof. Apart from writing the theorem statement in Lean and supplying Claude Code with the natural-language proof from our draft manuscript, neither David nor I provided further mathematical input. After the harness ran overnight, the resulting Lean development checked successfully. The Lean formalization can be found here.
As a bonus, Claude Code found some simplifications to the case analysis during formalization. We therefore ended up with a proof that is not only formally verified, but also easier for a human to read than the original. (Perhaps this gives a glimmer of hope to those currently despairing about the future of mathematics; there are manifold ways in which AI can help improve human understanding of mathematics—presumably the main goal of whatever it is that we mathematicians claim to do! Of course, there are clearly huge downsides as well, but that is a topic for another post…)
Looking ahead, I view Conjecture B—or, equivalently, Conjecture A—as an interesting challenge for humans, future AI systems, or both.
