A concurrent binary countdown leaves only a digit-sized scan remainder
ProvedPvsNP.binary_countdown_ticks_near_budgetcomplexity-theoryformal-verification
A carry-count function begins at zero at depth zero and otherwise counts the multiples of two plus the carry count of the halved number at one smaller depth. If floor(budget/3) fits in the given binary depth, the countdown clock on that value is at most the budget and leaves at most twice the depth plus two steps.
Preamble
import Lean.Elab.Tactic.Omega import Mathlib.Data.Nat.Basic set_option autoImplicit false
Formal statement
theorem PvsNP.binary_countdown_ticks_near_budget (carryCount : ℕ → ℕ → ℕ)
(zero : ∀ value, carryCount 0 value = 0)
(step : ∀ depth value, carryCount (depth + 1) value =
value / 2 + carryCount depth (value / 2))
(depth budget : ℕ) (fits : budget / 3 < 2 ^ depth) :
let steps := budget / 3 + 2 * carryCount depth (budget / 3)
steps ≤ budget ∧ budget - steps ≤ 2 * depth + 2 := by sorrySource
Arithmetic for the binary countdown used by a single-work-head sampler.