[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"Gn0yBxbh0D":3},"# LPBackendSoplexFFI\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-backend-soplex-ffi.svg)](./LICENSE)\n\n> **New here? Start at [`leanprover/lp`](https://github.com/leanprover/lp)** — the entry\n> point for the `lp` / `maximize` tactics and the verified LP solver. This repository is one\n> package of that family: the SoPlex FFI backend adapter (priority 10, the default).\n\n`LPBackend` adapter for the SoPlex FFI binding. Wraps the\nsynchronous `LP.solveExact` from\n[`leanprover/soplex-ffi`](https://github.com/leanprover/soplex-ffi) into\nthe abstract `LPBackend` record defined in\n[`leanprover/lp-core`](https://github.com/leanprover/lp-core), and\nself-registers with the\n[`leanprover/lp-tactic`](https://github.com/leanprover/lp-tactic) registry\nunder priority 10 (\"FFI band\") on import.\n\nThis is the production-grade native backend for the `by lp` tactic\n— what the meta-package\n[`leanprover/lp`](https://github.com/leanprover/lp) defaults to when\nno `set_option lp.backend` or per-call argument overrides it.\nDepend on this repo directly only when you want the SoPlex FFI\nspecifically without the full `leanprover/lp` tactic surface (e.g.\nto register the backend in your own Lake project that wires the\nverifier and tactic differently).\n\nThis is the only package in the `leanprover/lp` family besides\n`soplex-ffi` itself that carries `moreLinkArgs`: the SoPlex C++\nruntime link args propagate to anything that links this library.\n\n## Quickstart\n\n```lean\nrequire LPBackendSoplexFFI from git\n  \"https://github.com/leanprover/lp-backend-soplex-ffi\" @ \"main\"\n```\n\n```lean\nimport LPBackendSoplexFFI  -- self-registers \"soplex-ffi\" at priority 10\nimport LPTactic            -- the `by lp` tactic\n\nexample (a b : Rat) (_ : 2 * a + b ≤ 5) (_ : a - b ≤ 1) :\n    3 * a ≤ 6 := by lp\n```\n\n## Build\n\nSystem dependencies (same as `leanprover/soplex-ffi`):\n\n| Platform | Packages |\n|----------|----------|\n| Linux    | `build-essential cmake libgmp-dev libgmpxx4ldbl libboost-dev` |\n| macOS    | `brew install gmp boost cmake` (plus Xcode Command Line Tools) |\n| Windows  | MSYS2 `mingw-w64-x86_64-{gcc,cmake,ninja,make,gmp,boost}` |\n\n## Layout\n\n```\nLPBackendSoplexFFI.lean        # top-level import\nLPBackendSoplexFFI/Adapter.lean\n                               # def backend : LPBackend + initialize registerBackend\nLPBackendSoplexFFI/Driver.lean # LP.solveVerified (synchronous verified-solve driver)\nLPBackendSoplexFFITest/        # `lake test` smoke + driver-parity suite\n```\n\nThe adapter lives under `namespace LP.Backend.SoplexFFI`,\nmatching the namespace used before the split. Consumers writing\n`LP.Backend.SoplexFFI.backend` resolve to the same value\nregardless of which package owns it.\n\n## Licence\n\n[Apache License 2.0](./LICENSE).\n",1782661976788]