{"id":50568437,"url":"https://github.com/leanprover/lp-core","last_synced_at":"2026-06-04T17:00:25.641Z","repository":{"id":362267310,"uuid":"1245313663","full_name":"leanprover/lp-core","owner":"leanprover","description":"Shared LP vocabulary (Problem, Options, Solution, Certificate) plus the LPBackend record. Pure Lean. Part of the kim-em/soplex family.","archived":false,"fork":false,"pushed_at":"2026-06-04T04:41:50.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T06:20:34.365Z","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-21T05:36:52.000Z","updated_at":"2026-06-04T04:41:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/leanprover/lp-core","commit_stats":null,"previous_names":["kim-em/lp-core","leanprover/lp-core"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/leanprover/lp-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leanprover","download_url":"https://codeload.github.com/leanprover/lp-core/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leanprover%2Flp-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33914548,"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-04T02:00:06.755Z","response_time":64,"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-04T17:00:19.716Z","updated_at":"2026-06-04T17:00:25.634Z","avatar_url":"https://github.com/leanprover.png","language":"Lean","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LPCore\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-core.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 shared LP type vocabulary and the `LPBackend` record.\n\nThe shared LP type vocabulary and backend abstraction every package\nin the [`leanprover/lp`](https://github.com/leanprover/lp) family\nagrees on. Pure Lean, no native dependencies, no `moreLinkArgs`.\n\nThis repository defines `Problem`, `Options`, `Solution`,\n`Certificate`, `SolveError` (the data) plus the `LPBackend` record\n(the abstraction concrete solvers implement). It is consumed by:\n\n* [`leanprover/soplex-ffi`](https://github.com/leanprover/soplex-ffi) — marshals the data across the C++ boundary,\n* [`leanprover/lp-verify`](https://github.com/leanprover/lp-verify) — checks certificates against the same `Problem`,\n* [`leanprover/lp-tactic`](https://github.com/leanprover/lp-tactic) — drives the `by lp` tactic and owns the backend registry,\n* `leanprover/lp-backend-*` — every concrete backend produces an `LPBackend`,\n* [`leanprover/lp`](https://github.com/leanprover/lp) — the meta-package; `import LP` is the front door.\n\nIf you just want `by lp` end-to-end, depend on `leanprover/lp`.\nDepend on `lp-core` directly only when you are writing another\npackage in this family (a new backend, a verifier variant, a\nserialiser, etc.).\n\n## Quickstart\n\nAdd `LPCore` to your `lakefile.lean`:\n\n```lean\nrequire LPCore from git \"https://github.com/leanprover/lp-core\" @ \"main\"\n```\n\nA `Problem` with two variables, two constraints, and a maximise\nobjective looks like this:\n\n```lean\nimport LPCore\nopen LP\n\ndef lp : Problem 2 2 :=\n  { c         := #v[3, 5]\n    a         := #[(0, 0, 1), (0, 1, 0), (1, 0, 3), (1, 1, 2)]\n    rowBounds := #v[(none, some 4), (none, some 18)]\n    colBounds := #v[(some 0, none), (some 0, none)] }\n\ndef opts : Options := { sense := .maximize }\n\n-- Validate normalises the sparse matrix and rejects malformed input.\nexample : Except ProblemError (Problem 2 2) := validate lp\n```\n\n`LPCore` does not solve LPs on its own — it provides the data\ncontract. To actually solve, pull in a backend (e.g. the FFI\nbackend bundled with `leanprover/lp`) or write your own\nimplementing `LPBackend`.\n\n## Trust model\n\nPure Lean. The verifier ([`leanprover/lp-verify`](https://github.com/leanprover/lp-verify))\ntreats `Problem` and `Certificate` as opaque inputs and validates\nthe certificate's mathematical claims before constructing any proof.\nThis package adds no trust assumptions of its own.\n\n## Layout\n\n```\nLPCore.lean              # top-level import (re-exports the three modules)\nLPCore/Types.lean        # Problem, Options, Solution, Certificate, SolveError, enums\nLPCore/Validate.lean     # validate, validateOptions, validateRaw\nLPCore/Backend.lean      # the LPBackend record + lt comparator\n```\n\nAll declarations live in `namespace LP` (`Problem`, `Options`, …,\nand the `LPBackend` record). The namespace is shared across this\nfamily of packages; consumers refer to `LP.Problem`, `LP.Options`,\netc. regardless of which package they imported the type from.\n\n## Licence\n\n`LPCore` is licensed under the [Apache License 2.0](./LICENSE),\nmatching the rest of the `leanprover/lp` family and SoPlex\nitself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Flp-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleanprover%2Flp-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleanprover%2Flp-core/lists"}