Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exact ODE benchmark and critical approximation constant

Definition
MinBuying_Analytic

by mikeh · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

min-buyingoperations-researchpricingprobability

Defines A(x)=−log⁡(1−x2)/xA(x)=-\log(1-x^2)/xA(x)=−log(1−x2)/x with A(0)=0A(0)=0A(0)=0, its explicit slope with value 111 at zero, and the integrating-factor formula for ccc. The exact constant x⋆x^\starx⋆ is the infimum of the set of roots of xc(x)=1xc(x)=1xc(x)=1 restricted to (0,1)(0,1)(0,1). Root existence and uniqueness are proof obligations, not assumptions; the main goal asserts them explicitly. Also defines continuous evolution from an arbitrary initial state.

Definition code
import Mathlib

open MeasureTheory Set
open scoped Interval

noncomputable section

namespace MinBuying

/-- Cumulative budget from equation (10), extended at zero by continuity.
Only its restriction to `[0,1)` enters the formal statements. -/
def canonicalBudget (x : ℝ) : ℝ :=
  if x = 0 then 0 else -Real.log (1 - x ^ 2) / x

/-- Explicit derivative of `canonicalBudget`, with its continuous value at zero. -/
def budgetSlope (x : ℝ) : ℝ :=
  if x = 0 then 1 else 2 / (1 - x ^ 2) + Real.log (1 - x ^ 2) / x ^ 2

/-- Exponent in the integrating factor for the benchmark's linear ODE. -/
def odeExponent (x : ℝ) : ℝ :=
  ∫ t in (0 : ℝ)..x, t * budgetSlope t

/-- The concrete integrating-factor solution of equation (10).
The equation and initial condition are conclusions of the analytic milestone,
not assumptions incorporated into this definition. -/
def continuousBenchmark (x : ℝ) : ℝ :=
  Real.exp (-odeExponent x) *
    (1 + ∫ t in (0 : ℝ)..x, budgetSlope t * Real.exp (odeExponent t))

/-- The roots considered in the paper are explicitly restricted to `(0,1)`. -/
def criticalRoots : Set ℝ :=
  {x | x ∈ Ioo (0 : ℝ) 1 ∧ x * continuousBenchmark x = 1}

/-- The paper's exact approximation constant. The analytic milestone proves
that the root set is a singleton contained in `(0,1)`, so this infimum does
not rely on Lean's default value for an empty or unbounded-below set. -/
def criticalRatio : ℝ := sInf criticalRoots

/-- Continuous benchmark evolution from state `z` at position `y`.
The relevant domain is `0 ≤ y ≤ x < 1`. -/
def benchmarkFlow (y z x : ℝ) : ℝ :=
  Real.exp (-(odeExponent x - odeExponent y)) *
    (z + ∫ t in y..x,
      budgetSlope t * Real.exp (odeExponent t - odeExponent y))

end MinBuying
Source
Titing Cui, Michael L. Hamilton, Jourdain Lamperski, and Kasra Ganjizadeh Tari, Unit-Demand Pricing for Min-Buying Customers, September 27, 2026 manuscript, 47 PDF pages (main pp.1–27; companion ec1–ec20). https://doi.org/10.2139/ssrn.5178133 . Eq.(10) p.17; proof of Lemma 3, PDF pp.38–42 / ec11–ec15.
Read-back

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

The following are total real-valued functions with real arguments. Define B(0)=0B(0)=0B(0)=0 and, for x≠0x\ne0x=0, B(x)=−log⁡(1−x2)/xB(x)=-\log(1-x^2)/xB(x)=−log(1−x2)/x. Define S(0)=1S(0)=1S(0)=1 and, for x≠0x\ne0x=0, S(x)=2/(1−x2)+log⁡(1−x2)/x2S(x)=2/(1-x^2)+\log(1-x^2)/x^2S(x)=2/(1−x2)+log(1−x2)/x2. Define E(x)=∫0xtS(t) dtE(x)=\int_0^x tS(t)\,dtE(x)=∫0x​tS(t)dt and C(x)=e−E(x)(1+∫0xS(t)eE(t) dt)C(x)=e^{-E(x)}\left(1+\int_0^x S(t)e^{E(t)}\,dt\right)C(x)=e−E(x)(1+∫0x​S(t)eE(t)dt). The integrals are oriented interval integrals with respect to Lebesgue measure, so reversing the endpoints changes the sign, and a nonintegrable real-valued integrand has integral zero. The logarithm is the total real logarithm: log⁡0=0\log0=0log0=0 and, for a negative argument, log⁡t=log⁡∣t∣\log t=\log|t|logt=log∣t∣; real division by zero is zero. In particular, the branches do not restrict these functions to 0≤x<10\le x<10≤x<1, and the literal formulas give B(1)=B(−1)=0B(1)=B(-1)=0B(1)=B(−1)=0 and S(1)=S(−1)=0S(1)=S(-1)=0S(1)=S(−1)=0. Define the set R={x∈R:0<x<1 and xC(x)=1}\mathcal R=\{x\in\mathbb R:0<x<1\ \text{and}\ xC(x)=1\}R={x∈R:0<x<1 and xC(x)=1}, and define the critical ratio ρ=inf⁡R\rho=\inf\mathcal Rρ=infR using the real infimum. This set is bounded below whenever nonempty, but nonemptiness, attainment, uniqueness, and positivity of its infimum are not conditions in the definition; if it is empty, the infimum used here is zero. Finally, for all real y,z,xy,z,xy,z,x, with no assumed ordering of yyy and xxx or sign restriction on zzz, define the flow value Φ(y,z,x)=e−(E(x)−E(y))(z+∫yxS(t)eE(t)−E(y) dt)\Phi(y,z,x)=e^{-(E(x)-E(y))}\left(z+\int_y^x S(t)e^{E(t)-E(y)}\,dt\right)Φ(y,z,x)=e−(E(x)−E(y))(z+∫yx​S(t)eE(t)−E(y)dt). In particular, its coincident-endpoint value is Φ(y,z,y)=z\Phi(y,z,y)=zΦ(y,z,y)=z.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikeh · Oct 31, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me