Skip to content

refactor(WordRAM/FibonacciHeap): derive extractMin and insert forest reasoning from the record heap - #2275

Merged
SamuelSchlesinger merged 51 commits into
mainfrom
feat/fibheap-bridge
Nov 2, 2026
Merged

SamuelSchlesinger merged 51 commits into
mainfrom
feat/fibheap-bridge

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

worker-claude-015dlg8k-fibbridge (Claude Code, Opus), for #2205: bridge-and-delete under the policy of 2026-11-02 (item 3), for the Fibonacci heap's extractMin and insert. #2247 has landed; this PR is now based on main. The integration review records preservation of the independently approved change.

Change

The hand-stepped word-RAM proofs of extractMinCode, scatterRootCode and insertCode re-proved the forest bookkeeping that the record heap (#2228–#2247) proves on RawState n. They now state their invariants with #2247's phase predicates, applied to the machine state read as RawState.ofData n base x, and cite the pure lemmas. The instruction stepping is kept as it was.

Two commits.

  1. Move only. FibonacciHeap/Basic.lean imported the machine files WordRAM/…/Consolidate.lean and Cut.lean only for machine-free lemmas. These move unchanged into WordRAM/…/Forest.lean (machine-free): ValidRoot.frame_tree, frame_nodes, deg_bounds_of_extra, SlotInv with its lemmas, FHTree.eta, and descendant_ne_root_of_nodup. Basic.lean then imports Forest.lean and no machine code, so the machine Consolidate.lean can import the pure Consolidation.lean without a cycle. DecreaseKey.lean imports Cut.lean directly until the decreaseKey bridge.
  2. Bridge. The machine lemmas take and return the pure predicates.
    • scatterBody_exec, scatterLoop_exec, scatterRootCode_exec: Placing in, Consolidated out. A collision step is Placing.collide. The machine's link is shown to be LinksAs (its effect on memory), and LinksAs.linked does the forest work. The final store into an empty slot is Placing.place.
    • scatterChildrenLoop_exec, scatterRootsLoop_exec: Scattering in, Consolidated out, through Scattering.unmark (the machine's unmarking is unmarkState), placing and step.
    • gatherSlotsLoop_exec: Gathering in, Gathered out, through Gathering.take and done.
    • extractMinCode_exec (statement unchanged): FibRawInv.detach, then Detached.scatterChildren, scatterRoots, gathering and finish.
    • addRootAndUpdateMin_exec now concludes AddsRoot, as the record addRoot does. insertCode_exec (statement unchanged) then closes with FibRawInv.insert, since the state after its six writes is newNode st v k.

Deleted. addRootIterCur_lr_frame (134 lines, which re-executed addRootAndUpdateMin to frame the sibling pointers), NoStore, mem_eq_of_noStore, extract_tree_by_root, perm_reassoc_mid and perm_move_to_acc. Also deleted is the inline bookkeeping of every loop, which covered frames, permutations, Nodup, SlotInv and ValidRoot.

Statement changes (non-public consumers only).

  • scatterRootCode_exec takes Placing and returns Consolidated, in place of the SlotInv/otherNodes/Nodup interface. The cost bound and register frame are unchanged.
  • addRootAndUpdateMin_exec takes the precondition of the record wp_addRoot (the root list is empty, or is headed by the minimum, plus numRoots + 1 ≤ n) and returns AddsRoot.
  • insertIntoNonEmptyList_exec takes the right neighbour r of h and returns the state equation only. Its other client, in Cut.lean, derives the circular list with IsCircList.insertAfter.
  • In refactor(DataStructure): Fibonacci heap extractMin's forest bookkeeping as pure lemmas #2247's Consolidation.lean, Detached.child now records st.child m = y + 1 (was st.child m - 1 = y). The machine needs the stronger form, and FibRawInv.detach proves it as before. wp_extractMin adapts in two lines.

extractMinCode_exec, insertCode_exec, decreaseKeyCode_exec, the MinPQ/FibonacciHeap exports, Dijkstra and FibonacciHeapAbstract/FibonacciHeapBridge are unchanged and build. A script compared the statements of these and of the moved lemmas with the base.

Size

Proof-body lines (scripts/proof_lengths.py):

file before after
WordRAM/…/Consolidate.lean 2,954 1,997
WordRAM/…/BasicOps.lean 1,230 1,030
WordRAM/…/Forest.lean (receives the moved lemmas) 563 693
WordRAM/…/Cut.lean 1,227 1,232
total 5,974 4,952

Longest proofs: scatterBody_exec 791 → 667, extractMinCode_exec 723 → 522, scatterChildrenLoop_exec 431 → 279, addRootAndUpdateMin_exec 388 → 307, insertCode_exec 288 → 180, gatherSlotsLoop_exec 276 → 202, scatterRootCode_exec 212 → 195, scatterRootsLoop_exec 187 → 104, and addRootIterCur_lr_frame 134 → deleted. What remains in these proofs is instruction stepping, written in the old ExecWithin-per-instruction style; this PR does not touch it.

The diff is +1,090 / −2,259. That is over the usual 1.5k, but it is mostly deletion. Two parts inflate it:

  • The move commit is ±236 lines.
  • extractMinCode_exec lost one level of cases nesting, so its kept stepping is re-indented by two spaces. git diff -w shows +663 / −1,833.

Elaboration time (lake env lean, LEAN_NUM_THREADS=4): Consolidate.lean 11.3 s → 8.1 s, BasicOps.lean 3.0 s → 2.6 s, Cut.lean 4.7 s → 4.9 s; Forest.lean 2.2 s.

Existing notions considered. No new definitions. The reused notions are #2247's Placing, Scattering, Gathering, Consolidated, Gathered, Linked, LinksAs, Detached, unmarkState and detachState, and Basic.lean's AddsRoot, newNode, RootList.addRoot, FibRawInv.insert, minRoot_cases and counts_lt_of_absent.

Validation

  • lake build --wfail passes on the heap modules, MinPQ, Algorithms.WordRAM.Dijkstra.Fibonacci, ComplexityTests.{WordRAMFibonacciHeap, FibonacciHeapDecreaseKey, FibonacciHeapExtractMin, FibonacciHeapRecord, Abstracts.FibonacciHeapTests} and ComplexityAbstracts.{FibonacciHeapBridge, DijkstraBridge}.
  • lake build Complexity ComplexityTests ComplexityAbstracts passes, as does scripts/check.sh --quick --base origin/feat/fibheap-extract-pure (27 targets, mk_all --check).
  • check_hygiene.py --check-simp, check_tidy_surface.py and check_changed_files.py (against the base) pass.
  • lint-style passes on the changed files, and lake lint on Consolidate, BasicOps and Forest.

Current-context CI runs the six gates and must pass before integration. The linked integration review reuses the existing independent mathematical/API review; no new abstract rendering is needed.

Next. #2278 (stacked on this one) does the same for decreaseKey (cutNodeCode_raw, cutNode_forest, decreaseKeyCode_exec against CutsNode, cutsNode_cutState and Cascading).

AI assistance

Written by Claude Code (Opus) as worker worker-claude-015dlg8k-fibbridge; independently reviewed by reviewer-codex-edemaine. The ordinary main refresh was prepared by Codex review_list_foldl_max and independently checked by coordinator /root.

🤖 Generated with Claude Code

https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG

SamuelSchlesinger and others added 30 commits November 1, 2026 17:07
…eld arrays

Memory.spec w is the memory oracle of #2205 (decision D7): read, write, and
zeroed or dirty allocation at a frontier, with admissibility carrying the
allocated-address and word-fit preconditions. Field arrays are WordRAM
Blocks accessed by Block.get/Block.set programs over the oracle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ions with stacked potentials

Refinement D E is a Module whose representation is an invariant plus an
abstraction function (#2205 D2). Refinement.Amortized is the per-method
physicist's inequality (D3); potentials stack across comp, add across
non-interfering products, and yield an Amortized certificate for a realized
module with a functional native representation (R2 gap 5). CostIsBigO is the
exported asymptotic form (D6).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…inements

Amortized.mono and Amortized.mul_left (exchange at a constant rate, #2205 D4),
productCharge_const, and transcript-cost monotonicity and scaling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…t, outside Refinement

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…structure

A Prop-valued def whose body starts with an implicit binder is unfolded and
auto-introduced during elaboration against an expected type, which broke
term-mode uses such as Amortized.prod. A one-field structure, like the
existing DataStructure.Amortized, avoids this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
….elim

With a match, the answer types of product D E mention D and E through the
matcher's parameters, so the elaborator cannot identify clients of two
products whose components differ only in admissibility (for example the pair
of stacks and the pair of bounded stacks). Sum.elim D.Result E.Result
depends only on the component answer types.

Queue.Spec: factor the dequeue computation into runClient_dequeue_nil and
the behaviour of the methods into stepFn_methods, which the module and the
potential argument now use; repair transfer_run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
The M1 slice of #2205. Stack.Memory implements the bounded stack by three
memory programs over named fields, with a three-unit worst-case certificate,
its frame, a non-interfering pair, and allocation. Queue.Memory reuses the
two-stack queue methods over the bounded pair, then composes with the pair
of array stacks; the potentials stack to nine memory units per queue
operation. run allocates both stacks and runs a client: correct, at most
6 + 9 m memory units, and O(m).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
Add Record.spec, a generic record of named cells over the memory oracle with
a weakest-precondition calculus (Record.wp) and a one-unit-per-operation
refinement into Memory.spec. Start the Fibonacci heap over such a record:
the cells are the existing struct of arrays, read as RawState, so FibRawInv
and the forest lemmas apply unchanged. isEmpty, getKey and insert are record
programs with specifications against IndexedMinPQ.step, the invariant, and
the amortized cost with potential credit * (numRoots + 2 * numMarked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…op 3

Products over a shared memory (#2205 hop 3):
- `Memory.Framed`: a refinement over `Memory.spec w` with a footprint of
  allocated cells, read by its invariant and abstraction, outside which its
  methods change no allocated cell. `Framed.ofStatic` for fixed layouts.
- `Framed.prod`: two framed refinements with disjoint footprints implement
  the product of their specifications; the product is framed again, so
  products iterate. `Framed.amortized_prod` adds charges and potentials that
  read only their own footprints; zero potentials give a `ChargeBound`.
- `Framed.of_fresh`, `Framed.prod_of_fresh`: allocation preserves structures
  and sets up products.
- `Refinement.prod` takes a joint invariant (here, disjointness), and its
  methods are the new `Methods.prod`.

The array stack is now `Stack.Memory.framed`, and the queue's pair of stacks
is the generic product; the hand-written frame and pair lemmas are gone.

Glue charges: `Refinement.Amortized.add`, `Amortized.glue` (glue at most
`K` times a call's charge plus `K`), `Amortized.glue_of_one_le`,
`StateTransitionSpec.totalCost_glue_le` and `Memory.one_le_charge`.
`Queue.Memory.run_cost_glue` bounds memory charges and glue together by
`(2K + 1)(6 + 9m)`.

`link_eq_interpret` (D1) in a leaf module, so the state-transition layer
does not import probability.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ver a record

decreaseKey cuts v from its parent when heap order breaks, cascades up the
marked ancestors (fuel bounded by the number of marks), then stores the key
and updates the minimum root. Program evaluation (wp_cut, wp_cascade,
wp_setKey, wp_decreaseKey) is separated from forest mathematics on RawState
(cutsNode_cutState, CutsNode.cascading, Cascading.mark, ...), which reuses
ValidSubtree.exists_cut, mark_pending, lower_key_no_cut and
CutInv.to_fibRawInv unchanged. Amortized cost: 104 record operations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…r a record

extractMin detaches the minimum root, scatters its children and the other
roots into the degree table (linking equal degrees), and gathers the table
into a new root list. The loops carry the existing SlotInv; linking goes
through ValidRoot.link; RootList.addRoot builds the new root list. The
largest degree is a program value. Amortized cost 92 * (log2 m + 1) record
operations with potential 24 * (numRoots + 2 * numMarked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… over memory

Assemble the five record programs into a Refinement of indexedMinPQSpec n K
over the heap's record, with amortized charges 1, 2, 43, 104 and
92 * (log2 m + 1). Place the record at 9 n + 5 consecutive cells and compose
with Record.refinement; the potentials stack (Amortized.comp). Package the
result as a Memory.Framed structure with a static footprint, a potential
local to it, and allocation of all arrays at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…test records and insert

Retain the original authorship of the native WordRAM Fibonacci heap that Basic.lean
adapts, and add ComplexityTests/FibonacciHeapRecord: a concrete Record.Layout with a
program run through Record.wp and Record.refinement, the all-zero heap record satisfying
Inv, and three insertions checked by evaluation and through wp_insert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…t a cut and cascading cut

Retain the original authorship of the native Cut.lean development that DecreaseKey.lean
adapts, and add ComplexityTests/FibonacciHeapDecreaseKey: a three-node chain with a marked
middle node proved to satisfy Inv (and hence Cascading), on which decreaseKey cuts the leaf
and the cascade cuts the marked parent; checked by evaluation and through wp_decreaseKey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… a consolidation

Retain the original authorship of the native Program.lean/Consolidate.lean development
that ExtractMin.lean adapts, and add ComplexityTests/FibonacciHeapExtractMin: a two-root
heap whose minimum root has a marked child, proved to satisfy Inv, on which extractMin
promotes the child to an unmarked root and links it after a table collision; checked by
evaluation and through wp_extractMin, with empty and one-handle extraction as edge cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
SamuelSchlesinger and others added 2 commits November 1, 2026 22:37
…reasoning from the record heap

The hand-stepped proofs of `extractMinCode`, `scatterRootCode` and `insertCode` re-proved, on
machine states, the forest bookkeeping that `FibonacciHeap/Consolidation.lean` and `Basic.lean`
prove on `RawState n`. They now state their invariants with the pure phase predicates, applied
to `RawState.ofData n base x`, and cite the pure lemmas; the instruction stepping is unchanged.

* `scatterBody_exec`/`scatterLoop_exec`/`scatterRootCode_exec`: `Placing` in, `Consolidated` out;
  a collision is `Placing.collide`, the machine link is `LinksAs`, closed by `LinksAs.linked`.
* `scatterChildrenLoop_exec`/`scatterRootsLoop_exec`: `Scattering` in, `Consolidated` out, via
  `Scattering.unmark`/`placing`/`step`.
* `gatherSlotsLoop_exec`: `Gathering` in, `Gathered` out, via `Gathering.take`/`done`.
* `extractMinCode_exec` (statement unchanged): `FibRawInv.detach`, `Detached.scatterChildren`,
  `scatterRoots`, `gathering` and `finish`.
* `addRootAndUpdateMin_exec` now concludes `AddsRoot`, and `insertCode_exec` (statement
  unchanged) closes with `FibRawInv.insert`.
* `insertIntoNonEmptyList_exec` takes the right neighbour `r` directly and returns the state
  equation only; its one other client in `Cut.lean` derives the circular list itself.
* `Detached.child` records `st.child m = y + 1` (was `st.child m - 1 = y`).

Deleted: `addRootIterCur_lr_frame`, `NoStore`, `mem_eq_of_noStore`, `extract_tree_by_root`,
`perm_reassoc_mid`, `perm_move_to_acc`, and the inline frame, permutation and `SlotInv`
bookkeeping of the loops.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…feat/fibheap-bridge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
@edemaine

edemaine commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Active review — reviewer-codex-edemaine, independent non-author worker: reviewing the complete own layer at a5fd7b77348e78efa3aae4f8cea9e30bf51462f9, isolating #2247. Scope: native-to-record bridges, deleted forest reasoning, preservation of public statements/instruction counts and affected clients/abstracts. Reusing unchanged record-heap coverage.

@edemaine edemaine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

APPROVE — reviewer-codex-edemaine, independent non-author review of a5fd7b77348e78efa3aae4f8cea9e30bf51462f9, isolating the eight-file layer over reviewed #2247 42643d4e565629a48b4063fb30276bea8029939f.

Read the complete own diff and actual phase/state definitions. Native links prove LinksAs; scattering and gathering reuse the record heap’s validity, permutation and framing arguments. Detached.child now supplies the exact nonzero pointer equation, with the record client explicitly recovering its subtraction form. The old duplicate reasoning is deleted. All moved declarations retain their text/names and source credit; the imports break the machine/pure cycle. Public insert, extract-min and decrease-key statements, native programs, instruction/potential bounds and external exports are preserved. No blocking finding.

Existing unchanged checked clients cover equal-key handle ordering, empty extraction, genuine consolidation/cascading cuts and framing. Tests, abstracts and catalogue are byte-identical; no rendered-abstract change. Whitespace, hygiene/simp and the canonical 3,873-module aggregate pass. The author reports strict heap, Dijkstra and abstract-client builds plus quick validation; I did not run Lean or replicate timings. At one inspection library CI and Guide were running; title passed. Agent review, not human approval.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

coordinator-claude-015dlg8k (Claude Code): this Claude-fleet PR from worker-claude-015dlg8k-fibbridge is #2205 bridge-and-delete for the hand-stepped Fibonacci heap's extractMin and insert. The machine proofs now cite #2247's pure phase lemmas through RawState.ofData, and the inline forest, list and frame bookkeeping is deleted. The diff is +1,090/−2,259 (git diff -w gives +663/−1,833). Public statements (extractMinCode_exec, insertCode_exec, the MinPQ/FibonacciHeap exports, Dijkstra, the FibonacciHeapAbstract bridge) are unchanged. Please review at a5fd7b77348e78efa3aae4f8cea9e30bf51462f9, after #2247: reviewer-codex-edemaine (@edemaine) or a Codex reviewer.

SamuelSchlesinger and others added 8 commits November 1, 2026 23:37
Complexity.lean: union.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…heap-refinement

ComplexityTests/DataStructureMemoryProduct.lean is not part of this PR: main's copy (#2234) is
taken. Complexity.lean: union.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ier (#2239's Framed API)

Record.Layout.frontier_clientState_link, beside mem_clientState_link: an admissible record program
keeps the frontier. It supplies Framed.ofStatic's frontier_eq for FibonacciHeap.Memory.framed, and
potential_local takes the room hypothesis that Framed.Local now has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…heap-extract-pure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ibheap-bridge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
FibonacciHeap/ExtractMin.lean: main's copy is byte-identical to the approved parent heads
(#2240 a6ac6be, #2242 49aeb57), so this branch's side is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…ibheap-bridge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

integrator-claude-015dlg8k (integration delegate of coordinator-claude-015dlg8k): I merged #2247's refreshed head 58b72389 (which includes #2242 and main) into this branch: a5fd7b773 → 5de40abe6. Payload +/- lines identical to approved a5fd7b773 (vs git diff 42643d4e a5fd7b77, 3365 lines, 8 files), and the PR's modules build on the merged tree. Next step, after #2247 lands: retarget to main and merge main (add/add files should take this branch's side), then carry forward and queue.

SamuelSchlesinger commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Frozen / awaiting preservation audit — source-refresh worker codex-restack-2275-list-20261102 prepared local ordinary merge 85ce2e231301851026d2046de59913d1e98bb5d5 (tree 85fe110324e308d74b5b5b774d88acee8ce35886), parents current 5de40abe69df814cfbfead6d736f76ccdd3612e6 and fixed actual #2247 main 9e0865ff3cf55e669dea593e16856bd89511a909. Branch/worktree: codex/restack-2275-list-20261102 / full-template/.worktrees/restack-2275-list-20261102.

Every one of the eight reviewed code payloads is exact. The complete final feature patch is byte-identical to the original outside-reviewed patch, and applies/inverts to the exact candidate/main trees. Both conflicted files retain the approved source because main still has their exact reviewed preimages. All unrelated main entries, tests, docs, imports, pins and abstracts are preserved. Root/LogsQ have the frozen packet before publication.

Outside review 5731883248, prior carry and original Claude credit are reused. No new proof/API repair, Lean build, publication or queue action occurred; public source remains 5de40abe. A/#2270 priority is preserved, #2278 is untouched, and broader native migration/#2205 remain open.

After #2247 landed, preserve the complete outside-reviewed eight-file
#2275 bridge-and-delete feature byte-for-byte, including every import and
declaration change. Main still has the exact reviewed feature preimages;
retain the approved payloads in the two merge conflicts and preserve all
unrelated main entries, aggregate, documentation, pins and abstracts.

Original Claude authorship and review5731883248 remain credited.
AI-assisted source-only integration preparation by
codex-restack-2275-list-20261102; no new proof/API repair or Lean build.
@SamuelSchlesinger
SamuelSchlesinger changed the base branch from feat/fibheap-extract-pure to main November 2, 2026 06:36

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Coordinator codex-root-2205-20261101: APPROVE the integration delta, carrying independent review 5731883248 to 85ce2e231301851026d2046de59913d1e98bb5d5 after #2247's actual landing. This is agent source-preservation review, not a new mathematical or human approval.

I independently checked all eight files against the approved a5fd7b773. The complete original, previously refreshed, and newly prepared feature patches are byte-identical. Forward and inverse reconstruction recover the full candidate and main trees; all unrelated main content is unchanged. The two conflict resolutions retain the approved source against exact original preimages. No theorem, definition, proof, instruction bound or source credit changed in this refresh. Tests, selected abstracts, catalogue and rendering are unaffected.

Current-context CI is running and must pass before queue admission. This lands the reviewed bridge-and-delete cleanup; the native Fibonacci migration and broader #2205 remain open.

SamuelSchlesinger commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Coordinator codex-logsq-1671: #2275 landed as e442d126 from 85ce2e23. Fresh source CI and the exact actual MQ checkout pass all six gates. The complete original feature reverses to its exact parent; all reviewed payloads, unrelated main entries, pins and canonical imports are preserved. Outside approval and preservation carry are reused.

The pinned first started main consumer passes all six and published a usable cache: 5,245 unique mappings and all 11 new references available. Optional handoff reuse was unavailable; it rebuilt 13 library, 10 test and four abstract modules. The sole saved log/map audit is retained for reuse, with zero artifact-body downloads. This completes this bridge milestone with original Claude credit; the broader Fibonacci/native migration remains open.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit e442d12 Nov 2, 2026
4 checks passed
SamuelSchlesinger added a commit that referenced this pull request Nov 2, 2026
After #2275 actually landed, preserve the four reviewed whole payloads
and Memory.lean's original one-line import on top of the exact actual
parent frontier/Local correction. Both original and current full feature
patches apply and reverse to the exact candidate/main trees. Retain all
unrelated main entries, pins, documentation, aggregate and abstracts.

Original Claude source credit and review5731993369 remain. AI-assisted
source-only preparation by codex-restack-2278-list-20261102; no proof/API
repair, Lean validation or publication in this step.
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