docs: strengthen formal proof framing#100
Conversation
Review Summary by QodoStrengthen formal proof framing for bitmap-overlap theorem
WalkthroughsDescription• Reframes bitmap-overlap documentation around the checked Lean proof spine • Adds finite in-model caveats across README, docs, Rust and Python docstrings • Links to formalization repo with proof-spine, theorem-map, and reviewer-brief • Strengthens contributor guidelines for theory claims and real-encoder distinctions Diagramflowchart LR
A["Bitmap overlap<br/>documentation"] -->|"reframe around<br/>Lean proof spine"| B["Checked finite model:<br/>symmetry, quotient,<br/>threshold, calibration"]
B -->|"add in-model<br/>caveats"| C["Real-encoder<br/>empirical contract"]
D["Formalization repo<br/>links"] -->|"proof-spine,<br/>theorem-map"| B
E["Contributor<br/>guidelines"] -->|"theory claim<br/>boundaries"| C
File Changes2. docs/RANK_MODES.md
|
Code Review by Qodo
1. Invalid rustdoc link paths
|
There was a problem hiding this comment.
Code Review
This pull request reframes and clarifies the documentation across multiple files regarding the machine-checked Lean formalization of the constant-weight bitmap overlap model, emphasizing its in-model nature and the need for empirical validation on real-world datasets. The review feedback points out several broken Rust intra-doc links in ordvec-python/src/lib.rs where . was used instead of :: to reference methods.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR tightens and standardizes the crate’s documentation around the companion Lean formalization, explicitly scoping which APIs are covered by the constant-weight bitmap overlap model (and which are not), and propagating the “finite in-model vs real-corpus” caveat across Rust + Python surfaces.
Changes:
- Reframed
Bitmapdocs (crate root, module docs, and README/docs) around the checked Lean proof spine: symmetry/quotient sufficiency → Bayes-optimal threshold form → idealized hypergeometric calibration. - Added explicit boundary statements that top-k / fixed-budget shortlist helpers,
SignBitmap,fastscan, andMultiBucketBitmapare not themselves the theorem’s threshold-calibration surface. - Added formalization linkage/metadata and contributor + changelog guardrails for future proof-backed claims.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/sign_bitmap.rs | Clarifies SignBitmap is not the constant-weight bitmap/theorem surface. |
| src/rank_io.rs | Refines invariant commentary to explicitly tie to the idealized constant-weight null model assumptions. |
| src/quant.rs | Notes subset rerank doesn’t itself provide bitmap threshold-calibration guarantees. |
| src/multi_bucket.rs | Rewords framing (“algebraic object”) and scopes Lean theorem applicability to top-bucket bitmap overlap. |
| src/lib.rs | Adds crate-level “strongest formal story” framing and clarifies MultiBucketBitmap is not the theorem surface. |
| src/fastscan.rs | States fastscan latency path is outside the bitmap overlap calibration theorem. |
| src/bitmap.rs | Expands module + API docs to distinguish overlap statistic vs threshold admission and reiterates in-model scope. |
| ROADMAP.md | Adds the Lean formalization repo as part of “framing” references alongside the paper. |
| README.md | Rewrites the bitmap section to “checked finite model” and adds formalization/proof-spine links and explicit caveats. |
| ordvec-python/tests/test_redteam_fuzz.py | Updates test commentary to refer to constant-weight/formal overlap model assumptions. |
| ordvec-python/tests/test_bitmap.py | Updates module docstring framing and points formal theorem to ordvec-formalization. |
| ordvec-python/src/lib.rs | Updates Rust-docs for Python bindings to scope theorem vs shortlist/rerank behavior and invariants. |
| ordvec-python/README.md | Adds “Theory and calibration” section and clarifies Bitmap vs SignBitmap theorem scope. |
| ordvec-python/python/ordvec/init.py | Adds package-level docstring explanation of the finite model and its explicit assumptions. |
| ordvec-python/pyproject.toml | Adds a Formalization project URL for discoverability. |
| examples/bench_rank.rs | Notes bitmap metrics as an empirical complement/diagnostic for model assumptions. |
| docs/RANK_MODES.md | Reframes the “checked finite model” section and adds an explicit “formal boundary” note. |
| CONTRIBUTING.md | Adds guidance to keep theory claims bounded and to cite theorem names/docs + preserve caveats. |
| CHANGELOG.md | Adds an Unreleased documentation entry describing the reframing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Nelson Spence <nelson@projectnavi.ai>
1f4cc25 to
ec91d60
Compare
Summary
docs/RANK_MODES.md, Rust docs, Python package docs/docstrings, and adjacent APIs that are not covered by the top-bucket theorem.Checklist
cargo fmt --all --checkpassescargo clippy --all-targets --all-features -- -D warningsis cleancargo test --all-featurespassesCHANGELOG.mdupdated underUnreleasedif user-facingcargo deny checkpasses (not run locally; docs/metadata only)ordvec-python/changed:cargo clippy -p ordvec-python --all-targets -- -D warningspassesNotes
Additional local checks run:
git diff --checkPYTHONDONTWRITEBYTECODE=1 python3 -m py_compile ordvec-python/python/ordvec/__init__.pypython3 -c 'import tomllib; tomllib.load(open("ordvec-python/pyproject.toml", "rb"))'cargo test --doc --all-featurescargo doc --no-deps --all-featurescargo doc --no-deps -p ordvec-pythonSkipped
maturin develop/ Python pytest because this PR changes Python-facing docs and package metadata only; no Python or binding behavior changed.