Plectis Atlas
Search

↑ and ↓ move, Enter opens, Esc closes.

Lean statement

Spherical linear-field dual formula and approximation

Lean is a language for mathematical statements and proofs that a computer can verify. This page shows one statement file from OpenAI’s release, possible paper matches and independent reports. The code-like names below identify the definitions or theorems selected by the proof-verification settings.

Theorem selected for verification: OAI.SphericalPerceptron.spherical_linear_field_formula

Lean statement file: SphericalField.leanShow on the mapOpenAI’s Lean catalogue does not list this as a main result; the release’s Lean notes for family 222 link it.

The Lean statement

The lines of the Lean statement that state the theorem, then the definitions in the file that it uses.

def SphericalLinearFieldFormula : Prop :=  (∀ (k : ℕ) (w : Fin (k+1) → ℝ) (hw : ∀ i, 0 < w i) (hw1 : ∑ i, w i=1),    (∀ h : Fin (k+1) → ℝ, Monotone h → 0 ≤ h 0 →      ∃ q : Fin (k+1) → Time, Monotone q ∧ (q (Fin.last k):ℝ) < 1 ∧        IsLeast (finiteSphericalDualValues w h (fun i => (hw i).le) hw1)          (finiteSphericalDualObjective w h (fun i => (hw i).le) hw1 q)) ∧    (∀ K : Set (Fin (k+1) → ℝ), IsCompact K →      (∀ h ∈ K, Monotone h ∧ 0 ≤ h 0) →      TendstoUniformlyOn (fun n h => finiteSphericalFieldValue n k w h)        (fun h => sInf (finiteSphericalDualValues w h (fun i => (hw i).le) hw1)) atTop K)) ∧  (∀ (B : ℝ) (hB0 : 0 ≤ B) (hB1 : B < 1) (ε : ℝ), 0 < ε →    ∀ᶠ n : ℕ in atTop, ∀ (q : Time → Time) (hq : Monotone q),      (∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) →      entropy (quantileTrial q) < ∞ ∧      (∀ᵐ u ∂timeLaw, 2*stationaryQuantileField q hq B hB0 hB1 u=quantileA q (q u)) ∧      |boundedSphericalFieldValue (stationaryQuantileField q hq B hB0 hB1) n-        ((entropy (quantileTrial q)).toReal-          ∫ u, stationaryQuantileField q hq B hB0 hB1 u*(q u:ℝ) ∂timeLaw)| < ε)theorem spherical_linear_field_formula : SphericalLinearFieldFormula := by  sorry

A Lean statement states the theorem and leaves its proof as sorry on purpose. OpenAI’s proof is in a separate solution module, and a program called Comparator checks that proof against this statement.

Definitions needed to read it

Local definitions the statement names, followed through the definitions they name in turn. The match is by name in the source text, so a name reached only through notation can be missed; the full file is below.

  • abbreviation OAI.SphericalPerceptron.Time line 11

    abbrev Time := unitInterval
  • abbreviation OAI.SphericalPerceptron.Spin line 13

    abbrev Spin (N : ℕ) := EuclideanSpace ℝ (Fin N)
  • definition OAI.SphericalPerceptron.unitSphereLaw line 15

    def unitSphereLaw (N : ℕ) : Measure (Metric.sphere (0 : Spin N) 1) :=  let s := (volume : Measure (Spin N)).toSphere  (s Set.univ)⁻¹ • s
  • structure OAI.SphericalPerceptron.Trial line 19

    structure Trial where  toFun : Time → ℝ  monotone : Monotone toFun  measurable : Measurable toFun  nonneg : ∀ t, 0 ≤ toFun t  le_one : ∀ t, toFun t ≤ 1
  • definition OAI.SphericalPerceptron.timeLaw line 28

    def timeLaw : Measure Time := Measure.comap Subtype.val volume
  • definition OAI.SphericalPerceptron.tailIntegral line 30

    def tailIntegral (m : Trial) (t : Time) : ℝ :=  ∫ s in Set.Ici t, m s ∂timeLaw
  • definition OAI.SphericalPerceptron.entropy line 33

    def entropy (m : Trial) : ℝ≥0∞ :=  (∫⁻ t, (ENNReal.ofReal (tailIntegral m t))⁻¹ -    (ENNReal.ofReal (1 - (t : ℝ)))⁻¹ ∂timeLaw) / 2
  • definition OAI.SphericalPerceptron.finitePointMeasure line 43

    def finitePointMeasure {S : Type*} [MeasurableSpace S] (n : ℕ) (x : Fin n → S) : Measure S :=  ∑ i : Fin n, Measure.dirac (x i)
  • definition OAI.SphericalPerceptron.finitePoissonLaw line 51

    def finitePoissonLaw {S : Type*} [MeasurableSpace S] (r : ℝ≥0) (ν : Measure S) :    Measure (Measure S) :=  Measure.sum fun n : ℕ =>    poissonMeasure r {n} • (Measure.pi fun _ : Fin n => ν).map (finitePointMeasure n)
  • definition OAI.SphericalPerceptron.countablePoissonLaw line 77

    def countablePoissonLaw {S : Type*} [MeasurableSpace S]    (r : ℕ → ℝ≥0) (ν : ℕ → Measure S) : Measure (Measure S) :=  (Measure.infinitePi fun i => finitePoissonLaw (r i) (ν i)).map Measure.sum
  • definition OAI.SphericalPerceptron.finiteIntensityMarks line 87

    def finiteIntensityMarks {S : Type*} [MeasurableSpace S] [Nonempty S] (κ : Measure S) : Measure S :=  if κ univ = 0 then Measure.dirac (Classical.choice ‹Nonempty S›) else (κ univ)⁻¹ • κ
  • definition OAI.SphericalPerceptron.poissonRandomMeasureLaw line 98

    def poissonRandomMeasureLaw {S : Type*} [MeasurableSpace S] [Nonempty S]    (κ : Measure S) [SFinite κ] : Measure (Measure S) :=  countablePoissonLaw (fun i => ((sfiniteSeq κ i) univ).toNNReal)    (fun i => finiteIntensityMarks (sfiniteSeq κ i))
  • instance OAI.SphericalPerceptron.poissonRandomMeasureLaw_probability line 103

    instance poissonRandomMeasureLaw_probability {S : Type*} [MeasurableSpace S] [Nonempty S]    (κ : Measure S) [SFinite κ] : IsProbabilityMeasure (poissonRandomMeasureLaw κ) := by  unfold poissonRandomMeasureLaw  infer_instance
  • definition OAI.SphericalPerceptron.stableLogIntensity line 108

    def stableLogIntensity (b : ℝ) : Measure ℝ :=  volume.withDensity (fun x => ENNReal.ofReal (b * Real.exp (-b*x)))
  • definition OAI.SphericalPerceptron.normalizedMeasure line 115

    def normalizedMeasure {S : Type*} [MeasurableSpace S] (μ : Measure S) : Measure S :=  (μ univ)⁻¹ • μ
  • definition OAI.SphericalPerceptron.markedStableTotalE line 133

    def markedStableTotalE (η : Measure (ℝ × S)) : ℝ≥0∞ :=  ∫⁻ p, ENNReal.ofReal (Real.exp p.1) ∂η
  • definition OAI.SphericalPerceptron.markedStableTotal line 139

    def markedStableTotal (η : Measure (ℝ × S)) : ℝ := (markedStableTotalE η).toReal
  • definition OAI.SphericalPerceptron.markedStableMassKernel line 144

    def markedStableMassKernel : Kernel (Measure (ℝ × S)) (ℝ × S) where  toFun η := normalizedMeasure (η.withDensity (fun p => ENNReal.ofReal (Real.exp p.1)))  measurable' := normalizedMeasure_measurable.comp (measurable_measure_withDensity_fixed (by fun_prop))
  • definition OAI.SphericalPerceptron.markedStableCountKernel line 155

    def markedStableCountKernel : Kernel (Measure (ℝ × S)) (ℝ × S) :=  markedStableMassKernel.withDensity (fun η p => ENNReal.ofReal (markedStableTotal η*Real.exp (-p.1)))
  • definition OAI.SphericalPerceptron.DecoratedCascade line 160

    @[reducible] def DecoratedCascade (S : Type) [MeasurableSpace S] : ℕ → MeasCat  | 0 => MeasCat.of Unit  | n+1 => MeasCat.of (Measure (ℝ×(S×DecoratedCascade S n)))
  • definition OAI.SphericalPerceptron.decoratedCascadeLaw line 170

    def decoratedCascadeLaw {S : Type} [MeasurableSpace S] [Nonempty S]    (ν : ProbabilityMeasure S) : (n : ℕ) → (Fin n → ℝ) → ProbabilityMeasure (DecoratedCascade S n)  | 0, _ => ⟨Measure.dirac (),by exact Measure.dirac.isProbabilityMeasure⟩  | n+1, z => ⟨poissonRandomMeasureLaw ((stableLogIntensity (z 0)).prod      ((ν : Measure S).prod (decoratedCascadeLaw ν n (fun i => z i.succ)))),        by exact poissonRandomMeasureLaw_probability _⟩
  • definition OAI.SphericalPerceptron.decoratedTerminalTotalE line 177

    def decoratedTerminalTotalE {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (step : X×S → X) (H : X → ℝ) : (n : ℕ) → X×DecoratedCascade S n → ℝ≥0∞  | 0, p => ENNReal.ofReal (Real.exp (H p.1))  | n+1, p => ∫⁻ q : ℝ×(S×DecoratedCascade S n), ENNReal.ofReal (Real.exp q.1) *      decoratedTerminalTotalE step H n (step (p.1,q.2.1),q.2.2) ∂markedStableCountKernel p.2
  • definition OAI.SphericalPerceptron.decoratedTerminalTotal line 183

    def decoratedTerminalTotal {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (step : X×S → X) (H : X → ℝ) (n : ℕ) (p : X×DecoratedCascade S n) : ℝ :=  (decoratedTerminalTotalE step H n p).toReal
  • definition OAI.SphericalPerceptron.gaussianShiftStep line 187

    def gaussianShiftStep (σ : ℕ → ℝ) (p : (ℕ → ℝ) × ℝ) : ℕ → ℝ :=  fun i => p.1 (i+1)+σ i*p.2

32 more definitions are reached the same way; the full file lists them.

Possible paper match, with no recorded review

Atlas selected this possible match by comparing words in the Lean statement with every statement in the family. No review of whether the statements mean the same thing is recorded.

Words of the Lean statement, its names split into words, that also appear in the theorem: hq, linear, weights, field, compact, spherical, step, uniformly and five more.

Proposition 4 of The free energy of the spherical random perceptron

Proposition (Spherical linear-field formula)

For fixed interval weights, uniformly on compact sets of nonnegative nondecreasing step field values,

l_n(h)\ \longrightarrow\ \min_{q_0\le\cdots\le q_{k-1}\,;\ 0\le q_i<1} \left\{S(q)-\sum_i w_i h_i q_i\right\}

as n\to\infty. Furthermore, for each fixed 0\le B<1, if 0\le q(u)\le B a.e. is nondecreasing and

2h(u)=A_q(q(u)),\qquad A_q(r):=\int_0^r\frac{dt}{D_q(t)^2}\quad(0\le r<1),

then

l_n(h)=S(q)-\int_0^1 hq+o(1),

where the error tends to zero uniformly over these q.

Section 4, The spherical linear-field formula Read it in the paper TeX source, line 669
Show the TeX
For fixed interval weights, uniformly on compact sets of nonnegative
nondecreasing step field values,

\begin{equation}
l_n(h)\ \longrightarrow\ \min_{q_0\le\cdots\le q_{k-1}\,;\ 0\le q_i<1}
       \left\{S(q)-\sum_i w_i h_i q_i\right\}
\end{equation}

as $n\to\infty$. Furthermore, for each fixed $0\le B<1$, if $0\le q(u)\le B$ a.e. is nondecreasing and

\begin{equation}
2h(u)=A_q(q(u)),\qquad A_q(r):=\int_0^r\frac{dt}{D_q(t)^2}\quad(0\le r<1),
\end{equation}

then

\begin{equation}
l_n(h)=S(q)-\int_0^1 hq+o(1),
\end{equation}

where the error tends to zero uniformly over these $q$.

Other possible paper matches, closest wording first

  • Theorem 8.5 of The free energy of the Ising random perceptron. Words of the Lean statement, its names split into words, that also appear in the theorem: random, expected, measure, pressure, continuous, gaussian and four more. Shared only with the release’s name for the Lean statement or OpenAI’s note on it: converge.
  • Theorem 3.1 of The spherical perceptron with bi-orthogonally invariant disorder. Words of the Lean statement, its names split into words, that also appear in the theorem: counts, expectation, pressure, log, min, formula and four more. Shared only with the release’s name for the Lean statement or OpenAI’s note on it: converges.
  • Proposition 5.3 of Microscopic jamming in the negative spherical perceptron. Words of the Lean statement, its names split into words, that also appear in the theorem: inner, univ, mass, agree, measure, normalization and six more. Shared only with the release’s name for the Lean statement or OpenAI’s note on it: converges.
  • Theorem 8.3 of The free energy of the Ising random perceptron. Words of the Lean statement, its names split into words, that also appear in the theorem: integrable, real, expectation, max, min, finite and three more.
  • Theorem 1 of The free energy of the spherical random perceptron. Words of the Lean statement, its names split into words, that also appear in the theorem: infinite, trials, entropy and value. Found in the paper’s title, which its main theorem states: random and spherical.
  • Proposition 2.5 of Microscopic jamming in the negative spherical perceptron. Words of the Lean statement, its names split into words, that also appear in the theorem: point, spherical, step, entropy, log, finite and three more.

How Atlas selects possible matches: it compares words in the Lean statement with every statement in the family. It also splits Lean names into words. The release’s label and note receive less weight; a main theorem wins a close match. If the Lean wording yields no clear match, Atlas uses the catalogue description. This selects passages to compare; it does not establish that they mean the same thing.

Reported Comparator runs

two independent groups report that Comparator accepted runs for this Lean statement file: Carlos Toledo’s cert-machine; MathVet. Each group reports its own Comparator run for this statement file. Atlas has not repeated the runs.

For a configured theorem, Comparator tests whether OpenAI’s proof proves the exact Lean statement. Some files instead configure definitions for comparison by name and type. Acceptance does not establish that the statement means the same thing as the paper’s theorem.

Carlos Toledo’s cert-machine

How they ran it, in their words

Every Comparator challenge re-run on Linux with nanoda switched on, decided by a preregistered rule; every family’s challenge statements read against OpenAI’s headline, clause by clause. Decider: Comparator (leanprover/comparator d03acab1 = tag v4.34.0, built with the release’s toolchain v4.34.1), lean4export 076e8e57, landrun 811cfff5, nanoda_lib 3a240721 — on GitHub’s Linux runners (.github/workflows/openai-math-kernel.yml), one j…

  • Accepted Their term: “CERTIFIED”.

    Re-run through Comparator with the independent nanoda kernel switched on: Lean’s kernel and nanoda both accept OpenAI’s solution.

    Reported 10 October 2026, at the release version shown here. Original verification report

MathVet

How they ran it, in their words

An independent, model-assisted, pre-referee reading of each family’s challenge statements against its headline claim under a published rubric (PROTOCOL.md), with its own Comparator runs per challenge. Its protocol describes a planned error-rate study; this import does not establish that the study has been completed.

  • Accepted Their term: “comparator-sandboxed-pass”.

    Re-run through Comparator in a sandboxed virtual machine: accepted.

    Reported 8 October 2026, at the release version shown here. Original verification report

What an accepted Comparator run would establish

If Comparator is run under this configuration and accepts, the solution proves the configured theorem using only the allowed axioms, and the Lean kernel accepts every step.

This configuration lists no definition holes, so every definition the statement uses is compared as it is written in this file.

Allowed axioms: propext, Classical.choice, Quot.sound

Acceptance leaves open whether the Lean statement means the same thing as the paper’s theorem, whether the paper’s other claims are correct, and whether the result is new. Those questions require comparing the definitions and statements, reviewing the paper’s arguments, and reading the earlier literature.

Do family 222’s Lean statements express the advertised result?

These assessments compare all the family’s Lean statements with the whole result OpenAI describes in its catalogue. They do not assess this statement alone. Each group uses its own published rules.

Neither group finds that the Lean statements express or imply the whole advertised result. They describe what the statements express in different terms.

  • MathVet

    Finds part of it stated, or a narrower or weaker statement Their term: “partial”.

    Only a special case is stated, or a co-equal headline claim has no challenge statement. Their record

    Their note: Stated: the spherical Gaussian perceptron formula SphericalPerceptronFreeEnergy.main : ∀ α β > 0, ∀ φ : ℝ →ᵇ ℝ, ∃ p, variationalValue P α β φ = p ∧ expectedPressure → p ∧ pressure → p in probability, plus a supporting spherical_linear_field_formula. For the Ising perceptron only well-definedness is stated: variationalValue_real_of_continuous : ∃ p : ℝ, variationalValue α f = (p : EReal) (docs: 'supporting well-definedness result. It does not assert convergence of the finite-system pressure or ... all bounded Borel log-potentials'). Not stated: Ising free-energy convergence, the bi-orthogonally invariant spherical extension, and the margin -1 jamming gap/force laws.

    Definitions the group asks readers to compare with the paper: Hand-written variational 'free energies': Ising variationalValue α f := ⨅ q : OverlapPath, (α * patternFunctional f q : ℝ) + isingEntropy q with patternFunctional f q := Filter.limUnder atTop (uniformPattern f q) (junk value if the limit does not exist) and isingEntropy q := ⨆ h : FieldStep, ... in EReal; spherical variationalValue P α β φ := ⨅ m : Trial, α * controlValue P (β • φ) m + entropy m via Brownian stochastic control (Progressive, usualBrownianSigma). Finiteness of a limUnder-defined inf is a weak guarantee.

  • Carlos Toledo’s cert-machine

    Finds part of it stated, or a narrower or weaker statement Their term: “NARROWER — UNLINKED”.

    The challenge statements state less than the headline; the missing part comes from a paper the Lean note does not link. Their record

    Their note: Ising: only finiteness of the variational value (no convergence; continuous potentials only) — declared. The bi-orthogonally invariant spherical model and the margin −1 jamming threshold, gap and force laws are not stated, and the scope note is silent on both.

Read the complete assessments on the family page.

OpenAI’s own note on what this Lean statement covers

“The linked spherical-field result supplies a supporting dual formula: finite hierarchy field values converge uniformly on compact parameter sets to an attained dual minimum, and the corresponding bounded stationary-field approximation holds for monotone overlap quantiles bounded away from one.”

An AI agent drafted an interpretation of that note, classifying this statement as “states a supporting result”. No human review of the draft is recorded.

Supporting material

The complete Lean statement file

557 lines, copied from release version fd4aeeb. A name defined in this file links to its line; pointing at the name shows its definition.

Declared in this fileOpenAI’s library at fd4aeebOther linked names open the current documentation for Mathlib, Lean’s mathematical library.

Links in the file: 238 to its own declarations, 427 to Mathlib’s documentation. 86 declared names also link to the same declaration in OpenAI’s library. OpenAI uses Mathlib version d13f23b. The linked documentation describes the current version, so names that have since changed may be missing there.

import Mathlibnamespace OAInoncomputable sectionopen MeasureTheory ProbabilityTheory Filter Setopen scoped ENNReal NNReal Topology BigOperators BoundedContinuousFunctionnamespace SphericalPerceptronabbrev Time := unitIntervalabbrev Spin (N : ℕ) := EuclideanSpace ℝ (Fin N)def unitSphereLaw (N : ℕ) : Measure (Metric.sphere (0 : Spin N) 1) :=  let s := (volume : Measure (Spin N)).toSphere  (s Set.univ)⁻¹ • sstructure Trial where  toFun : Time → ℝ  monotone : Monotone toFun  measurable : Measurable toFun  nonneg : ∀ t, 0 ≤ toFun t  le_one : ∀ t, toFun t ≤ 1instance : CoeFun Trial (fun _ => Time → ℝ) := ⟨Trial.toFun⟩def timeLaw : Measure Time := Measure.comap Subtype.val volumedef tailIntegral (m : Trial) (t : Time) : ℝ :=  ∫ s in Set.Ici t, m s ∂timeLawdef entropy (m : Trial) : ℝ≥0∞ :=  (∫⁻ t, (ENNReal.ofReal (tailIntegral m t))⁻¹ -    (ENNReal.ofReal (1 - (t : ℝ)))⁻¹ ∂timeLaw) / 2@[simp] theorem timeLaw_eq_volume : timeLaw = (volume : Measure Time) := rflinstance : IsProbabilityMeasure timeLaw := by  rw [timeLaw_eq_volume]  infer_instancedef finitePointMeasure {S : Type*} [MeasurableSpace S] (n : ℕ) (x : Fin n → S) : Measure S :=  ∑ i : Fin n, Measure.dirac (x i)@[fun_prop] lemma finitePointMeasure_measurable {S : Type*} [MeasurableSpace S] (n : ℕ) :    Measurable (finitePointMeasure (S := S) n) := by  unfold finitePointMeasure  fun_propdef finitePoissonLaw {S : Type*} [MeasurableSpace S] (r : ℝ≥0) (ν : Measure S) :    Measure (Measure S) :=  Measure.sum fun n : ℕ =>    poissonMeasure r {n} • (Measure.pi fun _ : Fin n => ν).map (finitePointMeasure n)instance finitePoissonLaw_probability {S : Type*} [MeasurableSpace S]    (r : ℝ≥0) (ν : Measure S) [IsProbabilityMeasure ν] :    IsProbabilityMeasure (finitePoissonLaw r ν) := by  constructor  rw [finitePoissonLaw,Measure.sum_apply _ MeasurableSet.univ]  have hmass (n : ℕ) : ((Measure.pi fun _ : Fin n => ν).map (finitePointMeasure n)) univ = 1 := by    rw [Measure.map_apply (finitePointMeasure_measurable n) MeasurableSet.univ,      preimage_univ,measure_univ]  simp only [Measure.smul_apply,hmass,smul_eq_mul,mul_one]  have hh := hasSum_one_poissonMeasure r  simp_rw [poissonMeasure_singleton]  rw [← ENNReal.ofReal_tsum_of_nonneg (fun _ => by positivity) hh.summable,hh.tsum_eq]  norm_numlemma measureSum_measurable {S : Type*} [MeasurableSpace S] :    Measurable (fun η : ℕ → Measure S => Measure.sum η) := by  apply Measure.measurable_of_measurable_coe  intro s hs  simp only [Measure.sum_apply _ hs]  exact Measurable.tsum fun i => (Measure.measurable_coe hs).comp (measurable_pi_apply i)def countablePoissonLaw {S : Type*} [MeasurableSpace S]    (r : ℕ → ℝ≥0) (ν : ℕ → Measure S) : Measure (Measure S) :=  (Measure.infinitePi fun i => finitePoissonLaw (r i) (ν i)).map Measure.suminstance countablePoissonLaw_probability {S : Type*} [MeasurableSpace S]    (r : ℕ → ℝ≥0) (ν : ℕ → Measure S) [∀ i, IsProbabilityMeasure (ν i)] :    IsProbabilityMeasure (countablePoissonLaw r ν) := by  unfold countablePoissonLaw  infer_instancedef finiteIntensityMarks {S : Type*} [MeasurableSpace S] [Nonempty S] (κ : Measure S) : Measure S :=  if κ univ = 0 then Measure.dirac (Classical.choice ‹Nonempty S›) else (κ univ)⁻¹ • κinstance finiteIntensityMarks_probability {S : Type*} [MeasurableSpace S] [Nonempty S]    (κ : Measure S) [IsFiniteMeasure κ] : IsProbabilityMeasure (finiteIntensityMarks κ) := by  by_cases hκ : κ univ = 0  · simp only [finiteIntensityMarks,ite_eq_left hκ]    infer_instance  · constructor    simp [finiteIntensityMarks,hκ,ENNReal.inv_mul_cancel hκ (measure_ne_top _ _)]def poissonRandomMeasureLaw {S : Type*} [MeasurableSpace S] [Nonempty S]    (κ : Measure S) [SFinite κ] : Measure (Measure S) :=  countablePoissonLaw (fun i => ((sfiniteSeq κ i) univ).toNNReal)    (fun i => finiteIntensityMarks (sfiniteSeq κ i))instance poissonRandomMeasureLaw_probability {S : Type*} [MeasurableSpace S] [Nonempty S]    (κ : Measure S) [SFinite κ] : IsProbabilityMeasure (poissonRandomMeasureLaw κ) := by  unfold poissonRandomMeasureLaw  infer_instancedef stableLogIntensity (b : ℝ) : Measure ℝ :=  volume.withDensity (fun x => ENNReal.ofReal (b * Real.exp (-b*x)))instance stableLogIntensity_sigmaFinite (b : ℝ) : SigmaFinite (stableLogIntensity b) := by  unfold stableLogIntensity  infer_instancedef normalizedMeasure {S : Type*} [MeasurableSpace S] (μ : Measure S) : Measure S :=  (μ univ)⁻¹ • μlemma measurable_measure_withDensity_fixed {S : Type*} [MeasurableSpace S]    {f : S → ℝ≥0∞} (hf : Measurable f) : Measurable (fun μ : Measure S => μ.withDensity f) := by  refine Measure.measurable_of_measurable_coe _ fun s hs => ?_  simp only [withDensity_apply _ hs,← lintegral_indicator hs]  exact Measure.measurable_lintegral (hf.indicator hs)lemma normalizedMeasure_measurable {S : Type*} [MeasurableSpace S] :    Measurable (normalizedMeasure (S := S)) := by  refine Measure.measurable_of_measurable_coe _ fun s hs => ?_  change Measurable (fun μ : Measure S => (μ univ)⁻¹ * μ s)  exact (Measure.measurable_coe MeasurableSet.univ).inv.mul (Measure.measurable_coe hs)section MarkedStablevariable {S : Type*} [MeasurableSpace S]def markedStableTotalE (η : Measure (ℝ × S)) : ℝ≥0∞ :=  ∫⁻ p, ENNReal.ofReal (Real.exp p.1) ∂η@[fun_prop] lemma markedStableTotalE_measurable : Measurable (markedStableTotalE (S := S)) :=  Measure.measurable_lintegral (by fun_prop)def markedStableTotal (η : Measure (ℝ × S)) : ℝ := (markedStableTotalE η).toReal@[fun_prop] lemma markedStableTotal_measurable : Measurable (markedStableTotal (S := S)) :=  markedStableTotalE_measurable.ennreal_toRealdef markedStableMassKernel : Kernel (Measure (ℝ × S)) (ℝ × S) where  toFun η := normalizedMeasure (η.withDensity (fun p => ENNReal.ofReal (Real.exp p.1)))  measurable' := normalizedMeasure_measurable.comp (measurable_measure_withDensity_fixed (by fun_prop))instance markedStableMassKernel_finite : IsFiniteKernel (markedStableMassKernel (S := S)) := by  refine ⟨1, by simp, ?_⟩  intro η  change (η.withDensity (fun p => ENNReal.ofReal (Real.exp p.1)) univ)⁻¹ *    (η.withDensity (fun p => ENNReal.ofReal (Real.exp p.1)) univ) ≤ 1  exact ENNReal.inv_mul_le_one _def markedStableCountKernel : Kernel (Measure (ℝ × S)) (ℝ × S) :=  markedStableMassKernel.withDensity (fun η p => ENNReal.ofReal (markedStableTotal η*Real.exp (-p.1)))end MarkedStable@[reducible] def DecoratedCascade (S : Type) [MeasurableSpace S] : ℕ → MeasCat  | 0 => MeasCat.of Unit  | n+1 => MeasCat.of (Measure (ℝ×(S×DecoratedCascade S n)))instance decoratedCascadeNonempty (S : Type) [MeasurableSpace S] (n : ℕ) :    Nonempty (DecoratedCascade S n) := by  cases n with  | zero => exact ⟨()⟩  | succ n => exact ⟨(0 : Measure (ℝ×(S×DecoratedCascade S n)))⟩def decoratedCascadeLaw {S : Type} [MeasurableSpace S] [Nonempty S]    (ν : ProbabilityMeasure S) : (n : ℕ) → (Fin n → ℝ) → ProbabilityMeasure (DecoratedCascade S n)  | 0, _ => ⟨Measure.dirac (),by exact Measure.dirac.isProbabilityMeasure⟩  | n+1, z => ⟨poissonRandomMeasureLaw ((stableLogIntensity (z 0)).prod      ((ν : Measure S).prod (decoratedCascadeLaw ν n (fun i => z i.succ)))),        by exact poissonRandomMeasureLaw_probability _⟩def decoratedTerminalTotalE {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (step : X×S → X) (H : X → ℝ) : (n : ℕ) → X×DecoratedCascade S n → ℝ≥0∞  | 0, p => ENNReal.ofReal (Real.exp (H p.1))  | n+1, p => ∫⁻ q : ℝ×(S×DecoratedCascade S n), ENNReal.ofReal (Real.exp q.1) *      decoratedTerminalTotalE step H n (step (p.1,q.2.1),q.2.2) ∂markedStableCountKernel p.2def decoratedTerminalTotal {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (step : X×S → X) (H : X → ℝ) (n : ℕ) (p : X×DecoratedCascade S n) : ℝ :=  (decoratedTerminalTotalE step H n p).toRealdef gaussianShiftStep (σ : ℕ → ℝ) (p : (ℕ → ℝ) × ℝ) : ℕ → ℝ :=  fun i => p.1 (i+1)+σ i*p.2def standardGaussianMark : ProbabilityMeasure ℝ := ⟨gaussianReal 0 1,inferInstance⟩def piMarkLaw {ι S : Type} [Fintype ι] [MeasurableSpace S]    (ν : ι → ProbabilityMeasure S) : ProbabilityMeasure (ι → S) :=  ⟨Measure.pi (fun i => (ν i : Measure S)),inferInstance⟩def canonicalCoordinateStep (d : ℕ) (σ : ℕ → ℝ) :    (Fin d → ℕ → ℝ)×(Fin d → ℝ) → (Fin d → ℕ → ℝ) :=  fun p i => gaussianShiftStep σ (p.1 i,p.2 i)def decoratedLeafIntegral {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (step : X × S → X) (F : X → ℝ≥0∞) :    (n : ℕ) → X × DecoratedCascade S n → ℝ≥0∞  | 0, p => F p.1  | n+1, p => ∫⁻ q : ℝ × (S × DecoratedCascade S n),      ENNReal.ofReal (Real.exp q.1) *        decoratedLeafIntegral step F n (step (p.1,q.2.1),q.2.2)          ∂markedStableCountKernel p.2def decoratedFieldFactor {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (d : ℕ) (step : X × S → X) (field : X → Spin d) (k : ℕ)    (p : X × DecoratedCascade S k) (x : Spin d) : ℝ≥0∞ :=  decoratedLeafIntegral step (fun y => ENNReal.ofReal (Real.exp (inner ℝ (field y) x))) k pdef decoratedAngularFactor {X S : Type} [MeasurableSpace X] [MeasurableSpace S]    (n : ℕ) (step : X × S → X) (field : X → Spin (n+1)) (k : ℕ)    (p : X × DecoratedCascade S k) (r : ℝ) : ℝ≥0∞ :=  ∫⁻ u : Metric.sphere (0:Spin (n+1)) 1,    decoratedFieldFactor (n+1) step field k p (r • (u:Spin (n+1))) ∂unitSphereLaw (n+1)def coordinateLeafField (d : ℕ) (x : Fin d → ℕ → ℝ) : Spin d :=  WithLp.toLp 2 (fun i => x i 0)def coordinateCascadeLaw (d k : ℕ) (z : Fin k → ℝ) (r : ℝ≥0) :    Measure ((Fin d → ℝ) × DecoratedCascade (Fin d → ℝ) k) :=  (Measure.pi (fun _ : Fin d => gaussianReal 0 r)).prod    (decoratedCascadeLaw (piMarkLaw (fun _ : Fin d => standardGaussianMark)) k z)def coordinateAngularLog (n k : ℕ) (σ : ℕ → ℝ) (R : ℝ)    (p : (Fin (n+1) → ℕ → ℝ) × DecoratedCascade (Fin (n+1) → ℝ) k) : ℝ :=  Real.log ((decoratedAngularFactor n (canonicalCoordinateStep (n+1) σ)    (coordinateLeafField (n+1)) k p R).toReal /      decoratedTerminalTotal (canonicalCoordinateStep (n+1) σ) (fun _ => 0) k p)def normalizedCoordinateSphereLog (n k : ℕ) (σ : ℕ → ℝ)    (p : (Fin (n+1) → ℝ) × DecoratedCascade (Fin (n+1) → ℝ) k) : ℝ :=  coordinateAngularLog n k σ (Real.sqrt (n+1:ℕ)) ((fun i _ => p.1 i),p.2) / ((n+1:ℕ):ℝ)def expectedCoordinateSphereLog (n k : ℕ) (σ : ℕ → ℝ) (z : Fin k → ℝ) (r : ℝ≥0) : ℝ :=  ∫ p, normalizedCoordinateSphereLog n k σ p ∂coordinateCascadeLaw (n+1) k z rdef weightedStepTrial {I : Type*} [Fintype I] (w : I → ℝ) (q : I → Time)    (hw : ∀ i, 0 ≤ w i) (hw1 : ∑ i, w i = 1) : Trial where  toFun := fun t => ∑ i, if q i ≤ t then w i else 0  monotone := by    intro s t hst    apply Finset.sum_le_sum    intro i _    by_cases hi : q i ≤ s    · simp only [ite_eq_left hi,ite_eq_left (hi.trans hst),le_refl]    · rw [ite_eq_right hi]      split_ifs <;> first | exact hw i | rfl  measurable := by    apply Finset.measurable_sum    intro i _    exact measurable_const.ite (measurableSet_le measurable_const measurable_id) measurable_const  nonneg := by    intro t    apply Finset.sum_nonneg    intro i _    split_ifs <;> first | exact hw i | rfl  le_one := by    intro t    rw [← hw1]    apply Finset.sum_le_sum    intro i _    split_ifs <;> first | rfl | exact hw idef stepCumulative {k : ℕ} (w : Fin (k+1) → ℝ) (i : Fin k) : ℝ :=  ∑ j : Fin (k+1), if j ≤ i.castSucc then w j else 0def stepFieldIncrement (k : ℕ) (h : Fin (k+1) → ℝ) (j : ℕ) : ℝ :=  if hj : j < k then    Real.sqrt (2*(h (Fin.rev ⟨j,hj⟩).succ-h (Fin.rev ⟨j,hj⟩).castSucc)) else 0def finiteSphericalFieldValue (n k : ℕ) (w h : Fin (k+1) → ℝ) : ℝ :=  expectedCoordinateSphereLog n k (stepFieldIncrement k h) (stepCumulative w)    (Real.toNNReal (2*h 0))-h (Fin.last k)def finiteSphericalDualObjective {k : ℕ} (w h : Fin (k+1) → ℝ)    (hw : ∀ i, 0 ≤ w i) (hw1 : ∑ i, w i=1) (q : Fin (k+1) → Time) : ℝ :=  (entropy (weightedStepTrial w q hw hw1)).toReal-∑ i, w i*h i*(q i:ℝ)def finiteSphericalDualValues {k : ℕ} (w h : Fin (k+1) → ℝ)    (hw : ∀ i, 0 ≤ w i) (hw1 : ∑ i, w i=1) : Set ℝ :=  finiteSphericalDualObjective w h hw hw1 ''    {q : Fin (k+1) → Time | Monotone q ∧ (q (Fin.last k):ℝ) < 1}structure FiniteFieldModel (f : Time → ℝ) where  depth : ℕ  value : Fin (depth+1) → ℝ  label : Time → Fin (depth+1)  measurable_label : Measurable label  positive : ∀ i, 0 < timeLaw.real (label ⁻¹' {i})  monotone_value : Monotone value  agrees : (fun u => value (label u)) =ᵐ[timeLaw] fdef FiniteFieldModel.weight {f : Time → ℝ} (M : FiniteFieldModel f) (i : Fin (M.depth+1)) : ℝ :=  timeLaw.real (M.label ⁻¹' {i})def FiniteFieldModel.pressure {f : Time → ℝ} (M : FiniteFieldModel f) (n : ℕ) : ℝ :=  finiteSphericalFieldValue n M.depth M.weight M.valuetheorem exists_finiteFieldModel (f : Time → ℝ) (hf : Measurable f)    (hfin : (Set.range f).Finite) : Nonempty (FiniteFieldModel f) := by  classical  let S := hfin.toFinset  let T := S.filter (fun r => 0 < timeLaw.real (f ⁻¹' {r}))  have hae : ∀ᵐ u ∂timeLaw, f u ∈ T := by    have hnull : ∀ r ∈ S, ∀ᵐ u ∂timeLaw, f u=r → 0 < timeLaw.real (f ⁻¹' {r}) := by      intro r hr      by_cases hp : 0 < timeLaw.real (f ⁻¹' {r})      · exact ae_of_all _ (fun _ _ => hp)      · have hz : timeLaw (f ⁻¹' {r})=0 := by          have hz : (timeLaw (f ⁻¹' {r})).toReal=0 := le_antisymm (le_of_not_gt hp) ENNReal.toReal_nonneg          have hp := (ENNReal.toReal_eq_zero_iff _).mp hz          rcases hp with hp | hp          · exact hp          · exact (measure_ne_top _ _ hp).elim        have hnot : ∀ᵐ u ∂timeLaw, f u ≠ r := by          apply ae_iff.mpr          simpa only [Set.preimage,Set.mem_singleton_iff,not_not] using hz        filter_upwards [hnot] with u hu        exact fun h => (hu h).elim    have hall := (S.eventually_all).mpr hnull    filter_upwards [hall] with u hu    have hmem : f u ∈ S := hfin.mem_toFinset.mpr (mem_range_self u)    exact Finset.mem_filter.mpr ⟨hmem,hu (f u) hmem rfl⟩  have hT : T.Nonempty := by    obtain ⟨u,hu⟩ := hae.exists    exact ⟨f u,hu⟩  obtain ⟨d,hd⟩ := Nat.exists_eq_succ_of_ne_zero (Finset.card_ne_zero.mpr hT)  let e := T.orderIsoOfFin hd  let v : Fin (d+1) → ℝ := fun i => e i  have hv : StrictMono v := fun i j hij => e.strictMono hij  have hve : MeasurableEmbedding v := ⟨hv.injective,measurable_of_finite _,fun _ _ => (Set.toFinite _).measurableSet⟩  let a : Time → Fin (d+1) := fun u => hve.invFun (f u)  have hag : (fun u => v (a u)) =ᵐ[timeLaw] f := by    filter_upwards [hae] with u hu    have hx : f u=v (e.symm ⟨f u,hu⟩) := congrArg Subtype.val (e.apply_symm_apply ⟨f u,hu⟩) |>.symm    dsimp only [a]    rw [hx,hve.leftInverse_invFun]  refine ⟨⟨d,v,a,hve.measurable_invFun.comp hf,?_,hv.monotone,hag⟩⟩  intro i  have he : a ⁻¹' {i}=ᵐ[timeLaw] f ⁻¹' {v i} := by    filter_upwards [hag] with u hu    apply propext    change (a u=i) ↔ f u=v i    rw [← hu]    exact hv.injective.eq_iff.symm  change 0 < (timeLaw (a ⁻¹' {i})).toReal  rw [measure_congr he]  exact (Finset.mem_filter.mp (e i).2).2structure BoundedField (H : ℝ) where  toFun : Time → ℝ  monotone : Monotone toFun  nonneg : ∀ u, 0 ≤ toFun u  le_bound : ∀ u, toFun u ≤ Hinstance {H : ℝ} : CoeFun (BoundedField H) (fun _ => Time → ℝ) := ⟨BoundedField.toFun⟩lemma BoundedField.measurable {H : ℝ} (f : BoundedField H) : Measurable f := f.monotone.measurabledef roundLower (N : ℕ) (x : ℝ) : ℝ := (⌊(N+1:ℕ)*x⌋₊:ℝ)/(N+1:ℕ)lemma roundLower_nonneg (N : ℕ) (x : ℝ) : 0 ≤ roundLower N x := by unfold roundLower; positivitylemma roundLower_monotone (N : ℕ) : Monotone (roundLower N) := by  intro x y hxy  apply div_le_div_of_nonneg_right _ (by positivity)  exact_mod_cast Nat.floor_mono (mul_le_mul_of_nonneg_left hxy (by positivity))lemma roundLower_le (N : ℕ) {x : ℝ} (hx : 0 ≤ x) : roundLower N x ≤ x := by  unfold roundLower  rw [div_le_iff₀ (by positivity : (0:ℝ)<(N+1:ℕ))]  simpa only [mul_comm] using Nat.floor_le (mul_nonneg (by positivity) hx)def BoundedField.round {H : ℝ} (f : BoundedField H) (N : ℕ) : BoundedField H where  toFun := fun u => roundLower N (f u)  monotone := (roundLower_monotone N).comp f.monotone  nonneg := fun u => roundLower_nonneg N (f u)  le_bound := fun u => (roundLower_le N (f.nonneg u)).trans (f.le_bound u)lemma BoundedField.round_finite {H : ℝ} (f : BoundedField H) (N : ℕ) :    (Set.range (f.round N)).Finite := by  let T := (Finset.range (⌊(N+1:ℕ)*H⌋₊+1)).image (fun k : ℕ => (k:ℝ)/(N+1:ℕ))  apply T.finite_toSet.subset  rintro x ⟨u,rfl⟩  apply Finset.mem_image.mpr  refine ⟨⌊(N+1:ℕ)*f u⌋₊,?_,rfl⟩  apply Finset.mem_range.mpr  exact Nat.lt_succ_of_le (Nat.floor_mono (mul_le_mul_of_nonneg_left (f.le_bound u) (by positivity)))def BoundedField.roundModel {H : ℝ} (f : BoundedField H) (N : ℕ) : FiniteFieldModel (f.round N) :=  Classical.choice (exists_finiteFieldModel _ (f.round N).measurable (f.round_finite N))def quantileTrial (q : Time → Time) : Trial where  toFun := fun t => timeLaw.real {u | q u ≤ t}  monotone := by    intro s t hst    exact measureReal_mono (fun u hu => hu.trans hst)  measurable := by    apply Monotone.measurable    intro s t hst    exact measureReal_mono (fun u hu => hu.trans hst)  nonneg := fun _ => measureReal_nonneg  le_one := by    intro t    exact measureReal_le_onedef quantileTail (q : Time → Time) (t : ℝ) : ℝ :=  ∫ u, 1-max (q u:ℝ) t ∂timeLawlemma quantileTail_integrable (q : Time → Time) (hq : Measurable q) (t : ℝ) :    Integrable (fun u => 1-max (q u:ℝ) t) timeLaw := by  have hm : Measurable (fun u => 1-max (q u:ℝ) t) :=    measurable_const.sub ((measurable_subtype_coe.comp hq).max measurable_const)  apply Integrable.mono' (integrable_const (2+|t|)) hm.aestronglyMeasurable  exact ae_of_all _ fun u => by    rw [Real.norm_eq_abs]    have hq0 := (q u).2.1    have hq1 := (q u).2.2    have ha : |max (q u:ℝ) t| ≤ 1+|t| := by      rcases le_total (q u:ℝ) t with h | h      · rw [max_eq_right h]; linarith      · rw [max_eq_left h,abs_of_nonneg hq0]; nlinarith [abs_nonneg t]    have hb := abs_sub 1 (max (q u:ℝ) t)    norm_num at hb    linarithlemma quantileTail_lower (q : Time → Time) (hq : Measurable q) {B t : ℝ}    (hb : ∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) (ht : t ≤ B) :    1-B ≤ quantileTail q t := by  have h := integral_mono_ae (integrable_const (1-B)) (quantileTail_integrable q hq t)    (hb.mono fun u hu => sub_le_sub_left (max_le hu ht) 1)  simpa [quantileTail] using hlemma quantileTail_lipschitz (q : Time → Time) (hq : Measurable q) :    LipschitzWith 1 (quantileTail q) := by  apply LipschitzWith.of_dist_le_mul  intro s t  rw [Real.dist_eq,Real.dist_eq,NNReal.coe_one,one_mul]  unfold quantileTail  rw [← integral_sub (quantileTail_integrable q hq s) (quantileTail_integrable q hq t)]  calc    _ ≤ ∫ u, |(1-max (q u:ℝ) s)-(1-max (q u:ℝ) t)| ∂timeLaw := abs_integral_le_integral_abs    _ ≤ ∫ _ : Time, |s-t| ∂timeLaw := by      apply integral_mono ((quantileTail_integrable q hq s).sub (quantileTail_integrable q hq t)).abs (integrable_const _)      intro u      have h := (LipschitzWith.id.const_max (q u:ℝ)).dist_le_mul s t      simp only [Real.dist_eq,NNReal.coe_one,one_mul] at h      change |(1-max (q u:ℝ) s)-(1-max (q u:ℝ) t)| ≤ _      rw [show (1-max (q u:ℝ) s)-(1-max (q u:ℝ) t)=max (q u:ℝ) t-max (q u:ℝ) s by ring,abs_sub_comm]      exact h    _ = _ := by simpdef boundedSphericalFieldValue {H : ℝ} (f : BoundedField H) (n : ℕ) : ℝ :=  limUnder atTop (fun N => (f.roundModel N).pressure n)def BoundedField.toQuantile {B : ℝ} (q : BoundedField B) (hB : B ≤ 1) : Time → Time :=  fun u => ⟨q u,q.nonneg u,(q.le_bound u).trans hB⟩lemma BoundedField.toQuantile_measurable {B : ℝ} (q : BoundedField B) (hB : B ≤ 1) :    Measurable (q.toQuantile hB) := q.measurable.subtype_mkdef quantileA (q : Time → Time) (r : ℝ) : ℝ :=  ∫ t in (0:ℝ)..r, 1/(quantileTail q t)^2lemma quantileA_integrand_continuous {B : ℝ} (q : Time → Time) (hq : Measurable q)    (hB : B < 1) (hb : ∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) :    ContinuousOn (fun t => 1/(quantileTail q t)^2) (Icc 0 B) := by  apply continuousOn_const.div ((quantileTail_lipschitz q hq).continuous.continuousOn.pow 2)  intro t ht  exact pow_ne_zero _ (ne_of_gt ((sub_pos.mpr hB).trans_le (quantileTail_lower q hq hb ht.2)))lemma quantileA_integrand_bound {B t : ℝ} (q : Time → Time) (hq : Measurable q)    (hB : B < 1) (hb : ∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) (ht : t ≤ B) :    1/(quantileTail q t)^2 ≤ 1/(1-B)^2 := by  have hd := quantileTail_lower q hq hb ht  exact one_div_le_one_div_of_le (sq_pos_of_pos (sub_pos.mpr hB))    (pow_le_pow_left₀ (sub_nonneg.mpr hB.le) hd 2)lemma quantileA_nonneg (q : Time → Time) {r : ℝ} (hr : 0 ≤ r) : 0 ≤ quantileA q r :=  intervalIntegral.integral_nonneg hr (fun _ _ => by positivity)lemma quantileA_mono {B : ℝ} (q : Time → Time) (hq : Measurable q)    (hB : B < 1) (hb : ∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) :    MonotoneOn (quantileA q) (Icc 0 B) := by  intro r hr s hs hrs  exact intervalIntegral.integral_mono_interval le_rfl hr.1 hrs    (ae_of_all _ fun _ => by positivity)    (((quantileA_integrand_continuous q hq hB hb).mono (Icc_subset_Icc le_rfl hs.2)).intervalIntegrable_of_Icc hs.1)lemma quantileA_bound {B r : ℝ} (q : Time → Time) (hq : Measurable q)    (hB : B < 1) (hb : ∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) (hr : r ∈ Icc 0 B) :    quantileA q r ≤ B/(1-B)^2 := by  have h := intervalIntegral.integral_mono_on hr.1    (((quantileA_integrand_continuous q hq hB hb).mono (Icc_subset_Icc le_rfl hr.2)).intervalIntegrable_of_Icc hr.1)    (intervalIntegrable_const (μ := volume) (c := 1/(1-B)^2))    (fun t ht => quantileA_integrand_bound q hq hB hb (ht.2.trans hr.2))  have he : (∫ _t in (0:ℝ)..r, 1/(1-B)^2)=r/(1-B)^2 := by simp [div_eq_mul_inv]  rw [he] at h  exact h.trans (div_le_div_of_nonneg_right hr.2 (sq_nonneg _))def BoundedField.stationary {B : ℝ} (q : BoundedField B) (hB : B < 1) :    BoundedField (B/(2*(1-B)^2)) where  toFun := fun u => quantileA (q.toQuantile hB.le) (q u)/2  monotone := fun u v huv => div_le_div_of_nonneg_right    (quantileA_mono _ (q.toQuantile_measurable hB.le) hB (ae_of_all _ q.le_bound)      ⟨q.nonneg u,q.le_bound u⟩ ⟨q.nonneg v,q.le_bound v⟩ (q.monotone huv)) (by norm_num)  nonneg := fun u => div_nonneg (quantileA_nonneg _ (q.nonneg u)) (by norm_num)  le_bound := by    intro u    have h := (quantileA_bound _ (q.toQuantile_measurable hB.le) hB (ae_of_all _ q.le_bound)      ⟨q.nonneg u,q.le_bound u⟩)    calc      _ ≤ (B/(1-B)^2)/2 := div_le_div_of_nonneg_right h (by norm_num)      _ = _ := by rw [div_div,mul_comm]def clippedQuantile (q : Time → Time) (hq : Monotone q) (B : ℝ) (hB0 : 0 ≤ B) : BoundedField B where  toFun := fun u => min (q u:ℝ) B  monotone := fun _ _ huv => min_le_min (hq huv) le_rfl  nonneg := fun u => le_min (q u).2.1 hB0  le_bound := fun _ => min_le_right _ _def stationaryQuantileField (q : Time → Time) (hq : Monotone q) (B : ℝ) (hB0 : 0 ≤ B) (hB1 : B < 1) :    BoundedField (B/(2*(1-B)^2)) := (clippedQuantile q hq B hB0).stationary hB1def SphericalLinearFieldFormula : Prop :=  (∀ (k : ℕ) (w : Fin (k+1) → ℝ) (hw : ∀ i, 0 < w i) (hw1 : ∑ i, w i=1),    (∀ h : Fin (k+1) → ℝ, Monotone h → 0 ≤ h 0 →      ∃ q : Fin (k+1) → Time, Monotone q ∧ (q (Fin.last k):ℝ) < 1 ∧        IsLeast (finiteSphericalDualValues w h (fun i => (hw i).le) hw1)          (finiteSphericalDualObjective w h (fun i => (hw i).le) hw1 q)) ∧    (∀ K : Set (Fin (k+1) → ℝ), IsCompact K →      (∀ h ∈ K, Monotone h ∧ 0 ≤ h 0) →      TendstoUniformlyOn (fun n h => finiteSphericalFieldValue n k w h)        (fun h => sInf (finiteSphericalDualValues w h (fun i => (hw i).le) hw1)) atTop K)) ∧  (∀ (B : ℝ) (hB0 : 0 ≤ B) (hB1 : B < 1) (ε : ℝ), 0 < ε →    ∀ᶠ n : ℕ in atTop, ∀ (q : Time → Time) (hq : Monotone q),      (∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) →      entropy (quantileTrial q) < ∞ ∧      (∀ᵐ u ∂timeLaw, 2*stationaryQuantileField q hq B hB0 hB1 u=quantileA q (q u)) ∧      |boundedSphericalFieldValue (stationaryQuantileField q hq B hB0 hB1) n-        ((entropy (quantileTrial q)).toReal-          ∫ u, stationaryQuantileField q hq B hB0 hB1 u*(q u:ℝ) ∂timeLaw)| < ε)end SphericalPerceptronendnamespace SphericalPerceptrontheorem spherical_linear_field_formula : SphericalLinearFieldFormula := by  sorryend SphericalPerceptronend OAI
Every extracted statement of the accompanying papers

The statements the atlas extracted automatically from each accompanying paper’s TeX source, with links to the full sources.

The free energy of the Ising random perceptron

Theorem (Gaussian Ising perceptron)

For every \alpha>0 and every bounded Borel f:\mathbb R\to\mathbb R,

\lim_{N\to\infty}\mathbb E p_N(f) =\mathcal P_f(\alpha) :=\inf_{q\in\mathcal Q}\{\alpha V_f(q)+S_{\mathrm I}(q)\}.

Moreover, p_N(f) converges to \mathcal P_f(\alpha) in probability. The variational value is finite. In particular, the conclusion holds for f=\beta\phi at every \beta>0 and every bounded continuous activation \phi, without symmetry, concavity, or a smallness restriction.

Section 2, The model and the variational formula Read it in the paper TeX source, line 88
Show the TeX
For every $\alpha>0$ and every bounded Borel $f:\mathbb R\to\mathbb R$,
\begin{equation}
 \lim_{N\to\infty}\mathbb E p_N(f)
 =\mathcal P_f(\alpha)
 :=\inf_{q\in\mathcal Q}\{\alpha V_f(q)+S_{\mathrm I}(q)\}.
\end{equation}
Moreover, $p_N(f)$ converges to $\mathcal P_f(\alpha)$ in probability.
The variational value is finite. In particular, the conclusion holds for
$f=\beta\phi$ at every $\beta>0$ and every bounded continuous activation
$\phi$, without symmetry, concavity, or a smallness restriction.
Theorem (Concavity and a supporting field)

The functional \ell is concave on nonnegative nondecreasing step paths. For any two such paths, represented on a common partition,

\ell(h')\le\ell(h) -\frac12\int_0^1(h'(u)-h(u))\rho_h(u)\,du.

Concavity also holds for its continuous extension to bounded nonnegative nondecreasing paths.

Section 3, Variations, order, and the Ising entropy Read it in the paper TeX source, line 292
Show the TeX
The functional $\ell$ is concave on nonnegative nondecreasing
step paths. For any two such paths, represented on a common
partition,
\begin{equation}

 \ell(h')\le\ell(h)
      -\frac12\int_0^1(h'(u)-h(u))\rho_h(u)\,du.
\end{equation}
Concavity also holds for its continuous extension to bounded
nonnegative nondecreasing paths.
Theorem (Positivity and ultrametricity)

Suppose B is a bounded, symmetric, weakly exchangeable Gram array with constant diagonal D and the Ghirlanda–Guerra property. Then, almost surely, for distinct indices,

B_{\ell m}\geq0, \qquad B_{12}\geq\min\{B_{13},B_{23}\}.
Section 4, Overlap arrays and probability cascades Read it in the paper TeX source, line 68
Show the TeX
Suppose $B$ is a bounded, symmetric, weakly exchangeable Gram array with
constant diagonal $D$ and the Ghirlanda--Guerra property.  Then, almost
surely, for distinct indices,
\begin{equation}
 B_{\ell m}\geq0,
 \qquad
 B_{12}\geq\min\{B_{13},B_{23}\}.
 
\end{equation}

The free energy of the spherical random perceptron

Theorem

For every \alpha,\beta>0 and every \phi\in C_b(\R;\R),

\lim_{N\to\infty}\E p_N =\inf_{m\in\U}\{\alpha V_{\beta\phi}(m)+S(m)\} =:\mathcal P(\alpha,\beta,\phi), \qquad p_N\xrightarrow{\mathbb P}\mathcal P(\alpha,\beta,\phi).

Trials of infinite entropy have value +\infty. No condition that m=1 near 1 is imposed.

Section 1, Introduction and statement Read it in the paper TeX source, line 72
Show the TeX
For every $\alpha,\beta>0$ and every $\phi\in C_b(\R;\R)$,
\[
 \lim_{N\to\infty}\E p_N
 =\inf_{m\in\U}\{\alpha V_{\beta\phi}(m)+S(m)\}
 =:\mathcal P(\alpha,\beta,\phi),
 \qquad
 p_N\xrightarrow{\mathbb P}\mathcal P(\alpha,\beta,\phi).
\]
Trials of infinite entropy have value $+\infty$. No condition that $m=1$ near
$1$ is imposed.
Configuration and file facts
OpenAI’s Lean catalogue
OpenAI’s Lean catalogue does not list this as a main result; the release’s Lean notes for family 222 link it.
Solution module
OAI.Probability.SphericalField.Main
Allowed axioms
propext, Classical.choice, Quot.soundThe axioms this configuration allows a proof to use. A replay shows which of them a proof uses.
Imports
Mathlib
Imports from outside Mathlib
None
Local vocabulary
66 local vocabulary declarations
Lines of Lean, without comments or blank lines
446
Second proof-verification program (nanoda)
Off in OpenAI's configuration.

Statement comparison

A shareable summary of this page: the proposed paper match, what the Lean statement expresses, and which reviews are recorded.

Plectis Atlas

Spherical linear-field dual formula and approximation

Family 222: Perceptron free energies and microscopic jamming exponents

Candidate pairing

Proposition (Spherical linear-field formula)

For fixed interval weights, uniformly on compact sets of nonnegative nondecreasing step field values,

l_n(h)\ \longrightarrow\ \min_{q_0\le\cdots\le q_{k-1}\,;\ 0\le q_i<1} \left\{S(q)-\sum_i w_i h_i q_i\right\}

as n\to\infty. Furthermore, for each fixed 0\le B<1, if 0\le q(u)\le B a.e. is nondecreasing and

2h(u)=A_q(q(u)),\qquad A_q(r):=\int_0^r\frac{dt}{D_q(t)^2}\quad(0\le r<1),

then

l_n(h)=S(q)-\int_0^1 hq+o(1),

where the error tends to zero uniformly over these q.

The free energy of the spherical random perceptron

TeX label prop:spherical, build/paper.tex, line 669

The Lean statement says

def SphericalLinearFieldFormula : Prop :=  (∀ (k : ℕ) (w : Fin (k+1) → ℝ) (hw : ∀ i, 0 < w i) (hw1 : ∑ i, w i=1),    (∀ h : Fin (k+1) → ℝ, Monotone h → 0 ≤ h 0 →      ∃ q : Fin (k+1) → Time, Monotone q ∧ (q (Fin.last k):ℝ) < 1 ∧        IsLeast (finiteSphericalDualValues w h (fun i => (hw i).le) hw1)          (finiteSphericalDualObjective w h (fun i => (hw i).le) hw1 q)) ∧    (∀ K : Set (Fin (k+1) → ℝ), IsCompact K →      (∀ h ∈ K, Monotone h ∧ 0 ≤ h 0) →      TendstoUniformlyOn (fun n h => finiteSphericalFieldValue n k w h)        (fun h => sInf (finiteSphericalDualValues w h (fun i => (hw i).le) hw1)) atTop K)) ∧  (∀ (B : ℝ) (hB0 : 0 ≤ B) (hB1 : B < 1) (ε : ℝ), 0 < ε →    ∀ᶠ n : ℕ in atTop, ∀ (q : Time → Time) (hq : Monotone q),      (∀ᵐ u ∂timeLaw, (q u:ℝ) ≤ B) →      entropy (quantileTrial q) < ∞ ∧      (∀ᵐ u ∂timeLaw, 2*stationaryQuantileField q hq B hB0 hB1 u=quantileA q (q u)) ∧      |boundedSphericalFieldValue (stationaryQuantileField q hq B hB0 hB1) n-        ((entropy (quantileTrial q)).toReal-          ∫ u, stationaryQuantileField q hq B hB0 hB1 u*(q u:ℝ) ∂timeLaw)| < ε)

A Lean statement states the theorem and leaves its proof as sorry on purpose. OpenAI’s proof is in a separate solution module, and a program called Comparator checks that proof against this statement.

Atlas selected this possible match because the two statements share words. No review of whether they mean the same thing is recorded.two independent groups report that Comparator accepted runs for this file at the release version shown here.Statement review: none recorded

66 local vocabulary declarationsAllowed axioms: propext, Classical.choice, Quot.soundopenai/math at fd4aeebwcook04.github.io/plectis-atlas/statements/SphericalField.html

Recorded comparisons with the paper

Atlas records no contributed comparison of this statement with the paper.

Contributed Comparator run reports

Atlas records no contributed report of running Comparator for this statement file.

Compare this statement with the paperShare a Comparator run reportSuggest a change