down_scale
def
Downward rounding down_θ(z) to the nearest scale in R_θ bounded by z: 0 if z ≤ 0, and 2^{θ + ⌊log₂ z - θ⌋} if z > 0.
Statement
noncomputable def down_scale (θ : ℝ) (z : ℝ) : ℝ
- Defined in
- arXiv:2611.17090, Section 3.1, Eq. (1)
- Verified
- 15 Nov 2026
- Axioms
- none listed
- Used by 1
- prefix_scale_weightThe accumulated weight W_θ(r) = ∑_{e ∈ E, down_θ(w_e) ≤ r} w_e of edges whose rounded length is at most r.
Read back from the Lean
The function down_scale takes two real parameters $\theta$ and $z$ and returns the real number defined by: if $z \le 0$, then $0$; otherwise (when $z > 0$), $2^{\theta + \lfloor \log_2(z) - \theta \rfloor}$, where $\log_2$ is the base-2 logarithm and $\lfloor \cdot \rfloor$ is the floor function coerced to a real number.
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
/-- Downward rounding of a positive real to the nearest shifted dyadic scale in R_θ. -/ noncomputable def down_scale (θ : ℝ) (z : ℝ) : ℝ := if z ≤ 0 then 0 else (2 : ℝ) ^ (θ + (⌊Real.logb 2 z - θ⌋ : ℝ))