Documentation

CslibFrontier.Algorithms.WordRAM.ExactTriangle.CountPrime.TimeBound

Charged subcubic native modular-counter time #

The actual initialized execution, including halt, is bounded by a quadratic polynomial in the runtime cyclic length p times seven to the computed ceiling-logarithmic matrix depth. The real-power consequence has n exponent 2.81, strictly below three. Dependence on p remains explicit; this does not claim subcubic time after arbitrary growth of p with n, nor complete prime selection or the full ExactTriangle/3SUM endpoint.

All constants bound the proved native execution. They do not inherit the Light machine's ring-operation constants from the pinned source.

Every actual initialized setup, memory/coefficient operation, recursion, scan and halt fits this native seven-to-depth budget.

A simple quadratic p envelope for the complete actual initialized instruction charge.

theorem Cslib.Algorithms.WordRAM.ExactTriangle.CountPrime.cost_le_subcubic (n p : ℕ) :
↑(cost n p + 10) ≤ 3704 * (↑p + 1) ^ 2 * (↑n + 1) ^ (281 / 100)

The actual initialized native counter has subcubic n exponent 2.81 and quadratic p factor, with every ring coefficient operation charged. The bound includes the final halt.