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

actual_bounded_test_expectation_continuity

compiled Samplinglib leaf Not mapped module/build coverage

- Actual PBPS bounded real tests are integrable; their clock expectations obey the explicit2M first-event defect estimate and converge to the initial value. This is the source Ex22 pointwise prerequisite, not its full L2 extension.

Plain-English statement

- Actual PBPS bounded real tests are integrable; their clock expectations obey the explicit2M first-event defect estimate and converge to the initial value. This is the source Ex22 pointwise prerequisite, not its full L2 extension.

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_bounded_test_expectation_continuity
    {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_bounded_test_expectation_continuity_statement hα hαβ hV hH hη hβη := by
  classical
  let P : Measure (ℕ → ℝ) := Measure.infinitePi (fun _ : ℕ => expMeasure (1 : ℝ))
  let c : E → E → E := fun y xRef => y - η • gradient V xRef
  let Φ : E → E → ℝ → (E × E) → (E × E) := fun y xRef t z =>
    (c y xRef + Real.cos t • (z.1 - c y xRef) +
        (Real.sqrt η * Real.sin t) • z.2,
     (-Real.sin t / Real.sqrt η) • (z.1 - c y xRef) + Real.cos t • z.2)
  let rate : E → (E × E) → ℝ := fun xRef z =>
    Real.sqrt η * max 0 (inner ℝ z.2 (gradient V z.1 - gradient V xRef))
  let Λ : E → E → (E × E) → ℝ≥0 → ℝ := fun y xRef z t =>
    ∫ s in (0 : ℝ)..(t : ℝ), rate xRef (Φ y xRef s z)
  obtain ⟨Z, hZM, hcovered, hfallback, hAE, hshort⟩ :=
    ActualSmallTimeContinuity.actual_small_time_stochastic_continuity
      hα hαβ hV hH hη hβη
  have hclock := ActualHazardClock.actual_integrated_hazard_clock_laws
    hα hαβ hV hH hη hβη
  have hΛC := hclock.1
  have hΛbasic := hclock.2.2.2.1
  have hflow := ActualHarmonicFlow.actual_harmonic_flow_laws hα hαβ hV hH hη hβη
  have hΦC := hflow.1
  have hΦ0 := hflow.2.2.1
  have hinput :=
    AutoSamplingTheory.TechnicalLemmas.Probability.UnitExponentialProduct.unit_exponential_product_laws
  let : IsProbabilityMeasure P := hinput.1
  refine ⟨Z, hZM, hcovered, hfallback, hAE, hshort, ?_⟩
  intro y xRef z₀ f hf M hM hbound
  have hZtM (t : ℝ≥0) : Measurable (Z y xRef z₀ t) := by
    have hargs : Measurable (fun sample : ℕ → ℝ => (((y, xRef), z₀), t, sample)) :=
      measurable_const.prodMk (measurable_const.prodMk measurable_id)
    exact hZM.comp hargs
  have hfM (t : ℝ≥0) : Measurable (fun sample : ℕ → ℝ => f (Z y xRef z₀ t sample)) :=
    hf.measurable.comp (hZtM t)
  have hfi (t : ℝ≥0) : Integrable (fun sample : ℕ → ℝ => f (Z y xRef z₀ t sample)) P := by
    apply Integrable.of_bound (hfM t).aestronglyMeasurable M
    exact Filter.Eventually.of_forall fun sample => by
      simpa only [Real.norm_eq_abs] using hbound (Z y xRef z₀ t sample)
  have hestimate (t : ℝ≥0) :
      |(∫ sample, f (Z y xRef z₀ t sample) ∂P) - f (Φ y xRef (t : ℝ) z₀)| ≤
        2 * M * (1 - Real.exp (-Λ y xRef z₀ t)) := by
    let D : Set (ℕ → ℝ) := {sample | Z y xRef z₀ t sample ≠ Φ y xRef (t : ℝ) z₀}
    have hDM : MeasurableSet D := ((hshort y xRef z₀).1 t).1
    have hbi : Integrable (D.indicator (fun _ : ℕ → ℝ => 2 * M)) P :=
      (integrable_const (2 * M)).indicator hDM
    have hpoint (sample : ℕ → ℝ) :
        ‖f (Z y xRef z₀ t sample) - f (Φ y xRef (t : ℝ) z₀)‖ ≤
          D.indicator (fun _ : ℕ → ℝ => 2 * M) sample := by
      by_cases hd : sample ∈ D
      · rw [Set.indicator_of_mem hd]
        calc
          ‖f (Z y xRef z₀ t sample) - f (Φ y xRef (t : ℝ) z₀)‖ ≤
              ‖f (Z y xRef z₀ t sample)‖ + ‖f (Φ y xRef (t : ℝ) z₀)‖ := norm_sub_le _ _
          _ ≤ M + M := add_le_add
            (by simpa only [Real.norm_eq_abs] using hbound (Z y xRef z₀ t sample))
            (by simpa only [Real.norm_eq_abs] using hbound (Φ y xRef (t : ℝ) z₀))
          _ = 2 * M := by ring
      · have he : Z y xRef z₀ t sample = Φ y xRef (t : ℝ) z₀ := not_ne_iff.mp hd
        simp only [Set.indicator_of_notMem hd, he, sub_self, norm_zero, le_refl]
    have hnorm := norm_integral_le_of_norm_le hbi (Filter.Eventually.of_forall hpoint)
    have hdiff : (∫ sample, f (Z y xRef z₀ t sample) - f (Φ y xRef (t : ℝ) z₀) ∂P) =
        (∫ sample, f (Z y xRef z₀ t sample) ∂P) - f (Φ y xRef (t : ℝ) z₀) := by
      rw [integral_sub (hfi t) (integrable_const _)]
      simp only [integral_const, probReal_univ, one_smul]
    calc
      |(∫ sample, f (Z y xRef z₀ t sample) ∂P) - f (Φ y xRef (t : ℝ) z₀)| =
          ‖∫ sample, f (Z y xRef z₀ t sample) - f (Φ y xRef (t : ℝ) z₀) ∂P‖ := by
        rw [hdiff, Real.norm_eq_abs]
      _ ≤ ∫ sample, D.indicator (fun _ : ℕ → ℝ => 2 * M) sample ∂P := hnorm
      _ = 2 * M * P.real D := by
        rw [integral_indicator_const _ hDM, smul_eq_mul, mul_comm]
      _ ≤ 2 * M * (1 - Real.exp (-Λ y xRef z₀ t)) :=
        mul_le_mul_of_nonneg_left (((hshort y xRef z₀).1 t).2) (by positivity)
  refine ⟨fun t => ⟨hfM t, hfi t, hestimate t⟩, ?_⟩
  have hφ : Continuous (fun t : ℝ≥0 => Φ y xRef (t : ℝ) z₀) := by
    have hargs : Continuous (fun t : ℝ≥0 => ((y, xRef), (t : ℝ), z₀)) :=
      continuous_const.prodMk (continuous_subtype_val.prodMk continuous_const)
    exact hΦC.comp hargs
  have hφlimit : Tendsto (fun t : ℝ≥0 => f (Φ y xRef (t : ℝ) z₀))
      (𝓝 0) (𝓝 (f z₀)) := by
    have hzero : Φ y xRef 0 z₀ = z₀ := hΦ0 y xRef z₀
    have hc : Continuous (fun t : ℝ≥0 => f (Φ y xRef (t : ℝ) z₀)) := hf.comp hφ
    simpa only [NNReal.coe_zero, hzero] using hc.tendsto (0 : ℝ≥0)
  have hLambdaCont : Continuous (Λ y xRef z₀) := by
    have hargs : Continuous (fun t : ℝ≥0 => (((y, xRef), z₀), t)) :=
      continuous_const.prodMk continuous_id
    exact hΛC.comp hargs
  have hbzero : Tendsto (fun t : ℝ≥0 => 1 - Real.exp (-Λ y xRef z₀ t))
      (𝓝 0) (𝓝 0) := by
    have hzero : Λ y xRef z₀ 0 = 0 := (hΛbasic y xRef z₀).1
    have he : Tendsto (fun t : ℝ≥0 => Real.exp (-Λ y xRef z₀ t)) (𝓝 0)
        (𝓝 (Real.exp (-Λ y xRef z₀ 0))) :=
      (Real.continuous_exp.tendsto _).comp ((hLambdaCont.tendsto 0).neg)
    simpa only [hzero, neg_zero, Real.exp_zero, sub_self] using
      (show Tendsto (fun t : ℝ≥0 => 1 - Real.exp (-Λ y xRef z₀ t)) (𝓝 0)
        (𝓝 (1 - Real.exp (-Λ y xRef z₀ 0))) from tendsto_const_nhds.sub he)
  have hscaled : Tendsto (fun t : ℝ≥0 => 2 * M * (1 - Real.exp (-Λ y xRef z₀ t)))
      (𝓝 0) (𝓝 0) := by
    simpa only [mul_zero] using
      (show Tendsto (fun _ : ℝ≥0 => 2 * M) (𝓝 0) (𝓝 (2 * M)) from
        tendsto_const_nhds).mul hbzero
  have habs : Tendsto (fun t : ℝ≥0 =>
      |(∫ sample, f (Z y xRef z₀ t sample) ∂P) - f (Φ y xRef (t : ℝ) z₀)|)
      (𝓝 0) (𝓝 0) :=
    tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hscaled
      (fun _ => abs_nonneg _) hestimate
  have hdiffzero : Tendsto (fun t : ℝ≥0 =>
      (∫ sample, f (Z y xRef z₀ t sample) ∂P) - f (Φ y xRef (t : ℝ) z₀))
      (𝓝 0) (𝓝 0) := by
    apply tendsto_zero_iff_norm_tendsto_zero.mpr
    simpa only [Real.norm_eq_abs] using habs
  simpa only [sub_add_cancel, zero_add] using hdiffzero.add hφlimit

end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualBoundedTestContinuity

Proof architecture

Source Ex22 pointwise clock-expectation ingredient; no SALD claim

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.
  • `apply` reduces the goal to the hypotheses of a reusable theorem.
  • `refine` instantiates a reusable theorem while leaving explicit subgoals.

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.
  • Integrability is an input or proved output; a displayed integral alone does not supply it.
  • Totalized `fderiv` values must not be read as a differentiability theorem.
  • Almost-everywhere hypotheses depend on the stated measure and representative.
  • Density statements retain normalization and absolute-continuity prerequisites.
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.