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

actual_phase_gibbs_normalization

compiled Samplinglib leaf Not mapped module/build coverage

- Positive finite normalization and exact product-law identification for the actual target phase energy. Integrability and all density identities are derived internally; no normalizer or minimizer is an additional hypothesis.

Plain-English statement

- Positive finite normalization and exact product-law identification for the actual target phase energy. Integrability and all density identities are derived internally; no normalizer or minimizer is an additional hypothesis.

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_phase_gibbs_normalization
    {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_phase_normalization_statement hα hαβ hV hH hη hβη := by

  dsimp only [actual_phase_normalization_statement]
  intro y
  let Vy : E → ℝ := fun x => V x + ‖x - y‖ ^ 2 / (2 * η)
  let U : E × E → ℝ := fun z => V z.1 + ‖z.1 - y‖ ^ 2 / (2 * η) + ‖z.2‖ ^ 2 / 2
  let f : E → ℝ := fun x => Real.exp (-Vy x)
  let g : E → ℝ := fun p => Real.exp (-‖p‖ ^ 2 / 2)
  let C : ℝ := (Real.sqrt (2 * Real.pi)) ^ Module.finrank ℝ E
  let Z : ℝ := ∫ x, f x ∂(volume : Measure E)
  let ell : Measure (E × E) := (volume : Measure E).prod (volume : Measure E)
  let Zp : ℝ≥0∞ := ∫⁻ z, ENNReal.ofReal (Real.exp (-U z)) ∂ell
  change Integrable f volume ∧ 0 < Z ∧ Zp = ENNReal.ofReal (Z * C) ∧
    0 < Zp ∧ Zp < ⊤ ∧
    IsProbabilityMeasure (ell.withDensity (fun z => Zp⁻¹ * ENNReal.ofReal (Real.exp (-U z)))) ∧
    ell.withDensity (fun z => Zp⁻¹ * ENNReal.ofReal (Real.exp (-U z))) =
      ((volume : Measure E).tilted (fun x => -Vy x)).prod (stdGaussian E)
  have hsc := AutoSamplingTheory.TechnicalLemmas.Analysis.HessianStrongConvexity.strongConvexOn_univ_of_fderiv2_lower hV (fun x v => (hH x v).1)
  have hbase := AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexGibbsIntegrability.integrable_exp_neg_of_strongConvexOn hα (hV.differentiable (by norm_num)) hsc
  have hVy : Continuous Vy := hV.continuous.add (((continuous_id.sub continuous_const).norm.pow 2).div_const (2 * η))
  have hfc : Continuous f := Real.continuous_exp.comp hVy.neg
  have hgc : Continuous g := Real.continuous_exp.comp ((continuous_norm.pow 2).neg.div_const 2)
  have hf : Integrable f (volume : Measure E) := by
    refine hbase.mono' hfc.aestronglyMeasurable ?_
    filter_upwards with x
    rw [Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)]
    apply Real.exp_le_exp.mpr
    dsimp [Vy]
    have : 0 ≤ ‖x - y‖ ^ 2 / (2 * η) := by positivity
    linarith
  have hZ : 0 < Z := integral_exp_pos hf
  have hC : 0 < C := by dsimp [C]; positivity
  have hCg : (∫⁻ p : E, ENNReal.ofReal (g p) ∂volume) = ENNReal.ofReal C := by
    have h := AutoSamplingTheory.TechnicalLemmas.Analysis.Integrability.lintegral_exp_neg_mul_norm_sq_eq (E := E) (a := (1 / 2 : ℝ)) (by norm_num)
    have hn : (Real.pi / (1 / 2 : ℝ)) ^ ((Module.finrank ℝ E : ℝ) / 2) = C := by
      dsimp [C]
      rw [Real.sqrt_eq_rpow, ← Real.rpow_mul_natCast (by positivity)]
      congr 1 <;> ring
    rw [hn] at h
    convert h using 1
    congr 1
    funext p
    congr 2
    dsimp [g]
    ring
  have hw (z : E × E) : Real.exp (-U z) = f z.1 * g z.2 := by
    dsimp [U, f, g, Vy]
    rw [← Real.exp_add]
    congr 1
    ring
  have hphase : Zp = ENNReal.ofReal (Z * C) := by
    calc
      Zp = ∫⁻ z : E × E, ENNReal.ofReal (f z.1) * ENNReal.ofReal (g z.2) ∂ell := by
        apply lintegral_congr
        intro z
        rw [hw, ENNReal.ofReal_mul (Real.exp_nonneg _)]
      _ = (∫⁻ x : E, ENNReal.ofReal (f x) ∂volume) * ∫⁻ p : E, ENNReal.ofReal (g p) ∂volume :=
        lintegral_prod_mul hfc.measurable.ennreal_ofReal.aemeasurable hgc.measurable.ennreal_ofReal.aemeasurable
      _ = ENNReal.ofReal (Z * C) := by
        rw [← ofReal_integral_eq_lintegral_ofReal hf (ae_of_all _ (fun x => Real.exp_nonneg _)), hCg, ← ENNReal.ofReal_mul hZ.le]
  have hpos : 0 < Zp := by rw [hphase]; exact ENNReal.ofReal_pos.mpr (mul_pos hZ hC)
  have hfin : Zp < ⊤ := by rw [hphase]; exact ENNReal.ofReal_lt_top
  have hprob : IsProbabilityMeasure (ell.withDensity (fun z => Zp⁻¹ * ENNReal.ofReal (Real.exp (-U z)))) :=
    AutoSamplingTheory.TechnicalLemmas.Measure.Gibbs.isProbabilityMeasure_withDensity_normalized_gibbs ell U hpos.ne' hfin.ne
  refine ⟨hf, hZ, hphase, hpos, hfin, hprob, ?_⟩
  have hgamma : stdGaussian E = (volume : Measure E).withDensity (fun p => ENNReal.ofReal (C⁻¹ * g p)) := by
    have h := AutoSamplingTheory.TechnicalLemmas.Measure.IsotropicGaussianDensity.map_sqrt_smul_stdGaussian_eq_withDensity (E := E) 1 (by norm_num)
    have hid : (fun z : E => Real.sqrt 1 • z) = id := by funext z; simp
    rw [hid, Measure.map_id] at h
    simpa only [mul_one, inv_pow, C, g] using h
  rw [hgamma, Measure.tilted, prod_withDensity ((hfc.measurable.div_const Z).ennreal_ofReal) ((hgc.measurable.const_mul C⁻¹).ennreal_ofReal)]
  apply withDensity_congr_ae
  filter_upwards with z
  rw [hphase, hw, ENNReal.ofReal_mul hZ.le, ENNReal.ofReal_mul (Real.exp_nonneg _), ENNReal.ofReal_div_of_pos hZ, ENNReal.ofReal_mul (inv_nonneg.mpr hC.le), ENNReal.ofReal_inv_of_pos hC]
  rw [ENNReal.mul_inv (Or.inr ENNReal.ofReal_ne_top) (Or.inl ENNReal.ofReal_ne_top)]
  simp only [div_eq_mul_inv, f]
  ac_rfl

#print axioms actual_phase_gibbs_normalization
end
end AutoSamplingTheory.ExampleCases.ProximalBPS.ActualPhaseNormalization

Proof architecture

Actual conditional position-momentum phase law; 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.
  • Genuine differentiability is localized to the hypotheses shown in the Lean statement.
  • Almost-everywhere hypotheses depend on the stated measure and representative.
  • Density statements retain normalization and absolute-continuity prerequisites.
  • A Gibbs expression is not automatically a probability law or an invariant law.
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.