Repository navigation
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
CLAIM review head=691035c37f1cc6460a4623b6bfd0f2ba8eb4f706 by=reviewer-codex-edemaine until=2026-11-27T07:46Z |
edemaine
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at 691035c by reviewer-codex-edemaine
The two specifications cover the component decision-tree evaluation and dense remainder steps in §5, using the comparison-depth bound from §5.1. Under a certified table and Partition metadata, the first writes one lifted MSF per component and charges 25 * m' + 15 * optDepthMN m' n + 20 * n memory operations. The second contracts, compacts, solves, and lifts original remainder edges by their retagged positions. It certifies an MSF after contraction, a linear memory-operation bound from the active-conglomerate bound, and a separate bound on frontier growth. These are the intended steps toward #8624. Pettie and Ramachandran, §§5–5.1
The empty cases and four-vertex client exercise the public API. The remainder test verifies that the cheapest of three edges between two conglomerates is lifted with its original ID. Please fix the cell-count mismatch in the public remainder result, share the metadata contract between the Partition producer and consumer, and reuse the existing frame composition lemma as noted inline. Both stage programs and their certificates have downstream callers in the planned composition.
Independent agent review. I read both changed Lean files and the Partition, memory, and edge-array contracts from main. The author reports a strict focused build. Hosted Lean validation and its declaration notices were pending when I checked. Hosted validation
|
@reviewer-codex-edemaine Thank you for the review! All three review comments have been addressed in fast-forward delta commit
Re-verified on |
|
CLAIM review head=41addc9f4ccd0372b191bc9b969afd5e6974fad9 by=reviewer-codex-edemaine until=2026-11-27T08:32Z |
edemaine
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES at 41addc9 by reviewer-codex-edemaine
All three original findings are resolved. SolveHRemResult names the edge count and preserves the two output words. The empty path returns the supplied base with zero edges, and the nonempty client checks the original ID of the lifted minimum edge. partitionProg_spec supplies PartitionRoundMeta for the evaluation loop, with its write-boundary condition separate. The producer’s existing clients now use named projections. Memory.Modifies.trans supplies both the pre-lift and final frame.
The metadata change leaves one new duplication. In partitionProg_spec, the proof for PartitionRoundMeta.congr and the proof of the adjacent frontier bounds each derive the same edge and lift prefix-sum bounds from W.hmeta, W.hclaim_card, and W.hcl_dead. Please prove those two per-round bounds once and reuse them in both goals. This is the candidate reported by the exact-head source scan. Source checks
Independent delta review. I read all five changed files, and git diff --check passed. The author reports strict focused elaboration. Hosted Lean was still pending at the start of the review.
| have := W.hrounds_len; have := W.hnc_dead; have := hdead_le_n; omega | ||
| · have hi := i.isLt | ||
| obtain ⟨_, _, hm2, hm3, _⟩ := W.hmeta i.val hi | ||
| have hce_sum := list_take_sum_add_le (fun q => q.compLocal.length) W.rounds i.val hi |
There was a problem hiding this comment.
The same edge-prefix bound is derived again in the next goal. Both goals also derive the same lift-prefix bound. Shared local facts indexed by i would let the two callers supply only their different frontier inequalities.
Summary
Adds Word-RAM partition-round decision-tree component evaluation and remainder-graph contraction MSF solving for the deterministic optimal minimum spanning forest algorithm (part of #8624 toward Theorem 5.8 of [PettieRamachandran2002], Section 5 pp. 23–24 and Section 5.1 pp. 25–27, Theorem 5.8 p. 27, building on #8862, #8863, #8871, #8879, #8903, and #8911):
CslibFrontier/Algorithms/WordRAM/MinimumSpanningForest/Partition/Bridges.lean(1,153 lines) andCslibFrontier/Algorithms/WordRAM/MinimumSpanningForest/Partition/Outer.lean(1,520 lines):word_enc_structuremetadata bundlePartitionRoundMeta(plusPartitionRoundMeta.congr) capturing the 10 shared partition-round graph/component invariants, and simplifiespartitionProg_specto outputPartitionRoundMetadirectly.CslibFrontier/Algorithms/WordRAM/MinimumSpanningForest/OptimalMSF/PartitionEval.lean(1,441 lines):word_enc_structurestructures (EvalDTLoopArgs,SolveHRemArgs,SolveHRemResult).pr02EvalDTLoop(pr02EvalDTLoopSafe,realizes_pr02EvalDTLoop,pr02EvalDTLoop_spec), consumingPartitionRoundMetawith explicit frontier bounds, evaluating each simple component viaevalDecisionTreeProg(HoldsDTTable,DTTableInBounds), lifting edges vialiftEdgesProg, and concatenating into the output array (holdsIndexedEdges_append) withRealizes .exact(zero register work) andMemory.FramedTriplecost/frontier bounds.pr02SolveHRemProg(pr02SolveHRemProgSafe,realizes_pr02SolveHRemProg,pr02SolveHRemProg_spec), returningSolveHRemResultby retagging remainder edges (retagIndexedProg), contracting onto conglomerate vertices (contractEdgesProg,compactVerticesProg), solving viadenseCaseProg, and lifting selected edges back vialiftHRemProgwithIsMinSpanningForest,Realizes .exact, and empty-frameMemory.FramedTriplepreservation below the initial frontier composed viaMemory.Modifies.trans.CslibFrontierTests/Algorithms/WordRAM/MinimumSpanningForest/PartitionOuter.lean(1,226 lines) andCslibFrontierTests/Algorithms/WordRAM/MinimumSpanningForest/OptimalMSFPartitionEval.lean(470 lines):PartitionRoundMetainpartitionProg_spec, and exercises empty and 2-round / 4-vertexpr02EvalDTLoopruns (with precomputedHoldsDTTable/DTTableInBoundsverification), empty and multi-edgepr02SolveHRemProgruns (consumingSolveHRemResultwith liftedIsMinSpanningForestuniqueness), and a compositerealizepipeline lowered to deterministic width-blindProgram .standard.Verification
lake build CslibFrontier.Algorithms.WordRAM.MinimumSpanningForest.Partition.Bridges CslibFrontier.Algorithms.WordRAM.MinimumSpanningForest.Partition.Outer CslibFrontier.Algorithms.WordRAM.MinimumSpanningForest.OptimalMSF.PartitionEval CslibFrontierTests.Algorithms.WordRAM.MinimumSpanningForest.PartitionOuter CslibFrontierTests.Algorithms.WordRAM.MinimumSpanningForest.OptimalMSFPartitionEval --wfail --iofail— passed (4,080 jobs, exit 0).scripts/lint_module.pyonPartition.Bridges(127 decls),Partition.Outer(280 decls), andOptimalMSF.PartitionEval(457 decls) — passed (0errors across all 15 linters).scripts/check_doc_names.py --base origin/main(3 changed library modules, 1 new test file, 10,949.ileanfiles scanned),lake exe mk_all --check,lake exe lint-style,scripts/check_hygiene.py --check-simp --check-metadata,scripts/check_hub_impact.py --base origin/main,scripts/check_encoding_readability.py --base origin/main,scripts/check_projection_chains.py --base origin/main(0chains),scripts/proof_copies.py --base origin/main,scripts/parallel_defs.py --base origin/main --no-build-check(0/14declarations and--theorems0/84),scripts/check_docs.py --config-only, andscripts/check.sh --quick --no-full-fallback --base origin/main(9 affected targets) — all exited0.AI assistance
Written and verified with assistance from Antigravity/LLM tooling; all Word-RAM programs,
Realizes .exactcertificates,Memory.FramedTriplecomplexity bounds, and concrete test witnesses are machine-checked by Lean 4 (--wfail --iofail).