Skip to content

Strengthen arithmetic specifications and prove arithmetic corollaries - #3746

Open
joshlf wants to merge 1 commit into
Gmasez6fvx2c6chogoybuzpgyoykiaupcfrom
Gxi6wprpgshggdrhvt64jphmjwhociog5
Open

joshlf wants to merge 1 commit into
Gmasez6fvx2c6chogoybuzpgyoykiaupcfrom
Gxi6wprpgshggdrhvt64jphmjwhociog5

Conversation

@joshlf

@joshlf joshlf commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Prove exact extrema, least padding and the greatest aligned predecessor.
Preserve broad Raw arithmetic results and derive recursive mathematical models
contracts; compose extrema and round-down corollaries. Layout padding is
introduced with its normalized implementation in the later padding proof layer.

Add total Rust assertion harnesses comparing padding and round-down with
independent division/remainder calculations, including usize boundary values.
Keep the comparisons and their power-of-two guard visible in Rust.

Validation: fresh pinned extraction and complete-model golden comparison;
independent golden/live Lean builds, required-contract checks, and the
transitive axiom audit.

Agent-authored-by: AI agent acting on joshlf's behalf


Latest Update: v26 — Compare vs v25

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/Gxi6wprpgshggdrhvt64jphmjwhociog5 && git checkout -b pr-Gxi6wprpgshggdrhvt64jphmjwhociog5 FETCH_HEAD

Checkout

git fetch origin refs/heads/Gxi6wprpgshggdrhvt64jphmjwhociog5 && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Gxi6wprpgshggdrhvt64jphmjwhociog5 && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Gxi6wprpgshggdrhvt64jphmjwhociog5

Stacked PRs enabled by GHerrit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T13:50:27.793969Z 95b51f2 PR opened
🔒 Security Review ✅ Completed 2026-10-02T13:49:45.553972Z 95b51f2 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.

@codecov-commenter

codecov-commenter commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.56%. Comparing base (5f4e936) to head (46a2375).

Files with missing lines Patch % Lines
zerocopy/src/util/checks.rs 0.00% 9 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##           Gmasez6fvx2c6chogoybuzpgyoykiaupc    #3746      +/-   ##
=====================================================================
- Coverage                              60.60%   60.56%   -0.04%     
=====================================================================
  Files                                     20       21       +1     
  Lines                                   3757     3766       +9     
=====================================================================
+ Hits                                    2277     2281       +4     
- Misses                                  1480     1485       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95b51f236a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread verification/aeneas/README.md Outdated
Comment on lines +243 to +244
establish that. It does not prove that the padded size is aligned or that the
padding is minimal.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the guarantees that the caller proof exports

This contradicts the new pad_to_align_spec: its postcondition explicitly proves R % A = 0 and that R is no greater than every aligned q ≥ S (zerocopy/src/layout.rs lines 531–532), which establish alignment and minimality. Describing these properties as unproved misstates the verification scope and may lead future maintainers to weaken or duplicate the checked obligations; clarify that the caller theorem inherits both guarantees from padding_lt_alignment.

Useful? React with 👍 / 👎.

@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from 95b51f2 to fec742a Compare October 2, 2026 15:26
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from fec742a to b9afff5 Compare October 2, 2026 19:39
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 83ba7cd to 6de7ebd Compare October 2, 2026 19:39
@joshlf joshlf changed the title Strengthen arithmetic contracts and compose layout padding proofs Strengthen arithmetic specifications and compose layout padding proofs Oct 2, 2026
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 6de7ebd to e8cf8dd Compare October 2, 2026 21:06
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from b9afff5 to 35cfc20 Compare October 2, 2026 21:06
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from e8cf8dd to d554dff Compare October 3, 2026 16:09
@joshlf joshlf changed the title Strengthen arithmetic specifications and compose layout padding proofs Strengthen arithmetic specifications and prove arithmetic corollaries Oct 3, 2026
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from 35cfc20 to b5d25f5 Compare October 3, 2026 16:09
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from a283bac to f4b6c05 Compare October 5, 2026 13:03
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 2b9ae39 to 4916bdc Compare October 5, 2026 13:03
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from f4b6c05 to bc7fdcc Compare October 5, 2026 15:25
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 4916bdc to 5a84ff2 Compare October 5, 2026 15:25
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 5a84ff2 to d1361e2 Compare October 5, 2026 21:12
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from bc7fdcc to 96cc574 Compare October 5, 2026 21:12
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from 96cc574 to 83853d4 Compare October 5, 2026 21:44
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from d1361e2 to 5b7adf6 Compare October 5, 2026 21:44
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from 83853d4 to d0e1851 Compare October 5, 2026 22:08
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 5b7adf6 to 941b81b Compare October 5, 2026 22:08
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from d0e1851 to fd7ef51 Compare October 6, 2026 00:32
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from 941b81b to c094754 Compare October 6, 2026 00:32
@joshlf
joshlf force-pushed the Gmasez6fvx2c6chogoybuzpgyoykiaupc branch from c094754 to c4126e8 Compare October 6, 2026 15:45
@joshlf
joshlf force-pushed the Gxi6wprpgshggdrhvt64jphmjwhociog5 branch from fd7ef51 to 1e0e85d Compare October 6, 2026 15:45
Prove exact extrema, least padding and the greatest aligned predecessor.
Preserve broad Raw arithmetic results and derive recursive mathematical models
contracts; compose extrema and round-down corollaries. Layout padding is
introduced with its normalized implementation in the later padding proof layer.

Add total Rust assertion harnesses comparing padding and round-down with
independent division/remainder calculations, including usize boundary values.
Keep the comparisons and their power-of-two guard visible in Rust.

Validation: fresh pinned extraction and complete-model golden comparison;
independent golden/live Lean builds, required-contract checks, and the
transitive axiom audit.

gherrit-pr-id: Gxi6wprpgshggdrhvt64jphmjwhociog5
Agent-authored-by: AI agent acting on joshlf's behalf

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.

2 participants