Plain-English statement
- A rounded logarithmic horizon gives actual restart accuracy and explicit cost, including zero rounds; budget absorption and small-error order are conditional.
Read the mathematics first, then descend into Lean
You do not need to know Lean before opening this panel. The page keeps the paper-level theorem, rigorous proof obligations, exact Lean declaration, and proof dependencies as separate layers so a first-time reader can move down one layer at a time.
Proof architecture
Start with the tree when learning: prerequisites sit below the theorem and downstream results sit above it. Switch to the network when you want to understand where this declaration lives in the local formal library. Every mapped node is clickable.
Graph rule: only dependencies found by the ASTIS source scan are drawn. Missing tactic indirection is treated as an under-approximation; the site never invents an edge just to make a prettier graph.
How to read the exact Lean declaration
Read a Lean theorem left-to-right exactly as you would unpack a mathematical sentence: name → ambient types → automatically inferred structures → explicit hypotheses → conclusion → proof. Then read the proof top-to-bottom as transformations of the current goal.
- NameWhat reusable mathematical fact is being created?
- ParametersWhich symbols are arbitrary, and which structures are inferred by typeclass search?
- PropositionAfter the colon, translate the Lean expression back into a paper statement.
- Proof actionsAfter
by, ask what each tactic does to the mathematical goal—not only what syntax it uses.
Syntax used on this page
This glossary is filtered to syntax that actually occurs in the declaration above. Open a symbol only when you meet it, rather than memorizing Lean grammar in advance.
Source voice and ASTIS voice stay separate
When Samplinglib shows a short quotation from Chewi, it is labeled as a source excerpt and linked to the canonical book page. Intuition, expanded proof steps, hidden regularity assumptions, and Lean explanations are ASTIS-authored commentary. A quotation never substitutes for a formal proof, and an ASTIS explanation is never attributed to the textbook author.
Lean statement
theorem logarithmic_accuracy_and_cost {f : E → ℝ} {α β R ε : ℝ}
(hf : ContDiff ℝ 1 f) (hsc : StrongConvexOn univ α f)
(hα : 0 < α) (hβ : 0 < β) (hR : 0 < R) (hε : 0 < ε)
{z x₀ : E} (hmin : IsMinOn f univ z) (hx₀ : ‖x₀-z‖ ≤ R)
(A : E → ℝ → ℝ → E × ℕ) (φ : ℝ → ℕ)
(hA : ∀ y r δ, 0 < r → 0 < δ → ‖y-z‖ ≤ r →
f (A y r δ).1 - f z ≤ δ ∧ (A y r δ).2 ≤ φ (β*r^2/δ)) :
let L := Real.log (α*R^2/ε) / Real.log 4
let N := ⌈L⌉₊
let r := fun k : ℕ => R / (2:ℝ)^k
let run : ℕ → E × ℕ := Nat.rec (x₀, 0) (fun k p =>
let w := A p.1 (r k) (α*(r k)^2/8)
(w.1, p.2 + w.2))
let last := A (run N).1 (Real.sqrt (ε/α)) ε
let C := (run N).2 + last.2
(N : ℝ) ≤ max 0 L + 1 ∧ (N = 0 ↔ α*R^2 ≤ ε) ∧
‖(run N).1-z‖ ≤ r N ∧ f last.1 - f z ≤ ε ∧
C ≤ N * φ (8*(β/α)) + φ (β/α) ∧
(C : ℝ) ≤ (max 0 L + 1) * φ (8*(β/α)) + φ (β/α) ∧
(φ (β/α) ≤ φ (8*(β/α)) →
(C : ℝ) ≤ (max 0 L + 2) * φ (8*(β/α)) ∧
(4 ≤ α*R^2/ε → (C : ℝ) ≤ 3*L*φ (8*(β/α)))) := by
let L := Real.log (α*R^2/ε) / Real.log 4
let N := ⌈L⌉₊
have hlog : 0 < Real.log 4 := Real.log_pos (by norm_num)
have hq : 0 < α*R^2/ε := by positivity
have hround : (N : ℝ) ≤ max 0 L + 1 := by
by_cases hL : 0 ≤ L
· exact (Nat.ceil_lt_add_one hL).le.trans (by rw [max_eq_right hL])
· have hz : N = 0 := Nat.ceil_eq_zero.mpr (le_of_not_ge hL)
rw [hz, Nat.cast_zero, max_eq_left (le_of_not_ge hL)]
norm_num
have hzero : N = 0 ↔ α*R^2 ≤ ε := by
change ⌈Real.log (α*R^2/ε) / Real.log 4⌉₊ = 0 ↔ _
rw [Nat.ceil_eq_zero, div_le_iff₀ hlog, zero_mul]
rw [← Real.log_one, Real.log_le_log_iff hq (by norm_num)]
exact (div_le_iff₀ hε).trans (by simp)
have hpow : α*R^2/ε ≤ (4:ℝ)^N := by
apply (Real.log_le_log_iff hq (by positivity)).mp
rw [Real.log_pow]
exact (div_le_iff₀ hlog).mp (Nat.le_ceil L)
have hid : ((2:ℝ)^N)^2 = (4:ℝ)^N := by
rw [← pow_mul, Nat.mul_comm N 2, pow_mul]
norm_num
have hN : α*(R/(2:ℝ)^N)^2 ≤ ε := by
rw [div_pow, ← mul_div_assoc, hid]
apply (div_le_iff₀ (by positivity : 0 < (4:ℝ)^N)).mpr
have h := (div_le_iff₀ hε).mp hpow
nlinarith
have hb := RestartReduction.radius_accuracy_and_cost hf hsc hα hβ hR hε
hmin hx₀ A φ hA N hN
let r := fun k : ℕ => R / (2:ℝ)^k
let run : ℕ → E × ℕ := Nat.rec (x₀, 0) (fun k p =>
let w := A p.1 (r k) (α*(r k)^2/8)
(w.1, p.2 + w.2))
let last := A (run N).1 (Real.sqrt (ε/α)) ε
let C := (run N).2 + last.2
have hcast : (C : ℝ) ≤ (N : ℝ) * φ (8*(β/α)) + φ (β/α) := by
have hc : C ≤ N * φ (8*(β/α)) + φ (β/α) := hb.2.2.2
simpa only [Nat.cast_add, Nat.cast_mul] using ((Nat.cast_le (α := ℝ)).mpr hc)
have hm : (N : ℝ) * φ (8*(β/α)) ≤
(max 0 L + 1) * φ (8*(β/α)) :=
mul_le_mul_of_nonneg_right hround (Nat.cast_nonneg _)
have hreal : (C : ℝ) ≤ (max 0 L + 1) * φ (8*(β/α)) + φ (β/α) := by
linarith
refine ⟨hround, hzero, hb.1, hb.2.2.1, hb.2.2.2, hreal, ?_⟩
intro hφ
have hp : (φ (β/α) : ℝ) ≤ φ (8*(β/α)) := by exact_mod_cast hφ
have ha : (C : ℝ) ≤ (max 0 L + 2) * φ (8*(β/α)) := by nlinarith
refine ⟨ha, ?_⟩
intro hsmall
have hL : 1 ≤ L := by
apply (le_div_iff₀ hlog).mpr
simpa using (Real.log_le_log (by norm_num : (0:ℝ)<4) hsmall)
rw [max_eq_right (by linarith : 0 ≤ L)] at ha
have hfactor : L+2 ≤ 3*L := by linarith
exact ha.trans (mul_le_mul_of_nonneg_right hfactor (Nat.cast_nonneg _))
end AutoSamplingTheory.TechnicalLemmas.Analysis.RestartLogComplexity
Open AutoSamplingTheory/TechnicalLemmas/Analysis/RestartLogComplexity.lean:22published source at 0e31a3cda412
Proof architecture
Actual logarithmic restart horizon, final accuracy and explicit certified call-cost bounds.
Lean proof walkthrough
- Read the quantified variables and typeclass brackets as part of the mathematical statement; inferred arguments are not missing assumptions.
- `intro` introduces quantified hypotheses into the local proof context.
- `have` creates a named intermediate mathematical fact.
- `rw` rewrites by an established identity.
- `simp` normalizes through registered definitional and theorem rewrites.
- `apply` reduces the goal to the hypotheses of a reusable theorem.
- `refine` instantiates a reusable theorem while leaving explicit subgoals.
- `exact` closes the current goal with an already typed term.
Why the statement has this shape
The declaration is kept at the reusable level recorded by its Registry tags and direct consumers. Explicit measures, spaces, wrappers, and regularity hypotheses expose interfaces that paper notation often infers. A theorem card explains those interfaces but never widens the compiled statement.
Hidden assumptions and non-claims
- No additional hidden-contract keyword was inferred; the exact Lean hypotheses remain controlling.