Skip to content

[anneal] Add 3-axiom Anneal.BitVec library and lazy theory staging - #3961

Open
joshlf wants to merge 1 commit into
joshlf-anneal-p2-t1a-mirfrom
joshlf-anneal-p2-theory-bitvec
Open

joshlf wants to merge 1 commit into
joshlf-anneal-p2-t1a-mirfrom
joshlf-anneal-p2-theory-bitvec

Conversation

@joshlf

@joshlf joshlf commented Nov 20, 2026

Copy link
Copy Markdown
Member

Human review surface

Add reusable, kernel-checked, 3-axiom BitVec reasoning and demand-driven
bundled theory staging in cargo-anneal:

  • theory/Anneal/NatBitwise.lean: centralize Nat.bitwise unfolding and width
    bounds so Anneal.MirWp and Anneal.BitVec can be imported together without
    duplicate Nat.bitwise.eq_def declarations.
  • theory/Anneal/BitVec.lean: 60 width-parametric, 3-axiom theorems covering
    disjoint-mask OR injectivity, tristate (tnum) bitvector soundness, unsigned
    range arithmetic soundness, structural @Nat.rec clz, and common-prefix
    bounds (zero bv_decide / Lean.ofReduceBool).
  • trusted/cargo-anneal/src/{bundle,target}.rs: BFS-filter bundled Anneal.*
    theory modules so unimported libraries are neither compiled nor recorded in
    provenance while preserving strict role-isolation checks and transitive
    closure staging, plus live 4-case target audit tests.

Layer 10 of 19 in the migrated Anneal verification stack under anneal/.

Public Anneal source checkpoint.

Authored by an AI agent acting on joshlf's behalf.

Add reusable, kernel-checked, 3-axiom BitVec reasoning and demand-driven
bundled theory staging in cargo-anneal:
- theory/Anneal/NatBitwise.lean: centralize Nat.bitwise unfolding and width
  bounds so Anneal.MirWp and Anneal.BitVec can be imported together without
  duplicate Nat.bitwise.eq_def declarations.
- theory/Anneal/BitVec.lean: 60 width-parametric, 3-axiom theorems covering
  disjoint-mask OR injectivity, tristate (tnum) bitvector soundness, unsigned
  range arithmetic soundness, structural @Nat.rec clz, and common-prefix
  bounds (zero bv_decide / Lean.ofReduceBool).
- trusted/cargo-anneal/src/{bundle,target}.rs: BFS-filter bundled Anneal.*
  theory modules so unimported libraries are neither compiled nor recorded in
  provenance while preserving strict role-isolation checks and transitive
  closure staging, plus live 4-case target audit tests.

Source: https://github.com/joshlf/anneal/tree/348c9ece04316e6390a2231f7d7d089b1fcbbe22
Agent-authored-by: AI agent acting on joshlf's behalf
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T15:39:20.851162Z 28dd167 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@joshlf
joshlf added this pull request to stack #3976 November 20, 2026 17:58

This branch has not been deployed

No deployments
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.

1 participant