leanprover / leanprover/sos

perf(ldl): replace brute-force four-squares search

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:search roadmap
Dominant language
Lean
Stars
8
Forks
1
Avg merge
53m
Merged PRs (30d)
2

Description

Background

Strict positivity certificates use rational LDL reconstruction plus Lagrange four-square decomposition. The current fourSquaresNat implementation brute-forces with a practical cap, which limits how small an epsilon the strict-positivity path can certify.

Desired outcome

Replace the brute-force four-squares step with a faster algorithm, such as Cornacchia-style or randomized number-theoretic search, while preserving exact certificate reconstruction.

Notes

This is independent from CSDP soundness: the reconstructed certificate must still be checked exactly by the verifier.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the fourSquaresNat implementation and the strict-positivity certificate reconstruction path. Read how the current brute-force cap is used, then review the exact verifier mentioned in the issue. Done means the four-squares step is faster, supports smaller certified epsilons, and reconstructed certificates still pass exact verification.

Written by the indexing model from the issue text.

Assessment

Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.