{"id":50731307,"url":"https://github.com/leanprover/lp-verify","last_synced_at":"2026-06-10T09:00:41.510Z","repository":{"id":359327422,"uuid":"1245427325","full_name":"leanprover/lp-verify","owner":"leanprover","description":"Pure-Lean LP certificate checker. No native deps; the standalone verifier from kim-em/soplex#50.","archived":false,"fork":false,"pushed_at":"2026-06-10T01:49:11.000Z","size":80,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-10T03:15:53.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leanprover.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T07:59:07.000Z","updated_at":"2026-06-10T01:49:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leanprover/lp-verify","commit_stats":null,"previous_names":["kim-em/lp-verify","leanprover/lp-verify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leanprover/lp-verify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-verify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-verify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-verify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-verify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover","download_url":"https://codeload.github.com/leanprover/lp-verify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-verify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34144680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-10T09:00:24.193Z","updated_at":"2026-06-10T09:00:41.504Z","avatar_url":"https://github.com/leanprover.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LPVerify\n\n[![Lean](https://img.shields.io/badge/Lean-4.31.0--rc1-blue.svg)](./lean-toolchain)\n[![License](https://img.shields.io/github/license/leanprover/lp-verify.svg)](./LICENSE)\n\n\u003e **New here? Start at [`leanprover/lp`](https://github.com/leanprover/lp)** — the entry\n\u003e point for the `lp` / `maximize` tactics and the verified LP solver. This repository is one\n\u003e package of that family: the pure-Lean certificate checker.\n\nPure-Lean checker for linear programming certificates produced by\nSoPlex (or any solver that emits the [`leanprover/lp-core`](https://github.com/leanprover/lp-core)\n`Certificate` shape). No native dependencies — depending on\n`lp-verify` does **not** pull in the SoPlex C++ build.\n\nThis is the package that delivers the standalone goal of\n[`leanprover/lp#50`](https://github.com/leanprover/lp/issues/50):\n*verify externally-produced certificates without building SoPlex*.\nUse it when you have an LP solution generated elsewhere (a CI\nartifact, a Python harness driving HiGHS via `lp-backend-soplex-json`,\na remote service that produces SoPlex JSON output) and want a\nchecked-in-Lean proof that the certificate is sound.\n\nIf instead you want `by lp` end-to-end (the tactic that calls SoPlex\nitself and reconstructs Lean proof terms), depend on the meta-package\n[`leanprover/lp`](https://github.com/leanprover/lp). That pulls in\n`lp-verify` plus `lp-tactic` plus the SoPlex FFI backend.\n\n## Quickstart\n\nAdd `LPVerify` to your `lakefile.lean`:\n\n```lean\nrequire LPVerify from git \"https://github.com/leanprover/lp-verify\" @ \"main\"\n```\n\nConstruct (or deserialise) a `Problem` and a `Certificate`, then\nhand them to `verifyOutcome`:\n\n```lean\nimport LPVerify\nopen LP LP.Verify\n\n-- An infeasible LP: the row says x ≥ 1, the column bound says x ≤ 0.\ndef lp : Problem 1 1 :=\n  { c         := #v[0]\n    a         := #[(0, 0, 1)]\n    rowBounds := #v[(some 1, none)]\n    colBounds := #v[(none, some 0)] }\n\n-- Farkas certificate: multiplier 1 on the row lower bound and 1 on\n-- the column upper bound combine to the contradiction 0 ≥ 1.\ndef cert : Certificate 1 1 :=\n  { primal := none\n    dual   := some { rowLower := #v[1], rowUpper := #v[0]\n                     colLower := #v[0], colUpper := #v[1] }\n    ray    := none }\n\n#eval match verifyOutcome {} none lp\n    { status := .infeasible, objective := none, certificate := cert, log := \"\" } with\n  | .infeasible _ =\u003e \"infeasible (with Lean proof)\"\n  | _             =\u003e \"certificate rejected\"\n```\n\n`Problem` and `Certificate` are the\n[`leanprover/lp-core`](https://github.com/leanprover/lp-core) types (re-exported\nunder `LP`). `verifyOutcome` returns a `Verified` value whose\nconstructors (`.optimal`, `.infeasible`, `.unbounded`, `.unchecked`)\ncarry real Lean soundness proofs over the original `Problem`, not just\na status label — here `.infeasible h` carries `h : IsInfeasible lp`.\nFor end-to-end examples that produce and check certificates with a\nreal solver, see the meta-package\n[`leanprover/lp`](https://github.com/leanprover/lp); `lp-verify` itself\nstays solver-free.\n\n## Trust model\n\nPure Lean. The verifier itself adds no trust assumptions beyond\nthe Lean kernel — every `Certificate` is independently checked\nbefore any proof is constructed, and certificates that fail\nchecking are surfaced as `Verified.unchecked` rather than silently\naccepted.\n\nThe serialisation layer between this checker and whichever external\ntool produced the certificate is the user's responsibility. If you\nwant a known-good JSON wire format, see\n[`leanprover/lp-backend-soplex-json`](https://github.com/leanprover/lp-backend-soplex-json).\n\n## Layout\n\n```\nLPVerify.lean              # top-level import (aggregates submodules)\nLPVerify/Driver.lean       # `verifyOutcome`, the `Verified` inductive\nLPVerify/Sound.lean        # soundness lemmas for each Verified constructor\nLPVerify/Prop.lean         # Prop-level statement of validity\nLPVerify/Bool.lean         # decidable Bool-level checker\nLPVerify/Arith.lean        # rational arithmetic over Problem rows\nLPVerify/Budget.lean       # numerator/denominator bit-length budget\n```\n\nAll declarations live in `namespace LP.Verify`, matching the\nnamespace used before the split. A consumer that writes\n`LP.Verify.verifyOutcome` resolves the same way whether they\nimported `LP.Verify` (from `leanprover/lp`) or `LPVerify`\ndirectly.\n\n## Licence\n\n`LPVerify` is licensed under the [Apache License 2.0](./LICENSE),\nmatching the rest of the `leanprover/lp` family.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Flp-verify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover%2Flp-verify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Flp-verify/lists"}