Exact ODE benchmark and critical approximation constant
DefinitionMinBuying_AnalyticDefines with , its explicit slope with value at zero, and the integrating-factor formula for . The exact constant is the infimum of the set of roots of restricted to . Root existence and uniqueness are proof obligations, not assumptions; the main goal asserts them explicitly. Also defines continuous evolution from an arbitrary initial state.
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
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 and, for , . Define and, for , . Define and . 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: and, for a negative argument, ; real division by zero is zero. In particular, the branches do not restrict these functions to , and the literal formulas give and . Define the set , and define the critical ratio 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 , with no assumed ordering of and or sign restriction on , define the flow value . In particular, its coincident-endpoint value is .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.