/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil

The Maxwell conjecture

References:

In his 1873 Treatise on Electricity and Magnetism (§113) J. C. Maxwell discusses the number of equilibria of the electric field generated by $n$ point charges. Based on their reading of that passage, Gabrielov, Novikov and Shapiro formulated the Maxwell conjecture: if the critical points of the electrostatic potential $$V(x) = \sum_{j=1}^n \frac{q_j}{|x - a_j|}$$ generated by $n$ point charges are all non-degenerate, then their number is at most $(n-1)^2$.

Arathoon, Ball and Kvalheim disproved the conjecture by exhibiting a configuration of five positive point charges — three unit charges at the vertices of an equilateral triangle together with two small charges placed symmetrically on the axis of the triangle — whose potential has at least $24$ non-degenerate critical points, whereas $(5-1)^2 = 16$.

@[expose] public sectionnamespace Arxiv.«2607.27197»open scoped Gradient

The Coulomb potential $V(x) = \sum_j q_j / |x - a_j|$ generated by $n$ point charges of strengths $q_j$ located at the points $a_j$ of Euclidean $3$-space. It is genuinely defined away from the charge locations $a_j$.

noncomputable def potential {n : ℕ} (q : Fin n → ℝ) (a : Fin n → EuclideanSpace ℝ (Fin 3)) : EuclideanSpace ℝ (Fin 3) → ℝ := fun x => ∑ j, q j / dist x (a j)

The Hessian of $V$ at $x$ is non-singular, i.e. the symmetric bilinear form $(v, w) \mapsto D^2V(x)[v, w]$ is non-degenerate.

def HasNondegenerateHessianAt (V : EuclideanSpace ℝ (Fin 3) → ℝ) (x : EuclideanSpace ℝ (Fin 3)) : Prop := ∀ v ≠ 0, ∃ w, iteratedFDeriv ℝ 2 V x ![v, w] ≠ 0

The equilibria of the field of $n$ point charges: the points where the electric field $-\nabla V$ vanishes, i.e. the critical points of the potential $V$, away from the charges themselves.

def equilibria {n : ℕ} (q : Fin n → ℝ) (a : Fin n → EuclideanSpace ℝ (Fin 3)) : Set (EuclideanSpace ℝ (Fin 3)) := {x | x ∉ Set.range a ∧ ∇ (potential q a) x = 0}

The equilibria of the field of $n$ point charges at which the Hessian of the potential is non-singular.

def nondegenerateEquilibria {n : ℕ} (q : Fin n → ℝ) (a : Fin n → EuclideanSpace ℝ (Fin 3)) : Set (EuclideanSpace ℝ (Fin 3)) := {x ∈ equilibria q a | HasNondegenerateHessianAt (potential q a) x}

Maxwell's conjecture, in the formulation of Gabrielov, Novikov and Shapiro: if the critical points of the electrostatic potential generated by $n$ point charges (at distinct locations, with non-zero strengths) are all non-degenerate, then their number cannot exceed $(n-1)^2$.

def Conjecture : Prop := ∀ (n : ℕ), 0 < n → ∀ (q : Fin n → ℝ) (a : Fin n → EuclideanSpace ℝ (Fin 3)), Function.Injective a → (∀ j, q j ≠ 0) → (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) → (equilibria q a).encard ≤ ((n - 1) ^ 2 : ℕ)

The second half of Theorem 1 of Arathoon–Ball–Kvalheim: after a small perturbation of the charge strengths, the counterexample potential is a Morse function, i.e. it has finitely many critical points, all of which are non-degenerate, and there are still at least $24$ of them.

Reference: arXiv:2607.27197

@[category research solved, AMS 31 78] theorem maxwell_conjecture.counterexample_morse : ∃ (q : Fin 5 → ℝ) (a : Fin 5 → EuclideanSpace ℝ (Fin 3)), Function.Injective a ∧ (∀ j, 0 < q j) ∧ (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) ∧ (equilibria q a).Finite ∧ 24 ≤ (equilibria q a).encard := ⊢ ∃ q a, Function.Injective a ∧ (∀ (j : Fin 5), 0 < q j) ∧ (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) ∧ (equilibria q a).Finite ∧ 24 ≤ (equilibria q a).encard All goals completed! 🐙

Maxwell's conjecture is false: Arathoon, Ball and Kvalheim exhibit five point charges whose potential is a Morse function with at least $24 > 16 = (5-1)^2$ critical points.

Reference: arXiv:2607.27197

h:Conjectureq:Fin 5 → ℝa:Fin 5 → EuclideanSpace ℝ (Fin 3)hinj:Function.Injective ahpos:∀ (j : Fin 5), 0 < q jhnd:∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) xleft✝:(equilibria q a).Finiteh24:24 ≤ (equilibria q a).encardhb:(equilibria q a).encard ≤ ↑((5 - 1) ^ 2)⊢ False h:Conjectureq:Fin 5 → ℝa:Fin 5 → EuclideanSpace ℝ (Fin 3)hinj:Function.Injective ahpos:∀ (j : Fin 5), 0 < q jhnd:∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) xleft✝:(equilibria q a).Finiteh24:24 ≤ (equilibria q a).encardhb:(equilibria q a).encard ≤ ↑((5 - 1) ^ 2)this:24 ≤ ↑((5 - 1) ^ 2)⊢ False All goals completed! 🐙

The positions of the five charges of the counterexample: three vertices of an equilateral triangle in the plane $z = 0$, together with the two points $(0, 0, \pm\varepsilon)$ on its axis of symmetry.

noncomputable def counterexamplePositions (ε : ℝ) : Fin 5 → EuclideanSpace ℝ (Fin 3) := ![!2[1, 0, 0], !2[-1/2, Real.sqrt 3 / 2, 0], !2[-1/2, -(Real.sqrt 3 / 2), 0], !2[0, 0, ε], !2[0, 0, -ε]]

The strengths of the five charges of the counterexample: three unit charges at the vertices of the triangle and two charges of strength $q_\varepsilon = \frac{3}{4}\varepsilon^3 - \frac{5}{32}\varepsilon^5$ on the axis.

noncomputable def counterexampleCharges (ε : ℝ) : Fin 5 → ℝ := ![1, 1, 1, 3 / 4 * ε ^ 3 - 5 / 32 * ε ^ 5, 3 / 4 * ε ^ 3 - 5 / 32 * ε ^ 5]

The first three charges of the counterexample sit at the vertices of an equilateral triangle of side length $\sqrt{3}$, inscribed in the unit circle of the plane $z = 0$.

@[category test, AMS 31 78] theorem counterexamplePositions_dist_vertices (ε : ℝ) : dist (counterexamplePositions ε 0) (counterexamplePositions ε 1) = Real.sqrt 3 ∧ dist (counterexamplePositions ε 1) (counterexamplePositions ε 2) = Real.sqrt 3 ∧ dist (counterexamplePositions ε 0) (counterexamplePositions ε 2) = Real.sqrt 3 := ε:ℝ⊢ dist (counterexamplePositions ε 0) (counterexamplePositions ε 1) = √3 ∧ dist (counterexamplePositions ε 1) (counterexamplePositions ε 2) = √3 ∧ dist (counterexamplePositions ε 0) (counterexamplePositions ε 2) = √3 ε:ℝ⊢ dist (counterexamplePositions ε 0) (counterexamplePositions ε 1) = √3ε:ℝ⊢ dist (counterexamplePositions ε 1) (counterexamplePositions ε 2) = √3ε:ℝ⊢ dist (counterexamplePositions ε 0) (counterexamplePositions ε 2) = √3 ε:ℝ⊢ dist (counterexamplePositions ε 0) (counterexamplePositions ε 1) = √3ε:ℝ⊢ dist (counterexamplePositions ε 1) (counterexamplePositions ε 2) = √3ε:ℝ⊢ dist (counterexamplePositions ε 0) (counterexamplePositions ε 2) = √3 ε:ℝ⊢ dist (counterexamplePositions ε 0) (counterexamplePositions ε 2) = √3 ε:ℝ⊢ √((1 - -1 / 2) ^ 2 + 3 / 2 ^ 2) = √3 try All goals completed! 🐙

The last two charges of the counterexample are placed symmetrically about the origin on the axis of the triangle, at distance $2|\varepsilon|$ from each other.

ε:ℝ⊢ |2| * |ε| = 2 * |ε| All goals completed! 🐙

Theorem 1 of Arathoon–Ball–Kvalheim: there is an $\varepsilon_0 > 0$ such that for all $0 < \varepsilon < \varepsilon_0$ the potential generated by the five charges located at $a_1, \dots, a_5$ with respective strengths $1, 1, 1, q_\varepsilon, q_\varepsilon$, where $q_\varepsilon = \frac{3}{4}\varepsilon^3 - \frac{5}{32}\varepsilon^5$, admits at least $24$ non-degenerate critical points.

Reference: arXiv:2607.27197

@[category research solved, AMS 31 78] theorem maxwell_conjecture.counterexample : ∃ ε₀ > 0, ∀ ε ∈ Set.Ioo 0 ε₀, 24 ≤ (nondegenerateEquilibria (counterexampleCharges ε) (counterexamplePositions ε)).encard := ⊢ ∃ ε₀ > 0, ∀ ε ∈ Set.Ioo 0 ε₀, 24 ≤ (nondegenerateEquilibria (counterexampleCharges ε) (counterexamplePositions ε)).encard All goals completed! 🐙

The polynomial $\Phi_0 = \frac{5}{32} H_2 + \frac{15}{8} H_3 + \frac{3}{16} H_4$ in the harmonic polynomials $H_2 = r^2 - 2z^2$, $H_3 = x^3 - 3xy^2$ and $H_4 = 3r^4 - 24r^2z^2 + 8z^4$ (where $r^2 = x^2 + y^2$), obtained as the limit as $\varepsilon \to 0$ of the rescaled potentials $\Phi_\varepsilon(X) = (V_\varepsilon(\varepsilon^2 X) - V_\varepsilon(0)) / \varepsilon^6$.

noncomputable def phiZero (p : EuclideanSpace ℝ (Fin 3)) : ℝ := let x := p.ofLp 0 let y := p.ofLp 1 let z := p.ofLp 2 let r2 := x ^ 2 + y ^ 2 5 / 32 * (r2 - 2 * z ^ 2) + 15 / 8 * (x ^ 3 - 3 * x * y ^ 2) + 3 / 16 * (3 * r2 ^ 2 - 24 * r2 * z ^ 2 + 8 * z ^ 4)

Lemma 2 of Arathoon–Ball–Kvalheim: the polynomial $\Phi_0$ has exactly $21$ critical points, all of which are non-degenerate. These are the critical points into which the central equilibrium of the equilateral triangle bifurcates when the two axial charges are added.

Reference: arXiv:2607.27197

@[category research solved, AMS 31 78] theorem maxwell_conjecture.phiZero_critical_points : {p : EuclideanSpace ℝ (Fin 3) | ∇ phiZero p = 0}.encard = 21 ∧ ∀ p, ∇ phiZero p = 0 → HasNondegenerateHessianAt phiZero p := ⊢ {p | ∇ phiZero p = 0}.encard = 21 ∧ ∀ (p : EuclideanSpace ℝ (Fin 3)), ∇ phiZero p = 0 → HasNondegenerateHessianAt phiZero p All goals completed! 🐙

Proposition 1 of Arathoon–Ball–Kvalheim: iterating the construction, for every $m \geq 0$ there is a configuration of $3 + 2m$ positive point charges whose potential has a finite number $k \geq 4 + 20m$ of critical points, all of which are non-degenerate. In particular the ratio of critical points to charges is asymptotically at least $10$.

Reference: arXiv:2607.27197

@[category research solved, AMS 31 78] theorem maxwell_conjecture.iterated (m : ℕ) : ∃ (q : Fin (3 + 2 * m) → ℝ) (a : Fin (3 + 2 * m) → EuclideanSpace ℝ (Fin 3)), Function.Injective a ∧ (∀ j, 0 < q j) ∧ (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) ∧ (equilibria q a).Finite ∧ 4 + 20 * m ≤ (equilibria q a).encard := m:ℕ⊢ ∃ q a, Function.Injective a ∧ (∀ (j : Fin (3 + 2 * m)), 0 < q j) ∧ (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) ∧ (equilibria q a).Finite ∧ 4 + 20 * ↑m ≤ (equilibria q a).encard All goals completed! 🐙

Maxwell's bound is trivially achieved for $n = 2$: the potential of two point charges at distinct locations has at most $(2-1)^2 = 1$ critical point.

Reference: arXiv:2607.27197

@[category textbook, AMS 31 78] theorem maxwell_conjecture.variants.two_charges (q : Fin 2 → ℝ) (a : Fin 2 → EuclideanSpace ℝ (Fin 3)) (ha : Function.Injective a) (hq : ∀ j, q j ≠ 0) : (equilibria q a).encard ≤ 1 := q:Fin 2 → ℝa:Fin 2 → EuclideanSpace ℝ (Fin 3)ha:Function.Injective ahq:∀ (j : Fin 2), q j ≠ 0⊢ (equilibria q a).encard ≤ 1 All goals completed! 🐙

Maxwell's conjecture holds for three point charges of equal magnitudes: the potential of three such charges, if all of its critical points are non-degenerate, has at most $(3-1)^2 = 4$ of them.

Reference: Maxwell's conjecture on three point charges with equal magnitudes by Ya-Lun Tsai

@[category research solved, AMS 31 78] theorem maxwell_conjecture.variants.three_equal_magnitudes (q : Fin 3 → ℝ) (a : Fin 3 → EuclideanSpace ℝ (Fin 3)) (ha : Function.Injective a) (hq : ∀ j, q j ≠ 0) (hq' : ∀ i j, |q i| = |q j|) (hnd : ∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) : (equilibria q a).encard ≤ 4 := q:Fin 3 → ℝa:Fin 3 → EuclideanSpace ℝ (Fin 3)ha:Function.Injective ahq:∀ (j : Fin 3), q j ≠ 0hq':∀ (i j : Fin 3), |q i| = |q j|hnd:∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x⊢ (equilibria q a).encard ≤ 4 All goals completed! 🐙

Maxwell's conjecture for three point charges of arbitrary strengths: if all critical points of the potential of three point charges are non-degenerate, then there are at most $(3-1)^2 = 4$ of them. This remains open.

Reference: arXiv:2607.27197

@[category research open, AMS 31 78] theorem maxwell_conjecture.variants.three_charges : ∀ (q : Fin 3 → ℝ) (a : Fin 3 → EuclideanSpace ℝ (Fin 3)), Function.Injective a → (∀ j, q j ≠ 0) → (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) → (equilibria q a).encard ≤ 4 := ⊢ ∀ (q : Fin 3 → ℝ) (a : Fin 3 → EuclideanSpace ℝ (Fin 3)), Function.Injective a → (∀ (j : Fin 3), q j ≠ 0) → (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) → (equilibria q a).encard ≤ 4 All goals completed! 🐙

Is the number of equilibria of $n$ point charges bounded by a polynomial in $n$?

With the quadratic bound of Maxwell's conjecture gone, the gap between the known bounds is wide: the constructions of Arathoon–Ball–Kvalheim give configurations with at least $10n$ equilibria asymptotically, while the best known upper bounds — $2^{2n^2}(3n)^{2n}$ by Gabrielov–Novikov–Shapiro, $5 \cdot 9^{3+n}$ by Zolotov and $2^n (3n-2)^3$ by Edelsbrunner–Fillmore–Oliveira — are all exponential in $n$.

References: arXiv:2607.27197, Counting equilibria of the electrostatic potential

@[category research open, question, AMS 31 78] theorem maxwell_conjecture.variants.polynomial_bound : ∃ C d : ℕ, ∀ (n : ℕ), 0 < n → ∀ (q : Fin n → ℝ) (a : Fin n → EuclideanSpace ℝ (Fin 3)), Function.Injective a → (∀ j, q j ≠ 0) → (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) → (equilibria q a).encard ≤ (C * n ^ d : ℕ) := ⊢ ∃ C d, ∀ (n : ℕ), 0 < n → ∀ (q : Fin n → ℝ) (a : Fin n → EuclideanSpace ℝ (Fin 3)), Function.Injective a → (∀ (j : Fin n), q j ≠ 0) → (∀ x ∈ equilibria q a, HasNondegenerateHessianAt (potential q a) x) → (equilibria q a).encard ≤ ↑(C * n ^ d) All goals completed! 🐙end Arxiv.«2607.27197»