Samplinglib
Lean gate not recorded for this source state main · ed709a7f320d
Registry leaf card · samplewiki.sphmc.initial-gibbs-q2

initial_gibbs_phase_transport_q2

compiled Samplinglib leaf Not mapped explicit smoke test

- Under the source's normalized curvature and reference-gradient hypotheses, the actual initial phase law is at squared `M_κ` transport cost at most `5κd` from the smoothed Gibbs reference phase law. This is only the `q = 2` component of Lemma 4.16, conditional on the proof's critical-point witness.

Plain-English statement

- Under the source's normalized curvature and reference-gradient hypotheses, the actual initial phase law is at squared `M_κ` transport cost at most `5κd` from the smoothed Gibbs reference phase law. This is only the `q = 2` component of Lemma 4.16, conditional on the proof's critical-point witness.

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 initial_gibbs_phase_transport_q2
    {U : E → ℝ} {α η : ℝ≥0} (hα : 0 < α) (hαone : α ≤ 1)
    (hU : ContDiff ℝ 2 U)
    (hH : ∀ x v : E,
      (α : ℝ) * ‖v‖ ^ 2 ≤ fderiv ℝ (fderiv ℝ U) x v v ∧
        fderiv ℝ (fderiv ℝ U) x v v ≤ ‖v‖ ^ 2)
    (p xref : E) (hp : gradient U p = 0)
    (href : ‖gradient U xref‖ ^ 2 ≤
      (α : ℝ) * (Module.finrank ℝ E : ℝ)) (hη : η ≤ 1) :
    let μ := (volume : Measure E).tilted (fun x => -U x)
    let πη := gaussianSmoothing μ (Real.sqrt η)
    PhaseMetric.phaseWassersteinSq (1 / (α : ℝ))
      ((Measure.dirac xref).prod (stdGaussian E))
      (πη.prod (stdGaussian E)) ≤
        ENNReal.ofReal (5 * (1 / (α : ℝ)) * (Module.finrank ℝ E : ℝ)) := by
  classical
  let μ := (volume : Measure E).tilted (fun x => -U x)
  let πη := gaussianSmoothing μ (Real.sqrt η)
  have ha : (0 : ℝ) < α := hα
  have haone : (α : ℝ) ≤ 1 := hαone
  have hκ : (1 : ℝ) ≤ 1 / (α : ℝ) := (one_le_div ha).2 haone
  have hdim : (0 : ℝ) ≤ Module.finrank ℝ E := by exact_mod_cast Nat.zero_le _
  have hdata := GibbsPositionMoment.gibbs_position_moment
    (β := 1) hα hαone hU
      (fun x v => ⟨(hH x v).1, by simpa using (hH x v).2⟩) p hp
  obtain ⟨hprob, _, _, hpos, _, _, hposBound⟩ := hdata
  change Integrable (fun x : E => ‖x - p‖ ^ 2) μ at hpos
  change (∫ x : E, ‖x - p‖ ^ 2 ∂μ) ≤
    (Module.finrank ℝ E : ℝ) / (α : ℝ) at hposBound
  letI : IsProbabilityMeasure μ := hprob
  have hsc : StrongConvexOn (Set.univ : Set E) (α : ℝ) U :=
    HessianStrongConvexity.strongConvexOn_univ_of_fderiv2_lower hU
      (fun x v => (hH x v).1)
  have hd : Differentiable ℝ U := hU.differentiable (by norm_num)
  have hmono : (α : ℝ) * ‖xref - p‖ ^ 2 ≤
      inner ℝ (gradient U xref) (xref - p) := by
    simpa only [hp, sub_zero] using
      (StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn
        hsc (fun z _ => (hd z).hasGradientAt)
        (x := p) (y := xref) (Set.mem_univ _) (Set.mem_univ _))
  have hr : (α : ℝ) * ‖xref - p‖ ≤ ‖gradient U xref‖ := by
    by_cases hz : ‖xref - p‖ = 0
    · simp [hz]
    · have hposr : 0 < ‖xref - p‖ :=
        lt_of_le_of_ne (norm_nonneg _) (Ne.symm hz)
      have hi := (hmono.trans (real_inner_le_norm (gradient U xref) (xref - p)))
      have hm : ((α : ℝ) * ‖xref - p‖) * ‖xref - p‖ ≤
          ‖gradient U xref‖ * ‖xref - p‖ := by nlinarith [hi]
      exact le_of_mul_le_mul_right hm hposr
  have hsq : ((α : ℝ) * ‖xref - p‖) ^ 2 ≤
      ‖gradient U xref‖ ^ 2 :=
    (sq_le_sq₀ (by positivity) (norm_nonneg _)).2 hr
  have hrefDist : ‖xref - p‖ ^ 2 ≤
      (Module.finrank ℝ E : ℝ) / (α : ℝ) := by
    apply (le_div_iff₀ ha).2
    have hm : (α : ℝ) * ((α : ℝ) * ‖xref - p‖ ^ 2) ≤
        (α : ℝ) * (Module.finrank ℝ E : ℝ) := by nlinarith [hsq, href]
    exact le_of_mul_le_mul_left (by nlinarith [hm]) ha
  have hpoint (x : E) : ‖xref - x‖ ^ 2 ≤
      2 * ‖x - p‖ ^ 2 + 2 * ‖xref - p‖ ^ 2 := by
    have ht : ‖xref - x‖ ≤ ‖xref - p‖ + ‖x - p‖ := by
      calc
        ‖xref - x‖ = ‖(xref - p) + (p - x)‖ := by congr 1; abel
        _ ≤ ‖xref - p‖ + ‖p - x‖ := norm_add_le _ _
        _ = _ := by rw [norm_sub_rev p x]
    have htsq : ‖xref - x‖ ^ 2 ≤ (‖xref - p‖ + ‖x - p‖) ^ 2 :=
      (sq_le_sq₀ (norm_nonneg _) (by positivity)).2 ht
    nlinarith [sq_nonneg (‖xref - p‖ - ‖x - p‖)]
  have hsum : Integrable
      (fun x : E => 2 * ‖x - p‖ ^ 2 + 2 * ‖xref - p‖ ^ 2) μ :=
    (hpos.const_mul 2).add (integrable_const _)
  have hrefI : Integrable (fun x : E => ‖xref - x‖ ^ 2) μ := by
    apply hsum.mono' (by fun_prop)
    filter_upwards with x
    simpa only [Real.norm_eq_abs,
      abs_of_nonneg (sq_nonneg (‖xref - x‖))] using hpoint x
  have hbase : (∫ x : E, ‖xref - x‖ ^ 2 ∂μ) ≤
      4 * ((Module.finrank ℝ E : ℝ) / (α : ℝ)) := by
    have hi := integral_mono hrefI hsum hpoint
    have hs : (∫ x : E,
        2 * ‖x - p‖ ^ 2 + 2 * ‖xref - p‖ ^ 2 ∂μ) =
        2 * (∫ x : E, ‖x - p‖ ^ 2 ∂μ) + 2 * ‖xref - p‖ ^ 2 := by
      rw [integral_add (hpos.const_mul _) (integrable_const _),
        integral_const_mul, integral_const]
      simp
    rw [hs] at hi
    linarith
  have hbaseI : Integrable (fun x : E => ‖x - xref‖ ^ 2) μ := by
    simpa only [norm_sub_rev] using hrefI
  have hsm := PhaseReferenceMoment.gaussianSmoothing_position_second_moment
    μ xref (Real.sqrt η) hbaseI
  change Integrable (fun y : E => ‖y - xref‖ ^ 2) πη ∧
    (∫ y : E, ‖y - xref‖ ^ 2 ∂πη) =
      (∫ x : E, ‖x - xref‖ ^ 2 ∂μ) +
        (Real.sqrt η) ^ 2 * (Module.finrank ℝ E : ℝ) at hsm
  letI : IsProbabilityMeasure πη := by
    dsimp [πη, gaussianSmoothing,
      AutoSamplingTheory.TechnicalLemmas.Measure.CommonNoiseContraction.addNoise]
    exact Measure.isProbabilityMeasure_map
      (by fun_prop : AEMeasurable (fun z : E × E => z.1 + z.2)
        (μ.prod (scaledStdGaussian (E := E) (Real.sqrt η))))
  have hcost := InitialPhaseTransport.phaseWassersteinSq_initial_le_position_moment
    πη xref hκ (by simpa only [norm_sub_rev] using hsm.1)
  have hnum : (∫ y : E, ‖xref - y‖ ^ 2 ∂πη) ≤
      5 * (1 / (α : ℝ)) * (Module.finrank ℝ E : ℝ) := by
    have hb : (∫ x : E, ‖x - xref‖ ^ 2 ∂μ) ≤
        4 * ((Module.finrank ℝ E : ℝ) / (α : ℝ)) := by
      simpa only [norm_sub_rev] using hbase
    have hetaκ : (η : ℝ) ≤ 1 / (α : ℝ) := le_trans hη hκ
    have hh := mul_nonneg (sub_nonneg.mpr hetaκ) hdim
    rw [show (∫ y : E, ‖xref - y‖ ^ 2 ∂πη) =
      (∫ y : E, ‖y - xref‖ ^ 2 ∂πη) by simp only [norm_sub_rev], hsm.2,
      Real.sq_sqrt (show (0 : ℝ) ≤ η by exact_mod_cast η.property)]
    rw [div_eq_mul_one_div] at hb
    nlinarith [hb, hh]
  exact hcost.trans (ENNReal.ofReal_le_ofReal hnum)

end AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.InitialGibbsPhaseTransport

Proof architecture

SPHMC Lemma 4.16 q=2 initialization component: assemble the actual smoothed Gibbs position moment with the identical-momentum phase coupling

Lean proof walkthrough

  • Read the quantified variables and typeclass brackets as part of the mathematical statement; inferred arguments are not missing assumptions.
  • `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.
  • `exact` closes the current goal with an already typed term.
  • `simpa` closes the goal after a controlled simplification of a typed result.

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.
  • 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.