Samplinglib
Lean gate not recorded for this source state main · ed709a7f320d
Registry leaf card · pbps.actualBounceRate

actual_bounce_rate_energy_laws

compiled Samplinglib leaf Not mapped module/build coverage

Independent exactSCI74 d556a7550f0395d149720da6478bfdfff98368a7. All original six analytic callers, no new premise; actual zero-safe Borel bounce, continuous nonnegative rate, norm/involution/pairing and exact weighted SUM energy preservation, flipped-rate difference and pointwise same-energy-layer Lambda majorant. Internal beta-Lipschitz producer, rank0/alphaeta1/zero-energy/zero-normal legal. Actual clocks/path/nonexplosion/invariance/Markov/terminal kernel/main/errors/expected-query cost/composition and full Exposition/PURIFIED/main/live/Goal remain open.

Plain-English statement

Independent exactSCI74 d556a7550f0395d149720da6478bfdfff98368a7. All original six analytic callers, no new premise; actual zero-safe Borel bounce, continuous nonnegative rate, norm/involution/pairing and exact weighted SUM energy preservation, flipped-rate difference and pointwise same-energy-layer Lambda majorant. Internal beta-Lipschitz producer, rank0/alphaeta1/zero-energy/zero-normal legal. Actual clocks/path/nonexplosion/invariance/Markov/terminal kernel/main/errors/expected-query cost/composition and full Exposition/PURIFIED/main/live/Goal remain open.

Scope guard. This card records a compiled local declaration. Its mathematical scope is exactly the Lean statement below; the Registry note and source correspondence may describe motivation but do not strengthen it.
Lean learning studio · mathematics → formal proof

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.

BeginnerWhy this theorem exists → intuition → statement → one hand calculation. Hide proof-engineering detail.
RigorousExpose assumptions, hidden measure/limit/domain issues, proof route, and rigorous references.
Lean learnerOpen the exact declaration, proof tree/network, syntax glossary, and line-by-line explanation.

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.

Loading source-derived dependency evidence…

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.

  1. NameWhat reusable mathematical fact is being created?
  2. ParametersWhich symbols are arbitrary, and which structures are inferred by typeclass search?
  3. PropositionAfter the colon, translate the Lean expression back into a paper statement.
  4. 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 actual_bounce_rate_energy_laws
    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    {V : E → ℝ} {α β : ℝ≥0} {η : ℝ}
    (hα : 0 < (α : ℝ)) (hαβ : α ≤ β) (hV : ContDiff ℝ 2 V)
    (hH : ∀ x v : E,
      (α : ℝ) * ‖v‖ ^ 2 ≤ (fderiv ℝ (fderiv ℝ V) x v) v ∧
      (fderiv ℝ (fderiv ℝ V) x v) v ≤ (β : ℝ) * ‖v‖ ^ 2)
    (hη : 0 < η) (hβη : (β : ℝ) * η ≤ 1) :
    actual_bounce_rate_energy_statement hα hαβ hV hH hη hβη := by

  let c : E → E → E := fun y xRef => y - η • gradient V xRef
  let h : E → E → E := fun xRef x => gradient V x - gradient V xRef
  let R : E → E → E := fun n p => p - (2 * inner ℝ p n / ‖n‖ ^ 2) • n
  let S : E → (E × E) → (E × E) := fun xRef z => (z.1, R (h xRef z.1) z.2)
  let rate : E → (E × E) → ℝ := fun xRef z =>
    Real.sqrt η * max 0 (inner ℝ z.2 (h xRef z.1))
  let H : E → E → (E × E) → ℝ := fun y xRef z =>
    (η⁻¹ * ‖z.1 - c y xRef‖ ^ 2 + ‖z.2‖ ^ 2) / 2
  change
    Measurable (fun a : E × (E × E) => S a.1 a.2) ∧
    Continuous (fun a : E × (E × E) => rate a.1 a.2) ∧
    Measurable (fun a : E × (E × E) => rate a.1 a.2) ∧
    (∀ p : E, R 0 p = p) ∧
    (∀ n p : E, R n (R n p) = p ∧ ‖R n p‖ = ‖p‖ ∧
      inner ℝ (R n p) n = -inner ℝ p n) ∧
    (∀ xRef : E, ∀ z : E × E,
      (S xRef z).1 = z.1 ∧ S xRef (S xRef z) = z) ∧
    (∀ y xRef : E, ∀ z : E × E,
      H y xRef (S xRef z) = H y xRef z) ∧
    (∀ xRef : E, ∀ z : E × E, 0 ≤ rate xRef z ∧
      rate xRef (S xRef z) =
        Real.sqrt η * max 0 (-inner ℝ z.2 (h xRef z.1)) ∧
      rate xRef z - rate xRef (S xRef z) =
        Real.sqrt η * inner ℝ z.2 (h xRef z.1)) ∧
    (∀ xRef x p : E, h xRef x = 0 →
      S xRef (x,p) = (x,p) ∧ rate xRef (x,p) = 0) ∧
    (∀ y xRef : E, ∀ z₀ : E × E,
      0 ≤ H y xRef z₀ ∧
      ∀ z : E × E, H y xRef z = H y xRef z₀ →
        ‖z.2‖ ≤ Real.sqrt (2 * H y xRef z₀) ∧
        ‖z.1 - c y xRef‖ ≤ Real.sqrt (2 * η * H y xRef z₀) ∧
        rate xRef z ≤ Real.sqrt η * (β : ℝ) *
          Real.sqrt (2 * H y xRef z₀) *
          (Real.sqrt (2 * η * H y xRef z₀) + ‖c y xRef - xRef‖))
  letI : CompleteSpace E := FiniteDimensional.complete ℝ E
  have hLip : LipschitzWith β (gradient V) := by
    simpa using
      (AutoSamplingTheory.TechnicalLemmas.Analysis.QuadraticRegularization.strongConvexOn_and_lipschitzWith_gradient_add_quadratic
        (m := α) (L := β) (r := 0) hV hH (0 : E)).2
  have hgrad : Continuous (gradient V) := hLip.continuous
  have hRzero (p : E) : R 0 p = p := by simp [R]
  have hRreflect (n p : E) : R n p = (ℝ ∙ n)ᗮ.reflection p := by
    rw [Submodule.reflection_orthogonal_apply, Submodule.reflection_singleton_apply]
    simp only [two_smul, neg_sub]
    dsimp [R]
    simp only [div_eq_mul_inv, mul_smul]
    rw [real_inner_comm n p]
    module
  have hRlaws (n p : E) : R n (R n p) = p ∧ ‖R n p‖ = ‖p‖ ∧
      inner ℝ (R n p) n = -inner ℝ p n := by
    refine ⟨?_, ?_, ?_⟩
    · simp only [hRreflect, Submodule.reflection_reflection]
    · rw [hRreflect]; exact LinearIsometryEquiv.norm_map _ _
    · by_cases hn : n = 0
      · simp [hn]
      · have hn2 : ‖n‖ ^ 2 ≠ 0 := pow_ne_zero _ (norm_ne_zero_iff.mpr hn)
        dsimp [R]
        rw [inner_sub_left, real_inner_smul_left, real_inner_self_eq_norm_sq]
        field_simp [hn2] <;> ring
  have hSmeas : Measurable (fun a : E × (E × E) => S a.1 a.2) := by
    dsimp [S, R, h]
    fun_prop
  have hratecont : Continuous (fun a : E × (E × E) => rate a.1 a.2) := by
    dsimp [rate, h]
    fun_prop
  have hSlaws (xRef : E) (z : E × E) :
      (S xRef z).1 = z.1 ∧ S xRef (S xRef z) = z := by
    refine ⟨rfl, ?_⟩
    exact Prod.ext rfl (hRlaws (h xRef z.1) z.2).1
  have hHbounce (y xRef : E) (z : E × E) : H y xRef (S xRef z) = H y xRef z := by
    dsimp [H, S]
    rw [(hRlaws (h xRef z.1) z.2).2.1]
  have hrateflip (xRef : E) (z : E × E) :
      rate xRef (S xRef z) = Real.sqrt η * max 0 (-inner ℝ z.2 (h xRef z.1)) := by
    dsimp [rate, S]
    rw [(hRlaws (h xRef z.1) z.2).2.2]
  have hratelaws (xRef : E) (z : E × E) : 0 ≤ rate xRef z ∧
      rate xRef (S xRef z) = Real.sqrt η * max 0 (-inner ℝ z.2 (h xRef z.1)) ∧
      rate xRef z - rate xRef (S xRef z) = Real.sqrt η * inner ℝ z.2 (h xRef z.1) := by
    refine ⟨mul_nonneg (Real.sqrt_nonneg _) (le_max_left _ _), hrateflip xRef z, ?_⟩
    rw [hrateflip]
    dsimp [rate]
    by_cases hi : 0 ≤ inner ℝ z.2 (h xRef z.1)
    · rw [max_eq_right hi, max_eq_left (by linarith)]
      ring
    · rw [max_eq_left (le_of_not_ge hi), max_eq_right (by linarith)]
      ring
  have hzero (xRef x p : E) (hh : h xRef x = 0) :
      S xRef (x,p) = (x,p) ∧ rate xRef (x,p) = 0 := by
    simp [S, rate, hh, hRzero]
  have hHnonneg (y xRef : E) (z : E × E) : 0 ≤ H y xRef z := by
    exact div_nonneg (add_nonneg (mul_nonneg (inv_nonneg.mpr hη.le) (sq_nonneg _))
      (sq_nonneg _)) (by norm_num)
  refine ⟨hSmeas, hratecont, hratecont.measurable, hRzero, hRlaws,
    hSlaws, hHbounce, hratelaws, hzero, ?_⟩
  intro y xRef z₀
  refine ⟨hHnonneg y xRef z₀, ?_⟩
  intro z heq
  have hsum : η⁻¹ * ‖z.1 - c y xRef‖ ^ 2 + ‖z.2‖ ^ 2 = 2 * H y xRef z₀ := by
    change (η⁻¹ * ‖z.1 - c y xRef‖ ^ 2 + ‖z.2‖ ^ 2) / 2 = _ at heq
    linarith
  have hp2 : ‖z.2‖ ^ 2 ≤ 2 * H y xRef z₀ := by
    have := mul_nonneg (inv_nonneg.mpr hη.le) (sq_nonneg ‖z.1 - c y xRef‖)
    linarith
  have hxweighted : η⁻¹ * ‖z.1 - c y xRef‖ ^ 2 ≤ 2 * H y xRef z₀ := by
    nlinarith [sq_nonneg ‖z.2‖]
  have hx2 : ‖z.1 - c y xRef‖ ^ 2 ≤ 2 * η * H y xRef z₀ := by
    calc
      ‖z.1 - c y xRef‖ ^ 2 = η * (η⁻¹ * ‖z.1 - c y xRef‖ ^ 2) := by
        rw [← mul_assoc, mul_inv_cancel₀ (ne_of_gt hη), one_mul]
      _ ≤ η * (2 * H y xRef z₀) := mul_le_mul_of_nonneg_left hxweighted hη.le
      _ = _ := by ring
  have hp : ‖z.2‖ ≤ Real.sqrt (2 * H y xRef z₀) := Real.le_sqrt_of_sq_le hp2
  have hx : ‖z.1 - c y xRef‖ ≤ Real.sqrt (2 * η * H y xRef z₀) :=
    Real.le_sqrt_of_sq_le hx2
  refine ⟨hp, hx, ?_⟩
  have htriangle : ‖z.1 - xRef‖ ≤ ‖z.1 - c y xRef‖ + ‖c y xRef - xRef‖ := by
    calc
      ‖z.1 - xRef‖ = ‖(z.1 - c y xRef) + (c y xRef - xRef)‖ := by
        congr 1
        abel
      _ ≤ _ := norm_add_le _ _
  have hnormal : ‖h xRef z.1‖ ≤ (β : ℝ) *
      (Real.sqrt (2 * η * H y xRef z₀) + ‖c y xRef - xRef‖) := by
    calc
      ‖h xRef z.1‖ ≤ (β : ℝ) * ‖z.1 - xRef‖ := hLip.norm_sub_le z.1 xRef
      _ ≤ _ := mul_le_mul_of_nonneg_left (htriangle.trans (add_le_add hx le_rfl)) β.coe_nonneg
  have hpair : max 0 (inner ℝ z.2 (h xRef z.1)) ≤ ‖z.2‖ * ‖h xRef z.1‖ :=
    max_le (mul_nonneg (norm_nonneg _) (norm_nonneg _)) (real_inner_le_norm _ _)
  calc
    rate xRef z ≤ Real.sqrt η * (‖z.2‖ * ‖h xRef z.1‖) :=
      mul_le_mul_of_nonneg_left hpair (Real.sqrt_nonneg _)
    _ ≤ Real.sqrt η * (Real.sqrt (2 * H y xRef z₀) *
        ((β : ℝ) * (Real.sqrt (2 * η * H y xRef z₀) + ‖c y xRef - xRef‖))) :=
      mul_le_mul_of_nonneg_left
        (mul_le_mul hp hnormal (norm_nonneg _) (Real.sqrt_nonneg _)) (Real.sqrt_nonneg _)
    _ = _ := by ring

end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualBounceRate

Proof architecture

PBPS consumer; no SALD admission

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.
  • `calc` records an equality or inequality chain matching a paper calculation.
  • `rw` rewrites by an established identity.
  • `simp` normalizes through registered definitional and theorem rewrites.
  • `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

  • Measurability is represented explicitly or must be supplied by a dependency.
  • Totalized `fderiv` values must not be read as a differentiability theorem.
  • Almost-everywhere hypotheses depend on the stated measure and representative.
Common pitfall. A wrapper or display identity is not a new analytic theorem merely because it has its own Lean name. Check the statement, hypotheses, and downstream consumers before interpreting its mathematical contribution.