Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

Discrete Geometry

156 missions · 79 completed

Missions

Open77Completed79All156
🏆Completed
Complexity Theory·Captain: marwahaha

OpenAI Ten Proofs 07: Hardness of the closest vector problemResearch Paper

Hardness of the closest vector problem, from the OpenAI Ten Proofs formalization. The source already contains machine-checked proofs; this mission organizes its headline result and additional Comparator targets for reuse.

For every Boolean language AAA of finite bit strings for which there exist a polynomial P∈N[X]P\in\mathbb N[X]P∈N[X] and a deterministic polynomial-time Boolean verifier VVV satisfying A(x)=trueA(x)=\mathrm{true}A(x)=true if and only if there is a bit-string certificate ccc with ∣c∣≤P(∣x∣)|c|\le P(|x|)∣c∣≤P(∣x∣) and V(x,c)=trueV(x,c)=\mathrm{true}V(x,c)=true, there exists a total deterministic polynomial-time map fff on bit strings sending every xxx with A(x)=trueA(x)=\mathrm{true}A(x)=true into the following YES set and every xxx with A(x)=falseA(x)=\mathrm{false}A(x)=false into the following NO set. An instance consists of a natural dimension n>0n>0n>0, an integer matrix B∈Zn×nB\in\mathbb Z^{n\times n}B∈Zn×n with det⁡B≠0\det B\ne0detB=0, a target t∈Qnt\in\mathbb Q^nt∈Qn all of whose coordinates are integers, and a rational radius r>0r>0r>0. It is in YES exactly when some z∈Znz\in\mathbb Z^nz∈Zn satisfies ∑i=0n−1((Bz)i−ti)2≤r2\sum_{i=0}^{n-1}((Bz)_i-t_i)^2\le r^2∑i=0n−1​((Bz)i​−ti​)2≤r2, and in NO exactly when every z∈Znz\in\mathbb Z^nz∈Zn satisfies (n1/400r)2<∑i=0n−1((Bz)i−ti)2(n^{1/400}r)^2<\sum_{i=0}^{n-1}((Bz)_i-t_i)^2(n1/400r)2<∑i=0n−1​((Bz)i​−ti​)2. The sets consist of the exact encoded instance strings, formed by concatenating the encodings of nnn, rrr, the target coordinates in order, and the matrix entries in row-major order. Each scalar is encoded by taking its library natural-number code, applying the library's natural-number-to-bit-string encoding to get a word www, and prefixing www with ∣w∣|w|∣w∣ true bits followed by one false bit. Strings without such a valid encoded instance, and instances satisfying neither distance condition, are outside both sets; dimension one is included. Polynomial time is witnessed in the library's TM2 machine model, using its product encoding of Boolean lists for verifier input, its Boolean output encoding for the verifier, and identity encodings for the reduction's input and output.

Additional targets:

  • NP-hardness of binary nearest codeword with gap n^(1/200).
  • NP-hardness of feasible binary syndrome decoding with gap n^(1/200).
  • NP-hardness of rational finite-p lattice distance with gap n^(1/(200p)).

The formalization uses Lean 4.33.1 with Mathlib revision 0df444a360eaa60ab8c11dca51a86af692955474. Its goal and milestone statements retain the validated source statements and their conventions.

Sources: Lean formalization, H_GapCVP.json.

Planned collection: OAI Ten Proofs (oai-ten-proofs).

5 thms1 active userReviewed
🏆Completed
Captain: marwahaha

OpenAI Ten Proofs 01: High-dimensional sphere packingResearch Paper

High-dimensional sphere packing, from the OpenAI Ten Proofs formalization. The source already contains machine-checked proofs; this mission organizes its headline result and additional Comparator targets for reuse.

For each natural number ddd, let Fd\mathcal F_dFd​ consist of complex-valued Schwartz functions on Euclidean Rd\mathbb R^dRd whose values and Fourier-transform values are real, with f^(ξ)≥0\widehat f(\xi)\geq0f​(ξ)≥0 for every ξ\xiξ, f^(0)>0\widehat f(0)>0f​(0)>0, and f(x)≤0f(x)\leq0f(x)≤0 whenever ∥x∥≥1\|x\|\geq1∥x∥≥1; radiality is not required. Put q(f)=f(0)/f^(0)q(f)=f(0)/\widehat f(0)q(f)=f(0)/f​(0), Vd=πd/2/Γ(d/2+1)V_d=\pi^{d/2}/\Gamma(d/2+1)Vd​=πd/2/Γ(d/2+1), and Ld=(Vd/2d)inf⁡f∈Fdq(f)L_d=(V_d/2^d)\inf_{f\in\mathcal F_d}q(f)Ld​=(Vd​/2d)inff∈Fd​​q(f), where the infimum is taken in R\mathbb RR. Put Ad=inf⁡f∈Fdq(f)1/dA_d=\inf_{f\in\mathcal F_d}q(f)^{1/d}Ad​=inff∈Fd​​q(f)1/d, B=e/(2π)B=\sqrt{e/(2\pi)}B=e/(2π)​, and c=12log⁡2(2π/e)c=\tfrac12\log_2(2\pi/e)c=21​log2​(2π/e). The assertion is the conjunction of the following ten claims: Ad/d→1/πA_d/\sqrt d\to1/\piAd​/d​→1/π; there exists a real sequence ud→0u_d\to0ud​→0 such that Ad=(1/π+ud)dA_d=(1/\pi+u_d)\sqrt dAd​=(1/π+ud​)d​ for every d>0d>0d>0; Ld1/d→BL_d^{1/d}\to BLd1/d​→B; (log⁡Ld)/d→12log⁡(e/(2π))(\log L_d)/d\to\tfrac12\log(e/(2\pi))(logLd​)/d→21​log(e/(2π)); there exists a real sequence vd→0v_d\to0vd​→0 such that Ld=(B+vd)dL_d=(B+v_d)^dLd​=(B+vd​)d for all sufficiently large ddd; there exists a real sequence δd→0\delta_d\to0δd​→0, nonnegative for every natural ddd, such that for all sufficiently large ddd and every f∈Fdf\in\mathcal F_df∈Fd​, (2d/Vd)(B−δd)d≤q(f)(2^d/V_d)(B-\delta_d)^d\leq q(f)(2d/Vd​)(B−δd​)d≤q(f); c>0c>0c>0; 0.604400544291677695341677307053<c<0.6044005442916776953416773070540.604400544291677695341677307053<c<0.6044005442916776953416773070540.604400544291677695341677307053<c<0.604400544291677695341677307054; (log⁡2Ld)/d→−c(\log_2 L_d)/d\to-c(log2​Ld​)/d→−c; and there exists a real sequence wd→0w_d\to0wd​→0 such that Ld=2−(c+wd)dL_d=2^{-(c+w_d)d}Ld​=2−(c+wd​)d for all sufficiently large ddd. Each limit is along natural dimensions tending to infinity, and the four existentially quantified error sequences need not coincide. The sequences are defined also at d=0d=0d=0 using total real operations, in particular 0−1=00^{-1}=00−1=0 and division by zero equal to zero; the displayed 1/d1/d1/d powers denote those real powers.

Additional targets:

  • Exact root limit of the full Cohn–Elkies program.
  • Exact binary logarithmic rate of the full Cohn–Elkies program.
  • Sphere-packing density bound with a vanishing root error.

The formalization uses Lean 4.33.1 with Mathlib revision 0df444a360eaa60ab8c11dca51a86af692955474. Its goal and milestone statements retain the validated source statements and their conventions.

Sources: Lean formalization, A_SpherePacking.json.

Planned collection: OAI Ten Proofs (oai-ten-proofs).

5 thms1 active userReviewed
🏆Completed
Algebraic Geometry·Captain: mysticflounder

Near enemies: spherical sets project to minimal-energy images in general positionOpen Problem

Motivation

How few distinct distances can a planar point set determine? The near enemies of this mission are the closest competitors to the extremal configuration: points in no-three-collinear position (no line through three of them) and points lying on a common sphere — the lattice-sphere slice of Erdős–Füredi–Pach–Ruzsa is the motivating example. The bisector energy of a set counts ordered quadruples (a,b,c,d)(a,b,c,d)(a,b,c,d) of points for which the pair a,ba,ba,b and the pair c,dc,dc,d have the same perpendicular bisector; it measures how far the set is from generic. Lund–Sheffer–de Zeeuw fixed the floor of this statistic: 2n(n−1)2n(n-1)2n(n−1) is a universal lower bound, and bisector injectivity is sufficient for equality. The Near Enemy theorem is the projection statement on top of it — every admissible set admits one generic projection whose image attains that floor, sits in general position, has zero rotation energy, and carries the whole distance-transport package.

Setting

Work with finite sets PPP of points in the Euclidean plane (EuclideanSpace ℝ (Fin 2)), and in the transport direction with points in EuclideanSpace ℝ ι for a general finite index type. Following Lund–Sheffer–de Zeeuw, the bisector energy is

E(P)=∣{(a,b,c,d)∈P4  :  a≠b,  c≠d,  perpBisector(a,b)=perpBisector(c,d)}∣.\mathcal{E}(P) = \bigl|\{(a,b,c,d) \in P^4 \;:\; a \neq b,\; c \neq d,\; \mathrm{perpBisector}(a,b) = \mathrm{perpBisector}(c,d)\}\bigr|.E(P)=​{(a,b,c,d)∈P4:a=b,c=d,perpBisector(a,b)=perpBisector(c,d)}​.

The rotation energy counts the ordered congruent quadruples whose difference vectors are neither equal nor opposite, so it discards the translation and half-turn channels and isolates the proper-rotation one. A linear map TTT is projection-generic for a set GGG when exactly two conditions hold: TTT sends the difference of any two distinct points of GGG to a nonzero vector, and for two distinct unordered pairs of GGG the images never combine a parallel pair of differences with an orthogonal midpoint difference. Perpendicular bisectors, difference classes and distance images are all Finset operations.

Target

The mission goal is the spherical complete profile: for every finite set GGG lying on a common sphere, in any dimension, there is a linear map TTT to the plane whose image satisfies six conclusions at once —

∃ T:E(T(G))=2∣G∣(∣G∣−1)  ∧  E(T(G))≤E(P′) for every ∣P′∣=∣G∣  ∧  rotationEnergy(T(G))=0\exists\,T:\quad \mathcal{E}(T(G)) = 2|G|(|G|-1) \;\wedge\; \mathcal{E}(T(G)) \le \mathcal{E}(P') \text{ for every } |P'| = |G| \;\wedge\; \mathrm{rotationEnergy}(T(G)) = 0∃T:E(T(G))=2∣G∣(∣G∣−1)∧E(T(G))≤E(P′) for every ∣P′∣=∣G∣∧rotationEnergy(T(G))=0

together with injectivity of TTT on GGG, general position of the image (no three collinear, no four cospherical), and exact distance transport. The projection is chosen per set — its very type depends on the ambient dimension — but a single projection delivers all six conclusions together, and that bundled form is what downstream incidence arguments consume.

Milestones ascend in five steps: the universal energy floor, the bisector-injectivity equality case, the attainment of the floor by projection-generic maps, the existence of such a map for every no-three-collinear set, and the no-three-collinear transport bundle that the goal then specialises to the spherical case.

Significance

Lund–Sheffer–de Zeeuw introduced the extremal picture for bisector energy at the level of the exact constant. In footnote 1 on p. 538 of the SoCG 2015 version (LIPIcs vol. 34, 537–552) they state that E(P)=2n(n−1)\mathcal{E}(P) = 2n(n-1)E(P)=2n(n−1) when every distinct pair determines a distinct bisector, with the enumeration of the trivial quadruples that proves the floor. The universal asymptotic form E(P)=Ω(n2)\mathcal{E}(P) = \Omega(n^2)E(P)=Ω(n2) is a remark in their §3.4.

This mission builds a complete machine-checked development of the floor, its attainment and the sufficiency direction, from first principles in Lean 4 over mathlib; the rotationEnergy statistic together with the rotationEnergy = 0 certificate for the projected image, where rotationEnergy(P) = 0 follows from the published "distance Sidon set" property; and a single generic projection of a given set that carries the bisector floor at the same time as the Erdős–Füredi–Pach–Ruzsa general-position package. Four of that bundle's six conjuncts are already in Erdős–Füredi–Pach–Ruzsa 1993, whose Theorem 3.1 supplies them.

Formalizing it matters because the argument composes analysis (generic projections obtained from nonvanishing of circle determinants), algebra (inner-product and determinant polynomial witnesses carrying linear_combination certificates) and counting (fiberwise difference-class tallies) — and the interfaces between the three must agree exactly. The projection-genericity and polynomial-witness lemmas are reusable for any Euclidean extremal formalization.

Difficulty

The hard step is keeping the projection generic through every predicate at once: a projection that preserves no-three-collinearity can still kill a circle determinant, or create a coincidence that the counting needs to keep distinct. The naive first idea — project along a random direction and hope — fails because each predicate forbids a different algebraic hypersurface of directions; the fix is a single simultaneous-avoidance argument over the union, with each forbidden set shown proper by an explicit polynomial witness. That step is the largest proof in the mission and carries its own milestone.

Formalization scope

Points are EuclideanSpace; finite sets are Finset; energies are ℕ-valued statistics. Generic projections are linear maps carrying the explicit two-clause ProjectionGeneric predicate, so there is no hidden regularity assumption. Dimension is a general ι with [Fintype ι] wherever the transport needs it. The goal's only hypothesis is membership of a common sphere; no-three-collinearity is derived from it rather than assumed, because a line meets a sphere at most twice. No statement is vacuous: explicit witnesses were checked in the kernel for the goal and for every milestone.

Welcome contributions: the converse of the equality case — bisector injectivity is proved here to be sufficient for the floor, and necessity is open in this development; sharpness examples beyond the Erdős–Füredi–Pach–Ruzsa configuration; and the incidence assembly that consumes this mission's output.

Selected references

  • B. Lund, A. Sheffer and F. de Zeeuw, Bisector energy and few distinct distances, Proc. 31st SoCG 2015, LIPIcs vol. 34, 537–552, DOI 10.4230/LIPIcs.SOCG.2015.537; journal version Discrete Comput. Geom. 56 (2016), no. 2, 337–356, DOI 10.1007/s00454-016-9783-5, arXiv:1411.6868. Source of the bisector-energy statistic and its upper bounds. Footnote 1 on p. 538 of the SoCG version gives E(P)=2n(n−1)\mathcal{E}(P) = 2n(n-1)E(P)=2n(n−1) for every set whose pairs have distinct bisectors, with the count of trivial quadruples that proves the floor; §3.4 (p. 545) gives E(P)=Ω(n2)\mathcal{E}(P) = \Omega(n^2)E(P)=Ω(n2) for every set. The footnote is not in arXiv:1411.6868v1.
  • P. Erdős, Z. Füredi, J. Pach and I. Z. Ruzsa, The grid revisited, Discrete Math. 111 (1993), 189–196, DOI 10.1016/0012-365X(93)90155-M — the lattice-sphere-slice configuration that gives this mission its name, and (proof of Theorem 3.1, p. 193) the generic planar projection that is injective, keeps general position and transports distances.
  • J. Solymosi and T. Tao, An incidence theorem in higher dimensions, Discrete Comput. Geom. 48 (2012), no. 2, 255–280, DOI 10.1007/s00454-012-9420-x, arXiv:1103.2926, §5.1 — the canonical statement of the generic-projection trick this construction borrows. The same trick is used in J. Pach and F. de Zeeuw, Distinct distances on algebraic curves in the plane, Combin. Probab. Comput. 26 (2017), no. 1, 99–117, arXiv:1308.0177.
  • McKenna, Lean formalization (mathlib-only, axiom-clean), lean-formalizations, module Geometry.Euclidean.NearEnemyTheorem.
20 thms1 active userReviewed
🏆Completed
Algebraic Geometry·Captain: mysticflounder

Pach-de Zeeuw: finite Bezout bound for real plane curvesResearch Paper

Motivation

The distinct-distances problem asks how few distinct distances a finite planar point set can determine. Guth and Katz proved the near-optimal bound Ω(n/log⁡n)\Omega(n / \log n)Ω(n/logn) in 2015. Their argument passes through incidence geometry: distances become incidences between points and curves, and the Elekes–Sharir framework converts the problem into an incidence bound for lines in three-space. Pach and de Zeeuw showed the same pipeline works for points on a fixed algebraic curve, replacing line incidences with curve incidences. The algebraic prerequisite for that replacement — that two bounded-degree real plane curves with no shared component meet in finitely many points, with an explicit degree-dependent bound — is what this mission formalizes.

Setting

A real plane curve here is the real zero set of a nonzero bivariate polynomial p∈R[x,y]p \in \mathbb{R}[x, y]p∈R[x,y], written V(p)={(x,y):p(x,y)=0}V(p) = \{(x,y) : p(x,y) = 0\}V(p)={(x,y):p(x,y)=0}. Its total degree is the maximum i+ji+ji+j over monomials xiyjx^i y^jxiyj with nonzero coefficient. A curve is irreducible when its polynomial is irreducible.

The paper says two curves have a common component when their polynomials share a nonconstant factor. The Lean development uses a different, weaker hypothesis, NoCommonCurveComponent: no infinite irreducible real curve lies inside both sets. A shared factor whose real zero set is finite (for example x2+y2x^2 + y^2x2+y2) violates the paper's hypothesis but satisfies the Lean one, so the Lean theorem covers strictly more pairs of curves than the paper's statement.

Currying views ppp as a univariate polynomial in one coordinate whose coefficients are polynomials in the other. In the Lean code the polynomial variable is coordinate 000 and the coefficient (base) variable is coordinate 111; this description writes the base coordinate as xxx and the fiber coordinate as yyy, so a line {x=c}\{x = c\}{x=c} is called vertical. The resultant of two curried polynomials is a polynomial in xxx alone. The development uses one direction of its defining property: if the two specializations at xxx share a real root, the resultant vanishes at xxx. All Lean statements use MvPolynomial (Fin 2) ℝ for plane polynomials and EuclideanSpace ℝ (Fin 2) for points.

Target

The mission's goal is a finite-intersection bound in the spirit of Theorem 2.1 of Pach–de Zeeuw (Bézout's inequality), but it is not that theorem. It differs in both directions:

∀d1,d2, ∃C>0, ∀C1,C2 of total degree≤d1,d2 with no common infinite irreducible component:C1∩C2 is finite and ∣C1∩C2∣≤C.\forall d_1, d_2,\ \exists C > 0,\ \forall C_1, C_2 \text{ of total degree} \le d_1, d_2 \text{ with no common infinite irreducible component}:\quad C_1 \cap C_2 \text{ is finite and } |C_1 \cap C_2| \le C.∀d1​,d2​, ∃C>0, ∀C1​,C2​ of total degree≤d1​,d2​ with no common infinite irreducible component:C1​∩C2​ is finite and ∣C1​∩C2​∣≤C.
  • The conclusion is an existential degree-dependent constant. The proof's witness is C=(d1+d2+1)8+1C = (d_1+d_2+1)^8 + 1C=(d1​+d2​+1)8+1. The paper's sharp bound d1⋅d2d_1 \cdot d_2d1​⋅d2​ is not proved here.
  • The hypothesis is the weaker "no common infinite irreducible component" described above, so the statement is not a formal consequence of the paper's Theorem 2.1; the shared-finite-factor case is handled separately in the proof by a singular-point count.

The six milestones are the algebraic inputs: coefficient-root counting, the two resultant-nonvanishing criteria, the fiber bound, and the two mixed vertical/nonvertical pair bounds that carry the constant d1⋅d2d_1 \cdot d_2d1​⋅d2​. The nonvertical–nonvertical pair bound (primitive_nonvertical_pair_intersection_bound) carries the cruder constant ((d1+d2)2+1)⋅max⁡(d1,d2)((d_1+d_2)^2+1)\cdot\max(d_1,d_2)((d1​+d2​)2+1)⋅max(d1​,d2​). Above the milestones sit the irreducible-pair assembly with constant (d1+d2+1)4(d_1+d_2+1)^4(d1​+d2​+1)4 and the factorized assembly with constant (d1+d2+1)8(d_1+d_2+1)^8(d1​+d2​+1)8, from which the goal follows.

Significance

The result is the algebraic input to the Pach–de Zeeuw distinct-distances theorem for points on curves: without a uniform finite-intersection bound, the incidence count that drives the distance bound cannot even be stated. The formalization pins down every constant and every non-degeneracy hypothesis (non-verticality, no shared infinite component, coprimality) that the argument consumes.

The proof composes four toolkits — univariate root counting, Sylvester-matrix resultant degree bounds, normalized-factor decompositions, and a smooth implicit-function nonsingularity argument — whose interfaces must agree exactly. The resulting lemmas (resultant criteria, fiber bounds, partial-derivative degree bounds) are reusable for other real-algebraic incidence formalizations over MvPolynomial.

Difficulty

The central difficulty is elimination with explicit constants: the resultant converts a two-variable intersection problem into a one-variable root count, but every step (currying, specialization, factor-pair summation) must preserve a usable degree bound, and the degenerate configurations (vertical fibers, shared factors with finite real zero set, singular points) each need a separate finite bound.

The textbook route — Bézout's inequality over C\mathbb{C}C, then observing that real intersection points are complex ones — is not taken, for two reasons. Mathlib has no plane-curve Bézout theorem to invoke. And under the weaker Lean hypothesis the two polynomials may share an irreducible factor with finite real zero set, in which case the complex intersection is infinite and no complex count applies; that branch is closed by bounding the singular points of the shared factor instead.

Formalization scope

Points are EuclideanSpace ℝ (Fin 2); curves are MvPolynomial (Fin 2) ℝ zero sets; finiteness is Set.Finite with Set.ncard bounds. The development commits to total degree (not weighted degrees) and to the currying order that eliminates Lean coordinate 000; variable-style implicit degree bounds d1,d2d_1, d_2d1​,d2​ are explicit {d₁ d₂ : ℕ} binders on the platform. No statement is vacuous: every intersection bound carries the non-degeneracy hypothesis (non-associated irreducibles, non-divisibility, nonzero partials) that excludes the infinite-intersection cases. Contributions welcome: the sharp d1d2d_1 d_2d1​d2​ general bound (currently an existential constant), the paper's hypothesis form (no common factor at all), and the incidence assembly that consumes this mission's output.

Selected references

  • János Pach and Frank de Zeeuw, Distinct distances on algebraic curves in the plane, Combin. Probab. Comput. 26 (2017), no. 1, 99–117, arXiv:1308.0177, DOI 10.1017/S0963548316000225. Theorem 2.1 there cites C. G. Gibson, Elementary Geometry of Algebraic Curves, Lemma 14.4, for Bézout's inequality.
  • McKenna, Lean formalization of the algebraic preliminaries and Bézout bound, lean-formalizations, modules PachDeZeeuw.AlgebraicPrelim and PachDeZeeuw.Bezout (mathlib-only, axiom-clean).
39 thms1 active userReviewed
PreviousPage 4 of 4Next

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me