Samplinglib
Lean gate not recorded for this source state main · 0e31a3cda412

Probability: mathematical reading route

Read the statements and derivations in source order. Every result has its own optional Lean statement and proof. Source assumptions, library reuse and unproved boundaries are kept explicit.

  1. Almost-everywhere equal variables have the same pushforward
  2. Integrate a test function through a pushforward measure
  3. Transfer a supplied weak derivative from samples to laws
  4. Transfer the derivative to a separately named law path
  5. A dominated pathwise derivative yields a weak derivative of the law
  6. A dominated derivative for a named law path
  7. Componentwise a.e. equality preserves the joint image law
  8. Extract the first marginal of a joint image law
  9. Extract the second marginal of a joint image law
  10. Swap the coordinate order of a joint image law
  11. Match the conditional distribution and mapped conditional-expectation kernel
  12. Transfer a chosen conditional integral version between equal kernels
  13. The conditional integral is almost-everywhere strongly measurable on the sample space
  14. The conditional integral is integrable on the sample space
  15. The conditional integral is almost-everywhere strongly measurable under the conditioning law
  16. The conditional integral is integrable under the conditioning law
  17. Integrating the conditional average recovers the joint integral
  18. Disintegration written with a named conditioning law
  19. A.e. strong measurability under a named conditioning law
  20. Integrability under a named conditioning law
  21. A chosen a.e. version inherits conditional-integral regularity
  22. Record the name and provenance of a measure
  23. Record a forward-KL expression and its status
  24. Record a Fisher-information expression and its status
  25. Record a log-Sobolev inequality as an obligation
  26. Record a Poincaré inequality as an obligation
  27. Record a proposed continuity-equation velocity
  28. Record the intended labels of a guided tilt
  29. Record the cited entropy-duality interface
  30. Construct a source-cited DV proof-obligation record
  31. Populate the paper-facing DV interface without claiming its proof
  32. The square-root density squares back to the density
  33. Rewrite the square-root test's entropy integrand
  34. Transfer a supplied unit-mass identity
  35. The Radon–Nikodym density has unit nonnegative integral
  36. The real Radon–Nikodym density also has unit integral
  37. The squared square-root Radon–Nikodym test has unit mass
  38. Transport the density entropy integral to the log-likelihood measure
  39. Rewrite the square-root test entropy as a log-likelihood integral
  40. The scalar square-root/logarithm coefficients give a factor of one quarter
  41. Apply the scalar coefficient identity to supplied derivative values
  42. Sum the scalar Fisher-chain factor over finitely many coordinates
  43. Name the finite-coordinate Dirichlet and Fisher expressions
  44. Integrate the a.e. finite-coordinate Fisher-chain identity
  45. Extract the one-quarter factor from supplied integral representations
  46. Rearrange a supplied variational upper bound
  47. Extract one admissible scalar value from a known supremum
  48. An integrable exponential moment remains integrable at a smaller nonnegative scale
  49. Prove the selected-test entropy bound by exponential tilting
  50. Use an upper-scale exponential moment for the selected scaled test
  51. Divide the scaled entropy bound by its positive scale
  52. Preserve an external nonnegative coefficient in the energy bound
  53. Write the tilted-backend test bound in additive form
  54. Record the remaining LSI-to-KL/Fisher proof target
ASTIS mathematical exposition

Almost-everywhere equal variables have the same pushforward

AutoSamplingTheory.lawMapEqOfAEEq · theorem · Teaching coverage

Statement

On measurable spaces Ω and E, let P be any measure and X,Y:Ω→E any functions. If X=Y P-almost everywhere, their pushforward measures are equal. No measurability assumption is present in this totalized-map identity.

\[X=Y\quad P\text{-a.e.}\ \Longrightarrow\ X_\#P=Y_\#P.\]

All objects and hypotheses

  • Ω and E are arbitrary measurable spaces; P is any measure on Ω, with no finiteness or probability hypothesis.
  • X,Y are arbitrary functions Ω→E; hXY asserts their P-almost-everywhere equality.

Notation and interpretation

Pushforward law

P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

\[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
A.e. and strong measurability

A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

\[f=g\quad\mu\text{-a.e.}\]

Mathematical proof

1. Keep the same equivalence class

An almost-everywhere change of a map does not change its Mathlib pushforward. The imported map-congruence theorem applies directly, including its totalized non-a.e.-measurable case.

\[X_\#P=Y_\#P\quad\text{whenever }X=Y\ P\text{-a.e.}\]
Corresponding Lean step

Measure.map_congr hXY

Lean statement · lawMapEqOfAEEq

The hypothesis compares two functions outside a P-null set; the conclusion compares measures, not sample values at every input.

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

theorem lawMapEqOfAEEq {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E]
    {P : Measure Ω} {X Y : Ω → E}
    (hXY : X =ᵐ[P] Y) :
    Measure.map X P = Measure.map Y P

Exact module and namespace context

Lean proof · lawMapEqOfAEEq

The proof applies the existing pushforward-congruence theorem once. It does not construct a process or establish either variable's measurability.

Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

theorem lawMapEqOfAEEq {Ω E : Type*} [MeasurableSpace Ω] [MeasurableSpace E]
    {P : Measure Ω} {X Y : Ω → E}
    (hXY : X =ᵐ[P] Y) :
    Measure.map X P = Measure.map Y P := by
  exact Measure.map_congr hXY

/-- Integrating a test against a pushforward law is the same as integrating
the composed test on the original probability space.

This is the weak-test bookkeeping used before differentiating EM
interpolation laws.  It does not prove any time differentiability, generator
identity, conditional law, density, or Fokker--Planck equation.
-/

Exact module and namespace context

Scope and omitted-condition boundaries

  • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
  • Measure.map is totalized: without AEMeasurable assumptions, this is not a claim that the expression is the usual nondegenerate distribution of an arbitrary nonmeasurable random variable.
  • No pointwise equality, process construction, conditional drift, or density theorem.

Source and reuse

ASTIS parents called

    Mathlib API called (external library)

    • MeasureTheory.Measure.map_congr

    Mathematical sources

    ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

    ASTIS mathematical exposition

    Integrate a test function through a pushforward measure

    AutoSamplingTheory.lawMapIntegral · theorem · Teaching coverage

    Statement

    Let P be any measure on measurable Ω and let X:Ω→E be P-almost-everywhere measurable. If B is a real normed vector space and φ:E→B is almost-everywhere strongly measurable under X#P, then the integral of φ against X#P equals the integral of φ∘X against P. No integrability or completeness assumption is imposed by this equality.

    \[\int_E\varphi(x)\,d(X_\#P)(x)=\int_\Omega\varphi(X(\omega))\,dP(\omega).\]

    All objects and hypotheses

    • Ω and E are arbitrary measurable spaces; P is any measure on Ω, with no finiteness or probability hypothesis.
    • B has NormedAddCommGroup and NormedSpace ℝ structures; completeness is not assumed.
    • X:Ω→E is AEMeasurable under P; φ:E→B is AEStronglyMeasurable under X#P.

    Notation and interpretation

    Pushforward law

    P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

    \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
    A.e. and strong measurability

    A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

    \[f=g\quad\mu\text{-a.e.}\]
    Integrability and Bochner integrals

    L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

    \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

    Mathematical proof

    1. Use the pushforward integration identity

    The imported change-of-variables theorem needs the map's a.e. measurability and the test's a.e. strong measurability under its image measure; the supplied assumptions match precisely.

    \[\int \varphi\,d(X_\#P)=\int\varphi\circ X\,dP.\]
    Corresponding Lean step

    integral_map hX hφ

    Lean statement · lawMapIntegral

    The vector-space assumptions tell Lean how to form the Bochner integral. The two measurability hypotheses concern different domains and measures.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    theorem lawMapIntegral {Ω E B : Type*} [MeasurableSpace Ω]
        [MeasurableSpace E] [NormedAddCommGroup B] [NormedSpace ℝ B]
        {P : Measure Ω} {X : Ω → E} {φ : E → B}
        (hX : AEMeasurable X P)
        (hφ : AEStronglyMeasurable φ (Measure.map X P)) :
        (∫ x, φ x ∂Measure.map X P) = ∫ ω, φ (X ω) ∂P

    Exact module and namespace context

    Lean proof · lawMapIntegral

    A single rewrite replaces integration under the image measure by integration of the composed test. No differentiation or integrability proof occurs.

    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

    theorem lawMapIntegral {Ω E B : Type*} [MeasurableSpace Ω]
        [MeasurableSpace E] [NormedAddCommGroup B] [NormedSpace ℝ B]
        {P : Measure Ω} {X : Ω → E} {φ : E → B}
        (hX : AEMeasurable X P)
        (hφ : AEStronglyMeasurable φ (Measure.map X P)) :
        (∫ x, φ x ∂Measure.map X P) = ∫ ω, φ (X ω) ∂P := by
      rw [integral_map hX hφ]
    
    /-- Transport a supplied sample-space derivative to the corresponding
    pushforward-law weak-test integral.
    
    The analytic derivative is still an explicit hypothesis.  This lemma only
    packages the `Measure.map` integral rewrite needed before applying a future
    EM generator/Fokker--Planck theorem.
    -/

    Exact module and namespace context

    Scope and omitted-condition boundaries

    • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
    • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
    • This is a bookkeeping equality, not time differentiability, a generator identity or a Fokker–Planck equation.

    Source and reuse

    ASTIS parents called

      Mathlib API called (external library)

      • MeasureTheory.integral_map

      Mathematical sources

      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      ASTIS mathematical exposition

      Transfer a supplied weak derivative from samples to laws

      AutoSamplingTheory.lawMapIntegralHasDerivAtOfSample · theorem · Teaching coverage

      Statement

      Under the time-indexed measurability hypotheses, suppose the real function s↦∫φ(X_s(ω))dP has derivative g at s₀. Then s↦∫φ(x)d((X_s)#P)(x) has the same derivative g at s₀. The analytic derivative is assumed, not derived.

      \[\left.\frac d{ds}\int_\Omega\varphi(X_s(\omega))\,dP\right|_{s=s_0}=g \ \Longrightarrow\ \left.\frac d{ds}\int_E\varphi(x)\,d((X_s)_\#P)\right|_{s=s_0}=g.\]

      All objects and hypotheses

      • Ω and E are arbitrary measurable spaces; P is any measure on Ω, with no finiteness or probability hypothesis.
      • X:ℝ→Ω→E is a time-indexed family, φ:E→ℝ is a fixed real test, and s₀,g are real numbers.
      • For every real s, X_s is P-a.e. measurable and φ is a.e. strongly measurable under (X_s)#P.
      • hderiv is HasDerivAt of the sample-space integral function, with derivative value g at s₀.

      Notation and interpretation

      Pushforward law

      P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

      \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
      A.e. and strong measurability

      A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

      \[f=g\quad\mu\text{-a.e.}\]
      Integrability and Bochner integrals

      L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

      \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
      Derivatives

      Derivative premises are never silently promoted to derived path regularity. The dominated differentiation units explicitly distinguish eventually-near-time assumptions from a.e.-sample, all-times-in-one-neighborhood assumptions.

      \[\operatorname{HasDerivAt}(F,g,s_0)\ \Longrightarrow\ F\text{ is differentiable at }s_0\text{ and }F'(s_0)=g.\]

      Mathematical proof

      1. Identify both functions at every time

      Apply the pushforward-integral identity separately at each s. Functional extensionality turns these pointwise equalities into equality of the two real functions.

      \[F(s):=\int\varphi\,d((X_s)_\#P)=G(s):=\int\varphi(X_s)\,dP\quad\forall s.\]
      Corresponding Lean step

      hfun; funext s; lawMapIntegral (hX s) (hφ s)

      2. Transfer the existing derivative

      Equal functions have the same derivative assertion at the same point. Replace G by F in the supplied derivative theorem.

      \[F=G,\quad G'(s_0)=g\ \Longrightarrow\ F'(s_0)=g.\]
      Corresponding Lean step

      simpa [hfun] using hderiv

      Lean statement · lawMapIntegralHasDerivAtOfSample

      The universal time hypotheses support equality of the entire two integral functions, while the derivative is asserted only at s₀.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawMapIntegralHasDerivAtOfSample {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {φ : E → ℝ} {s0 g : ℝ}
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (Measure.map (X s) P))
          (hderiv : HasDerivAt (fun s => ∫ ω, φ (X s ω) ∂P) g s0) :
          HasDerivAt (fun s => ∫ x, φ x ∂Measure.map (X s) P) g s0

      Exact module and namespace context

      Lean proof · lawMapIntegralHasDerivAtOfSample

      The proof first names the equality of functions, then rewrites the already supplied derivative. It supplies no pathwise derivative or domination estimate.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawMapIntegralHasDerivAtOfSample {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {φ : E → ℝ} {s0 g : ℝ}
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (Measure.map (X s) P))
          (hderiv : HasDerivAt (fun s => ∫ ω, φ (X s ω) ∂P) g s0) :
          HasDerivAt (fun s => ∫ x, φ x ∂Measure.map (X s) P) g s0 := by
        have hfun :
            (fun s => ∫ x, φ x ∂Measure.map (X s) P) =
              (fun s => ∫ ω, φ (X s ω) ∂P) := by
          funext s
          exact lawMapIntegral (hX s) (hφ s)
        simpa [hfun] using hderiv
      
      /-- Transport a sample-space derivative to a named law path equal to a
      `Measure.map` path.
      
      This is the named-law variant used when a paper first writes
      `hat rho_s = Law(hat X_s)` and the Lean target keeps `hatRhoS` as a separate
      measure-valued path.  The only analytic derivative input remains the
      sample-space derivative; this lemma just combines the named-law equality with
      `lawMapIntegralHasDerivAtOfSample`.
      -/

      Exact module and namespace context

      Scope and omitted-condition boundaries

      • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
      • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
      • The derivative is an explicit premise; no generator, process, weak PDE or new differentiability result is inferred.

      Source and reuse

      ASTIS parents called

      Mathlib API called (external library)

      No direct Mathlib call recorded; see the ASTIS parents.

      Mathematical sources

      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      ASTIS mathematical exposition

      Transfer the derivative to a separately named law path

      AutoSamplingTheory.lawIntegralHasDerivAtOfMeasureMapEqAndSample · theorem · Teaching coverage

      Statement

      Let ρ:ℝ→Measure E be a named path of measures with ρ_s=(X_s)#P for every s. Assume X_s is P-a.e. measurable, φ is ρ_s-a.e. strongly measurable at every time, and the sample integral has derivative g at s₀. Then the integral of φ under ρ_s also has derivative g at s₀.

      \[\rho_s=(X_s)_\#P\ (\forall s),\quad \left.\frac d{ds}\int\varphi(X_s)\,dP\right|_{s_0}=g \ \Longrightarrow\ \left.\frac d{ds}\int\varphi\,d\rho_s\right|_{s_0}=g.\]

      All objects and hypotheses

      • Ω and E are arbitrary measurable spaces; P is any measure on Ω, with no finiteness or probability hypothesis.
      • X:ℝ→Ω→E, ρ:ℝ→Measure E, φ:E→ℝ, s₀,g∈ℝ.
      • For every s, ρ_s=(X_s)#P, X_s is P-a.e. measurable, and φ is ρ_s-a.e. strongly measurable.
      • The sample-space integral function has derivative g at s₀.

      Notation and interpretation

      Pushforward law

      P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

      \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
      A.e. and strong measurability

      A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

      \[f=g\quad\mu\text{-a.e.}\]
      Integrability and Bochner integrals

      L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

      \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
      Derivatives

      Derivative premises are never silently promoted to derived path regularity. The dominated differentiation units explicitly distinguish eventually-near-time assumptions from a.e.-sample, all-times-in-one-neighborhood assumptions.

      \[\operatorname{HasDerivAt}(F,g,s_0)\ \Longrightarrow\ F\text{ is differentiable at }s_0\text{ and }F'(s_0)=g.\]

      Mathematical proof

      1. Move measurability to the mapped measure

      Substitute ρ_s=(X_s)#P in the test's measurability assumption.

      \[\varphi\text{ is }\rho_s\text{-a.e. strongly measurable}\Longrightarrow\varphi\text{ is }(X_s)_\#P\text{-a.e. strongly measurable}.\]
      Corresponding Lean step

      hφMap; simpa [hρ s] using hφ s

      2. Reuse the mapped-law derivative adapter

      With these exact measurability assumptions and the supplied derivative, obtain the derivative for the pushforward-law integral.

      \[\left(\int\varphi\,d((X_s)_\#P)\right)'_{s_0}=g.\]
      Corresponding Lean step

      lawMapIntegralHasDerivAtOfSample hX hφMap hderiv

      3. Replace the pushforward path by its name

      The named-law equality gives equality of the two law-integral functions at every time, so the derivative transfers once more.

      \[\int\varphi\,d\rho_s=\int\varphi\,d((X_s)_\#P)\quad\forall s.\]
      Corresponding Lean step

      hfun; funext; rw [hρ s]; simpa [hfun] using hmap

      Lean statement · lawIntegralHasDerivAtOfMeasureMapEqAndSample

      ρ is an additional named object, and its equality with the image measure is a supplied assumption rather than a definition inferred from its name.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawIntegralHasDerivAtOfMeasureMapEqAndSample {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {ρ : ℝ → Measure E}
          {φ : E → ℝ} {s0 g : ℝ}
          (hρ : ∀ s, ρ s = Measure.map (X s) P)
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (ρ s))
          (hderiv : HasDerivAt (fun s => ∫ ω, φ (X s ω) ∂P) g s0) :
          HasDerivAt (fun s => ∫ x, φ x ∂ρ s) g s0

      Exact module and namespace context

      Lean proof · lawIntegralHasDerivAtOfMeasureMapEqAndSample

      Both changes are equalities of functions or measures; the middle line reuses the previously proved derivative adapter. No new differentiation argument occurs.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawIntegralHasDerivAtOfMeasureMapEqAndSample {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {ρ : ℝ → Measure E}
          {φ : E → ℝ} {s0 g : ℝ}
          (hρ : ∀ s, ρ s = Measure.map (X s) P)
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (ρ s))
          (hderiv : HasDerivAt (fun s => ∫ ω, φ (X s ω) ∂P) g s0) :
          HasDerivAt (fun s => ∫ x, φ x ∂ρ s) g s0 := by
        have hφMap :
            ∀ s, AEStronglyMeasurable φ (Measure.map (X s) P) := by
          intro s
          simpa [hρ s] using hφ s
        have hmap :
            HasDerivAt
              (fun s => ∫ x, φ x ∂Measure.map (X s) P) g s0 :=
          lawMapIntegralHasDerivAtOfSample
            (P := P) (X := X) (φ := φ) hX hφMap hderiv
        have hfun :
            (fun s => ∫ x, φ x ∂ρ s) =
              fun s => ∫ x, φ x ∂Measure.map (X s) P := by
          funext s
          rw [hρ s]
        simpa [hfun] using hmap
      
      /-- Transport a dominated pointwise derivative to a pushforward-law weak-test
      derivative.
      
      This is the first parametric-integral step below the cycle-79 law-map handoff:
      Mathlib's dominated derivative-under-integral theorem proves the sample-space
      weak-test derivative, and `lawMapIntegralHasDerivAtOfSample` transports it to
      the mapped law.  The EM path derivative, neighborhood, and domination data stay
      explicit.
      -/

      Exact module and namespace context

      Scope and omitted-condition boundaries

      • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
      • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
      • Named-law reuse wrapper; all analytic derivative hypotheses remain external.

      Source and reuse

      ASTIS parents called

      Mathlib API called (external library)

      No direct Mathlib call recorded; see the ASTIS parents.

      Mathematical sources

      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      ASTIS mathematical exposition

      A dominated pathwise derivative yields a weak derivative of the law

      AutoSamplingTheory.lawMapIntegralHasDerivAtOfDominated · theorem · Teaching coverage

      Statement

      On arbitrary measurable Ω and E with measure P, suppose the full neighborhood, measurability, integrability, pathwise differentiability and integrable domination conditions listed below hold. If the integral of the sample derivative at s₀ equals g, the test integral under the pushforward law s↦(X_s)#P has derivative g at s₀.

      \[\left|\partial_s\varphi(X_s(\omega))\right|\le b(\omega),\ b\in L^1(P) \quad\Longrightarrow\quad \left.\frac d{ds}\int\varphi\,d((X_s)_\#P)\right|_{s_0} =\int D(s_0,\omega)\,dP(\omega)=g.\]

      All objects and hypotheses

      • Ω and E are arbitrary measurable spaces; P is any measure on Ω, with no finiteness or probability hypothesis.
      • X:ℝ→Ω→E, φ:E→ℝ, s₀,g∈ℝ; D:ℝ→Ω→ℝ is the supplied sampleDeriv; U⊆ℝ is the supplied neighborhood; b:Ω→ℝ is the bound.
      • For every s, X_s is P-a.e. measurable and φ is a.e. strongly measurable under its designated law.
      • U belongs to the neighborhood filter of s₀. For all s sufficiently near s₀, ω↦φ(X_sω) is P-a.e. strongly measurable.
      • ω↦φ(X_{s₀}ω) is P-integrable, and D(s₀,·) is P-a.e. strongly measurable.
      • For P-almost every ω, simultaneously for every s∈U, |D(s,ω)|≤b(ω); b is P-integrable.
      • For P-almost every ω, simultaneously for every s∈U, t↦φ(X_tω) has derivative D(s,ω) at s.
      • The integral ∫D(s₀,ω)dP(ω) is supplied to equal g.

      Notation and interpretation

      Pushforward law

      P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

      \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
      A.e. and strong measurability

      A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

      \[f=g\quad\mu\text{-a.e.}\]
      Integrability and Bochner integrals

      L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

      \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
      Derivatives

      Derivative premises are never silently promoted to derived path regularity. The dominated differentiation units explicitly distinguish eventually-near-time assumptions from a.e.-sample, all-times-in-one-neighborhood assumptions.

      \[\operatorname{HasDerivAt}(F,g,s_0)\ \Longrightarrow\ F\text{ is differentiable at }s_0\text{ and }F'(s_0)=g.\]

      Mathematical proof

      1. Fix the sample integrand and its derivative data

      Set F(s,ω)=φ(X_sω) and F′(s,ω)=D(s,ω). The same neighborhood U works outside one P-null set for the derivative and the domination hypotheses; this uniform quantifier order is essential.

      \[F(s,\omega)=\varphi(X_s\omega),\quad\partial_sF(s,\omega)=D(s,\omega),\quad |D(s,\omega)|\le b(\omega)\ (s\in U).\]
      Corresponding Lean step

      F := fun s ω => φ (X s ω); F' := sampleDeriv; neighborhood and bound arguments

      2. Apply differentiation under the integral

      Mathlib's dominated local derivative theorem uses the neighborhood and integrable bound to justify the sample-space derivative. It returns integrability of the derivative at s₀ and the derivative identity; this proof selects the identity component.

      \[\left.\frac d{ds}\int F(s,\omega)\,dP\right|_{s_0}=\int D(s_0,\omega)\,dP.\]
      Corresponding Lean step

      (hasDerivAt_integral_of_dominated_loc_of_deriv_le ... hPathDeriv).2

      3. Identify the derivative value

      Replace the integral of D(s₀,·) by the supplied real number g.

      \[\int D(s_0,\omega)\,dP=g.\]
      Corresponding Lean step

      rw [hDerivValue] at hsample

      4. Transport to the pushforward-law integral

      Reuse equality of test integrals under the image law and on the sample space, with the all-time measurability assumptions.

      \[\left.\frac d{ds}\int\varphi\,d((X_s)_\#P)\right|_{s_0}=g.\]
      Corresponding Lean step

      lawMapIntegralHasDerivAtOfSample hX hφ hsample

      Lean statement · lawMapIntegralHasDerivAtOfDominated

      There are two local quantifiers: eventually in time for measurability, and almost every sample followed by every time in U for differentiation and domination. They cannot be interchanged silently.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawMapIntegralHasDerivAtOfDominated {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {φ : E → ℝ} {s0 g : ℝ}
          {sampleDeriv : ℝ → Ω → ℝ} {neighborhood : Set ℝ}
          {bound : Ω → ℝ}
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (Measure.map (X s) P))
          (hneighborhood : neighborhood ∈ 𝓝 s0)
          (hFMeas :
            ∀ᶠ s in 𝓝 s0, AEStronglyMeasurable (fun ω => φ (X s ω)) P)
          (hFInt : Integrable (fun ω => φ (X s0 ω)) P)
          (hDerivMeas : AEStronglyMeasurable (sampleDeriv s0) P)
          (hDerivBound :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood, ‖sampleDeriv s ω‖ ≤ bound ω)
          (hBoundInt : Integrable bound P)
          (hPathDeriv :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood,
              HasDerivAt (fun t => φ (X t ω)) (sampleDeriv s ω) s)
          (hDerivValue : (∫ ω, sampleDeriv s0 ω ∂P) = g) :
          HasDerivAt (fun s => ∫ x, φ x ∂Measure.map (X s) P) g s0

      Exact module and namespace context

      Lean proof · lawMapIntegralHasDerivAtOfDominated

      The substantive analytic input is the imported dominated-differentiation theorem. The remaining lines identify its derivative value and reuse the law-map rewrite.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawMapIntegralHasDerivAtOfDominated {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {φ : E → ℝ} {s0 g : ℝ}
          {sampleDeriv : ℝ → Ω → ℝ} {neighborhood : Set ℝ}
          {bound : Ω → ℝ}
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (Measure.map (X s) P))
          (hneighborhood : neighborhood ∈ 𝓝 s0)
          (hFMeas :
            ∀ᶠ s in 𝓝 s0, AEStronglyMeasurable (fun ω => φ (X s ω)) P)
          (hFInt : Integrable (fun ω => φ (X s0 ω)) P)
          (hDerivMeas : AEStronglyMeasurable (sampleDeriv s0) P)
          (hDerivBound :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood, ‖sampleDeriv s ω‖ ≤ bound ω)
          (hBoundInt : Integrable bound P)
          (hPathDeriv :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood,
              HasDerivAt (fun t => φ (X t ω)) (sampleDeriv s ω) s)
          (hDerivValue : (∫ ω, sampleDeriv s0 ω ∂P) = g) :
          HasDerivAt (fun s => ∫ x, φ x ∂Measure.map (X s) P) g s0 := by
        have hsample :
            HasDerivAt (fun s => ∫ ω, φ (X s ω) ∂P)
              (∫ ω, sampleDeriv s0 ω ∂P) s0 :=
          (hasDerivAt_integral_of_dominated_loc_of_deriv_le
            (F := fun s ω => φ (X s ω))
            (F' := sampleDeriv)
            (x₀ := s0)
            (s := neighborhood)
            (bound := bound)
            (μ := P)
            hneighborhood hFMeas hFInt hDerivMeas hDerivBound hBoundInt
            hPathDeriv).2
        rw [hDerivValue] at hsample
        exact lawMapIntegralHasDerivAtOfSample (P := P) (X := X) (φ := φ) hX hφ hsample
      
      /-- Named-law version of `lawMapIntegralHasDerivAtOfDominated`.
      
      If a paper keeps a named law path `ρ s` with `ρ s = Measure.map (X s) P`,
      this combines the dominated sample-space derivative-under-integral step with
      the named-law equality rewrite.
      -/

      Exact module and namespace context

      Scope and omitted-condition boundaries

      • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
      • No finite measure is required, but the bound and base integrand must be integrable. No source-specific path derivative, drift formula, generator or PDE is proved here.

      Source and reuse

      ASTIS parents called

      Mathlib API called (external library)

      • hasDerivAt_integral_of_dominated_loc_of_deriv_le

      Mathematical sources

      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      ASTIS mathematical exposition

      A dominated derivative for a named law path

      AutoSamplingTheory.lawIntegralHasDerivAtOfMeasureMapEqAndDominated · theorem · Teaching coverage

      Statement

      Let ρ_s=(X_s)#P at every real s. With φ a.e. strongly measurable under ρ_s and all the dominated sample-derivative hypotheses below, including ∫D(s₀,ω)dP=g, the named weak integral s↦∫φdρ_s has derivative g at s₀.

      \[\rho_s=(X_s)_\#P,\qquad \left.\frac d{ds}\int\varphi\,d\rho_s\right|_{s_0}=\int D(s_0,\omega)\,dP=g.\]

      All objects and hypotheses

      • Ω and E are arbitrary measurable spaces; P is any measure on Ω, with no finiteness or probability hypothesis.
      • ρ:ℝ→Measure E satisfies ρ_s=(X_s)#P for every s; the designated law for φ's measurability is ρ_s.
      • X:ℝ→Ω→E, φ:E→ℝ, s₀,g∈ℝ; D:ℝ→Ω→ℝ is the supplied sampleDeriv; U⊆ℝ is the supplied neighborhood; b:Ω→ℝ is the bound.
      • For every s, X_s is P-a.e. measurable and φ is a.e. strongly measurable under its designated law.
      • U belongs to the neighborhood filter of s₀. For all s sufficiently near s₀, ω↦φ(X_sω) is P-a.e. strongly measurable.
      • ω↦φ(X_{s₀}ω) is P-integrable, and D(s₀,·) is P-a.e. strongly measurable.
      • For P-almost every ω, simultaneously for every s∈U, |D(s,ω)|≤b(ω); b is P-integrable.
      • For P-almost every ω, simultaneously for every s∈U, t↦φ(X_tω) has derivative D(s,ω) at s.
      • The integral ∫D(s₀,ω)dP(ω) is supplied to equal g.

      Notation and interpretation

      Pushforward law

      P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

      \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
      A.e. and strong measurability

      A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

      \[f=g\quad\mu\text{-a.e.}\]
      Integrability and Bochner integrals

      L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

      \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
      Derivatives

      Derivative premises are never silently promoted to derived path regularity. The dominated differentiation units explicitly distinguish eventually-near-time assumptions from a.e.-sample, all-times-in-one-neighborhood assumptions.

      \[\operatorname{HasDerivAt}(F,g,s_0)\ \Longrightarrow\ F\text{ is differentiable at }s_0\text{ and }F'(s_0)=g.\]

      Mathematical proof

      1. Rewrite the test's measurability measure

      The equality of named and image laws makes the all-time test measurability hypothesis match the dominated mapped-law theorem.

      \[\rho_s=(X_s)_\#P\ \Longrightarrow\ \varphi\text{ is a.e. strongly measurable under }(X_s)_\#P.\]
      Corresponding Lean step

      hφMap

      2. Reuse dominated law differentiation

      Pass the complete neighborhood, base-integrability, derivative-measurability, uniform bound, path-derivative and derivative-value data to the established mapped-law theorem.

      \[\left.\frac d{ds}\int\varphi\,d((X_s)_\#P)\right|_{s_0}=g.\]
      Corresponding Lean step

      lawMapIntegralHasDerivAtOfDominated hX hφMap ...

      3. Restore the named path

      Equality at every time identifies the real integral functions, hence transfers the derivative.

      \[\left(s\mapsto\int\varphi\,d\rho_s\right)=\left(s\mapsto\int\varphi\,d((X_s)_\#P)\right).\]
      Corresponding Lean step

      hfun; simpa [hfun] using hmap

      Lean statement · lawIntegralHasDerivAtOfMeasureMapEqAndDominated

      The extra path ρ changes the name of the law, not the analytic assumptions. Every dominated-differentiation condition is still explicitly required.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawIntegralHasDerivAtOfMeasureMapEqAndDominated {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {ρ : ℝ → Measure E}
          {φ : E → ℝ} {s0 g : ℝ}
          {sampleDeriv : ℝ → Ω → ℝ} {neighborhood : Set ℝ}
          {bound : Ω → ℝ}
          (hρ : ∀ s, ρ s = Measure.map (X s) P)
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (ρ s))
          (hneighborhood : neighborhood ∈ 𝓝 s0)
          (hFMeas :
            ∀ᶠ s in 𝓝 s0, AEStronglyMeasurable (fun ω => φ (X s ω)) P)
          (hFInt : Integrable (fun ω => φ (X s0 ω)) P)
          (hDerivMeas : AEStronglyMeasurable (sampleDeriv s0) P)
          (hDerivBound :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood, ‖sampleDeriv s ω‖ ≤ bound ω)
          (hBoundInt : Integrable bound P)
          (hPathDeriv :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood,
              HasDerivAt (fun t => φ (X t ω)) (sampleDeriv s ω) s)
          (hDerivValue : (∫ ω, sampleDeriv s0 ω ∂P) = g) :
          HasDerivAt (fun s => ∫ x, φ x ∂ρ s) g s0

      Exact module and namespace context

      Lean proof · lawIntegralHasDerivAtOfMeasureMapEqAndDominated

      The proof is a named-law reuse wrapper around the dominated derivative theorem; it rewrites the measure in measurability and in the final integral function.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawIntegralHasDerivAtOfMeasureMapEqAndDominated {Ω E : Type*}
          [MeasurableSpace Ω] [MeasurableSpace E]
          {P : Measure Ω} {X : ℝ → Ω → E} {ρ : ℝ → Measure E}
          {φ : E → ℝ} {s0 g : ℝ}
          {sampleDeriv : ℝ → Ω → ℝ} {neighborhood : Set ℝ}
          {bound : Ω → ℝ}
          (hρ : ∀ s, ρ s = Measure.map (X s) P)
          (hX : ∀ s, AEMeasurable (X s) P)
          (hφ : ∀ s, AEStronglyMeasurable φ (ρ s))
          (hneighborhood : neighborhood ∈ 𝓝 s0)
          (hFMeas :
            ∀ᶠ s in 𝓝 s0, AEStronglyMeasurable (fun ω => φ (X s ω)) P)
          (hFInt : Integrable (fun ω => φ (X s0 ω)) P)
          (hDerivMeas : AEStronglyMeasurable (sampleDeriv s0) P)
          (hDerivBound :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood, ‖sampleDeriv s ω‖ ≤ bound ω)
          (hBoundInt : Integrable bound P)
          (hPathDeriv :
            ∀ᵐ ω ∂P, ∀ s ∈ neighborhood,
              HasDerivAt (fun t => φ (X t ω)) (sampleDeriv s ω) s)
          (hDerivValue : (∫ ω, sampleDeriv s0 ω ∂P) = g) :
          HasDerivAt (fun s => ∫ x, φ x ∂ρ s) g s0 := by
        have hφMap :
            ∀ s, AEStronglyMeasurable φ (Measure.map (X s) P) := by
          intro s
          simpa [hρ s] using hφ s
        have hmap :
            HasDerivAt
              (fun s => ∫ x, φ x ∂Measure.map (X s) P) g s0 :=
          lawMapIntegralHasDerivAtOfDominated
            (P := P) (X := X) (φ := φ) (sampleDeriv := sampleDeriv)
            (neighborhood := neighborhood) (bound := bound)
            hX hφMap hneighborhood hFMeas hFInt hDerivMeas hDerivBound
            hBoundInt hPathDeriv hDerivValue
        have hfun :
            (fun s => ∫ x, φ x ∂ρ s) =
              fun s => ∫ x, φ x ∂Measure.map (X s) P := by
          funext s
          rw [hρ s]
        simpa [hfun] using hmap
      
      /-- Pushforward-law equality for paired random variables from componentwise
      almost-everywhere equality.
      
      This is a narrow endpoint-law helper for stitched EM paths: once two endpoint
      representatives agree almost everywhere component by component, their joint
      pushforward law agrees.  It does not construct conditional laws, densities, or
      Fokker--Planck backends.
      -/

      Exact module and namespace context

      Scope and omitted-condition boundaries

      • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
      • The uniform a.e.-sample/for-all-time hypotheses and integrable domination are not derived. No new weak PDE is asserted.

      Source and reuse

      ASTIS parents called

      Mathlib API called (external library)

      No direct Mathlib call recorded; see the ASTIS parents.

      Mathematical sources

      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

      ASTIS mathematical exposition

      Componentwise a.e. equality preserves the joint image law

      AutoSamplingTheory.lawMapProdEqOfAEEq · theorem · Teaching coverage

      Statement

      Let Ω,E,F be measurable spaces, P any measure, X,X′:Ω→E and Y,Y′:Ω→F any functions. If X=X′ P-a.e. and Y=Y′ P-a.e., then the image measures of the paired variables (X,Y) and (X′,Y′) are equal. No separate measurability is assumed.

      \[X=X'\ P\text{-a.e.},\quad Y=Y'\ P\text{-a.e.}\ \Longrightarrow\ (X,Y)_\#P=(X',Y')_\#P.\]

      All objects and hypotheses

      • Ω,E,F are measurable spaces; P is any measure on Ω.
      • X,X′:Ω→E and Y,Y′:Ω→F; the two component equalities hold P-almost everywhere.

      Notation and interpretation

      Pushforward law

      P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

      \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
      A.e. and strong measurability

      A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

      \[f=g\quad\mu\text{-a.e.}\]

      Mathematical proof

      1. Combine the two full-measure sets

      A finite intersection of a.e. events is again a.e.; outside the union of the two exceptional null sets, both coordinate equalities hold.

      \[(X(\omega),Y(\omega))=(X'(\omega),Y'(\omega))\quad P\text{-a.e.}\]
      Corresponding Lean step

      filter_upwards [hX,hY]; simp [hx,hy]

      2. Apply map congruence

      Pushforwards do not change under a.e.-equal maps, so the paired image measures agree.

      \[(X,Y)_\#P=(X',Y')_\#P.\]
      Corresponding Lean step

      Measure.map_congr

      Lean statement · lawMapProdEqOfAEEq

      There are two a.e. equalities but only one underlying measure. This permits combining them into a joint equality on the same sample space.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawMapProdEqOfAEEq {Ω E F : Type*} [MeasurableSpace Ω]
          [MeasurableSpace E] [MeasurableSpace F]
          {P : Measure Ω} {X X' : Ω → E} {Y Y' : Ω → F}
          (hX : X =ᵐ[P] X') (hY : Y =ᵐ[P] Y') :
          Measure.map (fun ω => (X ω, Y ω)) P =
            Measure.map (fun ω => (X' ω, Y' ω)) P

      Exact module and namespace context

      Lean proof · lawMapProdEqOfAEEq

      The proof establishes equality of ordered pairs on a full-measure set, then reuses pushforward congruence. It does not posit independence of the coordinates.

      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

      theorem lawMapProdEqOfAEEq {Ω E F : Type*} [MeasurableSpace Ω]
          [MeasurableSpace E] [MeasurableSpace F]
          {P : Measure Ω} {X X' : Ω → E} {Y Y' : Ω → F}
          (hX : X =ᵐ[P] X') (hY : Y =ᵐ[P] Y') :
          Measure.map (fun ω => (X ω, Y ω)) P =
            Measure.map (fun ω => (X' ω, Y' ω)) P := by
        exact Measure.map_congr <| by
          filter_upwards [hX, hY] with ω hx hy
          simp [hx, hy]
      
      /-- First marginal of a paired pushforward law.
      
      This is endpoint-law bookkeeping for common-space EM arguments: after a joint
      endpoint law has been represented as a paired pushforward, projecting the first
      coordinate recovers the first endpoint law.  Measurability is explicit; the
      lemma does not construct any process, density, or conditional law.
      -/

      Exact module and namespace context

      Scope and omitted-condition boundaries

      • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
      • As in map_congr, totalized map semantics apply without measurability. No conditional law or coupling construction is supplied.

      Source and reuse

      ASTIS parents called

        Mathlib API called (external library)

        • MeasureTheory.Measure.map_congr

        Mathematical sources

        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

        ASTIS mathematical exposition

        Extract the first marginal of a joint image law

        AutoSamplingTheory.lawMapProdFst · theorem · Teaching coverage

        Statement

        Let Ω,E,F be measurable spaces and P any measure on Ω. For measurable X:Ω→E and Y:Ω→F, pushing the joint law (X,Y)#P through its first projection gives X#P.

        \[\operatorname{fst}_\#((X,Y)_\#P)=X_\#P.\]

        All objects and hypotheses

        • Ω,E,F are arbitrary measurable spaces and P is any measure on Ω.
        • X:Ω→E and Y:Ω→F are both measurable, not merely assumed equal in law.

        Notation and interpretation

        Pushforward law

        P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

        \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]

        Mathematical proof

        1. Compose the measurable maps

        The pair map is measurable because both coordinates are. The projection or swap is measurable for product sigma-algebras, so consecutive pushforwards compose.

        \[T_\#((X,Y)_\#P)=(T\circ(X,Y))_\#P.\]
        Corresponding Lean step

        Measure.map_map measurable_fst (hX.prod hY)

        2. Evaluate the composite

        The selected projection or swap of a pair gives precisely the displayed target map, pointwise on Ω.

        \[\operatorname{fst}(X\omega,Y\omega)=X\omega.\]
        Corresponding Lean step

        rfl

        Lean statement · lawMapProdFst

        The two ordinary measurability hypotheses ensure this is genuine pushforward composition. The result identifies a measure, not a density.

        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

        theorem lawMapProdFst {Ω E F : Type*} [MeasurableSpace Ω]
            [MeasurableSpace E] [MeasurableSpace F]
            {P : Measure Ω} {X : Ω → E} {Y : Ω → F}
            (hX : Measurable X) (hY : Measurable Y) :
            Measure.map Prod.fst (Measure.map (fun ω => (X ω, Y ω)) P) =
              Measure.map X P

        Exact module and namespace context

        Lean proof · lawMapProdFst

        One rewrite composes the maps; the remaining equality follows directly from how a pair's projection or swap is defined.

        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

        theorem lawMapProdFst {Ω E F : Type*} [MeasurableSpace Ω]
            [MeasurableSpace E] [MeasurableSpace F]
            {P : Measure Ω} {X : Ω → E} {Y : Ω → F}
            (hX : Measurable X) (hY : Measurable Y) :
            Measure.map Prod.fst (Measure.map (fun ω => (X ω, Y ω)) P) =
              Measure.map X P := by
          rw [Measure.map_map measurable_fst (hX.prod hY)]
          rfl
        
        /-- Second marginal of a paired pushforward law.
        
        This is the right-endpoint analogue of `lawMapProdFst`; it keeps marginal-law
        extraction separate from the conditional-drift and Fokker--Planck obligations.
        -/

        Exact module and namespace context

        Scope and omitted-condition boundaries

        • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
        • Only orientation/marginal bookkeeping; no independence, conditional kernel, process or density construction.

        Source and reuse

        ASTIS parents called

          Mathlib API called (external library)

          • MeasureTheory.Measure.map_map
          • measurable_fst
          • Measurable.prod

          Mathematical sources

          ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

          ASTIS mathematical exposition

          Extract the second marginal of a joint image law

          AutoSamplingTheory.lawMapProdSnd · theorem · Teaching coverage

          Statement

          Let Ω,E,F be measurable spaces and P any measure on Ω. For measurable X:Ω→E and Y:Ω→F, pushing the joint law (X,Y)#P through its second projection gives Y#P.

          \[\operatorname{snd}_\#((X,Y)_\#P)=Y_\#P.\]

          All objects and hypotheses

          • Ω,E,F are arbitrary measurable spaces and P is any measure on Ω.
          • X:Ω→E and Y:Ω→F are both measurable, not merely assumed equal in law.

          Notation and interpretation

          Pushforward law

          P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

          \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]

          Mathematical proof

          1. Compose the measurable maps

          The pair map is measurable because both coordinates are. The projection or swap is measurable for product sigma-algebras, so consecutive pushforwards compose.

          \[T_\#((X,Y)_\#P)=(T\circ(X,Y))_\#P.\]
          Corresponding Lean step

          Measure.map_map measurable_snd (hX.prod hY)

          2. Evaluate the composite

          The selected projection or swap of a pair gives precisely the displayed target map, pointwise on Ω.

          \[\operatorname{snd}(X\omega,Y\omega)=Y\omega.\]
          Corresponding Lean step

          rfl

          Lean statement · lawMapProdSnd

          The two ordinary measurability hypotheses ensure this is genuine pushforward composition. The result identifies a measure, not a density.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          theorem lawMapProdSnd {Ω E F : Type*} [MeasurableSpace Ω]
              [MeasurableSpace E] [MeasurableSpace F]
              {P : Measure Ω} {X : Ω → E} {Y : Ω → F}
              (hX : Measurable X) (hY : Measurable Y) :
              Measure.map Prod.snd (Measure.map (fun ω => (X ω, Y ω)) P) =
                Measure.map Y P

          Exact module and namespace context

          Lean proof · lawMapProdSnd

          One rewrite composes the maps; the remaining equality follows directly from how a pair's projection or swap is defined.

          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

          theorem lawMapProdSnd {Ω E F : Type*} [MeasurableSpace Ω]
              [MeasurableSpace E] [MeasurableSpace F]
              {P : Measure Ω} {X : Ω → E} {Y : Ω → F}
              (hX : Measurable X) (hY : Measurable Y) :
              Measure.map Prod.snd (Measure.map (fun ω => (X ω, Y ω)) P) =
                Measure.map Y P := by
            rw [Measure.map_map measurable_snd (hX.prod hY)]
            rfl
          
          /-- Swap the coordinate order of a paired pushforward law.
          
          Mathlib conditional-distribution APIs usually represent the joint law for
          `Y | X` in the order `(X,Y)`.  Some paper proofs first name the joint law in the
          opposite order.  This helper records only the `Measure.map` orientation
          bookkeeping; it does not construct a conditional law.
          -/

          Exact module and namespace context

          Scope and omitted-condition boundaries

          • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
          • Only orientation/marginal bookkeeping; no independence, conditional kernel, process or density construction.

          Source and reuse

          ASTIS parents called

            Mathlib API called (external library)

            • MeasureTheory.Measure.map_map
            • measurable_snd
            • Measurable.prod

            Mathematical sources

            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

            ASTIS mathematical exposition

            Swap the coordinate order of a joint image law

            AutoSamplingTheory.lawMapProdSwap · theorem · Teaching coverage

            Statement

            Let Ω,E,F be measurable spaces and P any measure on Ω. For measurable X:Ω→E and Y:Ω→F, pushing the joint law (X,Y)#P through coordinate swap gives the joint law (Y,X)#P.

            \[\operatorname{swap}_\#((X,Y)_\#P)=(Y,X)_\#P.\]

            All objects and hypotheses

            • Ω,E,F are arbitrary measurable spaces and P is any measure on Ω.
            • X:Ω→E and Y:Ω→F are both measurable, not merely assumed equal in law.

            Notation and interpretation

            Pushforward law

            P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

            \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]

            Mathematical proof

            1. Compose the measurable maps

            The pair map is measurable because both coordinates are. The projection or swap is measurable for product sigma-algebras, so consecutive pushforwards compose.

            \[T_\#((X,Y)_\#P)=(T\circ(X,Y))_\#P.\]
            Corresponding Lean step

            Measure.map_map measurable_swap (hX.prod hY)

            2. Evaluate the composite

            The selected projection or swap of a pair gives precisely the displayed target map, pointwise on Ω.

            \[\operatorname{swap}(X\omega,Y\omega)=(Y\omega,X\omega).\]
            Corresponding Lean step

            rfl

            Lean statement · lawMapProdSwap

            The two ordinary measurability hypotheses ensure this is genuine pushforward composition. The result identifies a measure, not a density.

            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

            theorem lawMapProdSwap {Ω E F : Type*} [MeasurableSpace Ω]
                [MeasurableSpace E] [MeasurableSpace F]
                {P : Measure Ω} {X : Ω → E} {Y : Ω → F}
                (hX : Measurable X) (hY : Measurable Y) :
                Measure.map Prod.swap (Measure.map (fun ω => (X ω, Y ω)) P) =
                  Measure.map (fun ω => (Y ω, X ω)) P

            Exact module and namespace context

            Lean proof · lawMapProdSwap

            One rewrite composes the maps; the remaining equality follows directly from how a pair's projection or swap is defined.

            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

            theorem lawMapProdSwap {Ω E F : Type*} [MeasurableSpace Ω]
                [MeasurableSpace E] [MeasurableSpace F]
                {P : Measure Ω} {X : Ω → E} {Y : Ω → F}
                (hX : Measurable X) (hY : Measurable Y) :
                Measure.map Prod.swap (Measure.map (fun ω => (X ω, Y ω)) P) =
                  Measure.map (fun ω => (Y ω, X ω)) P := by
              rw [Measure.map_map measurable_swap (hX.prod hY)]
              rfl
            
            /-- Mathlib orientation bridge between `condDistrib` and `condExpKernel`.
            
            For the SALD conditional drift, instantiate `Y` with `X_k^eta` and `X` with
            `hat X_s`: the conditional distribution of `X_k^eta` given `hat X_s` agrees
            almost everywhere with the conditional-expectation kernel mapped by `X_k^eta`.
            This is a local theorem from Mathlib's conditional-kernel backend, not a weak
            Fokker--Planck or KL differentiability result.
            -/

            Exact module and namespace context

            Scope and omitted-condition boundaries

            • P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately.
            • Only orientation/marginal bookkeeping; no independence, conditional kernel, process or density construction.

            Source and reuse

            ASTIS parents called

              Mathlib API called (external library)

              • MeasureTheory.Measure.map_map
              • measurable_swap
              • Measurable.prod

              Mathematical sources

              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

              ASTIS mathematical exposition

              Match the conditional distribution and mapped conditional-expectation kernel

              AutoSamplingTheory.condDistribAeEqCondExpKernelMap · theorem · Teaching coverage

              Statement

              Let Ω and γ be Standard Borel measurable spaces, with γ nonempty; let β be any measurable space and μ any finite measure on Ω. For measurable X:Ω→β and Y:Ω→γ and a fixed measurable set S⊆γ, the selected conditional probability of Y∈S given X, evaluated at X(ω), agrees μ-almost everywhere with the conditional-expectation kernel for σ(X), pushed forward by Y and evaluated on S.

              \[q(X\omega,S)=\bigl(Y_\#\,\operatorname{condExpKernel}(\mu,\sigma(X))(\omega)\bigr)(S)\quad\mu\text{-a.e.},\qquad \sigma(X)=\mathcal M_\beta\operatorname{.comap}X.\]

              All objects and hypotheses

              • Ω, β, γ have measurable-space structures; Ω and γ are Standard Borel, and γ is nonempty. No Standard Borel assumption on β or Nonempty Ω is required.
              • μ is finite; X:Ω→β and Y:Ω→γ are measurable; S⊆γ is measurable.

              Notation and interpretation

              Pushforward law

              P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

              \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
              A.e. and strong measurability

              A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

              \[f=g\quad\mu\text{-a.e.}\]
              Conditional integral notation

              The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

              \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

              Mathematical proof

              1. Use the conditional-kernel comparison theorem

              Mathlib already compares the conditional distribution of a sampled variable with the image of the sample-space conditional-expectation kernel. Its convention lists the sampled variable first and the conditioning variable second.

              \[\operatorname{condDistrib}(V\mid U;\mu)(U\omega,S)=(V_\#Q_{\sigma(U)}(\omega))(S)\quad\mu\text{-a.e.}\]
              Corresponding Lean step

              ProbabilityTheory.condDistrib_apply_ae_eq_condExpKernel_map

              2. Match the roles without swapping the meaning

              Set the imported theorem's sampled variable to Y and its conditioning variable to X. Their measurability and S's measurability are exactly the required inputs.

              \[V=Y,\quad U=X,\quad q(X\omega,S)=(Y_\#Q_{\sigma(X)}(\omega))(S)\quad\mu\text{-a.e.}\]
              Corresponding Lean step

              (X := Y) (Y := X) hY hX hs

              Lean statement · condDistribAeEqCondExpKernelMap

              The conclusion is equality of two scalar event probabilities for one fixed measurable S. The order of parameter names in the imported theorem is opposite to this adapter's chosen names.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem condDistribAeEqCondExpKernelMap {Ω β γ : Type*}
                  [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                  [StandardBorelSpace Ω] [StandardBorelSpace γ] [Nonempty γ]
                  {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                  (hX : Measurable X) (hY : Measurable Y) {s : Set γ}
                  (hs : MeasurableSet s) :
                  (fun a => ProbabilityTheory.condDistrib Y X μ (X a) s) =ᵐ[μ]
                    fun a =>
                      (ProbabilityTheory.condExpKernel μ
                          ((inferInstance : MeasurableSpace β).comap X)).map Y a s

              Exact module and namespace context

              Lean proof · condDistribAeEqCondExpKernelMap

              The proof directly specializes the imported orientation theorem. It does not prove equality of measures on one common full-measure set for all S.

              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

              theorem condDistribAeEqCondExpKernelMap {Ω β γ : Type*}
                  [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                  [StandardBorelSpace Ω] [StandardBorelSpace γ] [Nonempty γ]
                  {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                  (hX : Measurable X) (hY : Measurable Y) {s : Set γ}
                  (hs : MeasurableSet s) :
                  (fun a => ProbabilityTheory.condDistrib Y X μ (X a) s) =ᵐ[μ]
                    fun a =>
                      (ProbabilityTheory.condExpKernel μ
                          ((inferInstance : MeasurableSpace β).comap X)).map Y a s := by
                exact ProbabilityTheory.condDistrib_apply_ae_eq_condExpKernel_map
                  (μ := μ) (X := Y) (Y := X) hY hX hs
              
              /-- Sample-space component-version bridge from `condExpKernel.map` to
              `condDistrib`.
              
              For the SALD `condC` field, this isolates the remaining Mathlib-facing
              boundary after `condDistrib` and `condExpKernel.map` have been aligned as
              measure-valued kernels almost everywhere.  It turns a selected
              `condExpKernel.map` version of the component field into the displayed
              `condDistrib` integral equality after composing with `hat X_s`.  The theorem
              does not prove the measure-valued kernel equality or choose the component
              version; those remain the smaller conditional-kernel obligations.
              -/

              Exact module and namespace context

              Scope and omitted-condition boundaries

              • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
              • The exceptional set may depend on the fixed event S; do not upgrade this declaration alone to measure-valued a.e. kernel equality.
              • No weak Fokker–Planck equation or KL differentiability result.

              Source and reuse

              ASTIS parents called

                Mathlib API called (external library)

                • ProbabilityTheory.condDistrib_apply_ae_eq_condExpKernel_map

                Mathematical sources

                ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                ASTIS mathematical exposition

                Transfer a chosen conditional integral version between equal kernels

                AutoSamplingTheory.condDistribIntegralSampleAeEqOfCondExpKernelMap · theorem · Teaching coverage

                Statement

                Use the finite-measure conditional-kernel setting with Ω additionally Standard Borel. Suppose q(Xω) and the Y-image of the conditional-expectation kernel for σ(X) are equal as measures μ-a.e. Suppose integrating y↦f(Xω,y) against the latter measure gives a chosen field v(Xω) μ-a.e. Then integrating against q(Xω) also gives v(Xω) μ-a.e. The two a.e. identities are assumptions.

                \[q(X\omega)=R(\omega)\ \mu\text{-a.e.},\quad \int f(X\omega,y)\,dR(\omega)(y)=v(X\omega)\ \mu\text{-a.e.} \ \Longrightarrow\ C(X\omega)=v(X\omega)\ \mu\text{-a.e.}.\]

                All objects and hypotheses

                • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                • Ω is also Standard Borel; v:β→F is a chosen field; R(ω)=(condExpKernel μ σ(X)).map Y (ω).
                • hkernel gives equality q(Xω)=R(ω) as measures μ-a.e.; this is stronger than a separate eventwise statement with event-dependent null sets.
                • hfield gives the stated integral equality to v(Xω) μ-a.e. No X/Y measurability or f integrability is separately assumed by this substitution theorem.

                Notation and interpretation

                Pushforward law

                P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                A.e. and strong measurability

                A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                \[f=g\quad\mu\text{-a.e.}\]
                Integrability and Bochner integrals

                L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                Conditional integral notation

                The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                Mathematical proof

                1. Intersect the two full-measure events

                Outside one null set both the measure equality and the field equality hold at the same ω.

                \[q(X\omega)=R(\omega),\qquad\int f(X\omega,y)\,dR(\omega)=v(X\omega).\]
                Corresponding Lean step

                filter_upwards [hkernel,hfield]

                2. Substitute the equal measure, then the field value

                An integral depends on its measure argument. Equal measures give equal totalized integrals, after which the supplied field identity closes the equality.

                \[C(X\omega)=\int f(X\omega,y)\,dR(\omega)=v(X\omega).\]
                Corresponding Lean step

                rw [hka,hfa]

                Lean statement · condDistribIntegralSampleAeEqOfCondExpKernelMap

                The theorem consumes a measure-valued equality and a selected field version. It does not construct either of those hypotheses.

                Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                theorem condDistribIntegralSampleAeEqOfCondExpKernelMap {Ω β γ F : Type*}
                    [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                    [NormedAddCommGroup F] [NormedSpace ℝ F]
                    [StandardBorelSpace Ω] [StandardBorelSpace γ] [Nonempty γ]
                    {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                    {f : β × γ → F} {field : β → F}
                    (hkernel :
                      (fun a => ProbabilityTheory.condDistrib Y X μ (X a)) =ᵐ[μ]
                        fun a =>
                          (ProbabilityTheory.condExpKernel μ
                            ((inferInstance : MeasurableSpace β).comap X)).map Y a)
                    (hfield :
                      (fun a => ∫ y, f (X a, y)
                          ∂(ProbabilityTheory.condExpKernel μ
                            ((inferInstance : MeasurableSpace β).comap X)).map Y a) =ᵐ[μ]
                        fun a => field (X a)) :
                    (fun a => ∫ y, f (X a, y)
                        ∂ProbabilityTheory.condDistrib Y X μ (X a)) =ᵐ[μ]
                      fun a => field (X a)

                Exact module and namespace context

                Lean proof · condDistribIntegralSampleAeEqOfCondExpKernelMap

                A finite intersection combines the a.e. assumptions, and two substitutions identify the integral. No conditional expectation or measurability theorem is re-proved.

                Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                theorem condDistribIntegralSampleAeEqOfCondExpKernelMap {Ω β γ F : Type*}
                    [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                    [NormedAddCommGroup F] [NormedSpace ℝ F]
                    [StandardBorelSpace Ω] [StandardBorelSpace γ] [Nonempty γ]
                    {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                    {f : β × γ → F} {field : β → F}
                    (hkernel :
                      (fun a => ProbabilityTheory.condDistrib Y X μ (X a)) =ᵐ[μ]
                        fun a =>
                          (ProbabilityTheory.condExpKernel μ
                            ((inferInstance : MeasurableSpace β).comap X)).map Y a)
                    (hfield :
                      (fun a => ∫ y, f (X a, y)
                          ∂(ProbabilityTheory.condExpKernel μ
                            ((inferInstance : MeasurableSpace β).comap X)).map Y a) =ᵐ[μ]
                        fun a => field (X a)) :
                    (fun a => ∫ y, f (X a, y)
                        ∂ProbabilityTheory.condDistrib Y X μ (X a)) =ᵐ[μ]
                      fun a => field (X a) := by
                  filter_upwards [hkernel, hfield] with a hka hfa
                  rw [hka, hfa]
                
                /-- Strong measurability of a vector-valued conditional integral against
                `condDistrib`.
                
                This packages the Mathlib theorem in the orientation used by the SALD
                component fields: conditioning variable `X`, sampled variable `Y`, and an
                integrand on `(X,Y)`.  It does not prove the EM interpolation law or any weak
                Fokker--Planck identity.
                -/

                Exact module and namespace context

                Scope and omitted-condition boundaries

                • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                • No regularity of the chosen field follows from this substitution alone.

                Source and reuse

                ASTIS parents called

                  Mathlib API called (external library)

                  No direct Mathlib call recorded; see the ASTIS parents.

                  Mathematical sources

                  ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                  ASTIS mathematical exposition

                  The conditional integral is almost-everywhere strongly measurable on the sample space

                  AutoSamplingTheory.condDistribIntegralAEStronglyMeasurable · theorem · Teaching coverage

                  Statement

                  In the finite-measure conditional-distribution setting and notation below, assume Y is μ-a.e. measurable and X is μ-a.e. measurable. If f is almost-everywhere strongly measurable under the joint image measure λ, then C∘X is almost-everywhere strongly measurable under μ.

                  \[f\in\operatorname{AESM}(\lambda)\Longrightarrow C∘X\in\operatorname{AESM}(μ).\]

                  All objects and hypotheses

                  • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                  • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                  • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                  • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                  • Y is μ-a.e. measurable.
                  • X is μ-a.e. measurable.
                  • f is almost-everywhere strongly measurable under λ.

                  Notation and interpretation

                  Pushforward law

                  P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                  \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                  A.e. and strong measurability

                  A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                  \[f=g\quad\mu\text{-a.e.}\]
                  Integrability and Bochner integrals

                  L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                  \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                  Conditional integral notation

                  The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                  \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                  Mathematical proof

                  1. Apply the canonical conditional-integral measurability result

                  Mathlib identifies the first marginal of the joint image measure using the a.e. measurability of Y, and its disintegration backend supplies a strongly measurable version of the conditional integral under that marginal.

                  \[f\text{ is }\lambda\text{-a.e. strongly measurable}\Longrightarrow C\text{ is }m\text{-a.e. strongly measurable}.\]
                  Corresponding Lean step

                  The map-level part inside hf.integral_condDistrib hX hY

                  2. Compose with the conditioning variable

                  The supplied a.e. measurability of X transfers the marginal-a.e. strong measurability of C back to sample-space a.e. strong measurability of C∘X.

                  \[C\in\operatorname{AESM}(m),\quad X\in\operatorname{AEM}(\mu)\Longrightarrow C\circ X\in\operatorname{AESM}(\mu).\]
                  Corresponding Lean step

                  hf.integral_condDistrib hX hY; imported composition support

                  Lean statement · condDistribIntegralAEStronglyMeasurable

                  The measure attached to the conclusion is the original sample measure μ. The hypothesis concerns the joint measure λ, not every individual conditional fiber.

                  Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                  theorem condDistribIntegralAEStronglyMeasurable {Ω β γ F : Type*}
                      [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                      [NormedAddCommGroup F] [NormedSpace ℝ F]
                      [StandardBorelSpace γ] [Nonempty γ]
                      {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                      {f : β × γ → F}
                      (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                      (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
                      AEStronglyMeasurable
                        (fun a => ∫ y, f (X a, y) ∂ProbabilityTheory.condDistrib Y X μ (X a))
                        μ

                  Exact module and namespace context

                  Lean proof · condDistribIntegralAEStronglyMeasurable

                  This is direct reuse of Mathlib's sample-space conditional-integral measurability theorem. The displayed argument explains that theorem's role; ASTIS adds no independent disintegration proof.

                  Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                  theorem condDistribIntegralAEStronglyMeasurable {Ω β γ F : Type*}
                      [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                      [NormedAddCommGroup F] [NormedSpace ℝ F]
                      [StandardBorelSpace γ] [Nonempty γ]
                      {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                      {f : β × γ → F}
                      (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                      (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
                      AEStronglyMeasurable
                        (fun a => ∫ y, f (X a, y) ∂ProbabilityTheory.condDistrib Y X μ (X a))
                        μ := by
                    exact hf.integral_condDistrib hX hY
                  
                  /-- Integrability of a vector-valued conditional integral against
                  `condDistrib`.
                  
                  For SALD this is the Mathlib-local handoff needed to turn integrable frozen
                  drift summands into integrable component conditional fields before the
                  existing `bar b_{k,s}` regularity wrappers are used.
                  -/

                  Exact module and namespace context

                  Scope and omitted-condition boundaries

                  • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                  • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                  • No specified SALD component version, path law, or weak PDE is constructed.

                  Source and reuse

                  ASTIS parents called

                    Mathlib API called (external library)

                    • MeasureTheory.AEStronglyMeasurable.integral_condDistrib

                    Mathematical sources

                    ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                    ASTIS mathematical exposition

                    The conditional integral is integrable on the sample space

                    AutoSamplingTheory.condDistribIntegralIntegrable · theorem · Teaching coverage

                    Statement

                    In the finite-measure conditional-distribution setting and notation below, assume Y is μ-a.e. measurable and X is μ-a.e. measurable. If f is integrable under the joint image measure λ, then C∘X is integrable under μ.

                    \[f\in L^1(\lambda)\Longrightarrow C∘X\in L^1(μ).\]

                    All objects and hypotheses

                    • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                    • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                    • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                    • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                    • Y is μ-a.e. measurable.
                    • X is μ-a.e. measurable.
                    • f is integrable under λ.

                    Notation and interpretation

                    Pushforward law

                    P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                    \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                    A.e. and strong measurability

                    A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                    \[f=g\quad\mu\text{-a.e.}\]
                    Integrability and Bochner integrals

                    L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                    \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                    Conditional integral notation

                    The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                    \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                    Mathematical proof

                    1. Reuse integrability of the conditional average

                    For an integrable joint integrand, the imported conditional-integral theorem combines a.e. strong measurability with integrability of the norm of the conditional average. The relevant norm bound is controlled by conditional integration of ‖f‖.

                    \[f\in L^1(\lambda)\Longrightarrow C\in L^1(m),\qquad\|C(x)\|\le\int\|f(x,y)\|\,dq(x)(y).\]
                    Corresponding Lean step

                    map-level integrability inside hf.integral_condDistrib hX hY

                    2. Pull marginal integrability back to samples

                    Since X is μ-a.e. measurable and m=X#μ, integrability of C under m implies integrability of C∘X under μ. This is part of the imported sample-space theorem.

                    \[C\in L^1(X_\#\mu)\Longrightarrow C\circ X\in L^1(\mu).\]
                    Corresponding Lean step

                    hf.integral_condDistrib hX hY

                    Lean statement · condDistribIntegralIntegrable

                    The measure attached to the conclusion is the original sample measure μ. The hypothesis concerns the joint measure λ, not every individual conditional fiber.

                    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                    theorem condDistribIntegralIntegrable {Ω β γ F : Type*}
                        [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                        [NormedAddCommGroup F] [NormedSpace ℝ F]
                        [StandardBorelSpace γ] [Nonempty γ]
                        {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                        {f : β × γ → F}
                        (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                        (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                        Integrable
                          (fun a => ∫ y, f (X a, y) ∂ProbabilityTheory.condDistrib Y X μ (X a))
                          μ

                    Exact module and namespace context

                    Lean proof · condDistribIntegralIntegrable

                    This is direct reuse of Mathlib's sample-space conditional-integral integrability theorem. The displayed argument explains that theorem's role; ASTIS adds no independent disintegration proof.

                    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                    theorem condDistribIntegralIntegrable {Ω β γ F : Type*}
                        [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                        [NormedAddCommGroup F] [NormedSpace ℝ F]
                        [StandardBorelSpace γ] [Nonempty γ]
                        {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                        {f : β × γ → F}
                        (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                        (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                        Integrable
                          (fun a => ∫ y, f (X a, y) ∂ProbabilityTheory.condDistrib Y X μ (X a))
                          μ := by
                      exact hf.integral_condDistrib hX hY
                    
                    /-- Strong measurability of the state-space conditional integral under the
                    conditioning law `μ.map X`.
                    
                    This is the law-space version needed for the SALD named `hat rho_s` field:
                    Mathlib's `condDistrib` backend already gives measurability of
                    `x ↦ ∫ y, f (x,y) ∂condDistrib Y X μ x` under the marginal law of the
                    conditioning variable.  It does not choose a SALD-specific version of the
                    conditional component field.
                    -/

                    Exact module and namespace context

                    Scope and omitted-condition boundaries

                    • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                    • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                    • No specified SALD component version, path law, or weak PDE is constructed.

                    Source and reuse

                    ASTIS parents called

                      Mathlib API called (external library)

                      • MeasureTheory.Integrable.integral_condDistrib

                      Mathematical sources

                      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                      ASTIS mathematical exposition

                      The conditional integral is almost-everywhere strongly measurable under the conditioning law

                      AutoSamplingTheory.condDistribIntegralMapAEStronglyMeasurable · theorem · Teaching coverage

                      Statement

                      In the finite-measure conditional-distribution setting and notation below, assume Y is μ-a.e. measurable. If f is almost-everywhere strongly measurable under the joint image measure λ, then C is almost-everywhere strongly measurable under m. No a.e. measurability assumption on X is required by this law-space adapter.

                      \[f\in\operatorname{AESM}(\lambda)\Longrightarrow C\in\operatorname{AESM}(m).\]

                      All objects and hypotheses

                      • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                      • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                      • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                      • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                      • Y is μ-a.e. measurable.
                      • f is almost-everywhere strongly measurable under λ.

                      Notation and interpretation

                      Pushforward law

                      P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                      \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                      A.e. and strong measurability

                      A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                      \[f=g\quad\mu\text{-a.e.}\]
                      Integrability and Bochner integrals

                      L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                      \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                      Conditional integral notation

                      The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                      \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                      Mathematical proof

                      1. Apply the canonical conditional-integral measurability result

                      Mathlib identifies the first marginal of the joint image measure using the a.e. measurability of Y, and its disintegration backend supplies a strongly measurable version of the conditional integral under that marginal.

                      \[f\text{ is }\lambda\text{-a.e. strongly measurable}\Longrightarrow C\text{ is }m\text{-a.e. strongly measurable}.\]
                      Corresponding Lean step

                      hf.integral_condDistrib_map hY

                      Lean statement · condDistribIntegralMapAEStronglyMeasurable

                      The measure attached to the conclusion is the conditioning image measure m. The hypothesis concerns the joint measure λ, not every individual conditional fiber.

                      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                      theorem condDistribIntegralMapAEStronglyMeasurable {Ω β γ F : Type*}
                          [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                          [NormedAddCommGroup F] [NormedSpace ℝ F]
                          [StandardBorelSpace γ] [Nonempty γ]
                          {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                          {f : β × γ → F}
                          (hY : AEMeasurable Y μ)
                          (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
                          AEStronglyMeasurable
                            (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                            (μ.map X)

                      Exact module and namespace context

                      Lean proof · condDistribIntegralMapAEStronglyMeasurable

                      This is direct reuse of Mathlib's law-space conditional-integral measurability theorem. The displayed argument explains that theorem's role; ASTIS adds no independent disintegration proof.

                      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                      theorem condDistribIntegralMapAEStronglyMeasurable {Ω β γ F : Type*}
                          [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                          [NormedAddCommGroup F] [NormedSpace ℝ F]
                          [StandardBorelSpace γ] [Nonempty γ]
                          {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                          {f : β × γ → F}
                          (hY : AEMeasurable Y μ)
                          (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
                          AEStronglyMeasurable
                            (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                            (μ.map X) := by
                        exact hf.integral_condDistrib_map hY
                      
                      /-- Integrability of the state-space conditional integral under the
                      conditioning law `μ.map X`.
                      
                      For SALD this is the Mathlib-local input that turns an integrable frozen
                      drift or score summand on the joint law of `(hat X_s, X_k^eta)` into an
                      integrable canonical conditional field under `hat rho_s = Law(hat X_s)`.
                      -/

                      Exact module and namespace context

                      Scope and omitted-condition boundaries

                      • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                      • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                      • X need not be a.e. measurable in this exact signature; without it, the displayed image measures retain Mathlib's totalized-map semantics.
                      • No specified SALD component version, path law, or weak PDE is constructed.

                      Source and reuse

                      ASTIS parents called

                        Mathlib API called (external library)

                        • MeasureTheory.AEStronglyMeasurable.integral_condDistrib_map

                        Mathematical sources

                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                        ASTIS mathematical exposition

                        The conditional integral is integrable under the conditioning law

                        AutoSamplingTheory.condDistribIntegralMapIntegrable · theorem · Teaching coverage

                        Statement

                        In the finite-measure conditional-distribution setting and notation below, assume Y is μ-a.e. measurable. If f is integrable under the joint image measure λ, then C is integrable under m. No a.e. measurability assumption on X is required by this law-space adapter.

                        \[f\in L^1(\lambda)\Longrightarrow C\in L^1(m).\]

                        All objects and hypotheses

                        • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                        • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                        • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                        • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                        • Y is μ-a.e. measurable.
                        • f is integrable under λ.

                        Notation and interpretation

                        Pushforward law

                        P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                        \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                        A.e. and strong measurability

                        A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                        \[f=g\quad\mu\text{-a.e.}\]
                        Integrability and Bochner integrals

                        L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                        \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                        Conditional integral notation

                        The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                        \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                        Mathematical proof

                        1. Reuse integrability of the conditional average

                        For an integrable joint integrand, the imported conditional-integral theorem combines a.e. strong measurability with integrability of the norm of the conditional average. The relevant norm bound is controlled by conditional integration of ‖f‖.

                        \[f\in L^1(\lambda)\Longrightarrow C\in L^1(m),\qquad\|C(x)\|\le\int\|f(x,y)\|\,dq(x)(y).\]
                        Corresponding Lean step

                        hf.integral_condDistrib_map hY

                        Lean statement · condDistribIntegralMapIntegrable

                        The measure attached to the conclusion is the conditioning image measure m. The hypothesis concerns the joint measure λ, not every individual conditional fiber.

                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                        theorem condDistribIntegralMapIntegrable {Ω β γ F : Type*}
                            [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                            [NormedAddCommGroup F] [NormedSpace ℝ F]
                            [StandardBorelSpace γ] [Nonempty γ]
                            {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                            {f : β × γ → F}
                            (hY : AEMeasurable Y μ)
                            (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                            Integrable
                              (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                              (μ.map X)

                        Exact module and namespace context

                        Lean proof · condDistribIntegralMapIntegrable

                        This is direct reuse of Mathlib's law-space conditional-integral integrability theorem. The displayed argument explains that theorem's role; ASTIS adds no independent disintegration proof.

                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                        theorem condDistribIntegralMapIntegrable {Ω β γ F : Type*}
                            [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                            [NormedAddCommGroup F] [NormedSpace ℝ F]
                            [StandardBorelSpace γ] [Nonempty γ]
                            {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                            {f : β × γ → F}
                            (hY : AEMeasurable Y μ)
                            (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                            Integrable
                              (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                              (μ.map X) := by
                          exact hf.integral_condDistrib_map hY
                        
                        /-- Disintegrate an integral through the `condDistrib` kernel.
                        
                        For the SALD conditional drift in `appendix.tex:1368-1377`, instantiate `X`
                        with `hat X_s`, `Y` with `X_k^eta`, and `f` with the weak test-gradient
                        pairing against one frozen component.  This proves the map-law
                        conditional-integral identity behind the canonical `condDistrib` component
                        generator action; it does not prove the weak Fokker--Planck equation,
                        boundary integration by parts, or log-ratio admissibility.
                        -/

                        Exact module and namespace context

                        Scope and omitted-condition boundaries

                        • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                        • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                        • X need not be a.e. measurable in this exact signature; without it, the displayed image measures retain Mathlib's totalized-map semantics.
                        • No specified SALD component version, path law, or weak PDE is constructed.

                        Source and reuse

                        ASTIS parents called

                          Mathlib API called (external library)

                          • MeasureTheory.Integrable.integral_condDistrib_map

                          Mathematical sources

                          ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                          ASTIS mathematical exposition

                          Integrating the conditional average recovers the joint integral

                          AutoSamplingTheory.condDistribIntegralMapIntegral · theorem · Teaching coverage

                          Statement

                          In the finite-measure conditional setting below, assume X and Y are μ-a.e. measurable and f is integrable under their joint image measure λ. Then integrating the conditional integral C(x) against the conditioning law m=X#μ equals integrating f(Xω,Yω) against μ. This is finite-measure disintegration, without probability normalization.

                          \[\int_\beta\left(\int_\gamma f(x,y)\,dq(x)(y)\right)\,dm(x)=\int_\Omega f(X\omega,Y\omega)\,d\mu(\omega).\]

                          All objects and hypotheses

                          • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                          • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                          • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                          • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                          • X and Y are μ-a.e. measurable, and f is λ-integrable.

                          Notation and interpretation

                          Pushforward law

                          P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                          \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                          A.e. and strong measurability

                          A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                          \[f=g\quad\mu\text{-a.e.}\]
                          Integrability and Bochner integrals

                          L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                          \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                          Conditional integral notation

                          The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                          \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                          Mathematical proof

                          1. Recover the joint image measure by disintegration

                          The general disintegration theorem with sampled variable Y gives λ=m⊗ₘq. The marginal is finite and q is Markov, providing the s-finiteness needed by the composition-product integral API.

                          \[m\otimes_m q=\lambda.\]
                          Corresponding Lean step

                          ProbabilityTheory.compProd_map_condDistrib hY; hcomp

                          2. Transfer integrability to the composition-product

                          Because the two joint measures are equal, the supplied integrability of f under λ applies to m⊗ₘq.

                          \[f\in L^1(\lambda)\Longrightarrow f\in L^1(m\otimes_m q).\]
                          Corresponding Lean step

                          hfComp; rw [hcomp]; exact hf

                          3. Use the iterated-integral identity

                          The composition-product integral theorem identifies the outer conditional average with integration over the reconstructed joint measure.

                          \[\int\!\int f(x,y)\,dq(x)(y)\,dm(x)=\int f\,d(m\otimes_m q).\]
                          Corresponding Lean step

                          (Measure.integral_compProd hfComp).symm

                          4. Return to the original sample space

                          Replace the composition-product by the joint image measure and use the measurable-pair pushforward integration formula.

                          \[\int f\,d\lambda=\int f(X\omega,Y\omega)\,d\mu.\]
                          Corresponding Lean step

                          rw [hcomp]; integral_map (hX.prodMk hY) hf.1

                          Lean statement · condDistribIntegralMapIntegral

                          The integrability assumption belongs to the joint measure. The conclusion averages over the conditioning law and does not demand integrability on every null fiber.

                          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                          theorem condDistribIntegralMapIntegral {Ω β γ F : Type*}
                              [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                              [NormedAddCommGroup F] [NormedSpace ℝ F]
                              [StandardBorelSpace γ] [Nonempty γ]
                              {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                              {f : β × γ → F}
                              (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                              (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                              (∫ x, ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x
                                  ∂μ.map X) =
                                ∫ a, f (X a, Y a) ∂μ

                          Exact module and namespace context

                          Lean proof · condDistribIntegralMapIntegral

                          The proof names the disintegration equality, transports the integrability hypothesis, reverses the iterated-integral theorem, and changes variables through the paired map.

                          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                          theorem condDistribIntegralMapIntegral {Ω β γ F : Type*}
                              [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                              [NormedAddCommGroup F] [NormedSpace ℝ F]
                              [StandardBorelSpace γ] [Nonempty γ]
                              {μ : Measure Ω} [IsFiniteMeasure μ] {X : Ω → β} {Y : Ω → γ}
                              {f : β × γ → F}
                              (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                              (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                              (∫ x, ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x
                                  ∂μ.map X) =
                                ∫ a, f (X a, Y a) ∂μ := by
                            have hcomp := ProbabilityTheory.compProd_map_condDistrib
                              (μ := μ) (X := X) (Y := Y) (mβ := inferInstance) hY
                            have hfComp :
                                Integrable f ((μ.map X) ⊗ₘ ProbabilityTheory.condDistrib Y X μ) := by
                              rw [hcomp]
                              exact hf
                            calc
                              (∫ x, ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x
                                  ∂μ.map X)
                                  = ∫ z, f z ∂((μ.map X) ⊗ₘ
                                      ProbabilityTheory.condDistrib Y X μ) := by
                                    exact (Measure.integral_compProd
                                      (μ := μ.map X) (κ := ProbabilityTheory.condDistrib Y X μ)
                                      hfComp).symm
                              _ = ∫ a, f (X a, Y a) ∂μ := by
                                    rw [hcomp]
                                    rw [integral_map (hX.prodMk hY) hf.1]
                          
                          /-- Named-law variant of `condDistribIntegralMapIntegral`.
                          
                          This is the paper-oriented form for `\hat\rho_s = Law(\hat X_s)`.
                          -/

                          Exact module and namespace context

                          Scope and omitted-condition boundaries

                          • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                          • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                          • For probability μ this is a two-stage expectation identity. For general finite μ, q(x) has mass one but the outer measure m has total mass μ(Ω); the reconstruction preserves that mass.
                          • No integration by parts, admissible log-ratio test or Fokker–Planck theorem.

                          Source and reuse

                          ASTIS parents called

                            Mathlib API called (external library)

                            • ProbabilityTheory.compProd_map_condDistrib
                            • MeasureTheory.Measure.integral_compProd
                            • MeasureTheory.integral_map
                            • AEMeasurable.prodMk

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Disintegration written with a named conditioning law

                            AutoSamplingTheory.condDistribIntegralNamedLawIntegral · theorem · Teaching coverage

                            Statement

                            In the finite-measure conditional setting below, let ρ̂ be a measure on β with ρ̂=X#μ. Assume Y is μ-a.e. measurable and X is μ-a.e. measurable, and f is integrable under λ. Then the averaged conditional integral equals the joint sample integral. This only replaces the mapped measure by an equal named measure.

                            \[\widehat\rho=m\Longrightarrow\int C\,d\widehat\rho=\int f(X\omega,Y\omega)\,d\mu.\]

                            All objects and hypotheses

                            • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                            • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                            • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                            • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                            • ρ̂ is a measure on β and hhatRho gives ρ̂=X#μ.
                            • Y is μ-a.e. measurable.
                            • X is μ-a.e. measurable.
                            • f is integrable under λ.

                            Notation and interpretation

                            Pushforward law

                            P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                            \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                            A.e. and strong measurability

                            A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                            \[f=g\quad\mu\text{-a.e.}\]
                            Integrability and Bochner integrals

                            L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                            \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                            Conditional integral notation

                            The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                            \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                            Mathematical proof

                            1. Replace the named measure by the image law

                            Use the supplied equality exactly where the measure occurs in the conclusion.

                            \[\widehat\rho=m=X_\#\mu.\]
                            Corresponding Lean step

                            rw [hhatRho]

                            2. Reuse the canonical law-space theorem

                            After substitution, the goal is the existing disintegration or regularity theorem with unchanged hypotheses.

                            \[\int C\,dm=\int f(X\omega,Y\omega)\,d\mu.\]
                            Corresponding Lean step

                            exact condDistribIntegralMapIntegral ...

                            Lean statement · condDistribIntegralNamedLawIntegral

                            The named measure is not inferred from notation; its equality to X#μ is an explicit premise. The remaining assumptions are exactly those of the reused theorem.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedLawIntegral {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F}
                                (hhatRho : hatRho = μ.map X)
                                (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                                (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                                (∫ x, ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x
                                    ∂hatRho) =
                                  ∫ a, f (X a, Y a) ∂μ

                            Exact module and namespace context

                            Lean proof · condDistribIntegralNamedLawIntegral

                            The proof consists of measure substitution followed by the existing canonical result. The named-law wrapper adds no conditional-law construction or analytic hypothesis.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedLawIntegral {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F}
                                (hhatRho : hatRho = μ.map X)
                                (hX : AEMeasurable X μ) (hY : AEMeasurable Y μ)
                                (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                                (∫ x, ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x
                                    ∂hatRho) =
                                  ∫ a, f (X a, Y a) ∂μ := by
                              rw [hhatRho]
                              exact condDistribIntegralMapIntegral hX hY hf
                            
                            /-- Named-law variant of `condDistribIntegralMapAEStronglyMeasurable`.
                            
                            Instantiate `hatRho` with `Law(hat X_s)`, `X` with `hat X_s`, and `Y` with
                            `X_k^eta`.  The hypothesis `hatRho = μ.map X` is the paper's
                            `\hat\rho_s = Law(\hat X_s)` line.
                            -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                            • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                            • Reuse wrapper, not a separate proof of disintegration.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            A.e. strong measurability under a named conditioning law

                            AutoSamplingTheory.condDistribIntegralNamedLawAEStronglyMeasurable · theorem · Teaching coverage

                            Statement

                            In the finite-measure conditional setting below, let ρ̂ be a measure on β with ρ̂=X#μ. Assume Y is μ-a.e. measurable, and f is a.e. strongly measurable under λ. Then C is ρ̂-a.e. strongly measurable. This only replaces the mapped measure by an equal named measure.

                            \[\widehat\rho=m\Longrightarrow C\in \operatorname{AESM}(\widehat\rho).\]

                            All objects and hypotheses

                            • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                            • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                            • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                            • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                            • ρ̂ is a measure on β and hhatRho gives ρ̂=X#μ.
                            • Y is μ-a.e. measurable.
                            • f is a.e. strongly measurable under λ.

                            Notation and interpretation

                            Pushforward law

                            P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                            \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                            A.e. and strong measurability

                            A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                            \[f=g\quad\mu\text{-a.e.}\]
                            Integrability and Bochner integrals

                            L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                            \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                            Conditional integral notation

                            The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                            \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                            Mathematical proof

                            1. Replace the named measure by the image law

                            Use the supplied equality exactly where the measure occurs in the conclusion.

                            \[\widehat\rho=m=X_\#\mu.\]
                            Corresponding Lean step

                            rw [hhatRho]

                            2. Reuse the canonical law-space theorem

                            After substitution, the goal is the existing disintegration or regularity theorem with unchanged hypotheses.

                            \[C\in \operatorname{AESM}(m).\]
                            Corresponding Lean step

                            exact condDistribIntegralMapAEStronglyMeasurable ...

                            Lean statement · condDistribIntegralNamedLawAEStronglyMeasurable

                            The named measure is not inferred from notation; its equality to X#μ is an explicit premise. The remaining assumptions are exactly those of the reused theorem.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedLawAEStronglyMeasurable {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F}
                                (hhatRho : hatRho = μ.map X)
                                (hY : AEMeasurable Y μ)
                                (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
                                AEStronglyMeasurable
                                  (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                  hatRho

                            Exact module and namespace context

                            Lean proof · condDistribIntegralNamedLawAEStronglyMeasurable

                            The proof consists of measure substitution followed by the existing canonical result. The named-law wrapper adds no conditional-law construction or analytic hypothesis.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedLawAEStronglyMeasurable {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F}
                                (hhatRho : hatRho = μ.map X)
                                (hY : AEMeasurable Y μ)
                                (hf : AEStronglyMeasurable f (μ.map fun a => (X a, Y a))) :
                                AEStronglyMeasurable
                                  (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                  hatRho := by
                              rw [hhatRho]
                              exact condDistribIntegralMapAEStronglyMeasurable hY hf
                            
                            /-- Named-law variant of `condDistribIntegralMapIntegrable`. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                            • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                            • No AEMeasurable X assumption appears in this named regularity theorem; retain the totalized-map boundary.
                            • Reuse wrapper, not a separate proof of disintegration.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Integrability under a named conditioning law

                            AutoSamplingTheory.condDistribIntegralNamedLawIntegrable · theorem · Teaching coverage

                            Statement

                            In the finite-measure conditional setting below, let ρ̂ be a measure on β with ρ̂=X#μ. Assume Y is μ-a.e. measurable, and f is integrable under λ. Then C is integrable under the named law ρ̂. This only replaces the mapped measure by an equal named measure.

                            \[\widehat\rho=m\Longrightarrow C\in L^1(\widehat\rho).\]

                            All objects and hypotheses

                            • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                            • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                            • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                            • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                            • ρ̂ is a measure on β and hhatRho gives ρ̂=X#μ.
                            • Y is μ-a.e. measurable.
                            • f is integrable under λ.

                            Notation and interpretation

                            Pushforward law

                            P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                            \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                            A.e. and strong measurability

                            A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                            \[f=g\quad\mu\text{-a.e.}\]
                            Integrability and Bochner integrals

                            L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                            \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                            Conditional integral notation

                            The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                            \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                            Mathematical proof

                            1. Replace the named measure by the image law

                            Use the supplied equality exactly where the measure occurs in the conclusion.

                            \[\widehat\rho=m=X_\#\mu.\]
                            Corresponding Lean step

                            rw [hhatRho]

                            2. Reuse the canonical law-space theorem

                            After substitution, the goal is the existing disintegration or regularity theorem with unchanged hypotheses.

                            \[C\in L^1(m).\]
                            Corresponding Lean step

                            exact condDistribIntegralMapIntegrable ...

                            Lean statement · condDistribIntegralNamedLawIntegrable

                            The named measure is not inferred from notation; its equality to X#μ is an explicit premise. The remaining assumptions are exactly those of the reused theorem.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedLawIntegrable {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F}
                                (hhatRho : hatRho = μ.map X)
                                (hY : AEMeasurable Y μ)
                                (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                                Integrable
                                  (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                  hatRho

                            Exact module and namespace context

                            Lean proof · condDistribIntegralNamedLawIntegrable

                            The proof consists of measure substitution followed by the existing canonical result. The named-law wrapper adds no conditional-law construction or analytic hypothesis.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedLawIntegrable {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F}
                                (hhatRho : hatRho = μ.map X)
                                (hY : AEMeasurable Y μ)
                                (hf : Integrable f (μ.map fun a => (X a, Y a))) :
                                Integrable
                                  (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                  hatRho := by
                              rw [hhatRho]
                              exact condDistribIntegralMapIntegrable hY hf
                            
                            /-- Versioning theorem for a named conditional-integral component field.
                            
                            If a SALD component field such as `condC_{k,s}` or `condScore_{k,s}` is chosen
                            as a `hatRho`-a.e. version of the canonical `condDistrib` integral, then the
                            Mathlib law-space conditional-integral lemmas give the component's
                            measurability and integrability under the named law.  This is still a
                            conditional-kernel component theorem, not a weak Fokker--Planck theorem.
                            -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                            • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                            • No AEMeasurable X assumption appears in this named regularity theorem; retain the totalized-map boundary.
                            • Reuse wrapper, not a separate proof of disintegration.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            A chosen a.e. version inherits conditional-integral regularity

                            AutoSamplingTheory.condDistribIntegralNamedFieldRegularity · theorem · Teaching coverage

                            Statement

                            In the conditional setting below, let ρ̂=X#μ and v:β→F be a chosen field equal to C ρ̂-almost everywhere. If Y is μ-a.e. measurable and f is both a.e. strongly measurable and integrable under λ, then v is a.e. strongly measurable and integrable under ρ̂.

                            \[C=v\quad\widehat\rho\text{-a.e.},\quad C\in\operatorname{AESM}(\widehat\rho)\cap L^1(\widehat\rho) \ \Longrightarrow\ v\in\operatorname{AESM}(\widehat\rho)\cap L^1(\widehat\rho).\]

                            All objects and hypotheses

                            • Ω, β and γ are measurable spaces; γ is Standard Borel and nonempty.
                            • μ is a finite measure on Ω, not necessarily a probability; X:Ω→β and Y:Ω→γ are functions.
                            • F is a real normed vector space (NormedAddCommGroup and NormedSpace ℝ); no CompleteSpace assumption is added. The integrand f:β×γ→F is as specified below.
                            • Notation: λ=(ω↦(Xω,Yω))#μ, m=X#μ, q(x)=condDistrib(Y|X;μ)(x), and C(x)=∫f(x,y)dq(x)(y).
                            • ρ̂ is a measure on β equal to X#μ, and v:β→F is a chosen field.
                            • Y is μ-a.e. measurable; hfMeas explicitly supplies AEStronglyMeasurable f λ and hfInt explicitly supplies Integrable f λ (both premises are retained).
                            • hfield supplies C=v ρ̂-a.e.; X a.e. measurability is not separately required.

                            Notation and interpretation

                            Pushforward law

                            P is an arbitrary measure unless explicitly declared finite or a probability. The word law here abbreviates a pushforward measure; probability-language interpretations require normalization separately. Mathlib totalizes map to zero when X is not a.e. measurable; unqualified map-congruence and some law-space adapters intentionally retain that generality.

                            \[(X_\#\mu)(A)=\mu(X^{-1}A)\quad\text{when the measurable pushforward interpretation applies}\]
                            A.e. and strong measurability

                            A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                            \[f=g\quad\mu\text{-a.e.}\]
                            Integrability and Bochner integrals

                            L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                            \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]
                            Conditional integral notation

                            The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted. Finite non-probability measures are reconstructed with their original total mass; any version changes on marginal-null inputs must retain a measurable kernel.

                            \[\lambda=(X,Y)_\#\mu,\quad m=X_\#\mu,\quad q(x)=\operatorname{condDistrib}(Y\mid X;\mu)(x),\quad C(x)=\int f(x,y)\,dq(x)(y)\]

                            Mathematical proof

                            1. Obtain canonical measurability

                            Apply the named-law measurability adapter to C using the explicit joint measurability premise.

                            \[C\in\operatorname{AESM}(\widehat\rho).\]
                            Corresponding Lean step

                            condDistribIntegralNamedLawAEStronglyMeasurable hhatRho hY hfMeas

                            2. Obtain canonical integrability

                            Apply the named-law integrability adapter using the joint integrability premise.

                            \[C\in L^1(\widehat\rho).\]
                            Corresponding Lean step

                            condDistribIntegralNamedLawIntegrable hhatRho hY hfInt

                            3. Transfer both properties across a.e. equality

                            A.e. strong measurability and integrability are invariant under changing a function on a null set, so both properties pass to v.

                            \[C=v\ \widehat\rho\text{-a.e.}\Longrightarrow v\in\operatorname{AESM}(\widehat\rho)\cap L^1(\widehat\rho).\]
                            Corresponding Lean step

                            ⟨hmeas.congr hfield,hint.congr hfield⟩

                            Lean statement · condDistribIntegralNamedFieldRegularity

                            The conclusion is a conjunction of two regularity properties of the chosen field. Its equality to the canonical conditional integral is assumed a.e., not pointwise.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedFieldRegularity {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F} {field : β → F}
                                (hhatRho : hatRho = μ.map X)
                                (hY : AEMeasurable Y μ)
                                (hfMeas : AEStronglyMeasurable f (μ.map fun a => (X a, Y a)))
                                (hfInt : Integrable f (μ.map fun a => (X a, Y a)))
                                (hfield :
                                  (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                    =ᵐ[hatRho] field) :
                                AEStronglyMeasurable field hatRho ∧ Integrable field hatRho

                            Exact module and namespace context

                            Lean proof · condDistribIntegralNamedFieldRegularity

                            Two reused regularity facts apply to the canonical integral, and their a.e.-congruence rules transfer them to the supplied version.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem condDistribIntegralNamedFieldRegularity {Ω β γ F : Type*}
                                [MeasurableSpace Ω] [MeasurableSpace β] [MeasurableSpace γ]
                                [NormedAddCommGroup F] [NormedSpace ℝ F]
                                [StandardBorelSpace γ] [Nonempty γ]
                                {μ : Measure Ω} [IsFiniteMeasure μ] {hatRho : Measure β}
                                {X : Ω → β} {Y : Ω → γ} {f : β × γ → F} {field : β → F}
                                (hhatRho : hatRho = μ.map X)
                                (hY : AEMeasurable Y μ)
                                (hfMeas : AEStronglyMeasurable f (μ.map fun a => (X a, Y a)))
                                (hfInt : Integrable f (μ.map fun a => (X a, Y a)))
                                (hfield :
                                  (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                    =ᵐ[hatRho] field) :
                                AEStronglyMeasurable field hatRho ∧ Integrable field hatRho := by
                              have hmeas :
                                  AEStronglyMeasurable
                                    (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                    hatRho :=
                                condDistribIntegralNamedLawAEStronglyMeasurable hhatRho hY hfMeas
                              have hint :
                                  Integrable
                                    (fun x => ∫ y, f (x, y) ∂ProbabilityTheory.condDistrib Y X μ x)
                                    hatRho :=
                                condDistribIntegralNamedLawIntegrable hhatRho hY hfInt
                              exact ⟨hmeas.congr hfield, hint.congr hfield⟩
                            
                            /-- A named probability measure or time-indexed law in a paper proof. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • The selected conditional distribution is a probability kernel, characterized as a conditional law only almost everywhere under the conditioning marginal. No pointwise choice, simultaneous equality on all events from a single-event a.e. theorem, or null-fiber support is asserted.
                            • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                            • Does not choose v or prove its version equality. Both explicit regularity premises remain in the source signature. No whole-PDE regularity follows.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            • MeasureTheory.AEStronglyMeasurable.congr
                            • MeasureTheory.Integrable.congr

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record the name and provenance of a measure

                            AutoSamplingTheory.MeasureContract · structure · Teaching coverage

                            Statement

                            This record stores descriptions of a named measure, its state space, optional density and smoothness labels, and its source. It contains no actual Measure value and no evidence that a density or regularity property exists.

                            \[\operatorname{fields}(\texttt{MeasureContract})=\{\texttt{name},\texttt{stateSpace},\texttt{densityName},\texttt{smoothness},\texttt{source}\}.\]

                            All objects and hypotheses

                            • name has type String: required label of the measure or law.
                            • stateSpace has type String: required description of its state space.
                            • densityName has type String: optional density label, default empty string.
                            • smoothness has type String: optional regularity description, default empty string.
                            • source has type SourceAnchor: required provenance record.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure MeasureContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · MeasureContract

                            This declaration introduces a record type. Its 5 fields are strings and a source anchor, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure MeasureContract where
                              name : String
                              stateSpace : String
                              densityName : String := ""
                              smoothness : String := ""
                              source : SourceAnchor
                            deriving Repr, DecidableEq
                            
                            /-- Forward KL divergence contract `KL(rho || pi)`. -/

                            Exact module and namespace context

                            Lean construction · MeasureContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure MeasureContract where
                              name : String
                              stateSpace : String
                              densityName : String := ""
                              smoothness : String := ""
                              source : SourceAnchor
                            deriving Repr, DecidableEq
                            
                            /-- Forward KL divergence contract `KL(rho || pi)`. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • Measure and regularity labels remain text; a record can describe an unproved object.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record a forward-KL expression and its status

                            AutoSamplingTheory.KLContract · structure · Teaching coverage

                            Statement

                            This record stores labels for rho and pi, a written forward-KL expression, source provenance and a status defaulting to contractOnly. It does not define KL as an analytic functional or prove the expression correct.

                            \[\operatorname{fields}(\texttt{KLContract})=\{\texttt{rho},\texttt{pi},\texttt{expression},\texttt{source},\texttt{status}\}.\]

                            All objects and hypotheses

                            • rho has type String: first measure label.
                            • pi has type String: reference-measure label.
                            • expression has type String: written KL expression.
                            • source has type SourceAnchor: provenance.
                            • status has type ProofStatus: default contractOnly.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure KLContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · KLContract

                            This declaration introduces a record type. Its 5 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure KLContract where
                              rho : String
                              pi : String
                              expression : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Fisher information contract `FI(rho || pi)`. -/

                            Exact module and namespace context

                            Lean construction · KLContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure KLContract where
                              rho : String
                              pi : String
                              expression : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Fisher information contract `FI(rho || pi)`. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • The order rho, pi records forward KL notation but supplies no absolute continuity, finite entropy or nonnegativity proof.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record a Fisher-information expression and its status

                            AutoSamplingTheory.FIContract · structure · Teaching coverage

                            Statement

                            This record stores labels for the two measures, a Fisher-information expression, source provenance and a status defaulting to contractOnly. It contains no gradient, density or integrability witness.

                            \[\operatorname{fields}(\texttt{FIContract})=\{\texttt{rho},\texttt{pi},\texttt{expression},\texttt{source},\texttt{status}\}.\]

                            All objects and hypotheses

                            • rho has type String: first measure label.
                            • pi has type String: reference-measure label.
                            • expression has type String: written Fisher-information expression.
                            • source has type SourceAnchor: provenance.
                            • status has type ProofStatus: default contractOnly.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure FIContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · FIContract

                            This declaration introduces a record type. Its 5 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure FIContract where
                              rho : String
                              pi : String
                              expression : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Log-Sobolev inequality contract. -/

                            Exact module and namespace context

                            Lean construction · FIContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure FIContract where
                              rho : String
                              pi : String
                              expression : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Log-Sobolev inequality contract. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • Writing a Fisher-information expression does not establish differentiability, Sobolev regularity or finiteness.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record a log-Sobolev inequality as an obligation

                            AutoSamplingTheory.LSIContract · structure · Teaching coverage

                            Statement

                            This record stores a measure label, a constant label, an inequality written as text, its source, and a status defaulting to obligation. No log-Sobolev inequality is asserted as a proposition by this structure.

                            \[\operatorname{fields}(\texttt{LSIContract})=\{\texttt{measureName},\texttt{constantName},\texttt{statement},\texttt{source},\texttt{status}\}.\]

                            All objects and hypotheses

                            • measureName has type String: measure label.
                            • constantName has type String: inequality-constant label.
                            • statement has type String: written inequality.
                            • source has type SourceAnchor: provenance.
                            • status has type ProofStatus: default obligation.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure LSIContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · LSIContract

                            This declaration introduces a record type. Its 5 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure LSIContract where
                              measureName : String
                              constantName : String
                              statement : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.obligation
                            deriving Repr, DecidableEq
                            
                            /-- Poincare inequality contract. -/

                            Exact module and namespace context

                            Lean construction · LSIContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure LSIContract where
                              measureName : String
                              constantName : String
                              statement : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.obligation
                            deriving Repr, DecidableEq
                            
                            /-- Poincare inequality contract. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • No constant convention, positivity, admissible test class or validity of LSI is enforced by string fields.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record a Poincaré inequality as an obligation

                            AutoSamplingTheory.PIContract · structure · Teaching coverage

                            Statement

                            This record stores labels and text for a Poincaré inequality with provenance and a default obligation status. It is metadata rather than a proof of the inequality.

                            \[\operatorname{fields}(\texttt{PIContract})=\{\texttt{measureName},\texttt{constantName},\texttt{statement},\texttt{source},\texttt{status}\}.\]

                            All objects and hypotheses

                            • measureName has type String: measure label.
                            • constantName has type String: inequality-constant label.
                            • statement has type String: written inequality.
                            • source has type SourceAnchor: provenance.
                            • status has type ProofStatus: default obligation.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure PIContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · PIContract

                            This declaration introduces a record type. Its 5 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure PIContract where
                              measureName : String
                              constantName : String
                              statement : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.obligation
                            deriving Repr, DecidableEq
                            
                            /-- Transport velocity field satisfying a continuity equation. -/

                            Exact module and namespace context

                            Lean construction · PIContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure PIContract where
                              measureName : String
                              constantName : String
                              statement : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.obligation
                            deriving Repr, DecidableEq
                            
                            /-- Transport velocity field satisfying a continuity equation. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • The structure does not assert a spectral gap, compare Poincaré and LSI constants, or impose a function domain.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record a proposed continuity-equation velocity

                            AutoSamplingTheory.TransportVelocityContract · structure · Teaching coverage

                            Statement

                            This record stores a named measure path, a named velocity field, a continuity equation written as text, provenance and a default contractOnly status. It contains no analytic path or velocity value.

                            \[\operatorname{fields}(\texttt{TransportVelocityContract})=\{\texttt{pathName},\texttt{velocityName},\texttt{continuityEquation},\texttt{source},\texttt{status}\}.\]

                            All objects and hypotheses

                            • pathName has type String: measure-path label.
                            • velocityName has type String: velocity-field label.
                            • continuityEquation has type String: written continuity equation.
                            • source has type SourceAnchor: provenance.
                            • status has type ProofStatus: default contractOnly.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure TransportVelocityContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · TransportVelocityContract

                            This declaration introduces a record type. Its 5 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure TransportVelocityContract where
                              pathName : String
                              velocityName : String
                              continuityEquation : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Guide tilt `pi_t proportional to p_t exp(-F_t)`. -/

                            Exact module and namespace context

                            Lean construction · TransportVelocityContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure TransportVelocityContract where
                              pathName : String
                              velocityName : String
                              continuityEquation : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Guide tilt `pi_t proportional to p_t exp(-F_t)`. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • A stored continuity equation does not prove weak differentiability, divergence regularity, boundary behavior or a transport identity.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record the intended labels of a guided tilt

                            AutoSamplingTheory.GuidedTiltContract · structure · Teaching coverage

                            Statement

                            This record stores names for a base path, guide, guided path and terminal target together with a source and default contractOnly status. The intended exponentially tilted relationship is descriptive, not an enforced measure equality.

                            \[\operatorname{fields}(\texttt{GuidedTiltContract})=\{\texttt{basePath},\texttt{guideName},\texttt{guidedPath},\texttt{terminalTarget},\texttt{source},\texttt{status}\}.\]

                            All objects and hypotheses

                            • basePath has type String: base-path label.
                            • guideName has type String: guide label.
                            • guidedPath has type String: tilted-path label.
                            • terminalTarget has type String: terminal target label.
                            • source has type SourceAnchor: provenance.
                            • status has type ProofStatus: default contractOnly.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure GuidedTiltContract where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · GuidedTiltContract

                            This declaration introduces a record type. Its 6 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure GuidedTiltContract where
                              basePath : String
                              guideName : String
                              guidedPath : String
                              terminalTarget : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Source-cited interface for the Donsker--Varadhan entropy duality formula.
                            
                            This is data, not a proof.  It records the exact analytic shape needed by the
                            SALD paper before theorem-specific finite-log-mgf witnesses instantiate it.
                            -/

                            Exact module and namespace context

                            Lean construction · GuidedTiltContract

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure GuidedTiltContract where
                              basePath : String
                              guideName : String
                              guidedPath : String
                              terminalTarget : String
                              source : SourceAnchor
                              status : ProofStatus := ProofStatus.contractOnly
                            deriving Repr, DecidableEq
                            
                            /-- Source-cited interface for the Donsker--Varadhan entropy duality formula.
                            
                            This is data, not a proof.  It records the exact analytic shape needed by the
                            SALD paper before theorem-specific finite-log-mgf witnesses instantiate it.
                            -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • It proves neither finite normalizer nor target correctness and does not construct the tilted law.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Record the cited entropy-duality interface

                            AutoSamplingTheory.DvVariationalFormulaInterface · structure · Teaching coverage

                            Statement

                            This record packages text describing the Donsker–Varadhan variational formula, its intended hypotheses, selected tests, scalar bridges and citation. Status defaults to sourceCited. Every analytic slot is text, not a Lean hypothesis or proved equality.

                            \[\operatorname{fields}(\texttt{DvVariationalFormulaInterface})=\{\texttt{source},\texttt{probabilityMeasures},\texttt{klFunctional},\texttt{testFunctionClass},\texttt{finiteLogMgfPredicate},\texttt{logMgfFunctional},\texttt{variationalFunctional},\texttt{supremumStatement},\texttt{oneSidedConsequence},\texttt{oneSidedScalarBridge},\texttt{citation},\texttt{status}\}.\]

                            All objects and hypotheses

                            • source has type SourceAnchor: provenance.
                            • probabilityMeasures has type String: described measure assumptions.
                            • klFunctional has type String: KL expression.
                            • testFunctionClass has type String: described test class.
                            • finiteLogMgfPredicate has type String: described admissibility predicate.
                            • logMgfFunctional has type String: log moment-generating-functional description.
                            • variationalFunctional has type String: variational-test value description.
                            • supremumStatement has type String: written supremum identity.
                            • oneSidedConsequence has type String: written test-wise consequence.
                            • oneSidedScalarBridge has type String: description of available bridge declarations.
                            • citation has type String: citation text.
                            • status has type ProofStatus: default sourceCited.
                            • No ambient measurable space, measure, analytic hypothesis or proof witness is a parameter of this metadata structure. Default fields may be overridden when constructing a record.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Specify the record's data slots

                            The structure declares exactly the listed fields and their data types. A source anchor is itself provenance data from Core, not a proof of the described statement.

                            \[\text{descriptive fields}+\text{provenance}\longmapsto\text{one record}.\]
                            Corresponding Lean step

                            structure DvVariationalFormulaInterface where; listed fields

                            2. Provide defaults and routine data operations

                            Any listed defaults are filled when omitted. Derived representation and decidable equality let the program display and compare records; they compare data and do not decide analytic truth.

                            \[\operatorname{DecidableEq}(\text{records})\ne\text{decision procedure for the recorded mathematics}.\]
                            Corresponding Lean step

                            field defaults; deriving Repr, DecidableEq

                            Lean statement · DvVariationalFormulaInterface

                            This declaration introduces a record type. Its 12 fields are descriptions, provenance and a status label, not mathematical objects satisfying the written claim.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure DvVariationalFormulaInterface where
                              source : SourceAnchor
                              probabilityMeasures : String
                              klFunctional : String
                              testFunctionClass : String
                              finiteLogMgfPredicate : String
                              logMgfFunctional : String
                              variationalFunctional : String
                              supremumStatement : String
                              oneSidedConsequence : String
                              oneSidedScalarBridge : String
                              citation : String
                              status : ProofStatus := ProofStatus.sourceCited
                            deriving Repr, DecidableEq
                            
                            /-- Donsker--Varadhan variational formula as a cited-result contract. -/

                            Exact module and namespace context

                            Lean construction · DvVariationalFormulaInterface

                            There is no theorem proof here. The body declares the fields and their defaults; derived display and equality support are ordinary operations on that data.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            structure DvVariationalFormulaInterface where
                              source : SourceAnchor
                              probabilityMeasures : String
                              klFunctional : String
                              testFunctionClass : String
                              finiteLogMgfPredicate : String
                              logMgfFunctional : String
                              variationalFunctional : String
                              supremumStatement : String
                              oneSidedConsequence : String
                              oneSidedScalarBridge : String
                              citation : String
                              status : ProofStatus := ProofStatus.sourceCited
                            deriving Repr, DecidableEq
                            
                            /-- Donsker--Varadhan variational formula as a cited-result contract. -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • No admissibility predicate, supremum functional or theorem is enforced by this data schema; even sourceCited is a metadata label, not certification.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Construct a source-cited DV proof-obligation record

                            AutoSamplingTheory.dvVariationalObligation · def · Teaching coverage

                            Statement

                            Given any source anchor, construct a ProofObligation with id probability.dv_variational_formula, the written KL variational-supremum statement, that source, sourceCited status, and a note that the result must be ported or kept as a cited analytic dependency. This creates metadata, not a proof of entropy duality.

                            \[\operatorname{id}=\texttt{probability.dv\_variational\_formula},\qquad \operatorname{status}=\texttt{sourceCited}.\]

                            All objects and hypotheses

                            • source is any Core SourceAnchor; it is the sole function parameter.
                            • The stored text describes KL(ν‖μ)=sup_Z{EνZ−log Eμexp Z} under the paper's integrability assumptions; those assumptions are text, not formal parameters.
                            • ProofObligation's omitted dependsOn list is empty by default; the supplied note is descriptive.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Populate the obligation fields

                            Store the fixed id and variational statement alongside the caller's source anchor.

                            \[\text{source}\longmapsto(\text{id},\text{statement},\text{source}).\]
                            Corresponding Lean step

                            id, statement, source fields

                            2. Keep its unproved status explicit

                            Set sourceCited and attach the port-or-cite note. No term of a variational-identity proposition is returned.

                            \[\text{result type}=\texttt{ProofObligation}\ne\text{proof of KL duality}.\]
                            Corresponding Lean step

                            status := ProofStatus.sourceCited; note field

                            Lean statement · dvVariationalObligation

                            The function accepts a provenance record and returns a workflow record, not an inequality or an equality of analytic quantities.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            def dvVariationalObligation (source : SourceAnchor) : ProofObligation

                            Exact module and namespace context

                            Lean construction · dvVariationalObligation

                            The body initializes named data fields. The word sourceCited preserves the intended cited-dependency status and supplies no proof certificate.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            def dvVariationalObligation (source : SourceAnchor) : ProofObligation where
                              id := "probability.dv_variational_formula"
                              statement := "KL(nu || mu) = sup_Z { E_nu[Z] - log E_mu[exp Z] } under the paper's integrability assumptions."
                              source := source
                              status := ProofStatus.sourceCited
                              note := "Port from Mathlib/SLT or keep as cited analytic dependency until formalized."
                            
                            /-- Precise source-cited DV interface matching `appendix.tex:73-79`.
                            
                            Downstream proof obligations may depend on this interface only as a cited
                            analytic result until an actual Lean proof or imported theorem replaces it.
                            -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • No Boucheron supremum equality has been proved by this constructor. The passed anchor is not validated here.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            Populate the paper-facing DV interface without claiming its proof

                            AutoSamplingTheory.dvVariationalFormulaInterface · def · Teaching coverage

                            Statement

                            Given a source anchor, populate the DvVariationalFormulaInterface with the existing paper-facing textual description: common probability measures, KL with source-specific side conditions, measurable real tests with finite log-mgf, the variational supremum expression, its one-sided consequence, descriptions of available scalar/tilting bridges, the Boucheron–Lugosi–Massart Corollary 4.15 citation, and sourceCited status. These are stored descriptions only.

                            \[\text{recorded target: }\mathrm{KL}(\nu\|\mu)=\sup_Z\left\{\mathbb E_\nu Z-\log\mathbb E_\mu e^Z\right\};\qquad \text{record status: sourceCited}.\]

                            All objects and hypotheses

                            • source:SourceAnchor is the only parameter; no measures, test functions, absolute-continuity proofs or admissibility witnesses are passed.
                            • All twelve data fields of DvVariationalFormulaInterface are populated. The reference to SALD appendix.tex:73–79 is an existing source comment, not a new independent reading or source-fidelity verdict.

                            Notation and interpretation

                            Analytic values versus metadata

                            Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                            \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                            Construction and meaning

                            1. Record the intended domain and functionals

                            Write the measure assumptions, real measurable test class, finite-log-mgf predicate and two functional expressions into their textual slots.

                            \[\text{recorded }V(Z)=\mathbb E_\nu Z-\log\mathbb E_\mu e^Z.\]
                            Corresponding Lean step

                            probabilityMeasures through variationalFunctional fields

                            2. Record target and bridge descriptions separately

                            The supremum identity remains source-cited. The one-sided consequence and names of existing scalar and tilted-backend bridges describe available narrower results, without converting the supremum identity into a proved theorem.

                            \[V(Z)\le\mathrm{KL}\Longrightarrow\mathbb E_\nu Z\le\mathrm{KL}+\log\mathbb E_\mu e^Z\quad\text{(recorded bridge shape)}.\]
                            Corresponding Lean step

                            supremumStatement, oneSidedConsequence, oneSidedScalarBridge

                            3. Attach provenance and the retained status

                            Store the caller's source, fixed citation text and sourceCited label.

                            \[\operatorname{status}=\texttt{sourceCited},\quad\operatorname{source}=\text{supplied anchor}.\]
                            Corresponding Lean step

                            source, citation, status fields

                            Lean statement · dvVariationalFormulaInterface

                            This lower-case function returns the upper-case interface record. None of its textual analytic clauses is a theorem hypothesis or conclusion.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            def dvVariationalFormulaInterface (source : SourceAnchor) :
                                DvVariationalFormulaInterface

                            Exact module and namespace context

                            Lean construction · dvVariationalFormulaInterface

                            The body is a record literal containing descriptions and citations. Existing theorem names appear inside a string, so they are documentary references rather than Lean proof dependencies.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            def dvVariationalFormulaInterface (source : SourceAnchor) :
                                DvVariationalFormulaInterface where
                              source := source
                              probabilityMeasures := "mu and nu are probability distributions on the same measurable space."
                              klFunctional := "KL(nu || mu), with the paper's absolute-continuity and finite-entropy side conditions supplied by each theorem block."
                              testFunctionClass := "real-valued measurable random variables Z on the common space."
                              finiteLogMgfPredicate := "log E_mu[exp(Z)] < +infty."
                              logMgfFunctional := "Z |-> log E_mu[exp(Z)]."
                              variationalFunctional := "Z |-> E_nu[Z] - log E_mu[exp(Z)]."
                              supremumStatement := "KL(nu || mu) = sup_Z { E_nu[Z] - log E_mu[exp(Z)] }, where the supremum is over finite-log-mgf tests."
                              oneSidedConsequence := "For every admissible Z, E_nu[Z] <= KL(nu || mu) + log E_mu[exp(Z)]."
                              oneSidedScalarBridge := "AutoSamplingTheory.dvVariationalOneSidedConsequenceScalar proves the real-order rearrangement from E_nu[Z] - logMgf <= KL to E_nu[Z] <= KL + logMgf; AutoSamplingTheory.dvVariationalOneSidedFromSupremumScalar additionally proves the scalar step from admissible-test membership plus the source supremum identity to that one-sided bound; AutoSamplingTheory.dvVariationalTiltedRightOneSidedConsequence combines the Mathlib tilted backend with the scalar rearrangement under explicit selected-test hypotheses."
                              citation := "Boucheron, Lugosi, and Massart, Concentration Inequalities, Corollary 4.15, cited by SALD appendix.tex:73."
                              status := ProofStatus.sourceCited
                            
                            /-- Pointwise square identity for the LSI density test `phi = sqrt(r)`.
                            
                            In the SALD source step `main_body.tex:208-215`, this is the local scalar
                            part of replacing `phi^2` by the Radon-Nikodym density ratio `r = rho/pi`.
                            The measure-theoretic density and integral transport remain separate
                            obligations.
                            -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                            • Names embedded in oneSidedScalarBridge are not formal theorem dependencies.
                            • Do not present the stored test class or finite-log-mgf clause as a proved sufficient hypothesis for the full supremum equality.

                            Source and reuse

                            ASTIS parents called

                            Mathlib API called (external library)

                            No direct Mathlib call recorded; see the ASTIS parents.

                            Mathematical sources

                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                            ASTIS mathematical exposition

                            The square-root density squares back to the density

                            AutoSamplingTheory.lsiKlFiSqrtDensitySquareScalar · theorem · Teaching coverage

                            Statement

                            For every nonnegative real number r, the square of its nonnegative real square root equals r.

                            \[r\ge0\Longrightarrow(\sqrt r)^2=r.\]

                            All objects and hypotheses

                            • r is a real number and hr supplies 0≤r; no measure or density construction is assumed.

                            Mathematical proof

                            1. Apply the defining square-root identity

                            The nonnegativity hypothesis is exactly what the real square-root theorem requires.

                            \[(\sqrt r)^2=r\quad(r\ge0).\]
                            Corresponding Lean step

                            Real.sq_sqrt hr

                            Lean statement · lsiKlFiSqrtDensitySquareScalar

                            The density interpretation is optional motivation. The formal parameter is only a real number with a nonnegativity proof.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem lsiKlFiSqrtDensitySquareScalar {r : Real} (hr : 0 ≤ r) :
                                (Real.sqrt r) ^ 2 = r

                            Exact module and namespace context

                            Lean proof · lsiKlFiSqrtDensitySquareScalar

                            The proof directly reuses the existing real square-root theorem, without any differentiation or integration.

                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                            theorem lsiKlFiSqrtDensitySquareScalar {r : Real} (hr : 0 ≤ r) :
                                (Real.sqrt r) ^ 2 = r := by
                              exact Real.sq_sqrt hr
                            
                            /-- Pointwise entropy-integrand rewrite for `phi = sqrt(r)`.
                            
                            This proves only the scalar rewrite
                            `phi^2 log(phi^2) = r log r` after nonnegativity of the density ratio is
                            available.  Integrability, zero-density conventions, and the KL integral
                            identity are still analytic obligations.
                            -/

                            Exact module and namespace context

                            Scope and omitted-condition boundaries

                            • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.

                            Source and reuse

                            ASTIS parents called

                              Mathlib API called (external library)

                              • Real.sq_sqrt

                              Mathematical sources

                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                              ASTIS mathematical exposition

                              Rewrite the square-root test's entropy integrand

                              AutoSamplingTheory.lsiKlFiSqrtDensityEntropyIntegrandScalar · theorem · Teaching coverage

                              Statement

                              For every real r≥0, the expression (√r)² log((√r)²) equals r log r, using Mathlib's real logarithm convention, including its value at zero.

                              \[r\ge0\Longrightarrow(\sqrt r)^2\log((\sqrt r)^2)=r\log r.\]

                              All objects and hypotheses

                              • r∈ℝ and 0≤r. The real logarithm is totalized; Real.log 0=0, so the displayed identity includes r=0.

                              Mathematical proof

                              1. Substitute the square identity in both occurrences

                              Replace the multiplicative factor and the logarithm's argument by r using the already proved square-root equality.

                              \[(\sqrt r)^2=r\Longrightarrow(\sqrt r)^2\log((\sqrt r)^2)=r\log r.\]
                              Corresponding Lean step

                              rw [lsiKlFiSqrtDensitySquareScalar hr]

                              Lean statement · lsiKlFiSqrtDensityEntropyIntegrandScalar

                              The theorem is equality of two real numbers. It does not assume or assert that either expression is integrable under any measure.

                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                              theorem lsiKlFiSqrtDensityEntropyIntegrandScalar {r : Real} (hr : 0 ≤ r) :
                                  (Real.sqrt r) ^ 2 * Real.log ((Real.sqrt r) ^ 2) = r * Real.log r

                              Exact module and namespace context

                              Lean proof · lsiKlFiSqrtDensityEntropyIntegrandScalar

                              A rewrite uses the same equality wherever the squared square root occurs, including inside the logarithm.

                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                              theorem lsiKlFiSqrtDensityEntropyIntegrandScalar {r : Real} (hr : 0 ≤ r) :
                                  (Real.sqrt r) ^ 2 * Real.log ((Real.sqrt r) ^ 2) = r * Real.log r := by
                                rw [lsiKlFiSqrtDensitySquareScalar hr]
                              
                              /-- Scalar normalization handoff for the LSI test `phi = sqrt(r)`.
                              
                              After an integral backend has shown that the mass of `phi^2` equals the mass of
                              the density ratio `r`, probability normalization of `r` gives the LSI test
                              normalization.  This does not prove the integral equality itself.
                              -/

                              Exact module and namespace context

                              Scope and omitted-condition boundaries

                              • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                              • No finite-entropy or analytic zero-density admissibility theorem is asserted.

                              Source and reuse

                              ASTIS parents called

                              Mathlib API called (external library)

                              No direct Mathlib call recorded; see the ASTIS parents.

                              Mathematical sources

                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                              ASTIS mathematical exposition

                              Transfer a supplied unit-mass identity

                              AutoSamplingTheory.lsiKlFiSqrtDensityNormalizationScalar · theorem · Teaching coverage

                              Statement

                              Let densityMass and testMass be real numbers. If testMass=densityMass and densityMass=1, then testMass=1. Their names carry no measure-theoretic meaning unless an application supplies it.

                              \[\text{testMass}=\text{densityMass},\quad\text{densityMass}=1\Longrightarrow\text{testMass}=1.\]

                              All objects and hypotheses

                              • densityMass,testMass∈ℝ; the two displayed equalities are supplied.

                              Mathematical proof

                              1. Chain the given equalities

                              Replace testMass by densityMass, and then replace densityMass by one.

                              \[\text{testMass}=\text{densityMass}=1.\]
                              Corresponding Lean step

                              rw [htest,hdensity]

                              Lean statement · lsiKlFiSqrtDensityNormalizationScalar

                              The two inputs are arbitrary real numbers. Equalities connecting them to actual integrals are not part of this theorem.

                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                              theorem lsiKlFiSqrtDensityNormalizationScalar {densityMass testMass : Real}
                                  (htest : testMass = densityMass)
                                  (hdensity : densityMass = 1) :
                                  testMass = 1

                              Exact module and namespace context

                              Lean proof · lsiKlFiSqrtDensityNormalizationScalar

                              The proof uses transitivity by rewriting; it does not calculate density mass or establish probability normalization.

                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                              theorem lsiKlFiSqrtDensityNormalizationScalar {densityMass testMass : Real}
                                  (htest : testMass = densityMass)
                                  (hdensity : densityMass = 1) :
                                  testMass = 1 := by
                                rw [htest, hdensity]
                              
                              /-- Radon-Nikodym mass normalization for the LSI density ratio.
                              
                              For probability measures `rho << pi`, the density ratio `d rho / d pi` has
                              unit `pi`-mass.  This is the measure-level backend behind the source line
                              `int phi^2 d pi = int (rho/pi) d pi = 1` before converting to real integrals.
                              -/

                              Exact module and namespace context

                              Scope and omitted-condition boundaries

                              • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                              • This is an equality handoff, not a normalization theorem for any measure.

                              Source and reuse

                              ASTIS parents called

                                Mathlib API called (external library)

                                No direct Mathlib call recorded; see the ASTIS parents.

                                Mathematical sources

                                ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                ASTIS mathematical exposition

                                The Radon–Nikodym density has unit nonnegative integral

                                AutoSamplingTheory.lsiKlFiRnDerivLIntegralMassOne · theorem · Teaching coverage

                                Statement

                                For probability measures ρ and π on a measurable space with ρ≪π, the nonnegative extended integral of dρ/dπ against π equals one.

                                \[\int_\alpha^{\!-}\frac{d\rho}{d\pi}\,d\pi=\rho(\alpha)=1.\]

                                All objects and hypotheses

                                • α is an arbitrary measurable space; ρ and π are measures on it, both with IsProbabilityMeasure instances.
                                • hrho_pi supplies absolute continuity ρ≪π. Probability assumptions supply the finite/sigma-finite and Lebesgue-decomposition requirements of the imported Radon–Nikodym APIs.
                                • Write R=dρ/dπ for Mathlib's ℝ≥0∞-valued rnDeriv representative and r=R.toReal for its real-valued conversion; r≥0 everywhere.

                                Notation and interpretation

                                Integrability and Bochner integrals

                                L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                Mathematical proof

                                1. Recover the mass from the derivative

                                The Radon–Nikodym mass identity under absolute continuity identifies the lower integral with the total mass of ρ.

                                \[\int^{\!-}R\,d\pi=\rho(\alpha).\]
                                Corresponding Lean step

                                Measure.lintegral_rnDeriv hrho_pi

                                2. Use probability normalization

                                The total mass of ρ is one.

                                \[\rho(\alpha)=1.\]
                                Corresponding Lean step

                                simp

                                Lean statement · lsiKlFiRnDerivLIntegralMassOne

                                This is the extended nonnegative integral, not the real Bochner integral; its integrand can take extended values.

                                Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                theorem lsiKlFiRnDerivLIntegralMassOne {α : Type*} [MeasurableSpace α]
                                    (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                    (hrho_pi : rho ≪ pi) :
                                    ∫⁻ x, rho.rnDeriv pi x ∂pi = 1

                                Exact module and namespace context

                                Lean proof · lsiKlFiRnDerivLIntegralMassOne

                                The first rewrite uses the existing Radon–Nikodym theorem. Probability normalization simplifies the remaining total mass.

                                Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                theorem lsiKlFiRnDerivLIntegralMassOne {α : Type*} [MeasurableSpace α]
                                    (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                    (hrho_pi : rho ≪ pi) :
                                    ∫⁻ x, rho.rnDeriv pi x ∂pi = 1 := by
                                  rw [Measure.lintegral_rnDeriv hrho_pi]
                                  simp
                                
                                /-- Real-integral normalization of the Radon-Nikodym density ratio.
                                
                                This supplies the real mass input used by the scalar normalization bridge for
                                the LSI test `phi=sqrt(d rho/d pi)`.
                                -/

                                Exact module and namespace context

                                Scope and omitted-condition boundaries

                                • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                • No differentiability or admissible square-root test follows from unit mass.

                                Source and reuse

                                ASTIS parents called

                                  Mathlib API called (external library)

                                  • MeasureTheory.Measure.lintegral_rnDeriv
                                  • MeasureTheory.IsProbabilityMeasure.measure_univ

                                  Mathematical sources

                                  ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                  ASTIS mathematical exposition

                                  The real Radon–Nikodym density also has unit integral

                                  AutoSamplingTheory.lsiKlFiRnDerivDensityMassOne · theorem · Teaching coverage

                                  Statement

                                  For absolutely continuous probability measures ρ≪π, the real-valued function r=(dρ/dπ).toReal has real integral one against π.

                                  \[\int_\alpha r(x)\,d\pi(x)=1,\qquad r=(d\rho/d\pi)_{\mathrm{toReal}}.\]

                                  All objects and hypotheses

                                  • α is an arbitrary measurable space; ρ and π are measures on it, both with IsProbabilityMeasure instances.
                                  • hrho_pi supplies absolute continuity ρ≪π. Probability assumptions supply the finite/sigma-finite and Lebesgue-decomposition requirements of the imported Radon–Nikodym APIs.
                                  • Write R=dρ/dπ for Mathlib's ℝ≥0∞-valued rnDeriv representative and r=R.toReal for its real-valued conversion; r≥0 everywhere.

                                  Notation and interpretation

                                  Integrability and Bochner integrals

                                  L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                  \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                  Mathematical proof

                                  1. Apply real Radon–Nikodym mass transport

                                  The imported theorem expresses the integral of the real conversion as the real total mass of ρ. Sigma-finiteness is available from the probability instances.

                                  \[\int R_{\mathrm{toReal}}\,d\pi=\rho.\mathrm{real}(\alpha).\]
                                  Corresponding Lean step

                                  Measure.integral_toReal_rnDeriv hrho_pi

                                  2. Simplify the total mass

                                  The real conversion of probability mass one is one.

                                  \[\rho.\mathrm{real}(\alpha)=1.\]
                                  Corresponding Lean step

                                  simp

                                  Lean statement · lsiKlFiRnDerivDensityMassOne

                                  The integrand is a particular real conversion of the extended Radon–Nikodym derivative, not an unspecified density symbol.

                                  Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                  theorem lsiKlFiRnDerivDensityMassOne {α : Type*} [MeasurableSpace α]
                                      (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                      (hrho_pi : rho ≪ pi) :
                                      ∫ x, (rho.rnDeriv pi x).toReal ∂pi = 1

                                  Exact module and namespace context

                                  Lean proof · lsiKlFiRnDerivDensityMassOne

                                  The proof reuses the real mass theorem and simplifies probability mass; it does not establish a smooth density.

                                  Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                  theorem lsiKlFiRnDerivDensityMassOne {α : Type*} [MeasurableSpace α]
                                      (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                      (hrho_pi : rho ≪ pi) :
                                      ∫ x, (rho.rnDeriv pi x).toReal ∂pi = 1 := by
                                    rw [Measure.integral_toReal_rnDeriv hrho_pi]
                                    simp
                                  
                                  /-- Normalization of the source LSI test `phi=sqrt(d rho/d pi)`.
                                  
                                  This combines the pointwise square identity for the square-root density test
                                  with the Radon-Nikodym mass theorem.  Smooth/admissible-test and approximation
                                  requirements remain separate analytic obligations.
                                  -/

                                  Exact module and namespace context

                                  Scope and omitted-condition boundaries

                                  • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                  • The chosen real density r is (rnDeriv ρ π).toReal, with ENNReal.toReal(∞)=0. Do not replace this with an arbitrary pointwise density version; absolute continuity and probability measures justify the a.e. density interpretation.

                                  Source and reuse

                                  ASTIS parents called

                                    Mathlib API called (external library)

                                    • MeasureTheory.Measure.integral_toReal_rnDeriv

                                    Mathematical sources

                                    ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                    ASTIS mathematical exposition

                                    The squared square-root Radon–Nikodym test has unit mass

                                    AutoSamplingTheory.lsiKlFiSqrtRnDerivTestMassOne · theorem · Teaching coverage

                                    Statement

                                    For probability measures ρ≪π and r=(dρ/dπ).toReal, the real integral of (√r)² against π is one.

                                    \[\int_\alpha(\sqrt{r(x)})^2\,d\pi(x)=1.\]

                                    All objects and hypotheses

                                    • α is an arbitrary measurable space; ρ and π are measures on it, both with IsProbabilityMeasure instances.
                                    • hrho_pi supplies absolute continuity ρ≪π. Probability assumptions supply the finite/sigma-finite and Lebesgue-decomposition requirements of the imported Radon–Nikodym APIs.
                                    • Write R=dρ/dπ for Mathlib's ℝ≥0∞-valued rnDeriv representative and r=R.toReal for its real-valued conversion; r≥0 everywhere.

                                    Notation and interpretation

                                    Integrability and Bochner integrals

                                    L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                    \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                    Mathematical proof

                                    1. Replace the target one by the density's known mass

                                    The preceding real-density theorem gives ∫r dπ=1, reducing the claim to equality of two integrals.

                                    \[1=\int r\,d\pi.\]
                                    Corresponding Lean step

                                    rw [← lsiKlFiRnDerivDensityMassOne rho pi hrho_pi]

                                    2. Compare the integrands pointwise

                                    The real conversion r is nonnegative everywhere, so its square root squares to r at every x, and therefore π-a.e.

                                    \[(\sqrt{r(x)})^2=r(x)\quad\forall x.\]
                                    Corresponding Lean step

                                    Real.sq_sqrt ENNReal.toReal_nonneg

                                    3. Transfer a.e. equality through integration

                                    A.e.-equal integrands have equal totalized real integrals.

                                    \[\int(\sqrt r)^2\,d\pi=\int r\,d\pi=1.\]
                                    Corresponding Lean step

                                    integral_congr_ae

                                    Lean statement · lsiKlFiSqrtRnDerivTestMassOne

                                    The measure assumptions give density mass. Nonnegativity of the real conversion supplies the pointwise square identity.

                                    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                    theorem lsiKlFiSqrtRnDerivTestMassOne {α : Type*} [MeasurableSpace α]
                                        (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                        (hrho_pi : rho ≪ pi) :
                                        ∫ x, (Real.sqrt ((rho.rnDeriv pi x).toReal)) ^ 2 ∂pi = 1

                                    Exact module and namespace context

                                    Lean proof · lsiKlFiSqrtRnDerivTestMassOne

                                    The proof first imports normalization, then applies integral congruence to a pointwise square-root equality. It supplies no differentiability of the square root.

                                    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                    theorem lsiKlFiSqrtRnDerivTestMassOne {α : Type*} [MeasurableSpace α]
                                        (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                        (hrho_pi : rho ≪ pi) :
                                        ∫ x, (Real.sqrt ((rho.rnDeriv pi x).toReal)) ^ 2 ∂pi = 1 := by
                                      rw [← lsiKlFiRnDerivDensityMassOne rho pi hrho_pi]
                                      refine integral_congr_ae ?_
                                      filter_upwards with x
                                      exact Real.sq_sqrt ENNReal.toReal_nonneg
                                    
                                    /-- Entropy transport from the density-ratio integral to the KL log-likelihood integral.
                                    
                                    For `rho << pi`, Mathlib's log-likelihood-ratio backend identifies
                                    `int (d rho/d pi) log(d rho/d pi) d pi` with the paper's KL integrand
                                    `int log(d rho/d pi) d rho`.  Finite-KL assumptions for theorem use remain
                                    explicit downstream.
                                    -/

                                    Exact module and namespace context

                                    Scope and omitted-condition boundaries

                                    • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                    • The chosen real density r is (rnDeriv ρ π).toReal, with ENNReal.toReal(∞)=0. Do not replace this with an arbitrary pointwise density version; absolute continuity and probability measures justify the a.e. density interpretation.

                                    Source and reuse

                                    ASTIS parents called

                                    Mathlib API called (external library)

                                    • MeasureTheory.integral_congr_ae
                                    • Real.sq_sqrt
                                    • ENNReal.toReal_nonneg

                                    Mathematical sources

                                    ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                    ASTIS mathematical exposition

                                    Transport the density entropy integral to the log-likelihood measure

                                    AutoSamplingTheory.lsiKlFiRnDerivEntropyIntegral · theorem · Teaching coverage

                                    Statement

                                    For probability measures ρ≪π, with r=(dρ/dπ).toReal and ℓρ,π=log r, the real integral ∫r log r dπ equals ∫ℓρ,π dρ. This is equality of Mathlib's totalized real integrals; it does not assert their integrability or finiteness as entropy quantities.

                                    \[\int_\alpha r(x)\log r(x)\,d\pi(x)=\int_\alpha\ell_{\rho,\pi}(x)\,d\rho(x).\]

                                    All objects and hypotheses

                                    • α is an arbitrary measurable space; ρ and π are measures on it, both with IsProbabilityMeasure instances.
                                    • hrho_pi supplies absolute continuity ρ≪π. Probability assumptions supply the finite/sigma-finite and Lebesgue-decomposition requirements of the imported Radon–Nikodym APIs.
                                    • Write R=dρ/dπ for Mathlib's ℝ≥0∞-valued rnDeriv representative and r=R.toReal for its real-valued conversion; r≥0 everywhere.

                                    Notation and interpretation

                                    Integrability and Bochner integrals

                                    L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                    \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                    Mathematical proof

                                    1. Use the log-likelihood Radon–Nikodym transport identity

                                    The imported identity changes the reference measure from π weighted by its density r to ρ. Its sigma-finite/decomposition requirements are supplied by the probability assumptions.

                                    \[\int r\log r\,d\pi=\int\log r\,d\rho.\]
                                    Corresponding Lean step

                                    integral_rnDeriv_mul_log hrho_pi

                                    Lean statement · lsiKlFiRnDerivEntropyIntegral

                                    No integrability assumption appears in this theorem. The right side is the real log-likelihood integral, not an assertion that extended KL is finite.

                                    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                    theorem lsiKlFiRnDerivEntropyIntegral {α : Type*} [MeasurableSpace α]
                                        (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                        (hrho_pi : rho ≪ pi) :
                                        ∫ x, (rho.rnDeriv pi x).toReal * Real.log (rho.rnDeriv pi x).toReal ∂pi =
                                          ∫ x, llr rho pi x ∂rho

                                    Exact module and namespace context

                                    Lean proof · lsiKlFiRnDerivEntropyIntegral

                                    This is direct reuse of the log-likelihood-ratio change-of-measure theorem. Its general integral convention allows the equality even when the analytic entropy integral is not finite.

                                    Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                    theorem lsiKlFiRnDerivEntropyIntegral {α : Type*} [MeasurableSpace α]
                                        (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                        (hrho_pi : rho ≪ pi) :
                                        ∫ x, (rho.rnDeriv pi x).toReal * Real.log (rho.rnDeriv pi x).toReal ∂pi =
                                          ∫ x, llr rho pi x ∂rho := by
                                      exact integral_rnDeriv_mul_log hrho_pi
                                    
                                    /-- Entropy transport for the square-root density test used by LSI.
                                    
                                    This rewrites the LSI entropy integrand for
                                    `phi=sqrt(d rho/d pi)` and then uses the Radon-Nikodym entropy transport
                                    identity.  It still does not prove admissibility of `phi` or the Fisher
                                    chain-rule side of `eq:LSI-KL-FI`.
                                    -/

                                    Exact module and namespace context

                                    Scope and omitted-condition boundaries

                                    • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                                    • The chosen real density r is (rnDeriv ρ π).toReal, with ENNReal.toReal(∞)=0. Do not replace this with an arbitrary pointwise density version; absolute continuity and probability measures justify the a.e. density interpretation.
                                    • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                    • Do not identify this equality alone with a finite KL formula; downstream hypotheses must control the log-likelihood integral.

                                    Source and reuse

                                    ASTIS parents called

                                      Mathlib API called (external library)

                                      • MeasureTheory.integral_rnDeriv_mul_log
                                      • MeasureTheory.llr

                                      Mathematical sources

                                      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                      ASTIS mathematical exposition

                                      Rewrite the square-root test entropy as a log-likelihood integral

                                      AutoSamplingTheory.lsiKlFiSqrtRnDerivEntropyIntegral · theorem · Teaching coverage

                                      Statement

                                      For probability measures ρ≪π and r=(dρ/dπ).toReal, the real integral of (√r)² log((√r)²) under π equals the integral of llr(ρ,π) under ρ. No finite-entropy or test-admissibility claim is made.

                                      \[\int(\sqrt r)^2\log((\sqrt r)^2)\,d\pi=\int\ell_{\rho,\pi}\,d\rho.\]

                                      All objects and hypotheses

                                      • α is an arbitrary measurable space; ρ and π are measures on it, both with IsProbabilityMeasure instances.
                                      • hrho_pi supplies absolute continuity ρ≪π. Probability assumptions supply the finite/sigma-finite and Lebesgue-decomposition requirements of the imported Radon–Nikodym APIs.
                                      • Write R=dρ/dπ for Mathlib's ℝ≥0∞-valued rnDeriv representative and r=R.toReal for its real-valued conversion; r≥0 everywhere.

                                      Notation and interpretation

                                      Integrability and Bochner integrals

                                      L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                      \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                      Mathematical proof

                                      1. Use the established density-entropy transport

                                      Replace the log-likelihood integral by ∫r log r dπ.

                                      \[\int\ell_{\rho,\pi}\,d\rho=\int r\log r\,d\pi.\]
                                      Corresponding Lean step

                                      rw [← lsiKlFiRnDerivEntropyIntegral rho pi hrho_pi]

                                      2. Rewrite each nonnegative density value

                                      At every x, nonnegativity of r(x) gives the scalar square-root entropy identity.

                                      \[(\sqrt{r(x)})^2\log((\sqrt{r(x)})^2)=r(x)\log r(x).\]
                                      Corresponding Lean step

                                      lsiKlFiSqrtDensityEntropyIntegrandScalar ENNReal.toReal_nonneg

                                      3. Integrate the a.e. equality

                                      Pointwise equality supplies the a.e. congruence required for equal real integrals.

                                      \[\int(\sqrt r)^2\log((\sqrt r)^2)\,d\pi=\int r\log r\,d\pi.\]
                                      Corresponding Lean step

                                      integral_congr_ae

                                      Lean statement · lsiKlFiSqrtRnDerivEntropyIntegral

                                      This substitutes a particular square-root density into an integrand. It does not certify that this function belongs to an LSI's admissible class.

                                      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                      theorem lsiKlFiSqrtRnDerivEntropyIntegral {α : Type*} [MeasurableSpace α]
                                          (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                          (hrho_pi : rho ≪ pi) :
                                          ∫ x, (Real.sqrt ((rho.rnDeriv pi x).toReal)) ^ 2 *
                                              Real.log ((Real.sqrt ((rho.rnDeriv pi x).toReal)) ^ 2) ∂pi =
                                            ∫ x, llr rho pi x ∂rho

                                      Exact module and namespace context

                                      Lean proof · lsiKlFiSqrtRnDerivEntropyIntegral

                                      The proof combines one previously established measure-transport identity with a pointwise algebraic rewrite and integral congruence.

                                      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                      theorem lsiKlFiSqrtRnDerivEntropyIntegral {α : Type*} [MeasurableSpace α]
                                          (rho pi : Measure α) [IsProbabilityMeasure rho] [IsProbabilityMeasure pi]
                                          (hrho_pi : rho ≪ pi) :
                                          ∫ x, (Real.sqrt ((rho.rnDeriv pi x).toReal)) ^ 2 *
                                              Real.log ((Real.sqrt ((rho.rnDeriv pi x).toReal)) ^ 2) ∂pi =
                                            ∫ x, llr rho pi x ∂rho := by
                                        rw [← lsiKlFiRnDerivEntropyIntegral rho pi hrho_pi]
                                        refine integral_congr_ae ?_
                                        filter_upwards with x
                                        exact lsiKlFiSqrtDensityEntropyIntegrandScalar ENNReal.toReal_nonneg
                                      
                                      /-- One-dimensional pointwise Fisher-chain coefficient for the LSI test.
                                      
                                      For a positive density ratio `r`, the source substitution
                                      `phi=sqrt(r)` has differential coefficient
                                      `d phi = (2*sqrt(r))^{-1} d r`, while
                                      `d log r = r^{-1} d r`.  This scalar lemma proves the resulting
                                      `1/4` factor in the Fisher integrand.  The vector-gradient and integral
                                      versions remain separate analytic obligations.
                                      -/

                                      Exact module and namespace context

                                      Scope and omitted-condition boundaries

                                      • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                                      • The chosen real density r is (rnDeriv ρ π).toReal, with ENNReal.toReal(∞)=0. Do not replace this with an arbitrary pointwise density version; absolute continuity and probability measures justify the a.e. density interpretation.
                                      • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.

                                      Source and reuse

                                      ASTIS parents called

                                      Mathlib API called (external library)

                                      • MeasureTheory.integral_congr_ae
                                      • ENNReal.toReal_nonneg

                                      Mathematical sources

                                      ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                      ASTIS mathematical exposition

                                      The scalar square-root/logarithm coefficients give a factor of one quarter

                                      AutoSamplingTheory.lsiKlFiSqrtDensityFisherChainScalar · theorem · Teaching coverage

                                      Statement

                                      For any positive real r and any real dr, the squared expression dr/(2√r) equals one quarter of r times (dr/r)². The symbols are numbers, not derivatives whose existence is established here.

                                      \[r>0\Longrightarrow\left(\frac{dr}{2\sqrt r}\right)^2=\frac14\,r\left(\frac{dr}{r}\right)^2.\]

                                      All objects and hypotheses

                                      • r,dr∈ℝ; hr asserts r>0. Strict positivity, not mere nonnegativity, permits clearing both denominators.

                                      Mathematical proof

                                      1. Record the square-root and nonzero facts

                                      Positivity gives (√r)²=r and both r≠0 and √r≠0.

                                      \[(\sqrt r)^2=r,\qquad r\ne0,\qquad\sqrt r\ne0.\]
                                      Corresponding Lean step

                                      Real.sq_sqrt; Real.sqrt_pos; hsqrt_sq, hsqrt_ne, hr_ne

                                      2. Clear the nonzero denominators

                                      Cross-multiplication reduces the rational equality to polynomial arithmetic; the two sides agree after replacing (√r)² by r.

                                      \[\frac{dr^2}{4(\sqrt r)^2}=\frac{dr^2}{4r}=\frac14\,r\,\frac{dr^2}{r^2}.\]
                                      Corresponding Lean step

                                      field_simp [hsqrt_ne,hr_ne]; nlinarith [hsqrt_sq]

                                      Lean statement · lsiKlFiSqrtDensityFisherChainScalar

                                      dr is any real number. The theorem identifies a coefficient pattern used by a future derivative calculation, not a derivative of a function.

                                      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                      theorem lsiKlFiSqrtDensityFisherChainScalar {r dr : Real} (hr : 0 < r) :
                                          ((1 / (2 * Real.sqrt r)) * dr) ^ 2 =
                                            (1 / 4) * (r * (dr / r) ^ 2)

                                      Exact module and namespace context

                                      Lean proof · lsiKlFiSqrtDensityFisherChainScalar

                                      The proof first establishes that the denominators are nonzero, then reduces the equation to polynomial arithmetic with the square-root identity.

                                      Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                      theorem lsiKlFiSqrtDensityFisherChainScalar {r dr : Real} (hr : 0 < r) :
                                          ((1 / (2 * Real.sqrt r)) * dr) ^ 2 =
                                            (1 / 4) * (r * (dr / r) ^ 2) := by
                                        have hsqrt_sq : (Real.sqrt r) ^ 2 = r := Real.sq_sqrt (le_of_lt hr)
                                        have hsqrt_ne : Real.sqrt r ≠ 0 := ne_of_gt (Real.sqrt_pos.2 hr)
                                        have hr_ne : r ≠ 0 := ne_of_gt hr
                                        field_simp [hsqrt_ne, hr_ne]
                                        nlinarith [hsqrt_sq]
                                      
                                      /-- Pointwise Fisher-chain handoff with named derivative identities.
                                      
                                      This packages the scalar part of
                                      `nabla sqrt(r) = (2*sqrt(r))^{-1} nabla r` and
                                      `nabla log r = r^{-1} nabla r`.  It does not prove differentiability,
                                      gradient existence, or the vector norm/integral transport backend.
                                      -/

                                      Exact module and namespace context

                                      Scope and omitted-condition boundaries

                                      • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                      • The r=0 case is excluded; no zero-density extension or vector-norm identity is proved.

                                      Source and reuse

                                      ASTIS parents called

                                        Mathlib API called (external library)

                                        • Real.sq_sqrt
                                        • Real.sqrt_pos

                                        Mathematical sources

                                        • Exact existing ASTIS declaration and body — Directly read local source; not a new proof or source-fidelity verdict.
                                        • Real.sq_sqrt — Directly inspected pinned Mathlib theorem/API. Reuse is distinguished from a new ASTIS proof.
                                        • Real.sqrt_pos — Directly inspected pinned Mathlib theorem/API. Reuse is distinguished from a new ASTIS proof.

                                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                        ASTIS mathematical exposition

                                        Apply the scalar coefficient identity to supplied derivative values

                                        AutoSamplingTheory.lsiKlFiSqrtDensityFisherChainOfDerivativesScalar · theorem · Teaching coverage

                                        Statement

                                        Let r>0 and dr,dSqrt,dLog be real numbers. If dSqrt=dr/(2√r) and dLog=dr/r, then dSqrt²=(1/4)r dLog². The named derivative identities are explicit assumptions.

                                        \[d_{\sqrt{\ }}=\frac{dr}{2\sqrt r},\quad d_{\log}=\frac{dr}{r}\Longrightarrow d_{\sqrt{\ }}^2=\tfrac14\,r\,d_{\log}^2.\]

                                        All objects and hypotheses

                                        • r,dr,dSqrt,dLog∈ℝ with r>0.
                                        • The two coefficient identities for dSqrt and dLog are supplied; no functions or differentiability hypotheses are inferred from their names.

                                        Mathematical proof

                                        1. Substitute the supplied identities

                                        Replace each named derivative value by its explicit scalar coefficient expression.

                                        \[d_{\sqrt{\ }}^2=\left(\frac{dr}{2\sqrt r}\right)^2,\quad r\,d_{\log}^2=r\left(\frac{dr}{r}\right)^2.\]
                                        Corresponding Lean step

                                        rw [hdSqrt,hdLog]

                                        2. Reuse the scalar algebra theorem

                                        The previous positive-r identity supplies the required factor one quarter.

                                        \[\left(\frac{dr}{2\sqrt r}\right)^2=\tfrac14r\left(\frac{dr}{r}\right)^2.\]
                                        Corresponding Lean step

                                        lsiKlFiSqrtDensityFisherChainScalar hr

                                        Lean statement · lsiKlFiSqrtDensityFisherChainOfDerivativesScalar

                                        This handoff takes values called derivatives plus formulas for them. It does not prove a chain rule for any underlying function.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainOfDerivativesScalar
                                            {r dr dSqrt dLog : Real}
                                            (hr : 0 < r)
                                            (hdSqrt : dSqrt = (1 / (2 * Real.sqrt r)) * dr)
                                            (hdLog : dLog = dr / r) :
                                            dSqrt ^ 2 = (1 / 4) * (r * dLog ^ 2)

                                        Exact module and namespace context

                                        Lean proof · lsiKlFiSqrtDensityFisherChainOfDerivativesScalar

                                        After substituting the two premises, the goal is exactly the preceding scalar theorem.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainOfDerivativesScalar
                                            {r dr dSqrt dLog : Real}
                                            (hr : 0 < r)
                                            (hdSqrt : dSqrt = (1 / (2 * Real.sqrt r)) * dr)
                                            (hdLog : dLog = dr / r) :
                                            dSqrt ^ 2 = (1 / 4) * (r * dLog ^ 2) := by
                                          rw [hdSqrt, hdLog]
                                          exact lsiKlFiSqrtDensityFisherChainScalar hr
                                        
                                        /-- Finite-coordinate Fisher-chain handoff for the LSI density test.
                                        
                                        This lifts the pointwise scalar identity for `phi=sqrt(r)` to a finite sum of
                                        coordinate-square terms.  It is still not the vector Sobolev chain rule or the
                                        integral identity for Fisher information; those analytic backends must supply
                                        the coordinate derivative identities and the later integral transport.
                                        -/

                                        Exact module and namespace context

                                        Scope and omitted-condition boundaries

                                        • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.

                                        Source and reuse

                                        ASTIS parents called

                                        Mathlib API called (external library)

                                        No direct Mathlib call recorded; see the ASTIS parents.

                                        Mathematical sources

                                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                        ASTIS mathematical exposition

                                        Sum the scalar Fisher-chain factor over finitely many coordinates

                                        AutoSamplingTheory.lsiKlFiSqrtDensityFisherChainFiniteSumScalar · theorem · Teaching coverage

                                        Statement

                                        Let I be a finite index type, r>0 a real number, and dr,dSqrt,dLog:I→ℝ. If at every i the values satisfy dSqrt_i=dr_i/(2√r) and dLog_i=dr_i/r, then the sum of dSqrt_i² is (1/4)r times the sum of dLog_i². The empty finite index type is allowed.

                                        \[\sum_{i\in I}d_{\sqrt{\ },i}^2=\frac14\,r\sum_{i\in I}d_{\log,i}^2.\]

                                        All objects and hypotheses

                                        • I is a type with Fintype; r∈ℝ is strictly positive.
                                        • dr,dSqrt,dLog:I→ℝ and the two derivative-coefficient equalities hold for every i.

                                        Mathematical proof

                                        1. Prove the identity in each coordinate

                                        Substitute the two supplied formulas at i and apply the scalar theorem.

                                        \[d_{\sqrt{\ },i}^2=\tfrac14\,r\,d_{\log,i}^2\quad\forall i.\]
                                        Corresponding Lean step

                                        Finset.sum_congr; rw [hdSqrt i,hdLog i]; lsiKlFiSqrtDensityFisherChainScalar hr

                                        2. Sum equal terms

                                        Equality at each index gives equality of the two finite sums.

                                        \[\sum_i d_{\sqrt{\ },i}^2=\sum_i\tfrac14(r\,d_{\log,i}^2).\]
                                        Corresponding Lean step

                                        first calc equality

                                        3. Factor out the common coefficient

                                        Reassociate products, distribute the constant across the finite sum, and reassociate again.

                                        \[\sum_i\tfrac14(r\,d_{\log,i}^2)=(\tfrac14r)\sum_i d_{\log,i}^2=\tfrac14\left(r\sum_i d_{\log,i}^2\right).\]
                                        Corresponding Lean step

                                        ring; Finset.mul_sum; ring

                                        Lean statement · lsiKlFiSqrtDensityFisherChainFiniteSumScalar

                                        Finiteness concerns the coordinate index only. All coordinate derivative formulas are premises, and no inner product or norm is part of the statement.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainFiniteSumScalar
                                            {ι : Type*} [Fintype ι] {r : Real} {dr dSqrt dLog : ι → Real}
                                            (hr : 0 < r)
                                            (hdSqrt : ∀ i, dSqrt i = (1 / (2 * Real.sqrt r)) * dr i)
                                            (hdLog : ∀ i, dLog i = dr i / r) :
                                            (∑ i, dSqrt i ^ 2) = (1 / 4) * (r * ∑ i, dLog i ^ 2)

                                        Exact module and namespace context

                                        Lean proof · lsiKlFiSqrtDensityFisherChainFiniteSumScalar

                                        The proof checks one summand, replaces the entire finite sum termwise, and pulls out the same scalar coefficient.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainFiniteSumScalar
                                            {ι : Type*} [Fintype ι] {r : Real} {dr dSqrt dLog : ι → Real}
                                            (hr : 0 < r)
                                            (hdSqrt : ∀ i, dSqrt i = (1 / (2 * Real.sqrt r)) * dr i)
                                            (hdLog : ∀ i, dLog i = dr i / r) :
                                            (∑ i, dSqrt i ^ 2) = (1 / 4) * (r * ∑ i, dLog i ^ 2) := by
                                          calc
                                            (∑ i, dSqrt i ^ 2) = ∑ i, (1 / 4) * (r * dLog i ^ 2) := by
                                              refine Finset.sum_congr rfl ?_
                                              intro i _hi
                                              rw [hdSqrt i, hdLog i]
                                              exact lsiKlFiSqrtDensityFisherChainScalar hr
                                            _ = ∑ i, ((1 / 4) * r) * dLog i ^ 2 := by
                                              refine Finset.sum_congr rfl ?_
                                              intro i _hi
                                              ring
                                            _ = ((1 / 4) * r) * ∑ i, dLog i ^ 2 := by
                                              rw [Finset.mul_sum]
                                            _ = (1 / 4) * (r * ∑ i, dLog i ^ 2) := by
                                              ring
                                        
                                        /-- Finite-coordinate handoff to the Dirichlet/Fisher identity.
                                        
                                        Once a density backend identifies the Dirichlet term with the finite coordinate
                                        sum of `d sqrt(r)` squares and the Fisher term with
                                        `r * sum_i (d log r_i)^2`, this lemma supplies the exact
                                        `dirichlet = (1/4)*FI` input consumed by the existing LSI/KL/FI scalar bridge.
                                        It does not construct the Radon--Nikodym density, prove differentiability, or
                                        integrate the identity.
                                        -/

                                        Exact module and namespace context

                                        Scope and omitted-condition boundaries

                                        • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                        • A coordinate-square sum is not automatically the squared norm of a gradient; an application must justify that identification.

                                        Source and reuse

                                        ASTIS parents called

                                        Mathlib API called (external library)

                                        • Finset.sum_congr
                                        • Finset.mul_sum

                                        Mathematical sources

                                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                        ASTIS mathematical exposition

                                        Name the finite-coordinate Dirichlet and Fisher expressions

                                        AutoSamplingTheory.lsiKlFiSqrtDensityFisherChainFiniteSumHandoffScalar · theorem · Teaching coverage

                                        Statement

                                        Let I be finite, r>0, and dr,dSqrt,dLog:I→ℝ satisfy the coefficient identities at every coordinate. If real numbers D and J are supplied to equal ∑dSqrt_i² and r∑dLog_i² respectively, then D=J/4.

                                        \[D=\sum_i d_{\sqrt{\ },i}^2,\quad J=r\sum_i d_{\log,i}^2\Longrightarrow D=\tfrac14J.\]

                                        All objects and hypotheses

                                        • I has Fintype; r,D,J∈ℝ with r>0; dr,dSqrt,dLog:I→ℝ.
                                        • D and J have the displayed finite-sum representations, and dSqrt_i=dr_i/(2√r), dLog_i=dr_i/r for every i.

                                        Mathematical proof

                                        1. Replace the named quantities by their sums

                                        Use the two representation hypotheses to expose the finite-coordinate expressions.

                                        \[D=\sum_i d_{\sqrt{\ },i}^2,\quad\tfrac14J=\tfrac14\left(r\sum_i d_{\log,i}^2\right).\]
                                        Corresponding Lean step

                                        rw [hdirichlet,hfisher]

                                        2. Reuse the finite-sum identity

                                        The earlier finite-coordinate algebra theorem identifies these expressions.

                                        \[\sum_i d_{\sqrt{\ },i}^2=\tfrac14\left(r\sum_i d_{\log,i}^2\right).\]
                                        Corresponding Lean step

                                        lsiKlFiSqrtDensityFisherChainFiniteSumScalar hr hdSqrt hdLog

                                        Lean statement · lsiKlFiSqrtDensityFisherChainFiniteSumHandoffScalar

                                        D and J are real values with supplied representations. Their names do not turn them into analytic Dirichlet energy or Fisher information automatically.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainFiniteSumHandoffScalar
                                            {ι : Type*} [Fintype ι] {r dirichlet fisher : Real}
                                            {dr dSqrt dLog : ι → Real}
                                            (hr : 0 < r)
                                            (hdirichlet : dirichlet = ∑ i, dSqrt i ^ 2)
                                            (hfisher : fisher = r * ∑ i, dLog i ^ 2)
                                            (hdSqrt : ∀ i, dSqrt i = (1 / (2 * Real.sqrt r)) * dr i)
                                            (hdLog : ∀ i, dLog i = dr i / r) :
                                            dirichlet = (1 / 4) * fisher

                                        Exact module and namespace context

                                        Lean proof · lsiKlFiSqrtDensityFisherChainFiniteSumHandoffScalar

                                        Only substitution and the existing finite-sum result are used. No derivative identity or norm representation is established.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainFiniteSumHandoffScalar
                                            {ι : Type*} [Fintype ι] {r dirichlet fisher : Real}
                                            {dr dSqrt dLog : ι → Real}
                                            (hr : 0 < r)
                                            (hdirichlet : dirichlet = ∑ i, dSqrt i ^ 2)
                                            (hfisher : fisher = r * ∑ i, dLog i ^ 2)
                                            (hdSqrt : ∀ i, dSqrt i = (1 / (2 * Real.sqrt r)) * dr i)
                                            (hdLog : ∀ i, dLog i = dr i / r) :
                                            dirichlet = (1 / 4) * fisher := by
                                          rw [hdirichlet, hfisher]
                                          exact lsiKlFiSqrtDensityFisherChainFiniteSumScalar hr hdSqrt hdLog
                                        
                                        /-- Integral handoff for the finite-coordinate Fisher chain rule.
                                        
                                        After a Sobolev backend supplies coordinate derivative identities almost
                                        everywhere for `sqrt(r)` and `log r`, this pushes the cycle-38 finite-sum
                                        coefficient through the `pi`-integral.  It is still below the full
                                        vector-gradient/Fisher-information theorem: integrability, coordinate-to-vector
                                        gradient equivalence, zero-density handling, and admissibility of `sqrt(r)`
                                        remain separate obligations.
                                        -/

                                        Exact module and namespace context

                                        Scope and omitted-condition boundaries

                                        • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                        • Named scalar handoff, not integration or geometric identification.

                                        Source and reuse

                                        ASTIS parents called

                                        Mathlib API called (external library)

                                        No direct Mathlib call recorded; see the ASTIS parents.

                                        Mathematical sources

                                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                        ASTIS mathematical exposition

                                        Integrate the a.e. finite-coordinate Fisher-chain identity

                                        AutoSamplingTheory.lsiKlFiSqrtDensityFisherChainIntegralFiniteSum · theorem · Teaching coverage

                                        Statement

                                        Under the finite-coordinate hypotheses below, suppose positivity of r and both families of derivative-coefficient identities hold μ-a.e. Then the real integral of ∑dSqrt_i² equals the real integral of (1/4)r∑dLog_i². This is a congruence identity for totalized integrals, with no integrability premise.

                                        \[\int\sum_i d_{\sqrt{\ },i}(x)^2\,d\mu(x)=\int\frac14\left(r(x)\sum_i d_{\log,i}(x)^2\right)\,d\mu(x).\]

                                        All objects and hypotheses

                                        • α is measurable, I has Fintype, and μ is any measure on α; no finiteness or probability hypothesis.
                                        • r:α→ℝ and dr,dSqrt,dLog:I→α→ℝ are arbitrary functions.
                                        • For μ-almost every x, r(x)>0.
                                        • For μ-almost every x, simultaneously for every i, dSqrt_i(x)=dr_i(x)/(2√r(x)); separately, for μ-almost every x, simultaneously for every i, dLog_i(x)=dr_i(x)/r(x).
                                        • No measurability or integrability of these functions is assumed by this congruence statement.

                                        Notation and interpretation

                                        A.e. and strong measurability

                                        A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                        \[f=g\quad\mu\text{-a.e.}\]
                                        Integrability and Bochner integrals

                                        L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                        \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                        Mathematical proof

                                        1. Combine the three a.e. hypotheses

                                        Intersect the full-measure sets for positivity and the two uniform coordinate identities. At every remaining x all scalar hypotheses hold together.

                                        \[r(x)>0,\ d_{\sqrt{\ },i}(x)=dr_i(x)/(2\sqrt{r(x)}),\ d_{\log,i}(x)=dr_i(x)/r(x)\quad\forall i.\]
                                        Corresponding Lean step

                                        filter_upwards [hr,hdSqrt,hdLog]

                                        2. Apply the finite-sum theorem at that x

                                        Treat r(x) and the coordinate values as scalar data for the previous theorem.

                                        \[\sum_i d_{\sqrt{\ },i}(x)^2=\tfrac14r(x)\sum_i d_{\log,i}(x)^2\quad\mu\text{-a.e.}\]
                                        Corresponding Lean step

                                        lsiKlFiSqrtDensityFisherChainFiniteSumScalar hx hSqrt hLog

                                        3. Use integral congruence

                                        A.e. equality suffices for equality of the real integrals under Mathlib's totalized convention.

                                        \[\int A\,d\mu=\int B\,d\mu\quad\text{if }A=B\ \mu\text{-a.e.}\]
                                        Corresponding Lean step

                                        integral_congr_ae

                                        Lean statement · lsiKlFiSqrtDensityFisherChainIntegralFiniteSum

                                        The a.e. assumptions quantify over x first and every coordinate second. They are not a theorem proving those derivative identities.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainIntegralFiniteSum
                                            {α ι : Type*} [MeasurableSpace α] [Fintype ι] (mu : Measure α)
                                            {r : α → Real} {dr dSqrt dLog : ι → α → Real}
                                            (hr : ∀ᵐ x ∂mu, 0 < r x)
                                            (hdSqrt : ∀ᵐ x ∂mu,
                                              ∀ i, dSqrt i x = (1 / (2 * Real.sqrt (r x))) * dr i x)
                                            (hdLog : ∀ᵐ x ∂mu, ∀ i, dLog i x = dr i x / r x) :
                                            ∫ x, (∑ i, dSqrt i x ^ 2) ∂mu =
                                              ∫ x, (1 / 4) * (r x * ∑ i, dLog i x ^ 2) ∂mu

                                        Exact module and namespace context

                                        Lean proof · lsiKlFiSqrtDensityFisherChainIntegralFiniteSum

                                        The proof intersects the a.e. events, invokes the scalar finite-sum identity pointwise, then integrates that equality.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainIntegralFiniteSum
                                            {α ι : Type*} [MeasurableSpace α] [Fintype ι] (mu : Measure α)
                                            {r : α → Real} {dr dSqrt dLog : ι → α → Real}
                                            (hr : ∀ᵐ x ∂mu, 0 < r x)
                                            (hdSqrt : ∀ᵐ x ∂mu,
                                              ∀ i, dSqrt i x = (1 / (2 * Real.sqrt (r x))) * dr i x)
                                            (hdLog : ∀ᵐ x ∂mu, ∀ i, dLog i x = dr i x / r x) :
                                            ∫ x, (∑ i, dSqrt i x ^ 2) ∂mu =
                                              ∫ x, (1 / 4) * (r x * ∑ i, dLog i x ^ 2) ∂mu := by
                                          refine integral_congr_ae ?_
                                          filter_upwards [hr, hdSqrt, hdLog] with x hx hSqrt hLog
                                          exact lsiKlFiSqrtDensityFisherChainFiniteSumScalar hx hSqrt hLog
                                        
                                        /-- Scalar Dirichlet/Fisher handoff after the integral finite-sum identity.
                                        
                                        This packages the exact `dirichlet=(1/4)*FI` input consumed by the existing
                                        LSI/KL/FI scalar bridges when the analytic backend represents the Dirichlet
                                        and Fisher quantities by finite-coordinate integrals.  It does not identify
                                        those finite-coordinate integrals with the paper's vector-gradient quantities.
                                        -/

                                        Exact module and namespace context

                                        Scope and omitted-condition boundaries

                                        • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                                        • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                        • Does not assert finite Dirichlet/Fisher integrals or justify exchanging coordinate sums and integrals. No such interchange is used.

                                        Source and reuse

                                        ASTIS parents called

                                        Mathlib API called (external library)

                                        • MeasureTheory.integral_congr_ae

                                        Mathematical sources

                                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                        ASTIS mathematical exposition

                                        Extract the one-quarter factor from supplied integral representations

                                        AutoSamplingTheory.lsiKlFiSqrtDensityFisherChainIntegralHandoffScalar · theorem · Teaching coverage

                                        Statement

                                        In the same arbitrary-measure finite-coordinate setting, suppose D and J are real numbers represented by ∫∑dSqrt_i²dμ and ∫r∑dLog_i²dμ. With the a.e. positivity and coordinate derivative identities listed below, D=J/4. No integrability is added by this representation handoff.

                                        \[D=\int\sum_i d_{\sqrt{\ },i}^2\,d\mu,\quad J=\int r\sum_i d_{\log,i}^2\,d\mu \Longrightarrow D=\tfrac14J.\]

                                        All objects and hypotheses

                                        • α is measurable, I has Fintype, and μ is any measure on α; no finiteness or probability hypothesis.
                                        • r:α→ℝ and dr,dSqrt,dLog:I→α→ℝ are arbitrary functions.
                                        • For μ-almost every x, r(x)>0.
                                        • For μ-almost every x, simultaneously for every i, dSqrt_i(x)=dr_i(x)/(2√r(x)); separately, for μ-almost every x, simultaneously for every i, dLog_i(x)=dr_i(x)/r(x).
                                        • No measurability or integrability of these functions is assumed by this congruence statement.
                                        • D,J∈ℝ with the two displayed integral-representation equalities.

                                        Notation and interpretation

                                        A.e. and strong measurability

                                        A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                        \[f=g\quad\mu\text{-a.e.}\]
                                        Integrability and Bochner integrals

                                        L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                        \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                        Mathematical proof

                                        1. Use the supplied integral representations

                                        Substitute the definitions supplied for D and J.

                                        \[D=\int\sum_i d_{\sqrt{\ },i}^2\,d\mu,\quad \tfrac14J=\tfrac14\int r\sum_i d_{\log,i}^2\,d\mu.\]
                                        Corresponding Lean step

                                        rw [hdirichlet,hfisher]

                                        2. Move the scalar factor into the real integral

                                        The constant-multiplication identity rewrites one quarter of the integral as the integral of one quarter times its integrand.

                                        \[\tfrac14\int B\,d\mu=\int\tfrac14 B\,d\mu.\]
                                        Corresponding Lean step

                                        rw [← integral_const_mul]

                                        3. Reuse a.e. integral congruence

                                        The preceding integrated finite-coordinate theorem now gives the exact equality.

                                        \[\int\sum_i d_{\sqrt{\ },i}^2\,d\mu=\int\tfrac14r\sum_i d_{\log,i}^2\,d\mu.\]
                                        Corresponding Lean step

                                        lsiKlFiSqrtDensityFisherChainIntegralFiniteSum mu hr hdSqrt hdLog

                                        Lean statement · lsiKlFiSqrtDensityFisherChainIntegralHandoffScalar

                                        D and J are named real numbers tied to displayed integral formulas; the theorem does not itself establish that those formulas are the paper's geometric energies.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainIntegralHandoffScalar
                                            {α ι : Type*} [MeasurableSpace α] [Fintype ι] (mu : Measure α)
                                            {r : α → Real} {dirichlet fisher : Real} {dr dSqrt dLog : ι → α → Real}
                                            (hdirichlet : dirichlet = ∫ x, (∑ i, dSqrt i x ^ 2) ∂mu)
                                            (hfisher : fisher = ∫ x, (r x * ∑ i, dLog i x ^ 2) ∂mu)
                                            (hr : ∀ᵐ x ∂mu, 0 < r x)
                                            (hdSqrt : ∀ᵐ x ∂mu,
                                              ∀ i, dSqrt i x = (1 / (2 * Real.sqrt (r x))) * dr i x)
                                            (hdLog : ∀ᵐ x ∂mu, ∀ i, dLog i x = dr i x / r x) :
                                            dirichlet = (1 / 4) * fisher

                                        Exact module and namespace context

                                        Lean proof · lsiKlFiSqrtDensityFisherChainIntegralHandoffScalar

                                        After substituting the representations and moving a constant into the integral, the goal is the earlier a.e. finite-sum integral identity.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem lsiKlFiSqrtDensityFisherChainIntegralHandoffScalar
                                            {α ι : Type*} [MeasurableSpace α] [Fintype ι] (mu : Measure α)
                                            {r : α → Real} {dirichlet fisher : Real} {dr dSqrt dLog : ι → α → Real}
                                            (hdirichlet : dirichlet = ∫ x, (∑ i, dSqrt i x ^ 2) ∂mu)
                                            (hfisher : fisher = ∫ x, (r x * ∑ i, dLog i x ^ 2) ∂mu)
                                            (hr : ∀ᵐ x ∂mu, 0 < r x)
                                            (hdSqrt : ∀ᵐ x ∂mu,
                                              ∀ i, dSqrt i x = (1 / (2 * Real.sqrt (r x))) * dr i x)
                                            (hdLog : ∀ᵐ x ∂mu, ∀ i, dLog i x = dr i x / r x) :
                                            dirichlet = (1 / 4) * fisher := by
                                          rw [hdirichlet, hfisher]
                                          rw [← integral_const_mul]
                                          exact lsiKlFiSqrtDensityFisherChainIntegralFiniteSum mu hr hdSqrt hdLog
                                        
                                        /-- Scalar rearrangement behind the one-sided use of the cited DV formula.
                                        
                                        This is not a proof of Donsker--Varadhan.  It starts after a cited or
                                        eventually formalized entropy-duality theorem has supplied the variational
                                        upper bound for an admissible test.
                                        -/

                                        Exact module and namespace context

                                        Scope and omitted-condition boundaries

                                        • ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.
                                        • These are scalar, density-integral or supplied-derivative handoffs. They do not prove an LSI, the admissibility of its square-root-density test, the vector/Sobolev chain rule or the full KL–Fisher comparison.
                                        • No integral finiteness, vector-gradient identification, or LSI test admissibility is concluded.

                                        Source and reuse

                                        ASTIS parents called

                                        Mathlib API called (external library)

                                        • MeasureTheory.integral_const_mul

                                        Mathematical sources

                                        ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                        ASTIS mathematical exposition

                                        Rearrange a supplied variational upper bound

                                        AutoSamplingTheory.dvVariationalOneSidedConsequenceScalar · theorem · Teaching coverage

                                        Statement

                                        For arbitrary real numbers k,e,L, if e−L≤k, then e≤k+L. The names KL, expectation and log-mgf used in the Lean declaration are labels for these real inputs, not analytic definitions.

                                        \[e-L\le k\Longrightarrow e\le k+L.\]

                                        All objects and hypotheses

                                        • kl, expectation and logMgf are arbitrary real numbers; hvar supplies expectation−logMgf≤kl.

                                        Mathematical proof

                                        1. Add the same real number to both sides

                                        The ordered-field subtraction equivalence moves −L from the left to +L on the right.

                                        \[e-L\le k\iff e\le k+L.\]
                                        Corresponding Lean step

                                        sub_le_iff_le_add.mp hvar

                                        Lean statement · dvVariationalOneSidedConsequenceScalar

                                        This theorem has no measures or integrals. Its only premise is a real inequality supplied by another argument.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem dvVariationalOneSidedConsequenceScalar {kl expectation logMgf : Real}
                                            (hvar : expectation - logMgf ≤ kl) :
                                            expectation ≤ kl + logMgf

                                        Exact module and namespace context

                                        Lean proof · dvVariationalOneSidedConsequenceScalar

                                        The proof applies a basic ordered-additive equivalence. It neither proves entropy duality nor checks an admissible test.

                                        Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                        theorem dvVariationalOneSidedConsequenceScalar {kl expectation logMgf : Real}
                                            (hvar : expectation - logMgf ≤ kl) :
                                            expectation ≤ kl + logMgf := by
                                          exact sub_le_iff_le_add.mp hvar
                                        
                                        /-- Scalar supremum step behind the one-sided use of the cited DV formula.
                                        
                                        This does not prove Donsker--Varadhan.  It starts after a cited or eventually
                                        formalized theorem has identified `kl` with the supremum of the admissible
                                        variational values, and after the selected test has been shown admissible.
                                        -/

                                        Exact module and namespace context

                                        Scope and omitted-condition boundaries

                                        • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                        • Pure scalar rearrangement; analytic meanings must be supplied downstream.

                                        Source and reuse

                                        ASTIS parents called

                                          Mathlib API called (external library)

                                          • sub_le_iff_le_add

                                          Mathematical sources

                                          ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                          ASTIS mathematical exposition

                                          Extract one admissible scalar value from a known supremum

                                          AutoSamplingTheory.dvVariationalOneSidedFromSupremumScalar · theorem · Teaching coverage

                                          Statement

                                          Let A⊆ℝ be bounded above, let v∈A, and suppose sup A=k and v=e−L for real k,e,L,v. Then e≤k+L. Membership supplies nonemptiness; the supremum identity and the selected test's representation are assumptions.

                                          \[v\in A,\quad A\text{ bounded above},\quad\sup A=k,\quad v=e-L \Longrightarrow e\le k+L.\]

                                          All objects and hypotheses

                                          • admissibleValues=A is a set of real numbers; hbounded says A is bounded above.
                                          • testValue=v belongs to A; kl=k, expectation=e and logMgf=L are real.
                                          • hsup gives sSup A=k and htest gives v=e−L.

                                          Mathematical proof

                                          1. Bound the selected value by the supremum

                                          For a bounded-above real set, every member is at most its supremum. The member v makes an additional nonemptiness assumption unnecessary.

                                          \[v\le\sup A.\]
                                          Corresponding Lean step

                                          le_csSup hbounded hmem

                                          2. Substitute the supplied meanings

                                          Replace v by e−L and sup A by k to obtain a variational upper bound.

                                          \[e-L\le k.\]
                                          Corresponding Lean step

                                          rw [← htest,← hsup]; htest_le_sup

                                          3. Apply scalar rearrangement

                                          The previously established subtraction lemma gives the one-sided sum form.

                                          \[e\le k+L.\]
                                          Corresponding Lean step

                                          dvVariationalOneSidedConsequenceScalar hvar

                                          Lean statement · dvVariationalOneSidedFromSupremumScalar

                                          The set consists of scalar values. This theorem does not define admissible random variables or prove that its supremum is KL.

                                          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                          theorem dvVariationalOneSidedFromSupremumScalar {admissibleValues : Set Real}
                                              {kl expectation logMgf testValue : Real}
                                              (hbounded : BddAbove admissibleValues)
                                              (hmem : testValue ∈ admissibleValues)
                                              (hsup : sSup admissibleValues = kl)
                                              (htest : testValue = expectation - logMgf) :
                                              expectation ≤ kl + logMgf

                                          Exact module and namespace context

                                          Lean proof · dvVariationalOneSidedFromSupremumScalar

                                          The proof uses the real supremum order theorem, rewrites the two assumed identities, and reuses the scalar consequence.

                                          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                          theorem dvVariationalOneSidedFromSupremumScalar {admissibleValues : Set Real}
                                              {kl expectation logMgf testValue : Real}
                                              (hbounded : BddAbove admissibleValues)
                                              (hmem : testValue ∈ admissibleValues)
                                              (hsup : sSup admissibleValues = kl)
                                              (htest : testValue = expectation - logMgf) :
                                              expectation ≤ kl + logMgf := by
                                            have htest_le_sup : testValue ≤ sSup admissibleValues := le_csSup hbounded hmem
                                            have hvar : expectation - logMgf ≤ kl := by
                                              rw [← htest, ← hsup]
                                              exact htest_le_sup
                                            exact dvVariationalOneSidedConsequenceScalar hvar
                                          
                                          /-- Finite-log-mgf monotonicity for the scaled tests used before DV.
                                          
                                          If the exponential moment for `alpha0 * q` is integrable under a finite
                                          measure, then the exponential moment for `alpha * q` is integrable for
                                          `0 <= alpha <= alpha0`.  In SALD this is the local Mathlib-backed part of
                                          turning an `alpha0`-complexity assumption into the finite-log-mgf hypothesis
                                          for a selected DV test; it is not a proof of the DV formula itself.
                                          -/

                                          Exact module and namespace context

                                          Scope and omitted-condition boundaries

                                          • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                          • The entropy supremum equality and admissible-test membership are not established here.

                                          Source and reuse

                                          ASTIS parents called

                                          Mathlib API called (external library)

                                          • le_csSup

                                          Mathematical sources

                                          ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                          ASTIS mathematical exposition

                                          An integrable exponential moment remains integrable at a smaller nonnegative scale

                                          AutoSamplingTheory.dvFiniteLogMgfOfLeAlpha · theorem · Teaching coverage

                                          Statement

                                          Let μ be a finite measure on measurable Ω and q:Ω→ℝ any function. If exp(α₀q) is μ-integrable and 0≤α≤α₀, then exp(αq) is μ-integrable. No nonnegativity of q, probability normalization, or separate measurability premise for q is assumed.

                                          \[e^{\alpha_0q}\in L^1(\mu),\quad0\le\alpha\le\alpha_0 \Longrightarrow e^{\alpha q}\in L^1(\mu).\]

                                          All objects and hypotheses

                                          • Ω is measurable and μ is finite, possibly zero or unnormalized.
                                          • q:Ω→ℝ and α,α₀∈ℝ; the exponential at α₀ is integrable, and 0≤α≤α₀.

                                          Notation and interpretation

                                          A.e. and strong measurability

                                          A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                          \[f=g\quad\mu\text{-a.e.}\]
                                          Integrability and Bochner integrals

                                          L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                          \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                          Mathematical proof

                                          1. Use the zero-scale endpoint

                                          For a finite measure the constant exponential at scale zero is integrable.

                                          \[e^{0q}=1\in L^1(\mu).\]
                                          Corresponding Lean step

                                          zero endpoint supplied inside integrable_exp_mul_of_nonneg_of_le

                                          2. Control all intermediate scales

                                          The imported interval theorem bounds exp(αq) by 1+exp(α₀q): use the upper endpoint where q≥0 and the zero endpoint where q≤0. Its proof also derives the needed a.e. measurability from the endpoint hypotheses, treating the zero-length interval separately.

                                          \[e^{\alpha q(\omega)}\le1+e^{\alpha_0q(\omega)}\qquad(0\le\alpha\le\alpha_0).\]
                                          Corresponding Lean step

                                          ProbabilityTheory.integrable_exp_mul_of_le_of_le: inspected proof background

                                          3. Reuse the packaged moment theorem

                                          Specialize the imported nonnegative-scale monotonicity result to q, upper scale α₀ and selected scale α.

                                          \[e^{\alpha q}\in L^1(\mu).\]
                                          Corresponding Lean step

                                          ProbabilityTheory.integrable_exp_mul_of_nonneg_of_le hAlpha0 hAlpha_nonneg hAlpha_le

                                          Lean statement · dvFiniteLogMgfOfLeAlpha

                                          The actual conclusion is integrability of an exponential. The theorem's name does not additionally assert a positive logarithm normalizer when μ is zero.

                                          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                          theorem dvFiniteLogMgfOfLeAlpha {Ω : Type*} [MeasurableSpace Ω]
                                              {mu : Measure Ω} [IsFiniteMeasure mu]
                                              {q : Ω → Real} {alpha alpha0 : Real}
                                              (hAlpha0 : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                              (hAlpha_nonneg : 0 ≤ alpha) (hAlpha_le : alpha ≤ alpha0) :
                                              Integrable (fun x ↦ Real.exp (alpha * q x)) mu

                                          Exact module and namespace context

                                          Lean proof · dvFiniteLogMgfOfLeAlpha

                                          The ASTIS body directly calls the imported moment theorem; the endpoint and domination steps explain its mathematical mechanism rather than a new local proof.

                                          Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                          theorem dvFiniteLogMgfOfLeAlpha {Ω : Type*} [MeasurableSpace Ω]
                                              {mu : Measure Ω} [IsFiniteMeasure mu]
                                              {q : Ω → Real} {alpha alpha0 : Real}
                                              (hAlpha0 : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                              (hAlpha_nonneg : 0 ≤ alpha) (hAlpha_le : alpha ≤ alpha0) :
                                              Integrable (fun x ↦ Real.exp (alpha * q x)) mu := by
                                            exact ProbabilityTheory.integrable_exp_mul_of_nonneg_of_le (X := q) (u := alpha0)
                                              (t := alpha) hAlpha0 hAlpha_nonneg hAlpha_le
                                          
                                          /-- Mathlib-backed one-sided Donsker--Varadhan inequality via exponential tilting.
                                          
                                          This proves only the admissible-test upper bound
                                          `E_nu[Z] - log E_mu[exp Z] <= KL(nu || mu)` under explicit Mathlib
                                          measure-theoretic hypotheses.  It is not the Boucheron supremum equality from
                                          `appendix.tex:73-79`.
                                          -/

                                          Exact module and namespace context

                                          Scope and omitted-condition boundaries

                                          • This result establishes exponential integrability at an intermediate nonnegative scale, not a Donsker–Varadhan inequality or a variational supremum formula. Its later use in a selected-test bound is a separate consumer; no source-fidelity verdict is made.
                                          • For a probability target this supports a finite, positive exponential normalizer. For the allowed zero measure, the normalizer is zero, so do not read the title as an unqualified ordinary log-mgf statement.

                                          Source and reuse

                                          ASTIS parents called

                                            Mathlib API called (external library)

                                            • ProbabilityTheory.integrable_exp_mul_of_nonneg_of_le

                                            Mathematical sources

                                            ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                            ASTIS mathematical exposition

                                            Prove the selected-test entropy bound by exponential tilting

                                            AutoSamplingTheory.dvVariationalOneSidedOfTiltedRight · theorem · Teaching coverage

                                            Statement

                                            For probability measures ν≪μ on a common measurable space, retain the explicit sigma-finiteness hypotheses and assume Z∈L¹(ν), exp Z∈L¹(μ), and llr(ν,μ)∈L¹(ν). Then ∫Z dν−log∫exp Z dμ≤(klDiv ν μ).toReal. These assumptions keep the selected normalizer positive and finite and put KL in its finite branch.

                                            \[\int Z\,d\nu-\log\int e^Z\,d\mu\le K,\qquad K=(\mathrm{klDiv}(\nu,\mu))_{\mathrm{toReal}}.\]

                                            All objects and hypotheses

                                            • α (or Ω) is an arbitrary measurable space; ν and μ are probability measures on that same space.
                                            • Both SigmaFinite μ and SigmaFinite ν are explicitly present in the Lean signature; probability already supplies them, but they are not omitted here.
                                            • ν≪μ; the chosen real test Z is ν-integrable; exp Z is μ-integrable; llr(ν,μ) is ν-integrable.
                                            • Notation: ℓ=llr(ν,μ)=log((dν/dμ).toReal), M_Z=∫exp Z dμ, and K=(InformationTheory.klDiv ν μ).toReal.
                                            • Z is an arbitrary real-valued function on the common space; no pointwise boundedness or smoothness is assumed.

                                            Notation and interpretation

                                            A.e. and strong measurability

                                            A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                            \[f=g\quad\mu\text{-a.e.}\]
                                            Integrability and Bochner integrals

                                            L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                            \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                            Mathematical proof

                                            1. Build a genuine tilted probability measure

                                            Define μ_Z by density exp Z/M_Z against μ. Because μ is nonzero and exp Z is integrable and strictly positive, its normalizer is positive and finite, and Mathlib proves μ_Z is a probability measure.

                                            \[d\mu_Z=M_Z^{-1}e^Z\,d\mu,\qquad0<M_Z<\infty,\qquad\mu_Z(\alpha)=1.\]
                                            Corresponding Lean step

                                            isProbabilityMeasure_tilted hexp_mu

                                            2. Transfer absolute continuity to the tilted target

                                            The positive exponential tilt dominates μ in the absolute-continuity sense; combine μ≪μ_Z with ν≪μ.

                                            \[\nu\ll\mu\ll\mu_Z\Longrightarrow\nu\ll\mu_Z.\]
                                            Corresponding Lean step

                                            absolutelyContinuous_tilted hexp_mu; hnu_mu.trans hmu_tilted

                                            3. Check integrability and use entropy nonnegativity

                                            The original test and log-likelihood integrability imply llr(ν,μ_Z) is ν-integrable. Gibbs' inequality includes total-mass correction terms; they cancel because ν and μ_Z are both probability measures.

                                            \[0\le\int\ell_{\nu,\mu_Z}\,d\nu+\mu_Z(\alpha)-\nu(\alpha)=\int\ell_{\nu,\mu_Z}\,d\nu.\]
                                            Corresponding Lean step

                                            integrable_llr_tilted_right; integral_llr_add_sub_measure_univ_nonneg; simpa

                                            4. Rewrite the tilted log-likelihood integral

                                            The imported tilt identity subtracts the test expectation and adds the logarithm of its normalizer to the original log-likelihood integral.

                                            \[\int\ell_{\nu,\mu_Z}\,d\nu=\int\ell_{\nu,\mu}\,d\nu-\int Z\,d\nu+\log M_Z.\]
                                            Corresponding Lean step

                                            integral_llr_tilted_right hnu_mu hZ_nu hexp_mu hllr

                                            5. Rearrange the nonnegative expression

                                            The previous two lines imply the test's variational value is at most the original log-likelihood integral.

                                            \[\int Z\,d\nu-\log M_Z\le\int\ell_{\nu,\mu}\,d\nu.\]
                                            Corresponding Lean step

                                            hnonneg_rewrite; linarith

                                            6. Identify the real KL value

                                            Absolute continuity and equal total masses give the toReal KL identity; substitute it into the bound. The explicit integrability hypotheses prevent this application from concealing infinite KL behind toReal(∞)=0.

                                            \[K=\int\ell_{\nu,\mu}\,d\nu,\qquad\int Z\,d\nu-\log M_Z\le K.\]
                                            Corresponding Lean step

                                            toReal_klDiv_of_measure_eq hnu_mu (by simp); simpa [hkl] using hineq

                                            Lean statement · dvVariationalOneSidedOfTiltedRight

                                            The target is a real inequality using toReal of the extended KL divergence. The test and likelihood integrability assumptions are essential analytic hypotheses, not metadata.

                                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                            theorem dvVariationalOneSidedOfTiltedRight {α : Type*} [MeasurableSpace α]
                                                (nu mu : Measure α) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                [SigmaFinite mu] [SigmaFinite nu]
                                                (Z : α → Real)
                                                (hnu_mu : nu ≪ mu)
                                                (hZ_nu : Integrable Z nu)
                                                (hexp_mu : Integrable (fun x ↦ Real.exp (Z x)) mu)
                                                (hllr : Integrable (llr nu mu) nu) :
                                                (∫ x, Z x ∂nu) - Real.log (∫ x, Real.exp (Z x) ∂mu) ≤
                                                  (klDiv nu mu).toReal

                                            Exact module and namespace context

                                            Lean proof · dvVariationalOneSidedOfTiltedRight

                                            The proof introduces the tilted probability instance, proves absolute continuity to it, applies nonnegativity of the tilted log-likelihood integral, expands that integral, and rearranges before identifying KL.

                                            Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                            theorem dvVariationalOneSidedOfTiltedRight {α : Type*} [MeasurableSpace α]
                                                (nu mu : Measure α) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                [SigmaFinite mu] [SigmaFinite nu]
                                                (Z : α → Real)
                                                (hnu_mu : nu ≪ mu)
                                                (hZ_nu : Integrable Z nu)
                                                (hexp_mu : Integrable (fun x ↦ Real.exp (Z x)) mu)
                                                (hllr : Integrable (llr nu mu) nu) :
                                                (∫ x, Z x ∂nu) - Real.log (∫ x, Real.exp (Z x) ∂mu) ≤
                                                  (klDiv nu mu).toReal := by
                                              let : IsProbabilityMeasure (mu.tilted Z) := isProbabilityMeasure_tilted hexp_mu
                                              have hmu_tilted : mu ≪ mu.tilted Z := absolutelyContinuous_tilted hexp_mu
                                              have hnu_tilted : nu ≪ mu.tilted Z := hnu_mu.trans hmu_tilted
                                              have hllr_tilted : Integrable (llr nu (mu.tilted Z)) nu :=
                                                integrable_llr_tilted_right (μ := nu) (ν := mu) (f := Z) hnu_mu hZ_nu hllr
                                                  hexp_mu
                                              have hnonneg := integral_llr_add_sub_measure_univ_nonneg (μ := nu) (ν := mu.tilted Z)
                                                hnu_tilted hllr_tilted
                                              have hnonneg_llr : 0 ≤ ∫ x, llr nu (mu.tilted Z) x ∂nu := by
                                                simpa using hnonneg
                                              have htilted :=
                                                integral_llr_tilted_right (μ := nu) (ν := mu) (f := Z) hnu_mu hZ_nu hexp_mu
                                                  hllr
                                              have hnonneg_rewrite :
                                                  0 ≤ (∫ x, llr nu mu x ∂nu) - (∫ x, Z x ∂nu) +
                                                    Real.log (∫ x, Real.exp (Z x) ∂mu) := by
                                                simpa [htilted] using hnonneg_llr
                                              have hineq :
                                                  (∫ x, Z x ∂nu) - Real.log (∫ x, Real.exp (Z x) ∂mu) ≤
                                                    ∫ x, llr nu mu x ∂nu := by
                                                linarith
                                              have hkl : (klDiv nu mu).toReal = ∫ x, llr nu mu x ∂nu := by
                                                simpa using toReal_klDiv_of_measure_eq (μ := nu) (ν := mu) hnu_mu (by simp)
                                              simpa [hkl] using hineq
                                            
                                            /-- One-sided DV inequality for a SALD-style scaled selected test.
                                            
                                            This packages the theorem-instance side conditions for tests of the form
                                            `Z = alpha * q`.  The `alpha0` exponential-moment assumption supplies the
                                            finite-log-mgf hypothesis by `dvFiniteLogMgfOfLeAlpha`, and the remaining
                                            absolute-continuity, selected-test integrability, and log-likelihood
                                            integrability hypotheses are kept explicit.  The Boucheron supremum equality
                                            from `appendix.tex:73-79` remains source-cited.
                                            -/

                                            Exact module and namespace context

                                            Scope and omitted-condition boundaries

                                            • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                            • No supremum equality, optimizer characterization or equality case is proved. The assumptions are not replaceable by merely finite-looking totalized integrals.

                                            Source and reuse

                                            ASTIS parents called

                                              Mathlib API called (external library)

                                              • MeasureTheory.isProbabilityMeasure_tilted
                                              • MeasureTheory.absolutelyContinuous_tilted
                                              • MeasureTheory.Measure.AbsolutelyContinuous.trans
                                              • MeasureTheory.integrable_llr_tilted_right
                                              • InformationTheory.integral_llr_add_sub_measure_univ_nonneg
                                              • MeasureTheory.integral_llr_tilted_right
                                              • InformationTheory.toReal_klDiv_of_measure_eq

                                              Mathematical sources

                                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                              ASTIS mathematical exposition

                                              Use an upper-scale exponential moment for the selected scaled test

                                              AutoSamplingTheory.dvVariationalOneSidedOfScaledTest · theorem · Teaching coverage

                                              Statement

                                              For the probability measures and hypotheses below, including integrability of the selected test αq under ν and an exponential moment at α₀ with 0≤α≤α₀, the selected-test DV bound holds at scale α. No positivity of q or strict positivity of α is needed.

                                              \[\int\alpha q\,d\nu-\log\int e^{\alpha q}\,d\mu\le K.\]

                                              All objects and hypotheses

                                              • Ω is measurable; ν and μ are probability measures with explicit SigmaFinite μ and SigmaFinite ν instances.
                                              • q:Ω→ℝ and α,α₀∈ℝ satisfy 0≤α≤α₀; ν≪μ.
                                              • The selected test αq is ν-integrable, exp(α₀q) is μ-integrable, and llr(ν,μ) is ν-integrable.
                                              • Write K=(klDiv ν μ).toReal and L_α=log∫exp(αq)dμ.

                                              Notation and interpretation

                                              A.e. and strong measurability

                                              A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                              \[f=g\quad\mu\text{-a.e.}\]
                                              Integrability and Bochner integrals

                                              L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                              \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                              Mathematical proof

                                              1. Supply the selected exponential moment

                                              The finite-measure moment theorem reduces the scale from α₀ to α.

                                              \[e^{\alpha_0q}\in L^1(\mu)\Longrightarrow e^{\alpha q}\in L^1(\mu).\]
                                              Corresponding Lean step

                                              dvFiniteLogMgfOfLeAlpha hexp_alpha0_mu hAlpha_nonneg hAlpha_le

                                              2. Apply the tilted selected-test theorem

                                              Use Z=αq with the explicitly supplied absolute continuity, selected-test integrability and likelihood integrability.

                                              \[\mathbb E_\nu[\alpha q]-L_\alpha\le K.\]
                                              Corresponding Lean step

                                              dvVariationalOneSidedOfTiltedRight ... (Z := fun x ↦ alpha*q x)

                                              Lean statement · dvVariationalOneSidedOfScaledTest

                                              Integrability is assumed for αq itself, not for q. The scale may be zero, so those are genuinely different hypotheses.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalOneSidedOfScaledTest {Ω : Type*} [MeasurableSpace Ω]
                                                  (nu mu : Measure Ω) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (q : Ω → Real) {alpha alpha0 : Real}
                                                  (hAlpha_nonneg : 0 ≤ alpha) (hAlpha_le : alpha ≤ alpha0)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hZ_nu : Integrable (fun x ↦ alpha * q x) nu)
                                                  (hexp_alpha0_mu : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu) :
                                                  (∫ x, alpha * q x ∂nu) - Real.log (∫ x, Real.exp (alpha * q x) ∂mu) ≤
                                                    (klDiv nu mu).toReal

                                              Exact module and namespace context

                                              Lean proof · dvVariationalOneSidedOfScaledTest

                                              One reused theorem supplies the missing selected exponential moment and the other proves the one-sided inequality for that particular test.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalOneSidedOfScaledTest {Ω : Type*} [MeasurableSpace Ω]
                                                  (nu mu : Measure Ω) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (q : Ω → Real) {alpha alpha0 : Real}
                                                  (hAlpha_nonneg : 0 ≤ alpha) (hAlpha_le : alpha ≤ alpha0)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hZ_nu : Integrable (fun x ↦ alpha * q x) nu)
                                                  (hexp_alpha0_mu : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu) :
                                                  (∫ x, alpha * q x ∂nu) - Real.log (∫ x, Real.exp (alpha * q x) ∂mu) ≤
                                                    (klDiv nu mu).toReal := by
                                                have hexp_mu : Integrable (fun x ↦ Real.exp (alpha * q x)) mu :=
                                                  dvFiniteLogMgfOfLeAlpha (mu := mu) (q := q) hexp_alpha0_mu hAlpha_nonneg
                                                    hAlpha_le
                                                exact dvVariationalOneSidedOfTiltedRight (nu := nu) (mu := mu)
                                                  (Z := fun x ↦ alpha * q x) hnu_mu hZ_nu hexp_mu hllr
                                              
                                              /-- Energy form of the one-sided DV bound for a scaled selected test.
                                              
                                              For SALD use sites, `q` is a squared velocity or residual norm.  This theorem
                                              starts after the selected-test hypotheses have been supplied, applies the
                                              compiled one-sided backend for `Z=alpha*q`, divides by `alpha > 0`, and
                                              rewrites the log-mgf quotient as the supplied alpha-complexity density
                                              `eAlpha`.  The Boucheron supremum equality from `appendix.tex:73-79` remains
                                              source-cited.
                                              -/

                                              Exact module and namespace context

                                              Scope and omitted-condition boundaries

                                              • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                              • No q≥0 or α>0 hypothesis is added. No arbitrary-test supremum is taken.

                                              Source and reuse

                                              ASTIS parents called

                                              Mathlib API called (external library)

                                              No direct Mathlib call recorded; see the ASTIS parents.

                                              Mathematical sources

                                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                              ASTIS mathematical exposition

                                              Divide the scaled entropy bound by its positive scale

                                              AutoSamplingTheory.dvVariationalScaledTestEnergyBound · theorem · Teaching coverage

                                              Statement

                                              Under the probability, absolute-continuity and integrability assumptions below, let 0<α≤α₀ and let e_α=α⁻¹log∫exp(αq)dμ. Then ∫q dν≤α⁻¹(klDiv ν μ).toReal+e_α. Although q may represent an energy in an application, this theorem does not require q≥0.

                                              \[\int q\,d\nu\le\alpha^{-1}K+e_\alpha,\qquad e_\alpha=\alpha^{-1}\log\int e^{\alpha q}\,d\mu.\]

                                              All objects and hypotheses

                                              • Ω is measurable; ν and μ are probability measures with explicit SigmaFinite μ and SigmaFinite ν instances.
                                              • q:Ω→ℝ is ν-integrable; α,α₀,e_α∈ℝ with 0<α≤α₀; ν≪μ.
                                              • exp(α₀q) is μ-integrable and llr(ν,μ) is ν-integrable.
                                              • The supplied named value e_α equals α⁻¹ log∫exp(αq)dμ. Write K=(klDiv ν μ).toReal.

                                              Notation and interpretation

                                              A.e. and strong measurability

                                              A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                              \[f=g\quad\mu\text{-a.e.}\]
                                              Integrability and Bochner integrals

                                              L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                              \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                              Mathematical proof

                                              1. Make the scaled test integrable

                                              A constant multiple of the ν-integrable q is integrable, so αq satisfies the selected-test input.

                                              \[q\in L^1(\nu)\Longrightarrow\alpha q\in L^1(\nu).\]
                                              Corresponding Lean step

                                              hq_nu.const_mul alpha; hZ_nu

                                              2. Apply the selected scaled-test bound

                                              The preceding theorem gives the variational inequality for αq, using the upper-scale exponential moment.

                                              \[\int\alpha q\,d\nu-L_\alpha\le K.\]
                                              Corresponding Lean step

                                              dvVariationalOneSidedOfScaledTest

                                              3. Move the constant and rearrange

                                              Pull α out of the integral and move the log-mgf to the right.

                                              \[\alpha\int q\,d\nu\le K+L_\alpha.\]
                                              Corresponding Lean step

                                              integral_const_mul; sub_le_iff_le_add.mp

                                              4. Multiply by the positive inverse

                                              Since α>0, its inverse is nonnegative, so multiplication preserves the inequality and α⁻¹α cancels.

                                              \[\int q\,d\nu=\alpha^{-1}\alpha\int q\,d\nu\le\alpha^{-1}(K+L_\alpha).\]
                                              Corresponding Lean step

                                              mul_le_mul_of_nonneg_left; inv_nonneg; field_simp [ne_of_gt hAlpha_pos]

                                              5. Identify the named log-mgf contribution

                                              Distribute the inverse and replace its log-mgf term by the supplied e_α.

                                              \[\alpha^{-1}(K+L_\alpha)=\alpha^{-1}K+e_\alpha.\]
                                              Corresponding Lean step

                                              rw [heAlpha]; ring

                                              Lean statement · dvVariationalScaledTestEnergyBound

                                              Strict positivity of α distinguishes this division theorem from the preceding α≥0 result. The value e_α is a real parameter tied to the log-mgf by an explicit equality.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalScaledTestEnergyBound {Ω : Type*} [MeasurableSpace Ω]
                                                  (nu mu : Measure Ω) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (q : Ω → Real) {alpha alpha0 eAlpha : Real}
                                                  (hAlpha_pos : 0 < alpha) (hAlpha_le : alpha ≤ alpha0)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hq_nu : Integrable q nu)
                                                  (hexp_alpha0_mu : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu)
                                                  (heAlpha : eAlpha =
                                                    alpha⁻¹ * Real.log (∫ x, Real.exp (alpha * q x) ∂mu)) :
                                                  (∫ x, q x ∂nu) ≤ alpha⁻¹ * (klDiv nu mu).toReal + eAlpha

                                              Exact module and namespace context

                                              Lean proof · dvVariationalScaledTestEnergyBound

                                              The proof obtains the selected-test bound, uses linearity for one constant, divides by a verified positive scale, and rewrites the named complexity term.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalScaledTestEnergyBound {Ω : Type*} [MeasurableSpace Ω]
                                                  (nu mu : Measure Ω) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (q : Ω → Real) {alpha alpha0 eAlpha : Real}
                                                  (hAlpha_pos : 0 < alpha) (hAlpha_le : alpha ≤ alpha0)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hq_nu : Integrable q nu)
                                                  (hexp_alpha0_mu : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu)
                                                  (heAlpha : eAlpha =
                                                    alpha⁻¹ * Real.log (∫ x, Real.exp (alpha * q x) ∂mu)) :
                                                  (∫ x, q x ∂nu) ≤ alpha⁻¹ * (klDiv nu mu).toReal + eAlpha := by
                                                have hZ_nu : Integrable (fun x ↦ alpha * q x) nu := by
                                                  simpa [smul_eq_mul] using hq_nu.const_mul alpha
                                                have hdv := dvVariationalOneSidedOfScaledTest (nu := nu) (mu := mu)
                                                  (q := q) hAlpha_pos.le hAlpha_le hnu_mu hZ_nu hexp_alpha0_mu hllr
                                                have hscaledIntegral :
                                                    (∫ x, alpha * q x ∂nu) = alpha * ∫ x, q x ∂nu := by
                                                  rw [integral_const_mul]
                                                have hscaled :
                                                    alpha * (∫ x, q x ∂nu) ≤
                                                      (klDiv nu mu).toReal + Real.log (∫ x, Real.exp (alpha * q x) ∂mu) := by
                                                  have hvar :
                                                      alpha * (∫ x, q x ∂nu) -
                                                          Real.log (∫ x, Real.exp (alpha * q x) ∂mu) ≤
                                                        (klDiv nu mu).toReal := by
                                                    simpa [hscaledIntegral] using hdv
                                                  exact sub_le_iff_le_add.mp hvar
                                                have hdiv :
                                                    alpha⁻¹ * (alpha * (∫ x, q x ∂nu)) ≤
                                                      alpha⁻¹ * ((klDiv nu mu).toReal +
                                                        Real.log (∫ x, Real.exp (alpha * q x) ∂mu)) := by
                                                  exact mul_le_mul_of_nonneg_left hscaled (inv_nonneg.mpr hAlpha_pos.le)
                                                calc
                                                  (∫ x, q x ∂nu) = alpha⁻¹ * (alpha * (∫ x, q x ∂nu)) := by
                                                    field_simp [ne_of_gt hAlpha_pos]
                                                  _ ≤ alpha⁻¹ * ((klDiv nu mu).toReal +
                                                        Real.log (∫ x, Real.exp (alpha * q x) ∂mu)) := hdiv
                                                  _ = alpha⁻¹ * (klDiv nu mu).toReal + eAlpha := by
                                                    rw [heAlpha]
                                                    ring
                                              
                                              /-- Coefficient-preserving energy form of the selected scaled-test DV bound.
                                              
                                              This is the local algebraic shape used before Gronwall in SALD proofs after a
                                              nonnegative prefactor, such as `(1/2)*dot{s}(t)^(-1)`, multiplies the
                                              post-DV energy estimate.
                                              -/

                                              Exact module and namespace context

                                              Scope and omitted-condition boundaries

                                              • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                              • No nonnegativity of q is required. It does not construct a complexity bound or prove a later Grönwall estimate.

                                              Source and reuse

                                              ASTIS parents called

                                              Mathlib API called (external library)

                                              • MeasureTheory.Integrable.const_mul
                                              • MeasureTheory.integral_const_mul
                                              • sub_le_iff_le_add
                                              • mul_le_mul_of_nonneg_left
                                              • inv_nonneg

                                              Mathematical sources

                                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                              ASTIS mathematical exposition

                                              Preserve an external nonnegative coefficient in the energy bound

                                              AutoSamplingTheory.dvVariationalScaledTestEnergyBoundWithCoeff · theorem · Teaching coverage

                                              Statement

                                              Under the complete scaled-energy assumptions below, let c≥0 be any real coefficient. Then c∫q dν≤(cα⁻¹)(klDiv ν μ).toReal+c e_α. The coefficient may be zero and is independent of the integration variable.

                                              \[c\int q\,d\nu\le(c\alpha^{-1})K+c\,e_\alpha\qquad(c\ge0).\]

                                              All objects and hypotheses

                                              • Ω is measurable; ν and μ are probability measures with explicit SigmaFinite μ and SigmaFinite ν instances.
                                              • q:Ω→ℝ is ν-integrable; α,α₀,e_α∈ℝ with 0<α≤α₀; ν≪μ.
                                              • exp(α₀q) is μ-integrable and llr(ν,μ) is ν-integrable.
                                              • The supplied named value e_α equals α⁻¹ log∫exp(αq)dμ. Write K=(klDiv ν μ).toReal.
                                              • c=coeff is a real scalar with hcoeff:0≤c.

                                              Notation and interpretation

                                              A.e. and strong measurability

                                              A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                              \[f=g\quad\mu\text{-a.e.}\]
                                              Integrability and Bochner integrals

                                              L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                              \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                              Mathematical proof

                                              1. Reuse the unweighted energy inequality

                                              All measure-theoretic hypotheses are passed unchanged to the existing positive-scale result.

                                              \[\int q\,d\nu\le\alpha^{-1}K+e_\alpha.\]
                                              Corresponding Lean step

                                              dvVariationalScaledTestEnergyBound ...

                                              2. Multiply by a nonnegative scalar

                                              The sign assumption on c ensures multiplication preserves the order.

                                              \[c\int q\,d\nu\le c(\alpha^{-1}K+e_\alpha).\]
                                              Corresponding Lean step

                                              mul_le_mul_of_nonneg_left hbase hcoeff

                                              3. Distribute while keeping the coefficient visible

                                              Associativity and distributivity give the desired coefficient grouping.

                                              \[c(\alpha^{-1}K+e_\alpha)=(c\alpha^{-1})K+ce_\alpha.\]
                                              Corresponding Lean step

                                              ring

                                              Lean statement · dvVariationalScaledTestEnergyBoundWithCoeff

                                              The new coefficient is a real number with an explicit nonnegative sign proof. No inverse of c is used, so c=0 is allowed.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalScaledTestEnergyBoundWithCoeff {Ω : Type*} [MeasurableSpace Ω]
                                                  (nu mu : Measure Ω) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (q : Ω → Real) {alpha alpha0 eAlpha coeff : Real}
                                                  (hAlpha_pos : 0 < alpha) (hAlpha_le : alpha ≤ alpha0)
                                                  (hcoeff : 0 ≤ coeff)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hq_nu : Integrable q nu)
                                                  (hexp_alpha0_mu : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu)
                                                  (heAlpha : eAlpha =
                                                    alpha⁻¹ * Real.log (∫ x, Real.exp (alpha * q x) ∂mu)) :
                                                  coeff * (∫ x, q x ∂nu) ≤
                                                    (coeff * alpha⁻¹) * (klDiv nu mu).toReal + coeff * eAlpha

                                              Exact module and namespace context

                                              Lean proof · dvVariationalScaledTestEnergyBoundWithCoeff

                                              The proof invokes the already proved energy bound, multiplies its two sides, then normalizes the algebraic grouping.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalScaledTestEnergyBoundWithCoeff {Ω : Type*} [MeasurableSpace Ω]
                                                  (nu mu : Measure Ω) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (q : Ω → Real) {alpha alpha0 eAlpha coeff : Real}
                                                  (hAlpha_pos : 0 < alpha) (hAlpha_le : alpha ≤ alpha0)
                                                  (hcoeff : 0 ≤ coeff)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hq_nu : Integrable q nu)
                                                  (hexp_alpha0_mu : Integrable (fun x ↦ Real.exp (alpha0 * q x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu)
                                                  (heAlpha : eAlpha =
                                                    alpha⁻¹ * Real.log (∫ x, Real.exp (alpha * q x) ∂mu)) :
                                                  coeff * (∫ x, q x ∂nu) ≤
                                                    (coeff * alpha⁻¹) * (klDiv nu mu).toReal + coeff * eAlpha := by
                                                have hbase := dvVariationalScaledTestEnergyBound (nu := nu) (mu := mu)
                                                  (q := q) hAlpha_pos hAlpha_le hnu_mu hq_nu hexp_alpha0_mu hllr heAlpha
                                                have hmul :
                                                    coeff * (∫ x, q x ∂nu) ≤
                                                      coeff * (alpha⁻¹ * (klDiv nu mu).toReal + eAlpha) := by
                                                  exact mul_le_mul_of_nonneg_left hbase hcoeff
                                                calc
                                                  coeff * (∫ x, q x ∂nu) ≤
                                                      coeff * (alpha⁻¹ * (klDiv nu mu).toReal + eAlpha) := hmul
                                                  _ = (coeff * alpha⁻¹) * (klDiv nu mu).toReal + coeff * eAlpha := by
                                                    ring
                                              
                                              /-- One-sided Donsker--Varadhan consequence from the tilted backend.
                                              
                                              This is the form consumed by SALD after a selected test has supplied the
                                              explicit Mathlib hypotheses.  It remains a one-sided theorem only; the
                                              Boucheron supremum equality in `appendix.tex:73-79` stays source-cited.
                                              -/

                                              Exact module and namespace context

                                              Scope and omitted-condition boundaries

                                              • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                              • A scalar coefficient such as a time-change factor must have its sign established by the caller. No Grönwall, convergence or time-change theorem is proved here.

                                              Source and reuse

                                              ASTIS parents called

                                              Mathlib API called (external library)

                                              • mul_le_mul_of_nonneg_left

                                              Mathematical sources

                                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                              ASTIS mathematical exposition

                                              Write the tilted-backend test bound in additive form

                                              AutoSamplingTheory.dvVariationalTiltedRightOneSidedConsequence · theorem · Teaching coverage

                                              Statement

                                              For probability measures ν≪μ with the explicit sigma-finiteness hypotheses, if Z is ν-integrable, exp Z is μ-integrable and llr(ν,μ) is ν-integrable, then ∫Z dν≤(klDiv ν μ).toReal+log∫exp Z dμ. This is the additive form of the already proved selected-test inequality.

                                              \[\int Z\,d\nu\le K+\log\int e^Z\,d\mu.\]

                                              All objects and hypotheses

                                              • α (or Ω) is an arbitrary measurable space; ν and μ are probability measures on that same space.
                                              • Both SigmaFinite μ and SigmaFinite ν are explicitly present in the Lean signature; probability already supplies them, but they are not omitted here.
                                              • ν≪μ; the chosen real test Z is ν-integrable; exp Z is μ-integrable; llr(ν,μ) is ν-integrable.
                                              • Notation: ℓ=llr(ν,μ)=log((dν/dμ).toReal), M_Z=∫exp Z dμ, and K=(InformationTheory.klDiv ν μ).toReal.

                                              Notation and interpretation

                                              A.e. and strong measurability

                                              A.e. means outside a μ-null set. AEMeasurable means equality a.e. to a measurable map; AEStronglyMeasurable (abbreviated AESM) means equality a.e. to a strongly measurable function, which is approximable by simple functions.

                                              \[f=g\quad\mu\text{-a.e.}\]
                                              Integrability and Bochner integrals

                                              L¹ in the teaching formulas means Integrable, not a newly defined quotient-space element. ∫ denotes Mathlib's totalized Bochner integral: it is zero for nonintegrable functions, and also for a codomain lacking completeness. Do not infer integrability or a genuine finite expectation from an unqualified integral equality. Real-valued integrals have a complete codomain; missing integrability still matters.

                                              \[f\in L^1(\mu)\quad\Longleftrightarrow\quad f\text{ is a.e. strongly measurable and }\int^{\!-}\|f\|\,d\mu<\infty\]

                                              Mathematical proof

                                              1. Reuse the analytic one-sided bound

                                              Apply the exponential-tilt theorem with exactly the selected-test hypotheses.

                                              \[\int Z\,d\nu-\log M_Z\le K.\]
                                              Corresponding Lean step

                                              dvVariationalOneSidedOfTiltedRight hnu_mu hZ_nu hexp_mu hllr

                                              2. Rearrange in real order

                                              Move the log-mgf from the left to the right using the existing scalar wrapper.

                                              \[\int Z\,d\nu\le K+\log M_Z.\]
                                              Corresponding Lean step

                                              dvVariationalOneSidedConsequenceScalar

                                              Lean statement · dvVariationalTiltedRightOneSidedConsequence

                                              The measure-theoretic assumptions are unchanged. Only the placement of the logarithmic term differs from the earlier theorem.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalTiltedRightOneSidedConsequence {α : Type*} [MeasurableSpace α]
                                                  (nu mu : Measure α) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (Z : α → Real)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hZ_nu : Integrable Z nu)
                                                  (hexp_mu : Integrable (fun x ↦ Real.exp (Z x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu) :
                                                  (∫ x, Z x ∂nu) ≤
                                                    (klDiv nu mu).toReal + Real.log (∫ x, Real.exp (Z x) ∂mu)

                                              Exact module and namespace context

                                              Lean proof · dvVariationalTiltedRightOneSidedConsequence

                                              The proof nests the selected-test theorem inside the scalar rearrangement theorem. It supplies no independent DV proof or supremum statement.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              theorem dvVariationalTiltedRightOneSidedConsequence {α : Type*} [MeasurableSpace α]
                                                  (nu mu : Measure α) [IsProbabilityMeasure nu] [IsProbabilityMeasure mu]
                                                  [SigmaFinite mu] [SigmaFinite nu]
                                                  (Z : α → Real)
                                                  (hnu_mu : nu ≪ mu)
                                                  (hZ_nu : Integrable Z nu)
                                                  (hexp_mu : Integrable (fun x ↦ Real.exp (Z x)) mu)
                                                  (hllr : Integrable (llr nu mu) nu) :
                                                  (∫ x, Z x ∂nu) ≤
                                                    (klDiv nu mu).toReal + Real.log (∫ x, Real.exp (Z x) ∂mu) := by
                                                exact dvVariationalOneSidedConsequenceScalar
                                                  (dvVariationalOneSidedOfTiltedRight (nu := nu) (mu := mu) (Z := Z)
                                                    hnu_mu hZ_nu hexp_mu hllr)
                                              
                                              /-- Log-Sobolev implies KL-FI comparison as a reusable proof target. -/

                                              Exact module and namespace context

                                              Scope and omitted-condition boundaries

                                              • Only a one-sided bound for a selected admissible test is established. The full Donsker–Varadhan/Boucheron variational supremum equality remains separate; no source-fidelity verdict is made.
                                              • Additive-form reuse wrapper, not a new variational principle.

                                              Source and reuse

                                              ASTIS parents called

                                              Mathlib API called (external library)

                                              No direct Mathlib call recorded; see the ASTIS parents.

                                              Mathematical sources

                                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.

                                              ASTIS mathematical exposition

                                              Record the remaining LSI-to-KL/Fisher proof target

                                              AutoSamplingTheory.lsiToKlFiObligation · def · Teaching coverage

                                              Statement

                                              Given any source anchor, construct the proof-obligation record named probability.lsi_to_kl_fi with the text that an LSI constant c_LSI should imply KL(ρ‖π)≤FI(ρ‖π)/(2c_LSI). The record has obligation status. It does not prove the inequality or supply its missing analytic hypotheses.

                                              \[\text{recorded target: }\mathrm{KL}(\rho\|\pi)\le\frac{\mathrm{FI}(\rho\|\pi)}{2c_{\mathrm{LSI}}},\qquad\operatorname{status}=\texttt{obligation}.\]

                                              All objects and hypotheses

                                              • source:SourceAnchor is the sole input. No positive constant, measures, LSI witness, density regularity or admissible-test proof is passed.
                                              • The returned ProofObligation uses its default empty dependency list and empty note.

                                              Notation and interpretation

                                              Analytic values versus metadata

                                              Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.

                                              \[\texttt{ProofObligation}\ne\text{proof of its statement string}\]

                                              Construction and meaning

                                              1. Write the requested target and provenance

                                              Populate the fixed id, written inequality, supplied source and explicit obligation label.

                                              \[\text{source}\mapsto(\texttt{probability.lsi\_to\_kl\_fi},\text{target text},\text{source},\texttt{obligation}).\]
                                              Corresponding Lean step

                                              record fields id, statement, source, status

                                              2. Interpret the result only as a workflow object

                                              The constructor returns data that can track unfinished work. It provides no witness of the stored functional inequality.

                                              \[\texttt{ProofObligation}\not\Rightarrow\mathrm{KL}\le\mathrm{FI}/(2c_{\mathrm{LSI}}).\]
                                              Corresponding Lean step

                                              return type ProofObligation

                                              Lean statement · lsiToKlFiObligation

                                              The displayed inequality occurs inside a string field. The return type is a record for unproved work, not the inequality proposition.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              def lsiToKlFiObligation (source : SourceAnchor) : ProofObligation

                                              Exact module and namespace context

                                              Lean construction · lsiToKlFiObligation

                                              No proof tactics or analytic theorem are used. The function constructs the stated data record with an obligation status.

                                              Braces mark parameters Lean can infer; square brackets request structures such as a measurable space or probability measure. Named hypotheses are mathematical premises, not facts established by this declaration. Section parameters are described in the mathematical hypotheses above; the module link retains their exact source context.

                                              def lsiToKlFiObligation (source : SourceAnchor) : ProofObligation where
                                                id := "probability.lsi_to_kl_fi"
                                                statement := "If pi satisfies LSI with constant c_LSI, then KL(rho || pi) <= FI(rho || pi)/(2*c_LSI)."
                                                source := source
                                                status := ProofStatus.obligation
                                              
                                              end AutoSamplingTheory

                                              Exact module and namespace context

                                              Scope and omitted-condition boundaries

                                              • Contracts and obligation/interface constructors store strings and status labels. They are not propositions asserting the written mathematics and supply no Lean proof of it.
                                              • No LSI-to-KL/FI conclusion may be inferred from compiling or displaying this record.

                                              Source and reuse

                                              ASTIS parents called

                                              Mathlib API called (external library)

                                              No direct Mathlib call recorded; see the ASTIS parents.

                                              Mathematical sources

                                              ASTIS prose is not a quotation or a source-equivalence certificate. Definitions and aliases are explained as constructions, not counted as new mathematical proofs.