Imports
/- Copyright (c) 2026 Axiomatic-AI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matteo Cipollina -/ module public import Physlib.QuantumMechanics.Operators.StateObservables.Variance

Covariance

i. Overview

In this module we define the covariance of two partial linear maps A and B in a common state ψ as the real part of the inner product of their centered vectors.

ii. Key results

    covariance : the real part of the centered inner product.

    covariance_comm : covariance is symmetric in the two observables.

    covariance_eq_re_symm_centered : covariance as the real part of the symmetrized centered inner product.

    covariance_self_eq_variance : the covariance of an observable with itself is its variance.

iii. Table of contents

    A. Covariance

iv. References

    [B. C. Hall, Quantum Theory for Mathematicians, Chapter 12][hall2013quantum].

@[expose] public section

A. Covariance

Covariance, defined as the real part of the centered inner product.

def covariance : := (centered A ψ, centered B ψ, hψB⟫_).re

Covariance, unfolded to the real part of the centered inner product.

lemma covariance_eq_re_inner_centered : covariance A B ψ hψB = (centered A ψ, centered B ψ, hψB⟫_).re := rfl

Swapping the two observables does not change the covariance.

All goals completed! 🐙

Covariance as the real part of the symmetrized centered inner product.

H:Type u_1inst✝¹:NormedAddCommGroup Hinst✝:InnerProductSpace HA:H →ₗ.[] HB:H →ₗ.[] Hψ:A.domainhψB:ψ B.domainz: := A.centered ψ, B.centered ψ, hψB⟫_hz:B.centered ψ, hψB, A.centered ψ⟫_ = star z(A.centered ψ, B.centered ψ, hψB⟫_).re = (A.centered ψ, B.centered ψ, hψB⟫_ + star z).re / 2 H:Type u_1inst✝¹:NormedAddCommGroup Hinst✝:InnerProductSpace HA:H →ₗ.[] HB:H →ₗ.[] Hψ:A.domainhψB:ψ B.domainz: := A.centered ψ, B.centered ψ, hψB⟫_hz:B.centered ψ, hψB, A.centered ψ⟫_ = star zz.re = (z + star z).re / 2 All goals completed! 🐙
H:Type u_1inst✝¹:NormedAddCommGroup Hinst✝:InnerProductSpace HA:H →ₗ.[] Hψ:A.domain(↑A.centered ψ).re * (↑A.centered ψ).re - (↑A.centered ψ).im * (↑A.centered ψ).im = A.centered ψ * A.centered ψ All goals completed! 🐙