Direct solver envelopes for an interleaved Chan–He visitor #
The fixed arena's existing admission envelope bounds allocations, common packed length and packed values before any standalone catalogue run is completed. These bounds therefore apply to actual nodes reached while native solver calls are interleaved with traversal.
Main results #
arena_resources: endpoints, packed length and signed values fit the caller's value envelope.packed_values: direct bounds on every value supplied by an admitted pending entry.
theorem Cslib.Algorithms.WordRAM.ThreeSum.Decision.Visitor.arena_resources (κ n : ℕ) (retained : ℕ → ℕ) :
Pure layout and admission bounds, independent of any completed preprocessing execution.
theorem Cslib.Algorithms.WordRAM.ThreeSum.Decision.Visitor.packed_values {κ n : ℕ} {retained : ℕ → ℕ} {e : ChanHe.Traversal.Entry} (h : e.Valid (ChanHe.Preprocessing.arena κ n retained).n (ChanHe.Preprocessing.arena κ n retained).U) (i : ℕ) :
|(ChanHe.Traversal.Math.Task.node (ChanHe.Preprocessing.arena κ n retained).m.primesLE
(ChanHe.Preprocessing.arena κ n retained).Λ e.task).oneArray
(ChanHe.Preprocessing.arena κ n retained).U i| ≤ ↑((n + 2) ^ envelopeExponent κ)
Every actual packed value follows from the pending entry's finite input promises.
theorem Cslib.Algorithms.WordRAM.ThreeSum.Decision.Visitor.exec_consume_emission {r κ n w : ℕ} {a : ChanHe.Traversal.Arena} (c : Host.Callee r) (e : ChanHe.Traversal.Entry) (x : WordRAM.Data 128) (v : WordRAM.Data (registerCount r)) (em : ChanHe.Traversal.Emission a.m.primesLE a.Λ e x (WordRAM.Data.comap (preprocessingRegisters r) v) false) (hc : a.Controls x) (hv : e.Valid a.n a.U) (hw : width κ c.widthCoefficient n ≤ w) (hresources :
a.ceiling ≤ (n + 2) ^ envelopeExponent κ ∧ 4 * a.N < (n + 2) ^ envelopeExponent κ ∧ 60 * a.U + 40 ≤ (n + 2) ^ envelopeExponent κ) (hheap : v.regs (preprocessingRegisters r ChanHe.Traversal.heap) ≤ a.ceiling) (hlen : v.regs (preprocessingRegisters r ChanHe.Preprocessing.packedLength) = 4 * a.N) (hbound : v.regs (controllerRegisters r envelope) = (n + 2) ^ envelopeExponent κ) (hone : v.regs (controllerRegisters r one) = 1) (hb : v.regs (controllerRegisters r answer) ≤ 1) :
∃ (y : WordRAM.Data (registerCount r)),
WordRAM.ExecWithin w (consume c.code) v y
(Host.callerTime (4 * a.N) (c.time (Host.sideLength (4 * a.N)) (2 * (n + 2) ^ envelopeExponent κ + 1)) + 7) ∧ y.regs (controllerRegisters r answer) ≤ 1 ∧ (y.regs (controllerRegisters r answer) = 1 ↔ v.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) = v.regs (preprocessingRegisters r i)) ∧ (∀ (i : Fin 16), i ≠ answer → y.regs (controllerRegisters r i) = v.regs (controllerRegisters r i)) ∧ ∀ p < v.regs (preprocessingRegisters r ChanHe.Traversal.heap), y.mem p = v.mem p
The concrete emitted pointer, readback and arena bounds discharge the actual host contract.