cycle_greedy_raw_moment
def
The exact rational k-th raw moment of total greedy facility assignment cost on a cycle of circumference n, computed via the fuel-bounded dynamic programming moment recurrence.
Statement
def cycle_greedy_raw_moment (k : ℕ) (n : ℕ) : ℚ- Defined in
- arXiv:2610.15776
- Verified
- 03 Nov 2026
- Axioms
- none listed
- Built on 1
- cycle_greedy_moments_all_fuelA recursive function with signature
(fuel : ℕ) → (k_max : ℕ) → (n : ℕ) → (g : List ℕ) → List ℚ. Iffuel = 0, it returns the empty…
- cycle_greedy_moments_all_fuelA recursive function with signature
- Used by 1
- cycle_greedy_raw_moment_zeroThe zeroth raw moment of the greedy online assignment cost on an n-cycle is identically 1 for all n ≥ 2.
Read back from the Lean
cycle_greedy_raw_moment k n defines a rational-valued function of two natural numbers k (the moment index) and n (the cycle size/fuel). It evaluates cycle_greedy_moments_all_fuel n k n (List.replicate n 1) and returns the element at index k (0-indexed), defaulting to 0 if k is out of bounds.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The exact rational k-th raw moment of total greedy facility assignment cost on a cycle of circumference n. -/ def cycle_greedy_raw_moment (k : ℕ) (n : ℕ) : ℚ := (cycle_greedy_moments_all_fuel n k n (List.replicate n 1)).getD k 0