leanprover / leanprover/lp

Bring SoPlex presolve into the verified path

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

Nobody has claimed this yet.

Dominant language
Lean
Stars
11
Forks
0
Avg merge
4h 48m
Merged PRs (30d)
1

Description

The current design (PLAN.md) forces Options.presolve := false whenever the verification layer runs (solveVerified). This keeps the bridge simple — certificates returned by SoPlex describe the original LP, so the Lean-side checker runs against the same Problem value the user passed in — at the cost of disabling SoPlex's most impactful speed optimization.

This issue tracks the alternative (option B in the plan's open-questions discussion): keep presolve enabled, and reconstruct an original-problem certificate from SoPlex's presolve transcript inside the bridge.

What it would take

  • Capture SoPlex's presolve operations (substitutions, scaling, redundant-constraint removal, bound tightening) as a transcript per solve.
  • Invert each operation when translating the returned primal / dual / Farkas / ray vectors into the canonical lower/upper-split form for the original problem.
  • Treat the inversion code as untrusted: the Lean-side checker remains the source of truth, so a buggy inversion surfaces as Verified.unchecked rather than silently wrong math. New CI golden tests per presolve operation type.

When to revisit

Only worth doing if profiling on a real verified workload (e.g. exact polyhedral preprocessing for SOS at scale, an exact LP relaxation loop in a future MILP backend) shows presolve-disabled wall-clock is the actual bottleneck. Small LPs see no meaningful difference; this exists for sparse / structured LPs where SoPlex's presolve removes most of the work.

Risks

  • Inversion logic is non-trivial and SoPlex-version-sensitive: each release that touches presolve risks silent breakage. Mitigation: pinned SoPlex release + golden tests.
  • Big bridge attack surface for what is essentially a performance optimization. The whole design is "trusted oracle, untrusted bridge, pure-Lean checker"; this option grows the bridge significantly.

References

  • PLAN.md § Verification layer / Decisions
  • PLAN.md § What this catches (presolve leakage bullet)

Contributor guide

No contributing guide indexed for this repository

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 with PLAN.md sections “Verification layer / Decisions” and “What this catches,” then profile a real verified workload to confirm presolve is the bottleneck. Done means presolve stays enabled, its operations are captured and inverted for original-problem certificates, and CI golden tests cover each presolve operation type while the Lean checker rejects incorrect translations.

Written by the indexing model from the issue text.

Assessment

Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.