Skip to content

Prove array IntoBytes initialization from element laws - #3863

Open
joshlf wants to merge 1 commit into
G32iu57kafa74nntjntxknpvpzw6gj37zfrom
G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g
Open

joshlf wants to merge 1 commit into
G32iu57kafa74nntjntxknpvpzw6gj37zfrom
G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g

Conversation

@joshlf

@joshlf joshlf commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

The existing unsafe array impl relies on every element representation being
initialized and Rust arrays adding no padding between complete elements.
Give IntoBytes an inline initialization law over abstract bytes, then prove
the actual extracted generic array dictionary from its element's law.
Place invariant_proof on the existing unsafe_impl! invocation so the
generic proof is required independently of concrete callers. Check
primitive, empty, zero-sized, and nested array uses in Rust.

Keep physical decoding independent of optional library admission. Missing
byte semantics cannot establish the law. Provide explicit inhabited empty
decoders and width-indexed integer, character and nonzero/niche decoders,
with checked initialization laws and mathematical-admission bridges.
Uninhabited and external-state token controls prevent zero-byte storage
from fabricating construction permission. Invalid byte-to-value decoding
produces the forbidden outcome rejected by total and partial contracts.
The Rust Reference bridge remains an explicit premise; this does not prove
the pointer implementation of as_bytes.

Native const-identity mutations, independent required contracts, and
proofs against both model builds check the generic implementation.

Adapt metadata-indexed storage to the existing retained model providers.
Compose language decoding with mathematical admission while preserving
forbidden failure. Explicit Usize slice counts distinguish zero-sized
representations; kernel counterexamples reject wrong metadata and invalid
Boolean bytes even with a True postcondition.

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


Latest Update: v15 — Compare vs v14

📚 Full Patch History

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

Version 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/G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g && git checkout -b pr-G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g FETCH_HEAD

Checkout

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

Cherry Pick

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

Pull

git pull origin refs/heads/G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g

Stacked PRs enabled by GHerrit.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T03:44:54.425740Z c44c770 PR opened
🔒 Security Review ✅ Completed 2026-10-14T03:45:13.688126Z c44c770 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 force-pushed the G32iu57kafa74nntjntxknpvpzw6gj37z branch from d81f4d2 to f009677 Compare October 14, 2026 18:32
@joshlf
joshlf force-pushed the G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g branch from 56e0995 to 5013358 Compare October 14, 2026 18:32
@joshlf
joshlf force-pushed the G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g branch from 5013358 to 868a125 Compare October 14, 2026 21:43
@joshlf
joshlf force-pushed the G32iu57kafa74nntjntxknpvpzw6gj37z branch from 144133f to eec57c3 Compare October 15, 2026 00:40
@joshlf
joshlf force-pushed the G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g branch from 868a125 to 4981be2 Compare October 15, 2026 00:40
@joshlf
joshlf force-pushed the G32iu57kafa74nntjntxknpvpzw6gj37z branch from eec57c3 to 526f1f0 Compare October 15, 2026 14:22
@joshlf
joshlf force-pushed the G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g branch from 4981be2 to 4f6d829 Compare October 15, 2026 14:22
The existing unsafe array impl relies on every element representation being
initialized and Rust arrays adding no padding between complete elements.
Give IntoBytes an inline initialization law over abstract bytes, then prove
the actual extracted generic array dictionary from its element's law.
Place invariant_proof on the existing unsafe_impl! invocation so the
generic proof is required independently of concrete callers. Check
primitive, empty, zero-sized, and nested array uses in Rust.

Keep physical decoding independent of optional library admission. Missing
byte semantics cannot establish the law. Provide explicit inhabited empty
decoders and width-indexed integer, character and nonzero/niche decoders,
with checked initialization laws and mathematical-admission bridges.
Uninhabited and external-state token controls prevent zero-byte storage
from fabricating construction permission. Invalid byte-to-value decoding
produces the forbidden outcome rejected by total and partial contracts.
The Rust Reference bridge remains an explicit premise; this does not prove
the pointer implementation of as_bytes.

Native const-identity mutations, independent required contracts, and
proofs against both model builds check the generic implementation.

Adapt metadata-indexed storage to the existing retained model providers.
Compose language decoding with mathematical admission while preserving
forbidden failure. Explicit Usize slice counts distinguish zero-sized
representations; kernel counterexamples reject wrong metadata and invalid
Boolean bytes even with a True postcondition.

gherrit-pr-id: G4s3r4gpuxvvnoxoizjjgoy3b2rwmgi7g
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