Actual live node consumption in the fused Chan–He visitor #
The actual local node construction is followed by the certified Convolution call and all three native child pushes. The callee may dirty arbitrary higher scratch; its live-prefix frame preserves the newly constructed heavy arrays and every pending source.
theorem Cslib.Algorithms.WordRAM.ThreeSum.Decision.Visitor.construct_consume {r κ n w : ℕ} {a : ChanHe.Traversal.Arena} (c : Host.Callee r) (e : ChanHe.Traversal.Entry) (x : WordRAM.Data (registerCount r)) (hw : width κ c.widthCoefficient n ≤ w + 2) (ha : a.Separated) (hresources :
a.ceiling ≤ (n + 2) ^ envelopeExponent κ ∧ 4 * a.N < (n + 2) ^ envelopeExponent κ ∧ 60 * a.U + 40 ≤ (n + 2) ^ envelopeExponent κ) (hready : a.Ready w) (hc : a.Controls (WordRAM.Data.comap (preprocessingRegisters r) x)) (hl : e.Loaded (WordRAM.Data.comap (preprocessingRegisters r) x)) (hv : e.Valid a.n a.U) (hs : e.Stored x.mem) (hbitmap : a.Bitmap x.mem) (hfloor : a.floor ≤ x.regs (preprocessingRegisters r ChanHe.Traversal.heap)) (hbudget :
x.regs (preprocessingRegisters r ChanHe.Traversal.heap) + ChanHe.Traversal.allocationSize a.n a.m a.N ≤ a.ceiling) (hsrc : ∀ (j : Fin 3), e.source j + (e.data j).length ≤ x.regs (preprocessingRegisters r ChanHe.Traversal.heap)) (hlen : x.regs (preprocessingRegisters r ChanHe.Preprocessing.packedLength) = 4 * a.N) (henv : x.regs (controllerRegisters r envelope) = (n + 2) ^ envelopeExponent κ) (hone : x.regs (controllerRegisters r one) = 1) (hb : x.regs (controllerRegisters r answer) ≤ 1) :
∃ (q : WordRAM.Data (registerCount r)) (y : WordRAM.Data (registerCount r)),
WordRAM.ExecWithin (w + 2) (WordRAM.Code.rename (preprocessingRegisters r) ChanHe.Traversal.localVisit) x q
(ChanHe.Traversal.visitTime a.n a.m a.N) ∧ WordRAM.ExecWithin (w + 2) (consume c.code) q y
(Host.callerTime (4 * a.N) (c.time (Host.sideLength (4 * a.N)) (2 * (n + 2) ^ envelopeExponent κ + 1)) + 7) ∧ Nonempty
(ChanHe.Traversal.Emission a.m.primesLE a.Λ e (WordRAM.Data.comap (preprocessingRegisters r) x)
(WordRAM.Data.comap (preprocessingRegisters r) q) false) ∧ y.regs (controllerRegisters r answer) ≤ 1 ∧ (y.regs (controllerRegisters r answer) = 1 ↔ x.regs (controllerRegisters r answer) = 1 ∨ ThreeSum.Convolution (4 * a.N)
((ChanHe.Traversal.Math.Task.node a.m.primesLE a.Λ e.task).oneArray a.U)) ∧ (∀ (i : Fin 128), y.regs (preprocessingRegisters r i) = q.regs (preprocessingRegisters r i)) ∧ (∀ (i : Fin 16), i ≠ answer → y.regs (controllerRegisters r i) = x.regs (controllerRegisters r i)) ∧ ∀ p < q.regs (preprocessingRegisters r ChanHe.Traversal.heap), y.mem p = q.mem p
Construct the actual current node and consume it before modifying the pending worklist. The construction witness stays at the pre-call state; the actual return frame retains live data.