Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Phase-space setting: γ0\gamma_0γ0​, Hamiltonian, skew-Hamiltonian and symplectic matrices

Definition
UnQM_phase_space

by Lucas · Oct 2, 2026 · Mathlib 0df444a (Lean v4.33.1)

hamiltonian-mechanicslinear-algebramathematical-physics

This definition file fixes the linear-algebraic setting of Sections IV–VI of Baumgarten's paper. Throughout, n≥0n \ge 0n≥0 is the number of degrees of freedom and phase-space vectors are ψ=(q1,p1,q2,p2,…,qn,pn)T∈R2n\psi = (q_1, p_1, q_2, p_2, \dots, q_n, p_n)^T \in \mathbb R^{2n}ψ=(q1​,p1​,q2​,p2​,…,qn​,pn​)T∈R2n.

  1. The 2×22\times 22×2 symplectic unit matrix is
η0=(01−10).\eta_0 = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}.η0​=(0−1​10​).
  1. The symplectic unit matrix (SUM) for nnn degrees of freedom is the Kronecker product γ0=1n⊗η0\gamma_0 = \mathbf 1_n \otimes \eta_0γ0​=1n​⊗η0​, a real 2n×2n2n \times 2n2n×2n matrix.
  2. A real 2n×2n2n\times 2n2n×2n matrix MMM is Hamiltonian if M=γ0AM = \gamma_0 AM=γ0​A for some symmetric matrix AAA.
  3. A real 2n×2n2n\times 2n2n×2n matrix CCC is skew-Hamiltonian if C=γ0BC = \gamma_0 BC=γ0​B for some skew-symmetric matrix BBB (BT=−BB^T = -BBT=−B).
  4. A real 2n×2n2n\times 2n2n×2n matrix MMM is symplectic if Mγ0MT=γ0M\gamma_0 M^T = \gamma_0Mγ0​MT=γ0​.
  5. For a matrix of second moments Σ\SigmaΣ, the autocorrelation matrix is S=Σ γ0TS = \Sigma\,\gamma_0^TS=Σγ0T​.

These notions are shared by every statement of the mission.

Formalization Note Indices of 2n×2n2n\times 2n2n×2n matrices are pairs (i,b)(i, b)(i,b) with i∈{0,…,n−1}i \in \{0,\dots,n-1\}i∈{0,…,n−1} and b∈{0,1}b \in \{0, 1\}b∈{0,1} (b=0b = 0b=0 for qiq_iqi​, b=1b=1b=1 for pip_ipi​), so γ0\gamma_0γ0​ is literally the Kronecker product 1n⊗η0\mathbf 1_n \otimes \eta_01n​⊗η0​. For n=0n = 0n=0 all matrices are empty.

Definition code
import Mathlib

namespace UnQuantumMechanics

open Matrix

/-- Phase-space coordinate indices for `n` degrees of freedom: the pair `(i, 0)` is the
coordinate `qᵢ` and `(i, 1)` is the conjugate momentum `pᵢ`, so a phase-space vector is
`ψ = (q₁, p₁, q₂, p₂, …, qₙ, pₙ)ᵀ` (Baumgarten, Sec. IV, after Eq. 33). -/
abbrev PhaseIdx (n : ℕ) : Type := Fin n × Fin 2

/-- The `2 × 2` symplectic unit matrix `η₀ = [[0, 1], [-1, 0]]` (Eq. 32). -/
def eta0 : Matrix (Fin 2) (Fin 2) ℝ := !![0, 1; -1, 0]

/-- The symplectic unit matrix (SUM) `γ₀ = 1ₙ ⊗ η₀` for `n` degrees of freedom (Eq. 33),
built as a Kronecker product. -/
def gamma0 (n : ℕ) : Matrix (PhaseIdx n) (PhaseIdx n) ℝ :=
  Matrix.kroneckerMap (· * ·) (1 : Matrix (Fin n) (Fin n) ℝ) eta0

/-- A real `2n × 2n` matrix `M` is *Hamiltonian* if it can be written `M = γ₀ A` with `A`
symmetric (Sec. IV, text before Eq. 36). -/
def IsHamiltonianMatrix (n : ℕ) (M : Matrix (PhaseIdx n) (PhaseIdx n) ℝ) : Prop :=
  ∃ A : Matrix (PhaseIdx n) (PhaseIdx n) ℝ, A.IsSymm ∧ M = gamma0 n * A

/-- A real `2n × 2n` matrix `C` is *skew-Hamiltonian* if it can be written `C = γ₀ B` with
`B` skew-symmetric, `Bᵀ = -B` (Eq. 53). -/
def IsSkewHamiltonianMatrix (n : ℕ) (C : Matrix (PhaseIdx n) (PhaseIdx n) ℝ) : Prop :=
  ∃ B : Matrix (PhaseIdx n) (PhaseIdx n) ℝ, Bᵀ = -B ∧ C = gamma0 n * B

/-- A real `2n × 2n` matrix `M` is *symplectic* if `M γ₀ Mᵀ = γ₀` (Eq. 50). -/
def IsSymplecticMatrix (n : ℕ) (M : Matrix (PhaseIdx n) (PhaseIdx n) ℝ) : Prop :=
  M * gamma0 n * Mᵀ = gamma0 n

/-- The "autocorrelation matrix" `S = Σ γ₀ᵀ` attached to a matrix of second moments `Σ`
(Sec. V, text before Eq. 42). -/
def autocorr (n : ℕ) (Sig : Matrix (PhaseIdx n) (PhaseIdx n) ℝ) :
    Matrix (PhaseIdx n) (PhaseIdx n) ℝ :=
  Sig * (gamma0 n)ᵀ

end UnQuantumMechanics
Source
C. Baumgarten, How to (Un-) Quantum Mechanics, arXiv:1810.06981v2 [physics.gen-ph] (v2 dated June 10, 2025), https://arxiv.org/abs/1810.06981, Sec. IV pp. 13–14 (Eqs. 32, 33, text before Eq. 36), Sec. V p. 15 (text before Eq. 42), Sec. VI p. 17 (Eqs. 50, 53)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent that drafted the statements; non-blind

Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement, at the explicit direction of the proposal owner. The author knew the intended meaning and the source text while writing it, so it must not be mistaken for a blind, independent audit. An independent blind read-back is still recommended before submission.

The file introduces, inside the namespace UnQuantumMechanics, the following objects over the real numbers, for a natural number nnn (including n=0n = 0n=0).

  • The index type for nnn degrees of freedom is the set of pairs (i,b)(i, b)(i,b) with i∈{0,…,n−1}i \in \{0, \dots, n-1\}i∈{0,…,n−1} and b∈{0,1}b \in \{0, 1\}b∈{0,1}; it has 2n2n2n elements, and all matrices below are indexed by it.
  • η0\eta_0η0​ is the real 2×22 \times 22×2 matrix with rows (0,1)(0, 1)(0,1) and (−1,0)(-1, 0)(−1,0).
  • γ0\gamma_0γ0​ (for a given nnn) is the Kronecker product of the n×nn\times nn×n identity with η0\eta_0η0​: its ((i,b),(j,c))((i,b),(j,c))((i,b),(j,c)) entry is δij (η0)bc\delta_{ij}\,(\eta_0)_{bc}δij​(η0​)bc​.
  • A matrix MMM is called Hamiltonian iff there exists a symmetric matrix AAA (AT=AA^T = AAT=A) with M=γ0AM = \gamma_0 AM=γ0​A.
  • A matrix CCC is called skew-Hamiltonian iff there exists BBB with BT=−BB^T = -BBT=−B and C=γ0BC = \gamma_0 BC=γ0​B.
  • A matrix MMM is called symplectic iff M γ0 MT=γ0M\,\gamma_0\,M^T = \gamma_0Mγ0​MT=γ0​.
  • For any matrix Σ\SigmaΣ, the matrix autocorr⁡(Σ)\operatorname{autocorr}(\Sigma)autocorr(Σ) is Σ γ0T\Sigma\,\gamma_0^TΣγ0T​.

No positivity, invertibility or symmetry is required of AAA beyond what is stated; in particular AAA need not be positive definite. When n=0n = 0n=0 all these matrices are the empty matrix and every predicate is trivially satisfied.

Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 8, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me