Phases of Muoncompanion
Section SI · Deterministic model: Volterra analysis and the phase map
Proved in Lean
Proposition SI.1 (One step of a row)
Let \(\Delta\in\R^{\Nout\times\Nin}\) be fixed, let \(u\) be a unit vector in \(\R^{\Nout}\), let \(\lr>0\), and let \({\mathsf S}\) be a random matrix with \(\EE\norm {\mathsf S}_\F^2<\infty\). Then
\[ \EE\norm{(\Delta-\lr {\mathsf S})^\T u}^2-\norm{\Delta^\T u}^2 =-2\lr\,\EE\langle\Delta^\T u,{\mathsf S}^\T u\rangle+\lr^2\,\EE\norm{{\mathsf S}^\T u}^2 . \]
Proof.
Expanding the square gives
\[ \norm{(\Delta-\lr {\mathsf S})^\T u}^2=\norm{\Delta^\T u}^2-2\lr\langle\Delta^\T u,{\mathsf S}^\T u\rangle+\lr^2\norm{{\mathsf S}^\T u}^2 . \]
Each term has finite expectation, because \(\abs{\langle\Delta^\T u,{\mathsf S}^\T u\rangle}\le\norm\Delta_\F\norm {\mathsf S}_\F\) and \(\norm{{\mathsf S}^\T u}^2\le\norm {\mathsf S}_\F^2\). Taking expectations proves the identity.

Lean

Proved in Lean
Muon.Phase.prop_app_phase_row_identity source
theorem prop_app_phase_row_identity {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
    [IsProbabilityMeasure P] {m n : ℕ} (Δ : Muon.Mat m n) (u : Muon.Vec m)
    (hu : dotProduct u u = 1) (lr : ℝ) (hlr : 0 < lr)
    (S : Ω → Muon.Mat m n) (hS : ∀ i j, Measurable fun ω => S ω i j)
    (hSF : MemLp (fun ω => Muon.fro (S ω)) 2 P) :
    ∫ ω, dotProduct (Matrix.mulVec (Matrix.transpose (Δ - lr • S ω)) u)
          (Matrix.mulVec (Matrix.transpose (Δ - lr • S ω)) u) ∂P
        - dotProduct (Matrix.mulVec (Matrix.transpose Δ) u) (Matrix.mulVec (Matrix.transpose Δ) u)
      = -2 * lr * ∫ ω, dotProduct (Matrix.mulVec (Matrix.transpose Δ) u)
          (Matrix.mulVec (Matrix.transpose (S ω)) u) ∂P
        + lr ^ 2 * ∫ ω, dotProduct (Matrix.mulVec (Matrix.transpose (S ω)) u)
          (Matrix.mulVec (Matrix.transpose (S ω)) u) ∂P := by