From mathematical prose to a formal statement
One theorem, two languages.
The dynamical comparison theorem connects the random algorithm to its deterministic dynamics. Here is its written statement alongside the Lean statements that formalize it.
Meaning and proof sketch ↗Complete written proof ↗Lean source ↗
Hover to preview a match. Click a phrase or a Lean line to keep it highlighted and bring its counterpart into view. Keyboard: Tab, then Enter or Space.
Try a conclusion:
Follow the correspondenceThe highlighted phrases and lines are curated links to the actual source, including the definitions hidden behind Lean names.
Written statement
Theorem SE.1 · Dynamical comparison
Theorem SE.1 (Dynamical comparison)
Fix \(\macrostep>0\), \(\ridge>0\), \(\bmom\in[0,1)\), \(\gamma_\star<\infty\), \(C_\Sigma\ge1\), \(E_\star<\infty\), \(c_M<\infty\) and \(0<r_0\le r_1<\infty\). Along a sequence of dimensions with \(B\to\infty\) assume:
- (H1)Assumption S1 and Assumption S2 hold with deterministic covariances, \(\max(\Nin,\Nout)\le\gamma_\star B\) and \(\norm{\Sigmain},\norm{\Sigmaout}\le C_\Sigma\);
- (H2)the algorithm of Definition SA.2 is run with momentum \(\bmom\), normalized ridge \(\ridge\) and step \(\lr_t=\macrostep/B\);
- (H3)\(W_0\) is deterministic, \(\norm{\Delta_0}_\F^2\le E_\star\), \(r_0\le\cR(0)\le r_1\), and \(\norm{\widehat A_0}\to0\);
- (H4)the initial buffer \(M^\circ_{-1}\) is independent of all batches and \(\EE\norm{M^\circ_{-1}}_\F^2\le c_MB\).
Let \(T_\star\) be given by (SE.10) and let \((\fQ_{ij})\) be the solution of (SE.7) of Proposition SE.1. Then the following hold.
- (i)With probability tending to one,\[ t_{\rm stop}>BT_\star,\qquad \inf_{t\le BT_\star}\cR(t)\ge r_0/2,\qquad \sup_{t\le BT_\star}\norm{\Dt}_\F^2\le E_\star+1. \]
- (ii)\(\sup_{\macrotime\le T_\star}\norm{\chi^{\mathrm{act}}(\macrotime)-\chi^{\mathrm{ode}}(\macrotime)}_\BL\to0\) in probability.
- (iii)\(\sup_{\macrotime\le T_\star}\norm{\mu\lambda\,(\chi^{\mathrm{act}}(\macrotime)-\chi^{\mathrm{ode}}(\macrotime))}_\BL\to0\) and \(\sup_{\macrotime\le T_\star}\abs{\cR(\lfloor B\macrotime\rfloor)-\fRisk(\macrotime)}\to0\) in probability.
- (iv)On the event of (i), \(\sup_{t\le BT_\star}\norm{\Ahat}\to0\) in probability.
structure DynParams where h : ℝ ϱ : ℝ β : ℝ γstar : ℝ CSig : ℝ Estar : ℝ cM : ℝ r0 : ℝ r1 : ℝ hh : 0 < h hϱ : 0 < ϱ hβ : 0 ≤ β ∧ β < 1 hγ : 0 ≤ γstar hC : 1 ≤ CSig hE : 0 ≤ Estar hcM : 0 ≤ cM hr0 : 0 < r0 hr : r0 ≤ r1structure DynHyp (p : DynParams) {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) (m n B : ℕ → ℕ) (C : ∀ k : ℕ, Covariances (m k) (n k)) where -- (H1) `hyp:app-dyn-data` regime : ProportionalRegime m n B C dims : ∀ k : ℕ, ((max (m k) (n k) : ℕ) : ℝ) ≤ p.γstar * (B k : ℝ) normBd : ∀ k : ℕ, opNorm (C k).Sin ≤ p.CSig ∧ opNorm (C k).Sout ≤ p.CSig x : ∀ k : ℕ, ℕ → Ω → Batch (m k) (n k) (B k) iid : ∀ k t, IIDBatch P (dataTarget (C k)) (fun a ω => x k t ω a) steps_indep : ∀ k : ℕ, iIndepFun (fun t => x k t) P -- (H2) `hyp:app-dyn-algorithm`: momentum β, ridge ϱ, step h/B alg : ∀ k : ℕ, AlgParams (m k) (n k) alg_β : ∀ k, (alg k).β = p.β alg_ϱ : ∀ k, (alg k).ϱ = p.ϱ alg_η : ∀ k t, (alg k).η t = p.h / (B k : ℝ) -- (H3) `hyp:app-dyn-initial`: deterministic W₀, ‖Δ₀‖_F² ≤ E⋆, r₀ ≤ 𝓡(0) ≤ r₁, ‖Â₀‖ → 0 W0 : ∀ k : ℕ, Mat (m k) (n k) W0_norm : ∀ k, fro (W0 k - (alg k).Wstar) ^ 2 ≤ p.Estar W0_risk : ∀ k, p.r0 ≤ riskSigma (C k) (W0 k - (alg k).Wstar) ∧ riskSigma (C k) (W0 k - (alg k).Wstar) ≤ p.r1 W0_hat : Tendsto (fun k => opNorm (Ahat (C k) (W0 k - (alg k).Wstar))) atTop (𝓝 0) -- (H4) `hyp:app-dyn-buffer`: initial buffer M°₋₁ independent of all batches, E‖M°₋₁‖_F² ≤ c_M B Mm1 : ∀ k : ℕ, Ω → Mat (m k) (n k) Mm1_meas : ∀ k : ℕ, AEMeasurable (Mm1 k) P Mm1_indep : ∀ k : ℕ, IndepFun (Mm1 k) (fun ω t => x k t ω) P Mm1_bound : ∀ k : ℕ, ∫⁻ ω, ENNReal.ofReal (fro (Mm1 k ω) ^ 2) ∂P ≤ ENNReal.ofReal (p.cM * B k)theorem thm_app_dyn_main_i (cert : Muon.External.GaussianOpNorm) (certOp : Muon.External.GaussianOpNormL6) (certP : Muon.External.GaussianPoincare) (certQ : Muon.External.GaussianQuadFormLp) -- (H1)–(H4) along a sequence of dimensions with `B → ∞` (hB : Tendsto (fun k : ℕ => B k) atTop atTop) (F : ∀ k : ℕ, FrozenParams (m k) (n k) (B k)) (hyp : DynHyp p P m n B (fun k => (F k).C)) (S : ∀ k : ℕ, SpectralData (F k).C) (c : ∀ k : ℕ, DynCoeff p (S k) (B k)) (hc : ∀ k : ℕ, IsActualCoeff cert (F k) (S k) (c k)) : Tendsto (fun k : ℕ => P (mainEvent hyp k)) atTop (𝓝 1) := byUnfold the event in (i)
def mainEvent (hyp : DynHyp p P m n B C) (k : ℕ) : Set Ω := {ω | ∀ t : ℕ, (t : ℝ) ≤ (B k : ℝ) * Tstar p → (t : ℕ∞) < stopTime hyp k ω ∧ p.r0 / 2 ≤ riskSigma (C k) (errPath hyp k t ω) ∧ fro (errPath hyp k t ω) ^ 2 ≤ p.Estar + 1}theorem thm_app_dyn_main_ii (cert : Muon.External.GaussianOpNorm) (certOp : Muon.External.GaussianOpNormL6) (certP : Muon.External.GaussianPoincare) (certQ : Muon.External.GaussianQuadFormLp) (hB : Tendsto (fun k : ℕ => B k) atTop atTop) (F : ∀ k : ℕ, FrozenParams (m k) (n k) (B k)) (hyp : DynHyp p P m n B (fun k => (F k).C)) (S : ∀ k : ℕ, SpectralData (F k).C) (c : ∀ k : ℕ, DynCoeff p (S k) (B k)) (hc : ∀ k : ℕ, IsActualCoeff cert (F k) (S k) (c k)) (e : ∀ k : ℕ, ℝ → Fin (m k) → Fin (n k) → ℝ) (he : ∀ k : ℕ, def_app_dyn_ode p (S k) (c k) (dev0 hyp k) (Tstar p) (e k)) : (∀ k : ℕ, ∀ ω : Ω, ∀ τ ∈ Icc (0 : ℝ) (Tstar p), ∀ φ ∈ blTest p.CSig, Integrable φ (actMeas hyp S k ω τ) ∧ Integrable φ (odeMeasure (B k : ℝ) (S k).μ (S k).lam (e k τ))) ∧ ∀ ε : ℝ, 0 < ε → Tendsto (fun k : ℕ => P {ω | ENNReal.ofReal ε < ⨆ τ ∈ Icc (0 : ℝ) (Tstar p), ENNReal.ofReal (blDist p.CSig (actMeas hyp S k ω τ) (odeMeasure (B k : ℝ) (S k).μ (S k).lam (e k τ)))}) atTop (𝓝 0) := bytheorem thm_app_dyn_main_iii (cert : Muon.External.GaussianOpNorm) (certOp : Muon.External.GaussianOpNormL6) (certP : Muon.External.GaussianPoincare) (certQ : Muon.External.GaussianQuadFormLp) (hB : Tendsto (fun k : ℕ => B k) atTop atTop) (F : ∀ k : ℕ, FrozenParams (m k) (n k) (B k)) (hyp : DynHyp p P m n B (fun k => (F k).C)) (S : ∀ k : ℕ, SpectralData (F k).C) (c : ∀ k : ℕ, DynCoeff p (S k) (B k)) (hc : ∀ k : ℕ, IsActualCoeff cert (F k) (S k) (c k)) (e : ∀ k : ℕ, ℝ → Fin (m k) → Fin (n k) → ℝ) (he : ∀ k : ℕ, def_app_dyn_ode p (S k) (c k) (dev0 hyp k) (Tstar p) (e k)) : (∀ k : ℕ, ∀ ω : Ω, ∀ τ ∈ Icc (0 : ℝ) (Tstar p), ∀ φ ∈ blTest p.CSig, Integrable (fun x => x.1 * x.2 * φ x) (actMeas hyp S k ω τ) ∧ Integrable (fun x => x.1 * x.2 * φ x) (odeMeasure (B k : ℝ) (S k).μ (S k).lam (e k τ))) ∧ (∀ ε : ℝ, 0 < ε → Tendsto (fun k : ℕ => P {ω | ENNReal.ofReal ε < ⨆ τ ∈ Icc (0 : ℝ) (Tstar p), ENNReal.ofReal (blDistLam p.CSig (actMeas hyp S k ω τ) (odeMeasure (B k : ℝ) (S k).μ (S k).lam (e k τ)))}) atTop (𝓝 0)) ∧ (∀ ε : ℝ, 0 < ε → Tendsto (fun k : ℕ => P {ω | ENNReal.ofReal ε < ⨆ τ ∈ Icc (0 : ℝ) (Tstar p), ENNReal.ofReal |riskSigma (F k).C (errPath hyp k ⌊(B k : ℝ) * τ⌋₊ ω) - odeRisk (S k).μ (S k).lam (B k : ℝ) (e k τ)|}) atTop (𝓝 0)) := bytheorem thm_app_dyn_main_iv (cert : Muon.External.GaussianOpNorm) (certOp : Muon.External.GaussianOpNormL6) (certP : Muon.External.GaussianPoincare) (certQ : Muon.External.GaussianQuadFormLp) (hB : Tendsto (fun k : ℕ => B k) atTop atTop) (F : ∀ k : ℕ, FrozenParams (m k) (n k) (B k)) (hyp : DynHyp p P m n B (fun k => (F k).C)) (S : ∀ k : ℕ, SpectralData (F k).C) (c : ∀ k : ℕ, DynCoeff p (S k) (B k)) (hc : ∀ k : ℕ, IsActualCoeff cert (F k) (S k) (c k)) : ∀ ε : ℝ, 0 < ε → Tendsto (fun k : ℕ => P (mainEvent hyp k ∩ {ω | ENNReal.ofReal ε < ⨆ (t : ℕ) (_ : (t : ℝ) ≤ (B k : ℝ) * Tstar p), ENNReal.ofReal (opNorm (normState (F k).C (errPath hyp k t ω)))})) atTop (𝓝 0) := byIn the convergence statements, ∀ ε : ℝ, 0 < ε → … expands “in probability”: for each positive tolerance, the probability of exceeding it tends to zero. The highlight links explain this correspondence at the level of clauses and definitions.