AFTD Auto-Formalizing Theoretical Domains

descending_band_cost

deforiginal

For integers $d \in \mathbb{Z}$ and $r, L \in \mathbb{N}$, the descending band cost descending_band_cost d r L is the infimum over all integer shifts $t \in \mathbb{Z}$ of the average absolute distance from elements of the descending band set $A = A_{d,r,L}$ to $t$, namely $\frac{1}{|A|} \sum_{a \in A} |a - t|$.

Statement

noncomputable def descending_band_cost (d : ℤ) (r L : ℕ) : ℝ
Related work
knowledgebase, OP-1702
Verified
14 Nov 2026
Axioms
none listed
Built on 1
  • descending_band_setFor an integer d and positive integers r ≤ L, the descending band set A_{r,L} is the union over j from 0 to r-1 of the integer intervals…
Used by 2
  • descending_band_pointsFor an integer d, descending_band_points d is the set of all pairs (descending_band_cost d r L, descending_band_vulnerability d r L) in ℝ…
  • descending_band_point_memFor any integer d and natural numbers r and L with 1 ≤ r and r ≤ L, the pair (descending_band_cost d r L, descending_band_vulnerability d…

Read back from the Lean

descending_band_cost d r L is defined as the infimum over all integers t : ℤ of the average absolute distance from elements of A to t, given by (1 / |A|) * ∑ a ∈ A, |(a : ℝ) - (t : ℝ)|, where A is descending_band_set d r L.

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

/-- Optimal integer shift centering cost C_{r,L} of descending band set A_{r,L} -/
noncomputable def descending_band_cost (d : ℤ) (r L : ℕ) : ℝ := let A := descending_band_set d r L; ⨅ t : ℤ, (1 / (A.card : ℝ)) * ∑ a ∈ A, |(a : ℝ) - (t : ℝ)|
See it in the graphDiscuss this resultChallenge it