Skip to content

proof: evaluate short mappingChain reads#2091

Merged
Th0rgal merged 4 commits into
mainfrom
codex/issue-2081-storage-mapping-bridge
Jul 3, 2026
Merged

proof: evaluate short mappingChain reads#2091
Th0rgal merged 4 commits into
mainfrom
codex/issue-2081-storage-mapping-bridge

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • add source semantics for one-key and two-key Expr.mappingChain reads, matching the existing mapping / mapping2 slot bridge behavior
  • mirror the new short-chain cases in Verity.Core.Model.Denote
  • extend DenoteAgreement so the denotational evaluator remains checked against SourceSemantics

Refs #2081.

Validation

  • lean-slot lake build Compiler.Proofs.IRGeneration.SourceSemantics
  • lean-slot lake build Compiler.Proofs.IRGeneration.DenoteAgreement
  • git diff --check
  • rg -n "\\bsorry\\b|\\badmit\\b|^\\s*axiom\\b" Compiler/Proofs/IRGeneration/SourceSemantics.lean Verity/Core/Model/Denote.lean Compiler/Proofs/IRGeneration/DenoteAgreement.lean

Remaining blockers

  • Arbitrary 3+ key mappingChain reads are still deferred; they need shared list-recursion infrastructure for evaluating arbitrary key lists without restructuring the large evaluator unsafely.
  • The coarse unsupported-state/helper surfaces still classify mapping-chain/storage surfaces conservatively; this PR only removes a local semantic gap for the one-key and two-key bridge cases.

Note

Low Risk
Proof-layer semantic extensions only; no runtime auth or IO. Remaining gap for 3+ key reads is unchanged and documented.

Overview
Implements one-key and two-key Expr.mappingChain read semantics in SourceSemantics, aligned with existing mapping / mapping2 slot hashing via abstractMappingSlot. The denotation interpreter in Verity.Core.Model.Denote mirrors the same cases (oracle mappingSlot instead of abstractMappingSlot).

DenoteAgreement splits the old catch-all mappingChain arm: empty lists and three-or-more keys stay unsupported (rfl); singleton and pair reads use bindAgree like other keyed expressions. Private evalExpr_mappingChain_singleton / _pair rfl lemmas and PrintAxioms entries track the new proof surface.

Documentation now states that only 0- and 3+-key chain reads remain outside the denotation fragment; 1- and 2-key reads are in scope. Arbitrary longer chains are still explicitly deferred pending list-recursion infrastructure.

Reviewed by Cursor Bugbot for commit 692253e. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
verity Ready Ready Preview, Comment Jul 3, 2026 12:49pm

Request Review

@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_6316e9db-9de9-4a1f-82e7-32170dae3339)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b348186f-fc13-40c9-a71b-94fed156c35f)

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
\n### CI Failure Hints\n\nFailed jobs: `checks`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n```

…tAxioms totals)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e8f4ce74-8f30-4397-aa0a-8c5d58ffc4d3)

@Th0rgal Th0rgal merged commit 5deba39 into main Jul 3, 2026
21 checks passed
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