Skip to content

[codex] Add calibrated evidence layer#9

Merged
project-navi-bot merged 1 commit into
mainfrom
codex/calibrated-evidence
May 29, 2026
Merged

[codex] Add calibrated evidence layer#9
project-navi-bot merged 1 commit into
mainfrom
codex/calibrated-evidence

Conversation

@Fieldnote-Echo
Copy link
Copy Markdown
Owner

Summary

  • Add a graph-neutral CalibratedEvidence layer that pairs an ordered Bayes-optimal cutoff with a supplied calibration equality.
  • Split finite Bayes-risk wrappers and bitmap incidence definitions into narrower modules while preserving old import paths.
  • Refactor bitmap calibration proofs to use the supplied calibration layer without changing the public bitmap theorem statements.
  • Update README, theorem docs, proof spine, reviewer brief, and verification checks for the new module boundary.

Validation

  • make build
  • make verify
  • make check-doc-names
  • make audit
  • make lint

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the formalization by modularizing several components. It introduces FiniteBayesRisk.lean to house Bayes-risk wrappers, CalibratedEvidence.lean to package ordered-tail calibration with Bayes-optimal cutoffs, and BitmapIncidence.lean to isolate constant-weight bitmap definitions and bridges. BitmapCalibration.lean is refactored to utilize these new modules, and corresponding updates are made to the verification checks and documentation. There are no review comments to address, and the changes appear clean and well-structured.

@Fieldnote-Echo Fieldnote-Echo marked this pull request as ready for review May 29, 2026 15:40
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add calibrated evidence layer with modular bitmap incidence and Bayes-risk separation

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add graph-neutral CalibratedEvidence layer pairing Bayes-optimal cutoff with supplied
  calibration equality
• Split finite Bayes-risk wrappers into dedicated FiniteBayesRisk module while preserving backward
  compatibility
• Extract bitmap incidence definitions into narrower BitmapIncidence module for better separation
  of concerns
• Refactor BitmapCalibration proofs to use supplied calibration layer without changing public
  theorem statements
• Update documentation, proof spine, reviewer brief, and theorem map for new module boundaries
Diagram
flowchart LR
  FE["FiniteExperiment"]
  FBR["FiniteBayesRisk"]
  OS["OrdinalSufficiency"]
  CE["CalibratedEvidence"]
  BI["BitmapIncidence"]
  BC["BitmapCalibration"]
  OBO["OverlapBayesOptimal"]
  
  FE --> FBR
  FE --> OS
  FBR --> CE
  OS --> CE
  BI --> BC
  CE --> BC
  OBO --> BC
  
  FE -.->|backward compat| OBO

Loading

Grey Divider

File Changes

1. OrdvecFormalization.lean ⚙️ Configuration changes +3/-0

Add imports for new modular layers

OrdvecFormalization.lean


2. OrdvecFormalization/CalibratedEvidence.lean ✨ Enhancement +77/-0

New graph-neutral calibrated evidence layer

OrdvecFormalization/CalibratedEvidence.lean


3. OrdvecFormalization/FiniteBayesRisk.lean ✨ Enhancement +31/-0

Extract Bayes-risk wrapper definitions

OrdvecFormalization/FiniteBayesRisk.lean


View more (9)
4. OrdvecFormalization/BitmapIncidence.lean ✨ Enhancement +127/-0

Extract bitmap incidence and evidence definitions

OrdvecFormalization/BitmapIncidence.lean


5. OrdvecFormalization/BitmapCalibration.lean ✨ Enhancement +70/-126

Refactor to use calibrated evidence layer

OrdvecFormalization/BitmapCalibration.lean


6. OrdvecFormalization/OverlapBayesOptimal.lean ✨ Enhancement +1/-11

Remove Bayes-risk definitions, add import

OrdvecFormalization/OverlapBayesOptimal.lean


7. OrdvecFormalization/Verify.lean 🧪 Tests +12/-0

Add verification checks for new modules

OrdvecFormalization/Verify.lean


8. OrdvecFormalization/VerifyMovedImports.lean 🧪 Tests +26/-0

New compatibility checks for moved definitions

OrdvecFormalization/VerifyMovedImports.lean


9. README.md 📝 Documentation +4/-0

Document calibrated evidence packaging

README.md


10. docs/proof-spine.md 📝 Documentation +45/-19

Update proof spine with new module layers

docs/proof-spine.md


11. docs/reviewer-brief.md 📝 Documentation +7/-1

Add calibrated evidence claim separation

docs/reviewer-brief.md


12. docs/theorem-map.md 📝 Documentation +22/-3

Update theorem map and dependency graph

docs/theorem-map.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented May 29, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Qodo Logo

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a graph-neutral “calibrated evidence” layer that lets downstream results pair an ordered Bayes-optimal cutoff with an explicitly supplied ordered-tail calibration equality, while also refactoring bitmap incidence and Bayes-risk wrappers into narrower modules and keeping legacy import paths working.

Changes:

  • Added CalibratedEvidence (OrderedTailCalibration + existence theorems returning a Bayes-optimal cut together with the supplied equality at that cut).
  • Split out FiniteBayesRisk wrappers and constant-weight bitmap incidence infrastructure into dedicated modules, updating imports/verification while preserving legacy aggregate imports.
  • Refactored bitmap calibration proofs to route through the new calibrated-evidence layer without changing the public bitmap theorem statements.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Documents the new “supplied calibration packaged with cutoff” concept and why it matters.
OrdvecFormalization/VerifyMovedImports.lean Adds compatibility #checks ensuring moved names remain available via legacy aggregate imports.
OrdvecFormalization/Verify.lean Extends public API verification to include new modules and new calibrated-evidence names/axiom prints.
OrdvecFormalization/OverlapBayesOptimal.lean Removes in-file Bayes-risk wrappers and imports FiniteBayesRisk instead.
OrdvecFormalization/FiniteBayesRisk.lean New module containing finiteBayesRisk / finiteCostedBayesRisk wrappers.
OrdvecFormalization/CalibratedEvidence.lean New module defining OrderedTailCalibration and calibrated-cut existence theorems.
OrdvecFormalization/BitmapIncidence.lean New module containing constant-weight bitmap subtype, uniform law, overlap evidence, and event-bridge lemmas.
OrdvecFormalization/BitmapCalibration.lean Refactors calibration proofs to use CalibratedEvidence + BitmapIncidence, keeping theorem statements stable.
OrdvecFormalization.lean Updates root module imports to include new modules.
docs/theorem-map.md Updates theorem surface map and dependency shape to include calibrated-evidence and incidence layers.
docs/reviewer-brief.md Updates reviewer narrative to distinguish calibrated-evidence from null calibration.
docs/proof-spine.md Updates proof spine/dependency narrative to reflect new module boundaries and calibrated-evidence step.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@project-navi-bot project-navi-bot merged commit 04134bd into main May 29, 2026
3 checks passed
@project-navi-bot project-navi-bot deleted the codex/calibrated-evidence branch May 29, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants