Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions LeanPool/C173.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/-
Copyright (c) 2026 Mark Gladden. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mark Gladden
-/

module

public import LeanPool.C173.C173TheoremOne

/-!
# Complete-law identification of a quartic thermal network

Source: url:https://github.com/VanGogh7777/c173-lean/tree/bea8a3daae28c0f1068848636218dcfa651613de
Authors: Mark Gladden
Status: verified
Main declarations: `C173.complete_law_identification`
Tags: inverse-problems, stochastic-differential-equations, diffusion
MSC: 60H10, 62M05
-/
119 changes: 119 additions & 0 deletions LeanPool/C173/C173ActualShortTime.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/-
Copyright (c) 2026 Mark Gladden. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mark Gladden
-/

module

public import LeanPool.C173.C173PhysicalIncrement
public import LeanPool.C173.C173StepMoments
public import LeanPool.C173.C173StepAssembly
public import LeanPool.C173.C173CollectiveCommutator

/-! Short-time moment bounds for the literal additive-noise path. -/

@[expose] public section

open MeasureTheory ProbabilityTheory Set Filter MvPolynomial C173CollectiveCommutator
open scoped NNReal

namespace C173

variable {Ω ι : Type*} [MeasurableSpace Ω] [Fintype ι]

/-- The literal negative force gives the original polynomial `H = -L`. -/
theorem diffusionPolynomial_eq_neg_physicalOp (T : ℝ) (F : ι → Poly ι) (p : Poly ι) :
diffusionPolynomial T (fun i ↦ -F i) p = -(physicalOp T F p) := by
change diffusionPolynomial T (fun i ↦ -F i) p = -((-T) • laplacian p + firstOrder F p)
simp only [diffusionPolynomial, firstOrder, laplacian, LinearMap.sum_apply, LinearMap.comp_apply,
Derivation.coeFn_coe, neg_mul, Finset.sum_neg_distrib]
change -(∑ i, F i * pderiv i p) + C T * (∑ i, pderiv i (pderiv i p)) =
-((-T) • (∑ i, pderiv i (pderiv i p)) + ∑ i, F i * pderiv i p)
simp only [Algebra.smul_def, MvPolynomial.algebraMap_eq, map_neg]
ring

omit [Fintype ι] in
/-- The actual physical Brownian increment has independent coordinates with
Gaussian variance `2T(b-a)` after the manuscript's noise scaling. -/
theorem additiveNoise_increment_gaussian {μ : Measure Ω} {W : ι → ℝ≥0 → Ω → ℝ}
(hW : ∀ i, IsPreBrownianReal (W i) μ) (hCoord : iIndepFun (fun i w t ↦ W i t w) μ)
{T : ℝ} (hT : 0 ≤ T) {a b : ℝ} (ha : 0 ≤ a) (hab : a ≤ b) :
let Z (w : Ω) := additiveNoise W T w b - additiveNoise W T w a
∃ v : ℝ≥0, (v : ℝ) = 2 * T * (b - a) ∧
(∀ i, HasLaw (fun w ↦ Z w i) (gaussianReal 0 v) μ) ∧ iIndepFun (fun i w ↦ Z w i) μ := by
dsimp only
let v : ℝ≥0 := ⟨2 * T * (b - a), mul_nonneg (mul_nonneg (by norm_num) hT) (sub_nonneg.mpr hab)⟩
let v₀ := nndist (b.toNNReal : ℝ) (a.toNNReal : ℝ)
have hv₀ : (v₀ : ℝ) = b - a := by
change dist (b.toNNReal : ℝ) (a.toNNReal : ℝ) = b - a
rw [Real.coe_toNNReal b (ha.trans hab), Real.coe_toNNReal a ha, Real.dist_eq,
abs_of_nonneg (sub_nonneg.mpr hab)]
have hv : NNReal.mk ((Real.sqrt (2 * T)) ^ 2) (sq_nonneg _) * v₀ = v := by
apply NNReal.eq
rw [NNReal.coe_mul, NNReal.coe_mk, Real.sq_sqrt (mul_nonneg (by norm_num) hT), hv₀]
rfl
have hZ (w : Ω) (i : ι) : (additiveNoise W T w b - additiveNoise W T w a) i =
Real.sqrt (2 * T) * (W i b.toNNReal w - W i a.toNNReal w) := by
rw [additiveNoise_increment_eq_scaled, Pi.smul_apply, smul_eq_mul]
refine ⟨v, rfl, fun i ↦ ?_, ?_⟩
· have hi : HasLaw (fun w ↦ W i b.toNNReal w - W i a.toNNReal w) (gaussianReal 0 v₀) μ :=
(hW i).hasLaw_sub _ _
simpa only [hZ, mul_zero, hv] using gaussianReal_const_mul hi (Real.sqrt (2 * T))
· simp only [hZ]
exact hCoord.comp (fun _ z ↦ Real.sqrt (2 * T) * (z b.toNNReal - z a.toNNReal))
(fun _ ↦ (measurable_pi_apply b.toNNReal |>.sub (measurable_pi_apply a.toNNReal)).const_mul _)

/-- The physical increment has the Brownian order, while its drift part has
the order of the elapsed time. The force slice moments do not assume stationarity. -/
theorem physical_stateAndDrift_increments {μ : Measure Ω} [IsProbabilityMeasure μ]
{W : ι → ℝ≥0 → Ω → ℝ} (hW : ∀ i, IsPreBrownianReal (W i) μ)
(T : ℝ) (K : ι → ι → ℝ) (g h : ι → ℝ) (y : Ω → ℝ → ι → ℝ) {H : ℝ}
(hPath : ∀ᵐ w ∂μ, ContinuousOn (additiveNoise W T w) (Icc 0 H) ∧
∀ s ∈ Icc 0 H, ∀ i, HasDerivAt (fun v ↦ y w v i)
(Pathwise.drift K g h (y w s + additiveNoise W T w s) i) s)
(hState : ∀ t ∈ Icc 0 H, AEStronglyMeasurable (fun w ↦ y w t + additiveNoise W T w t) μ)
{a b : ℝ} (ha : 0 ≤ a) (hab : a < b) (hb : b ≤ H) (hsmall : b - a ≤ 1)
{q M : ℝ} (hq : 1 ≤ q) (hM : 0 ≤ M)
(hForceJoint : AEStronglyMeasurable
(fun z : Ω × ℝ ↦ quarticForce K g h (y z.1 z.2 + additiveNoise W T z.1 z.2))
(μ.prod (volume.restrict (Ioc a b))))
(hForce : ∀ t ∈ Icc 0 H,
Integrable (fun w ↦ ‖quarticForce K g h (y w t + additiveNoise W T w t)‖ ^ q) μ ∧
(∫ w, ‖quarticForce K g h (y w t + additiveNoise W T w t)‖ ^ q ∂μ) ≤ M) :
let X (t : ℝ) (w : Ω) := y w t + additiveNoise W T w t
let R (w : Ω) := -(∫ t in a..b, quarticForce K g h (X t w))
let D (w : Ω) := X b w - X a w
let B := (Fintype.card ι : ℝ) * |Real.sqrt (2 * T)| ^ q * ∫ z, |z| ^ q ∂gaussianReal 0 1
Integrable (fun w ↦ ‖D w‖ ^ q) μ ∧
(∫ w, ‖D w‖ ^ q ∂μ) ≤ ((2 : ℝ) ^ q * (3 : ℝ) ^ (q - 1) * (B + M)) * (b - a) ^ (q / 2) ∧
Integrable (fun w ↦ ‖R w‖ ^ q) μ ∧ (∫ w, ‖R w‖ ^ q ∂μ) ≤ (b - a) ^ q * M := by
dsimp only
let X (t : ℝ) (w : Ω) := y w t + additiveNoise W T w t
let F (z : Ω × ℝ) := -quarticForce K g h (X z.2 z.1)
let Z (w : Ω) := additiveNoise W T w b - additiveNoise W T w a
have hForceOn : ∀ᵐ t ∂(volume.restrict (Ioc a b)),
Integrable (fun w ↦ ‖F (w,t)‖ ^ q) μ ∧
(∫ w, ‖F (w,t)‖ ^ q ∂μ) ≤ M := by
filter_upwards [ae_restrict_mem measurableSet_Ioc] with t ht
have ht' : t ∈ Icc 0 H := ⟨ha.trans ht.1.le, ht.2.trans hb⟩
simpa only [F, norm_neg] using hForce t ht'
obtain ⟨hF, hFq⟩ := drift_product_integrable hq hForceJoint.neg hForceOn
have hactual : ∀ᵐ w ∂μ, X b w - X a w = Z w + ∫ t in a..b, F (w,t) := by
filter_upwards [ae_physical_increment_eq_noise_sub_force W T K g h y hPath] with w hw
have he := (hw ha hab.le hb).2
rw [← additiveNoise_increment_eq_scaled] at he
simpa only [F, Z, intervalIntegral.integral_neg, X, sub_eq_add_neg] using he
obtain ⟨hZi, hZb⟩ := additiveNoise_increment_moment_bound hW T
(lt_of_lt_of_le zero_lt_one hq) ha hab.le
have hXm : AEStronglyMeasurable (fun w ↦ X b w - X a w) μ :=
(hState b ⟨ha.trans hab.le, hb⟩).sub (hState a ⟨ha, hab.le.trans hb⟩)
obtain ⟨hDi, hDb⟩ := state_increment_moment_bound hab hsmall hq hM hXm hactual
hZi hZb hF hFq (hForceOn.mono fun _ h ↦ h.2)
refine ⟨hDi, hDb, ?_, ?_⟩
· simpa only [F, Pi.neg_apply, intervalIntegral.integral_neg] using
driftNormMoment_integrable hab hq hF hFq
· simpa only [F, Pi.neg_apply, intervalIntegral.integral_neg] using
integral_norm_intervalIntegral_rpow_le hab hq hF hFq (hForceOn.mono fun _ h ↦ h.2)

end C173
82 changes: 82 additions & 0 deletions LeanPool/C173/C173BrownianIncrementMoments.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/-
Copyright (c) 2026 Mark Gladden. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mark Gladden
-/

module

public import LeanPool.C173.C173FiniteVectorMoments
public import LeanPool.C173.C173InitialNoiseMoments
import Mathlib.Tactic.Ring

/-!
# Moments of finite-dimensional Brownian increments

The positive-order moment of the spatial maximum of scaled Brownian increments
has the Gaussian time scaling needed for the additive-noise remainder estimates.
-/

@[expose] public section

open MeasureTheory ProbabilityTheory
open scoped BigOperators ENNReal NNReal

namespace C173.Brownian

variable {ι Ω : Type*} [Fintype ι] [MeasurableSpace Ω] {μ : Measure Ω}

/-- The finite-coordinate Brownian step has all positive absolute moments.
The explicit moment bound is a constant times the gap to the `q/2` power. -/
theorem scaled_increment_moment_bound (B : ι → ℝ≥0 → Ω → ℝ)
(hB : ∀ i, IsPreBrownianReal (B i) μ) (c : ℝ) {q : ℝ} (hq : 0 < q)
{s t : ℝ≥0} (hst : s ≤ t) :
Integrable (fun ω ↦ ‖(fun i ↦ c * (B i t ω - B i s ω))‖ ^ q) μ ∧
(∫ ω, ‖(fun i ↦ c * (B i t ω - B i s ω))‖ ^ q ∂μ) ≤
((Fintype.card ι : ℝ) * |c| ^ q * ∫ x, |x| ^ q ∂gaussianReal 0 1) *
((t : ℝ) - (s : ℝ)) ^ (q / 2) := by
let v : ℝ≥0 := nndist (t : ℝ) (s : ℝ)
let X (ω : Ω) (i : ι) := c * (B i t ω - B i s ω)
let moment := ∫ x, |x| ^ q ∂gaussianReal 0 1
have hLaw (i : ι) : HasLaw (fun ω ↦ B i t ω - B i s ω) (gaussianReal 0 v) μ :=
(hB i).hasLaw_sub t s
have hLp (i : ι) : MemLp (fun ω ↦ X ω i) (ENNReal.ofReal q) μ :=
((hLaw i).memLp (memLp_id_gaussianReal' _ ENNReal.ofReal_ne_top)).const_mul c
obtain ⟨hint, hbound⟩ := integral_pi_norm_rpow_le_sum X hq hLp
have hcoord (i : ι) : (∫ ω, ‖X ω i‖ ^ q ∂μ) ≤ (|c| * Real.sqrt (v : ℝ)) ^ q * moment := by
simpa only [X, moment, Real.norm_eq_abs] using
(C173.scaledGaussian_abs_rpow_moment (hLaw i) c hq.le le_rfl).2
have hstR : (s : ℝ) ≤ (t : ℝ) := hst
have hv : (v : ℝ) = (t : ℝ) - (s : ℝ) := by
dsimp [v]
rw [Real.dist_eq, abs_of_nonneg (sub_nonneg.mpr hstR)]
have hsqrt : Real.sqrt (v : ℝ) ^ q = ((t : ℝ) - (s : ℝ)) ^ (q / 2) := by
rw [Real.sqrt_eq_rpow, ← Real.rpow_mul v.coe_nonneg, hv]
congr 1
ring
refine ⟨hint, hbound.trans ?_⟩
calc
_ ≤ ∑ _ : ι, (|c| * Real.sqrt (v : ℝ)) ^ q * moment :=
Finset.sum_le_sum fun i _ ↦ hcoord i
_ = (Fintype.card ι : ℝ) * ((|c| * Real.sqrt (v : ℝ)) ^ q * moment) := by simp
_ = _ := by
rw [Real.mul_rpow (abs_nonneg _) (Real.sqrt_nonneg _), hsqrt]
dsimp [moment]
ring

/-- The unscaled coordinate Wiener paths have the same gap scaling, with a constant
depending only on the moment order and the number of coordinates. -/
theorem increment_moment_bound (B : ι → ℝ≥0 → Ω → ℝ)
(hB : ∀ i, IsPreBrownianReal (B i) μ) {q : ℝ} (hq : 0 < q) :
∃ C : ℝ, 0 ≤ C ∧ ∀ {s t : ℝ≥0}, s ≤ t →
Integrable (fun ω ↦ ‖(fun i ↦ B i t ω - B i s ω)‖ ^ q) μ ∧
(∫ ω, ‖(fun i ↦ B i t ω - B i s ω)‖ ^ q ∂μ) ≤
C * ((t : ℝ) - (s : ℝ)) ^ (q / 2) := by
let C := (Fintype.card ι : ℝ) * ∫ x, |x| ^ q ∂gaussianReal 0 1
have hmoment : 0 ≤ ∫ x, |x| ^ q ∂gaussianReal 0 1 :=
integral_nonneg fun _ ↦ Real.rpow_nonneg (abs_nonneg _) _
refine ⟨C, mul_nonneg (Nat.cast_nonneg _) hmoment, fun {s t} hst ↦ ?_⟩
simpa only [C, one_mul, abs_one, Real.one_rpow, mul_one] using
scaled_increment_moment_bound B hB 1 hq hst

end C173.Brownian
Loading
Loading