Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Equation (8): weighted velocity and marginal flux

Proved
FlowMatchingT1.marginal_velocity_identity

by MiltMont · Sep 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysiscontinuity-equationflow-matchingmeasure-theory

Let d∈Nd\in\mathbb Nd∈N, E=RdE=\mathbb R^dE=Rd, QQQ any Borel measure on EEE, ρ:R×E×E→R\rho:\mathbb R\times E\times E\to\mathbb Rρ:R×E×E→R, and v:R×E×E→Ev:\mathbb R\times E\times E\to Ev:R×E×E→E. At fixed t∈Rt\in\mathbb Rt∈R and x∈Ex\in Ex∈E, write p=∫ρ(t,x,z) dQ(z)p=\int\rho(t,x,z)\,dQ(z)p=∫ρ(t,x,z)dQ(z) and J=∫ρ(t,x,z)v(t,x,z) dQ(z)J=\int\rho(t,x,z)v(t,x,z)\,dQ(z)J=∫ρ(t,x,z)v(t,x,z)dQ(z). Suppose p>0p>0p>0 and the conditional flux is QQQ-integrable. The velocity u=p−1Ju=p^{-1}Ju=p−1J satisfies both

u=∫Eρ(t,x,z)pv(t,x,z) dQ(z),pu=J.u=\int_E\frac{\rho(t,x,z)}p v(t,x,z)\,dQ(z),\qquad pu=J.u=∫E​pρ(t,x,z)​v(t,x,z)dQ(z),pu=J.

The first identity matches equation (8) in measure notation; the second identifies the flux appearing in the continuity equation. This local algebraic result imposes no time interval, conditional normalization, or probability assumption on QQQ.

Preamble
import Definitions.Def_FlowMatchingT1
open MeasureTheory
open FlowMatchingT1

Formal statement
theorem FlowMatchingT1.marginal_velocity_identity
    {d : ℕ} (Q : Measure (Space d))
    (ρ : ℝ → Space d → Space d → ℝ) (v : ℝ → Space d → Space d → Space d)
    (t : ℝ) (x : Space d) (hp : 0 < marginalDensity Q ρ t x)
    (hF : Integrable (fun z => conditionalFlux ρ v t x z) Q) :
    marginalVelocity Q ρ v t x =
      (∫ z, (ρ t x z / marginalDensity Q ρ t x) • v t x z ∂Q) ∧
    marginalDensity Q ρ t x • marginalVelocity Q ρ v t x =
      marginalFlux Q ρ v t x := by sorry
Source
Y. Lipman, R. T. Q. Chen, H. Ben-Hamu, M. Nickel, M. Le, Flow Matching for Generative Modeling, ICLR 2023; https://arxiv.org/abs/2210.02747v2; Section 2, Section 3.1, Theorem 1, equations (6), (8), (26), Appendix A proof of Theorem 1.
Read-back

What the Lean code literally says, in plain math · gpt-6-astra

For every natural number ddd, let E={0,…,d−1}→RE=\{0,\ldots,d-1\}\to\mathbb RE={0,…,d−1}→R, with its usual finite-dimensional real vector-space and Borel measurable structures. For every measure QQQ on EEE, every function ρ:R×E×E→R\rho:\mathbb R\times E\times E\to\mathbb Rρ:R×E×E→R, every function v:R×E×E→Ev:\mathbb R\times E\times E\to Ev:R×E×E→E, every real number ttt, and every x∈Ex\in Ex∈E, define p=∫Eρ(t,x,z) dQ(z)p=\int_E\rho(t,x,z)\,dQ(z)p=∫E​ρ(t,x,z)dQ(z), F=∫Eρ(t,x,z)v(t,x,z) dQ(z)F=\int_E\rho(t,x,z)v(t,x,z)\,dQ(z)F=∫E​ρ(t,x,z)v(t,x,z)dQ(z), and u=p−1Fu=p^{-1}Fu=p−1F, where multiplication of a vector by a real number is scalar multiplication and the vector integral is the Bochner integral. If p>0p>0p>0 and the function z↦ρ(t,x,z)v(t,x,z)z\mapsto\rho(t,x,z)v(t,x,z)z↦ρ(t,x,z)v(t,x,z) is Bochner integrable with respect to QQQ (almost everywhere strongly measurable with integrable norm), then both identities hold:

u=∫Eρ(t,x,z)pv(t,x,z) dQ(z)andpu=F.u=\int_E\frac{\rho(t,x,z)}{p}v(t,x,z)\,dQ(z) \qquad\text{and}\qquad p u=F.u=∫E​pρ(t,x,z)​v(t,x,z)dQ(z)andpu=F.

Here QQQ need not be finite or a probability measure, ρ\rhoρ need not be pointwise nonnegative or normalized, and no differentiability, continuity equation, or time-interval restriction is assumed; the integrability assumption concerns the product ρ(t,x,⋅)v(t,x,⋅)\rho(t,x,\cdot)v(t,x,\cdot)ρ(t,x,⋅)v(t,x,⋅), rather than v(t,x,⋅)v(t,x,\cdot)v(t,x,⋅) separately. The integrals use the total Bochner-integral convention, which assigns zero to a nonintegrable function; consequently the strict inequality p>0p>0p>0 excludes a nonintegrable scalar density slice as well as a zero or negative scalar integral, and excludes the zero measure. Real inversion is total with 0−1=00^{-1}=00−1=0, but the assumption excludes that denominator case. The quantification includes d=0d=0d=0, for which EEE is the one-element zero-dimensional vector space and both vector identities are identities of its unique vector, provided the same hypotheses hold.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by MiltMont · Sep 24, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me