[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"q5tMsA1TmV":3},"# LeanVerifier\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**LeanVerifier** is a research technical preview for *exact* formal checks of affine binary classifiers over the rationals.\n\n**v0.1.0 target — not authorized for release.** Read [STATUS.md](STATUS.md), [CLAIMS.md](CLAIMS.md), and [SECURITY.md](SECURITY.md) before use.\n\n## Supported claim (only)\n\nGiven a dimensionally valid affine binary classifier over exact rationals ℚ, a reference input \\(x\\), and a nonnegative L∞ radius \\(\\varepsilon\\), if the absolute score margin strictly exceeds \\(\\varepsilon \\cdot \\|w\\|_1\\), then the classification sign (strictly positive score) is invariant on the closed L∞ ball of radius \\(\\varepsilon\\) around \\(x\\).\n\nThis is **not** a general ML verification product. Neural nets, transformers, vision models, SMT automation, distributed or enterprise features, and the legacy web upload path are unsupported historical material under [`experimental/legacy-formalverifml/`](experimental/legacy-formalverifml/).\n\n## Quick start\n\n### Prerequisites\n\n- Lean 4 matching [`lean-toolchain`](lean-toolchain) (`leanprover/lean4:v4.32.0`) via [elan](https://github.com/leanprover/elan)\n- Python 3.11+ for the generator and CLI\n- Docker (optional) for a Lean-only container build\n\n### Lean library\n\n```bash\nlake update\nlake build\npython scripts/audit_axioms.py\n```\n\n### Python package / CLI\n\n```bash\npython -m pip install -e \".[dev]\"\nleanverifier validate-model examples/affine_binary/model.json\nleanverifier verify --model examples/affine_binary/model.json --request examples/affine_binary/request.json\n```\n\n| Exit | Meaning |\n|------|---------|\n| 0 | `verified` |\n| 2 | `not-certified` (e.g. insufficient margin) |\n| 3 | invalid input / schema |\n| 4 | Lean build failure |\n| 5 | axiom audit failure |\n| 6 | digest mismatch |\n| 7 | internal error |\n| 8 | timeout |\n\n## Repository layout\n\n```\nLeanVerifier/          # Supported Lean library\nsrc/leanverifier/      # Supported Python package + CLI\nschemas/               # Canonical JSON schemas\nexamples/affine_binary/\ntests/                 # unit, schema, integration, mutation, security\nscripts/               # axiom audit, docs verification, release helpers\ndocs/                  # guides + assurance case\nexperimental/          # Legacy FormalVerifML — not in supported build\n```\n\nSupported Lake targets must not import `experimental/`.\n\n## Documentation\n\n| Doc | Purpose |\n|-----|---------|\n| [STATUS.md](STATUS.md) | Program status and blockers |\n| [CLAIMS.md](CLAIMS.md) | Supported / experimental / planned / rejected claims |\n| [SECURITY.md](SECURITY.md) | Supported surface and legacy web quarantine |\n| [CHANGELOG.md](CHANGELOG.md) | Release notes |\n| [docs/user_guide.md](docs/user_guide.md) | Operator guide |\n| [docs/developer_guide.md](docs/developer_guide.md) | Build, layout, contribution mechanics |\n| [docs/model-format.md](docs/model-format.md) | Canonical rational JSON |\n| [docs/assurance-boundary.md](docs/assurance-boundary.md) | In / out of scope |\n| [docs/trusted-computing-base.md](docs/trusted-computing-base.md) | TCB inventory |\n| [docs/threat-model.md](docs/threat-model.md) | Threats and controls |\n| [docs/limitations.md](docs/limitations.md) | Known limits |\n| [docs/release-process.md](docs/release-process.md) | RC and v0.1.0 authorization |\n| [docs/history/README.md](docs/history/README.md) | Withdrawn FormalVerifML materials |\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). On formal-kernel, schema, generator, workflow, and release PRs, the implementer must not be the sole designated reviewer.\n\n## Citation\n\nSee [CITATION.cff](CITATION.cff). Prefer citing the specific commit or tag you evaluated.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",1784994995961]