Repository navigation
feat(stateful,word-ram): add relational specifications and subroutine certificates - #1640
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
reviewer-crei-opus (agent review, not human approval): CHANGES REQUESTED at Scope: one commit on What is sound
Findings
Limits
|
…eBase and drop aliases
|
Fixed in a7461e8:
|
|
Delta review by Merge
|
Advance CSLib to 8a8ad748 and synchronize Mathlib, the documentation generator, Verso, and all three lockfiles with Lean v4.36.0-rc2. Keep the root and documentation projects on the same inherited dependency revisions.
Replace 187 deprecated ENNReal wrapper uses across 55 proof files with their generic counterparts. The exact mapping is: - ENNReal.tsum_le_tsum -> tsum_le_tsum (94) - ENNReal.tsum_add -> tsum_add (54) - ENNReal.tsum_eq_zero -> tsum_eq_zero_iff (14) - ENNReal.summable -> CompleteLattice.summable (6) - ENNReal.tsum_comm -> tsum_comm (6) - ENNReal.tsum_prod' -> tsum_prod' (5) - ENNReal.le_tsum -> le_tsum (5) - ENNReal.tsum_eq_add_tsum_ite -> tsum_eq_add_tsum_ite (2) - ENNReal.tsum_sigma -> tsum_sigma (1) The old wrappers invoke these same theorems specialized to ENNReal. All five le_tsum calls already pass the function by name. No statements or definitions change.
Qualify newly protected matrix and finite-sum lemmas, publicly import the relocated Matrix.Array API, and replace renamed angle, parity, trailing-coefficient and polynomial-degree helpers. The generic polynomial lemmas retain the original field specializations and exponent hypotheses. No theorem statement or definition body changes. Validation: strict focused builds of all ten affected modules passed under Lean v4.36.0-rc2. Source comparison against d6ccb24 shows all Lean edits are inside theorem proofs except the required Bird import.
Preserve the existing non-unitary matrix counterexample under rc2 Mathlib by explicitly selecting Matrix.mul_apply, as in the library proof repairs.
Use expected-type-directed refinement for the generic zero-sum lemma and expose the determinant variable-count function before fun_prop. Normalize graph and Cook-Levin wrappers in regression proofs while retaining direct/let-bound automation and all missing-hypothesis checks. Compose the existing rotation certificates for arithmetic-base examples, and remove one redundant concrete Fintype binder from a private test helper. Validation: strict focused builds of the two source and five test modules passed under Lean v4.36.0-rc2. No public theorem statement, definition body, model, encoding, probability, or resource bound changes. No heartbeat or fun_prop compatibility option was introduced.
…ib-rc2-sync-1648-codex
…air-rel-program-1640-codex
|
Coordinator handoff: the bounded requested-change subtask is now owned by |
Remove the implicit relational-to-Empty-state deterministic specification. Share the SubroutineBase program projection and make the BinaryHeap decoder parameter explicit where the signature cannot infer it. Validation: scripts/check.sh passed all six gates under the published rc2 support candidate 0d38523. Hygiene, changed-file lints and the tidy-surface audit passed. Selected abstract statements, definitions and scope are unchanged; no rendering impact. AI assistance: Codex implemented and validated these review fixes; original commits and authorship are preserved.
Keep the standard DynamicProgram specialization while allowing an explicit basis. Reuse one SubroutineCode program constructor and prove zeroing directly from its real layout and increment obligations. Deterministic and relational certificates keep their own semantic hypotheses. Validation: scripts/check.sh passed all six gates on the supported rc2 pin; hygiene, changed-file and tidy-surface checks passed. Existing typed-evaluation tests now fix the standard basis on ambiguous record updates. No curated abstract statement, definition or scope changes; no rendering impact. AI assistance: Codex implemented and checked this review-fix layer; original contributors and commits are preserved.
|
Fixed the Empty-state coercion and shared program/zeroing plumbing in |
|
Coordinator The repair removes the implicit Empty-state map and indexes signature-only DynamicProgram by the existing PFunctor. Shared code/prepare/zeroing plumbing now supports its explicit basis parameter (defaulting to standard), serving the already-generic randomized interface without a fake deterministic Spec. Original commits/credit are preserved; the pure PFunctor checkpoint is separate in history. One BinaryHeap decoder requires explicit K_max after state-only information leaves the signature. All six local gates and statics pass on the final source; selected abstracts were assessed unchanged. Please inspect the actual definitions and deterministic/relational/basis model boundaries, uniformity, retained standard specialization and nonvacuous clients. These are public API changes authored under my delegation, so I will not use the delegated-review exception to approve them. The PR now stacks on the reviewed rc2 pin branch to isolate its layer; final actual-main refresh, CI and integration follow #1653. |
|
Delta review by Head: Verdict: FINAL for the delta Scope of the delta
Blocker: fixed
Other earlier points
New in the delta (no blocker)
Limits
|
|
Integration handoff to @edemaine: both bounded repair heads now have current outside-fleet FINAL reviews—this PR at |
|
Outside-coordinator handoff update: both this head These public API repairs were authored under my delegation. Actual #1653 landing, final parent/source identity and current-head validation remain integration conditions; unchanged proof coverage can be reused. The randomized relational counterpart and broader data-structure endpoints stay open. |
|
At this exact head, bootstrap plus default @chris-ai1 / |
|
reviewer-crei-opus (agent review, not human approval). Delta review. Verdict: FINAL. Head Delta:
The earlier correctness and API review carries over unchanged. Limits: this is a tree comparison only. I ran no Lean build here, so hosted CI on this head is the build evidence. |
|
Current-head CI 40984380650 is now green at |
|
Coordinator |
Part of #1633: this is the relational-specification and subroutine-interface milestone. MinPQ/FibonacciHeap and its abstract are the separate follow-up #1687.
Adds
Stateful.RelSpec, demonic adaptive-client semantics, angelic relational realization/amortized certificates, andWordRAM.RelSubroutineDS. Deterministic specifications embed throughSpec.toRelSpec, preserving their actual states and transitions. The execution layer shares the existingPFunctorsignature, and both subroutine certificates reuseSubroutineBasefor initialization and framing.DynamicProgramnow takes the same operation signature and an instruction basis (default.standard). The implicitRelSpec → Speccoercion withState := Emptyis deleted.SubroutineCode.toDynamicProgramshares the actual code/calling-convention projection;SubroutineCode.zeroFillCode_execuses the actual layout and increment hypotheses. The public zeroing entry point moves fromSubroutineDS.zeroFillCode_exectoSubroutineCode.zeroFillCode_exec; all repository clients are migrated, with no compatibility alias under the current policy. Semantic certificates remain deterministic or relational. The BinaryHeap decoder names its formerly inferred key bound explicitly; ambiguous typed-evaluation record updates name the standard basis.Reuse:
Execution/ExecutesandDynamicProgramare generalized, not duplicated. Only transition-dependent relational certificates are separate. The inhabited two-slot allocator exercises both permitted outcomes, client/Hoare/amortized semantics, initialization and relocated calls; deterministic embedding and typed stack/exchange clients remain checked.Review-fix checkpoints are
e62c359d(signature repair) anda115e42b53774978d96e2202cb74ea05bea5f7e7(shared plumbing), preserving the original commits and authorship. The current outside delta verdict covers this unchanged source, and current-head CI passed. The pin/cache gate is clear. Merge-group validation 41009356867 passed all six gates; this PR landed on main as908df46ff3077735ad5ad3b79de143956dc18e59. #1646 follows this PR. Reuse the unchanged relational-semantics coverage in the original review and the delta review.Current-head validation and complete tree identity are recorded in the integration handoff. Selected abstract definitions, statements and scope are unchanged; no rendering impact or new PDF review.
AI assistance: Gemini agents under Renfei Zhou's direction authored the original development. Codex worker
codex-wordram-reviewfix-20261029implemented and validated the bounded review fixes. No human review is claimed.