Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Polynomial-time computability of comparisons of sums of square roots

Source:Wikipedia lists of open problems · en.wikipedia.org/wiki/Square-root_sum_problem
Open problem Nobody knows the answer yet — neither on paper nor in Lean. First verified proof: +100 points.
Statement:reviewed
Statement:

Is the square-root sum problem polynomial time (single sum version)?

Reference: Wikipedia

Subjects:Combinatorics (math.CO)
MSC classes:68
Tags:question
Cite as:NS.08515 [math.CO] · NS.08515v1 for this version
Declaration:PolyTime.isPolyTime_squareRootSum
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 100, later ones: 10; accepted critique: up to 60
Statement hash:43fbff1a5743bb621e1728b29ae853137da2e57e699649df9639bb74d8cdf433
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Wikipedia/SquareRootSum.lean

Formal statement

theorem isPolyTime_squareRootSum :
    IsPolyTime (Function.uncurry squareRootSum)
Show the full Challenge.lean (90 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Polynomial-time computability of comparisons of sums of square roots

This file formalizes the "Square-root sum problem"
which asks if one can decide in polynomial time on a Turing machine
whether the sum of the square roots of a list of naturals
is at most a cutoff (or alternatively, at most another such sum).

This problem is relevant to questions in computational geometry
(for example, in determining which of two polygonal paths in Euclidean space is longer).

Wikipedia states the problem for positive integers, an integer threshold, and lists of
equal length.
The versions here allow zeros, a natural-number threshold, and lists of any length.
This slightly more general formulation can be reduced to the fixed length form
(by removing zeros and introducing copies of $\sqrt{4}$ to the longer list and
$\sqrt{1} + \sqrt{1}$ to the shorter one).

*References:*
- [Wikipedia: List of unsolved problems in computer science](https://en.wikipedia.org/wiki/List_of_unsolved_problems_in_computer_science)
- [Wikipedia: Square-root sum problem](https://en.wikipedia.org/wiki/Square-root_sum_problem)

-/

@[expose] public section

namespace PolyTime

open ComplexityTheory Real

/--
**The square-root sum problem (single sum version)**

A decision problem that asks, of a list of natural numbers and a threshold,
whether the sum of the square roots of the elements of the list is at most that threshold.

*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Square-root_sum_problem) -/
noncomputable def squareRootSum (l : List ℕ) (t : ℕ) : Bool :=
  decide ((l.map fun n => √(n : ℝ)).sum ≤ t)

/--
**Is the square-root sum problem polynomial time (single sum version)?**

*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Square-root_sum_problem) -/
@[category research open, question, AMS 68]
theorem isPolyTime_squareRootSum :
    IsPolyTime (Function.uncurry squareRootSum) := by
  sorry

/--
**The square-root sum problem (two sum version)**

A decision problem that asks, of two lists of natural numbers,
whether the sum of the square roots of the elements of the first list
is at most the corresponding sum for the second list.

*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Square-root_sum_problem) -/
noncomputable def squareRootSumTwoSided (l₁ l₂ : List ℕ) : Bool :=
  decide ((l₁.map fun n => √(n : ℝ)).sum ≤ (l₂.map fun n => √(n : ℝ)).sum)

/--
**Is the square-root sum problem polynomial time (two sum version)?**

*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Square-root_sum_problem) -/
@[category research open, question, AMS 68]
theorem isPolyTime_squareRootSumTwoSided :
    IsPolyTime (Function.uncurry squareRootSumTwoSided) := by
  sorry

end PolyTime

To prove it: keep every definition of Challenge.lean unchanged and prove PolyTime.isPolyTime_squareRootSum with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_isPolyTime_squareRootSum : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch wikipedia-squarerootsum
nosorry submit wikipedia-squarerootsum nosorry/wikipedia-squarerootsum/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.