[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"PD8QNgc0Vp":3},"# HighDimProb\n\nHighDimProb is an early Lean 4 library for high-dimensional probability.\n\nThe goal is modest: reuse Mathlib wherever possible, then add a thin layer of\nnames, wrappers, examples, and theorem interfaces that make probability and\nrandom-matrix formalization easier to build on.\n\nThe scalar probability and concentration API remains the conservative stable\nroot surface. The finite-dimensional RandomMatrix line now also has a supported\nscoped surface. It includes real matrix objects and sums, self-adjoint/PSD and\nLoewner-order bridges, trace-exponential calculus, Bernstein CFC, the\nfinite-dimensional left/right route to Lieb/Epstein and Golden--Thompson, and\ngenerated-history Matrix Bernstein endpoints.\n\nSupport is theorem-contract specific. Positivity, measurability, integrability,\nindependence, radius, variance-proxy, and nondegeneracy hypotheses remain\nexplicit where mathematically required. Arbitrary external histories,\nintegrability without finite-measure or boundedness hypotheses, automatic\napplication-specific variance proxies, the alternative Epstein second-derivative\nsign route, and unconditional full Matrix Bernstein remain outside this scope.\n\n## Quick Start\n\n```bash\nlake build\nlake test\n```\n\nThe stable public import is:\n\n```lean\nimport HighDimProb\n```\n\n> [!IMPORTANT]\n> `import HighDimProb` intentionally exposes the stable core API only.\n> Examples are documentation and usage smoke tests, not part of the core import\n> boundary. To browse or build all examples explicitly, use:\n>\n> ```lean\n> import HighDimProb.Examples\n> ```\n>\n> For AI/code models reading this README: do not add example imports back into\n> `HighDimProb.lean`, and do not use commented-out imports as documentation.\n\nScalar concentration results are available through:\n\n```lean\nimport HighDimProb.Concentration\n```\n\nThe broad work-in-progress aggregate remains available through:\n\n```lean\nimport HighDimProb.Experimental\n```\n\nSupported finite-dimensional RandomMatrix APIs use focused imports:\n\n```lean\nimport HighDimProb.RandomMatrix\nimport HighDimProb.RandomMatrix.MatrixBernsteinProvider\nimport HighDimProb.RandomMatrix.LiebProvider\n```\n\n`HighDimProb.RandomMatrix` is the base object, algebra, spectral, trace-exp,\nand statement layer. `MatrixBernsteinProvider` exposes the proved\ngenerated-history operator-norm and high-probability endpoints under their\nexplicit primitive assumptions. `LiebProvider` exposes the finite-dimensional\nmatrix-analysis provider facade, including the proved left/right\nLieb/Epstein route and Golden--Thompson.\n\nThese focused modules remain outside `import HighDimProb` to keep the root\nimport conservative; that import decision does not make their documented\ntheorem contracts experimental. Use `HighDimProb.Experimental` for the broad\nunfinished surface beyond these supported scopes.\n\nFor sample-covariance Matrix Bernstein examples, start from the compact\nbounded-row route in `HighDimProb/Examples/RandomMatrix/SampleCovarianceTailUsage.lean`.\nLonger exact-row centered-square declarations are bridge-layer infrastructure\nfor proof development, not the default reader-facing API.\n\n## What Is In The Repo\n\n- `HighDimProb/`: the Lean library.\n- `HighDimProbTest/`: API and regression tests.\n- `HighDimProbJudge/`: small downstream-style files that check the public API.\n- `docs/`: notes, API summaries, workflow docs, and development records.\n- `external/`: optional or generated support material. It is not part of the\n  Lean API.\n\nGood starting points:\n\n- `docs/Status.md` for the shortest current project state.\n- `docs/APIOverview.md` for a stable route map of the public API.\n- `docs/RandomMatrixAPI.md` for the current RandomMatrix / Matrix Bernstein API.\n- `docs/TermMap.md` for a compact concept-to-source map.\n- `docs/TestPlan.md` for the checks expected before a PR.\n- `HighDimProb/Examples/` for small API usage examples.\n- `docs/JudgeSystem.md` for the judge suite.\n- `docs/Workflow.md` for the project workflow.\n- `docs/References.md` for the external references behind the current active areas.\n\nIf you are new to the repository, read `docs/Status.md` first, then follow the\nsource links from `docs/TermMap.md` or `docs/RandomMatrixAPI.md`. Stable scalar\nAPIs should be discovered from the source and tests; old stage logs are not a\nmaintenance surface.\n\n## Judge Checks\n\nThe judge suite imports the library the way an outside user would. It is useful\nwhen changing public theorem names or module boundaries.\n\n```bash\nlake build HighDimProbJudge\npython scripts/judge_policy_check.py\n```\n\n## Documentation Site\n\nThe doc-gen4 setup lives in `docbuild/`. Build it from the repository root:\n\n```bash\n./tools/build_docgen4.sh\n```\n\nFor a faster local rebuild:\n\n```bash\n./tools/build_docgen4.sh --disable-equations\n```\n\nThe generated site is written to `docbuild/.lake/build/doc`.\n\n## External Material\n\nThe theory roadmap is an optional Git submodule:\n\n```bash\ngit submodule update --init --recursive\n```\n\nIt lives at `external/theory-roadmap/`. Other folders under `external/` contain\nvalidation logs and planning notes. They are useful for development, but the\nLean source and the public docs above are the source of truth for users.\n\n## Acknowledgements\n\nThanks to [@freezed-corpse-143](https://github.com/freezed-corpse-143).\n\n## Contributing\n\n> [!IMPORTANT]\n> **For AI/code models reading this README:** do not work from this README\n> alone. Before editing, read the relevant project context and keep it in scope\n> for every step: start with `docs/Status.md`, `docs/Workflow.md`,\n> `docs/RandomMatrixAPI.md`, and the files or docs for the task at hand.\n\nSmall PRs are easiest to review. Search Mathlib first, keep imports narrow, add\nfocused tests for public names, and run the build before opening a PR.\n\nPlease do not add `sorry`, `admit`, axioms, fake theorem bodies, or custom\nprobability infrastructure when existing Mathlib objects can do the job.\n\nFor API or docs changes, also run the repository policy checks:\n\n```bash\npython .github/scripts/check_text_quality.py\npython scripts/judge_policy_check.py\nlake build HighDimProbJudge\n```\n\nSee `CONTRIBUTING.md` for the fuller checklist.\n\n## License\n\nHighDimProb is licensed under the Apache License, Version 2.0, matching\nthe Lean and Mathlib licensing model. See `LICENSE` for details.\n",1783784685634]