Documentation

Complexity.Algorithms.WordRAM.ThreeSum.ChanHe.TraversalRoot

Complete native Chan–He traversal from a supplied root #

The finite 128-register program initializes its actual stack and constants, pushes the supplied seven-word root and executes the complete bounded traversal. Every emitted array is the existing finite node's oneArray, in preorder. The protected frontend prefix survives for later roots.

Main definitions #

Main results #

These native composition proofs are original. The initialized-input forest and global logarithmic-width/subquadratic-cost composition remain separate obligations.

Concrete caller obligations before the complete native root program initializes its stack.

Instances For
    theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Traversal.root_exec {a : Arena} {w : ℕ} (e : Entry) (ns : List (ℕ × ThreeSum.ChanHe.Node)) (x : WordRAM.Data 128) (ha : a.Separated) (hw : a.Ready w) (h : RootInput a w e ns x) :
    ∃ (out : List (ℕ × ThreeSum.ChanHe.Node)) (y : WordRAM.Data 128), WordRAM.ExecWithin (w + 2) oneRoot x y (rootTime e.fuel a.n a.m a.N) ∧ Cursor.Invariant a w (List.map Prod.snd ns ++ Math.Task.output a.m.primesLE a.Λ e.task) { pending := [], emitted := out } y ∧ List.map Prod.snd out = List.map Prod.snd ns ++ Math.Task.output a.m.primesLE a.Λ e.task ∧ (∀ p < a.stack, y.mem p = x.mem p) ∧ ∀ (i : Fin 128), 109 ≤ ↑i → y.regs i = x.regs i

    Execute the fixed complete native root program. There are no supplied kernel executions: all calls are proved from the actual arrays, bitmap, finite bounds and one signed envelope. The caller chooses m, Λ and fuel. Setting m = mPar n U, Λ = labelBits U and e.fuel = fuel n makes e.task.output (Nat.primesLE a.m) a.Λ the existing Chan–He reduction n U of the root sets; the initialized-input bridge is in PreprocessingEntries.