Sostactic
polynomial inequalities using sums-of-squares in Lean
Get picks like this daily. Today's launch numbers, the top launches, AI and tech news, and a daily opportunity pick, straight to your inbox.
Want to reach these readers? Sponsor an issue.
Current support for nonlinear inequalities in Lean is quite limited. This package attempts to solve this. It contains a collection of Lean4 tactics for proving polynomial inequalities via sum-of-squares (SOS) decompositions, powered by a Python backend. You can use it via Python or Lean.These tactics are significantly more powerful than `nlinarith` and `positivity` -- i.e., they can prove inequalities they cannot. In theory, they can be used to prove any of the following types of statements- prove that a polynomial is nonnegative globally - prove that a polynomial is nonnegative over a semialgebraic set (i.e., defined by a set of polynomial inequalities) - prove that a semialgebraic set is empty, i.e., that a system of polynomial inequalities is infeasibleThe underlying theory is based on the following observation: if a polynomial can be written as a sum of squares of other polynomials, then it is nonnegative everywhere. Theorems proving the existence of such decompositions were one of the landmark achievements of real algebraic geometry in the 20th century, and its connection to semidefinite programming in the 21st century made it a practical computational tool, and is what this software does in the background.
HN · launched Apr 18, 2026 · 14 upvotes (top 31%) · 1 view
Niche: identity and formal verification software · 93 launches, 5 in the last 7 days ▼ -38% · Explore this niche →
Category and tags
- Horizontal
- Dev tools
- Developer
- Not AI
- Hobby / open-source project
Visit website ↗ Source listing ↗
More like this: all 93 launches in identity and formal verification software →
Could you build this?
No Building formal verification tactics in Lean 4 based on real algebraic geometry and semidefinite programming (sum-of-squares decompositions) requires deep mathematical research and expertise in interactive theorem proving.
What it would actually take: Requires Lean 4 metaprogramming/tactic framework paired with a backend solver interface (e.g., Python with SymPy, Mosek/SCS for semidefinite programming). The hard problem is generating certifiable, exact rational arithmetic proofs inside Lean's proof kernel from numerical SDP solver outputs (positivstellensatz certificates). This demands specialized expertise in automated deduction, formal logic, and convex optimization.
Discussion
1 comment analyzed.
Competitors
Other products that read as similar to this one : 69 launches clear the similarity bar, closest 8 shown.
Attention rank: #20 of 70 (itself plus its competitors, highest first, normalized so YC and Product Hunt are compared fairly).
Launched 127 days after the earliest competitor.
- Compute polynomials twice as fast · hn · 2026-09-09 · 137 upvotes · similarity 0.45
- ConZF · github · 2026-09-18 · 17 upvotes · similarity 0.45
- Spivak's Calculus formalized in Lean 4 · hn · 2026-09-26 · 22 upvotes · similarity 0.44
- spivak-lean · github · 2026-09-26 · 42 upvotes · similarity 0.44
- Lean4 proof that SSOT requires definition-time hooks and introspection · hn · 2026-01-08 · 10 upvotes · similarity 0.44
- I made a calculator that works over disjoint sets of intervals · hn · 2026-04-18 · 314 upvotes · similarity 0.42
- matrix-multiplication-all-fields · github · 2026-10-07 · 27 upvotes · similarity 0.42
- PoincareConjecture · github · 2026-09-28 · 13 upvotes · similarity 0.41
The niche, labels, vibe code rating and competitor comparison on this page are analysis by Nicheloom. If you use them, please credit nicheloom.com. How you may use our data.