Dyadic order for Antihydra odd-run budgets
DefinitionAntihydraTwoOrderantihydrabusy-beavernumber-theory
For a positive natural number , let be the number of successive exact divisions by before an odd number is reached. The function Antihydra.twoOrder computes this number recursively, and assigns the value at .
For the Antihydra map , the quantity measures the length of the upcoming run of odd states when . This definition supplies the arithmetic reserve used in an odd-run reduction of the counter conjecture.
Definition code
import Lean.Elab.Tactic.Omega namespace Antihydra /-- The exponent of 2 dividing a positive natural number; zero at 0. -/ def twoOrder (n : Nat) : Nat := if n = 0 then 0 else if n % 2 = 0 then twoOrder (n / 2) + 1 else 0 termination_by n decreasing_by omega end Antihydra
Source