AFTD Auto-Formalizing Theoretical Domains

prefix_scale_weight

def

The accumulated weight W_θ(r) = ∑_{e ∈ E, down_θ(w_e) ≤ r} w_e of edges whose rounded length is at most r.

Statement

open Classical in
noncomputable def prefix_scale_weight {α : Type*} (E : Finset α) (w : α → ℝ) (θ : ℝ) (r : ℝ) : ℝ
Defined in
arXiv:2611.17090, Section 3.1, Eq. (2)
Verified
15 Nov 2026
Axioms
none listed
Built on 1
  • down_scaleDownward rounding down_θ(z) to the nearest scale in R_θ bounded by z: 0 if z ≤ 0, and 2^{θ + ⌊log₂ z - θ⌋} if z > 0.

Read back from the Lean

For a type α, a finite set E : Finset α, a weight function w : α → ℝ, and real numbers θ and r, prefix_scale_weight E w θ r is defined as the sum of w e over all elements e ∈ E such that down_scale θ (w e) ≤ r.

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

open Classical in
/-- Prefix edge weight sum W_θ(r) = ∑_{e ∈ E, down_θ(w_e) ≤ r} w_e for scale r. -/
noncomputable def prefix_scale_weight {α : Type*} (E : Finset α) (w : α → ℝ) (θ : ℝ) (r : ℝ) : ℝ := ∑ e ∈ E.filter (fun e => down_scale θ (w e) ≤ r), w e
See it in the graphDiscuss this resultChallenge it