Paths of symplectic matrices, , and the Conley–Zehnder and Maslov indices
DefinitionConleyZehnder_SettingObjects for the Conley–Zehnder index of paths of symplectic matrices, following Gutt, §2.
- Symplectic group. has coordinates and
is the set of real matrices with , and . 2. Paths. is the set of continuous with and (Definition 4). A symplectic loop is a continuous with . 3. Endpoints. and . 4. Complex determinant. , , and (formula (9)). 5. Degree. A continuous is an argument of if for all . An extension of is a path in from to or . The integer is a value of the index of if for some extension and arguments of and of ,
i.e. for the concatenation of and . 6. Indices. is such a value (Definition 7 in the form of Corollary 12), and the Maslov index of a loop is an integer with for an argument of . 7. Signature and block sum. is the number of positive minus the number of negative eigenvalues of a symmetric . is the block embedding , . 8. The three characterizing properties for a map from paths to :
- Homotopy: is constant on each connected component of (compact-open topology).
- Loop: for every symplectic loop and every .
- Signature: for every symmetric nondegenerate whose eigenvalues all have absolute value .
Formalization Note Matrices are indexed by Fin n ⊕ Fin n; is Matrix.J and is Matrix.symplecticGroup. Paths are C(unitInterval, Mat n). czIndex and maslovIndex pick a value by choice and return if none exists; that the value exists and is unique is a separate theorem. Index maps are functions on all continuous paths, and the properties constrain them only on .
import Mathlib.LinearAlgebra.SymplecticGroup
import Mathlib.LinearAlgebra.Matrix.Block
import Mathlib.Analysis.Normed.Algebra.MatrixExponential
import Mathlib.Analysis.Matrix.Spectrum
import Mathlib.Analysis.SpecialFunctions.Complex.Circle
import Mathlib.Topology.Instances.Matrix
import Mathlib.Topology.ContinuousMap.Basic
import Mathlib.Topology.UnitInterval
import Mathlib.Topology.Connected.Basic
import Mathlib.Data.Real.Sign
/-!
# The Conley–Zehnder index of a path of symplectic matrices
Salamon–Zehnder (CPAM 45, 1992), §3; Salamon, *Lectures on Floer homology* (1999), §2.4;
in the form of Gutt, *Generalized Conley–Zehnder index*, Ann. Fac. Sci. Toulouse 23 (2014),
arXiv:1307.7239, §2: Definition 4 (`SP(n)`), Definition 7 with Corollary 12 (the index),
the Maslov index of a loop and the signature used in Proposition 8.
Conventions. `ℝ²ⁿ` is indexed by `Fin n ⊕ Fin n` (first block `q`, second block `p`).
`J₀ = [[0, -Id], [Id, 0]]` is Mathlib's `Matrix.J`. The symplectic group is Mathlib's
`Matrix.symplecticGroup`, `A J₀ Aᵀ = J₀`, which is the group `Sp(ℝ²ⁿ, Ω₀)`,
`Ω₀ = [[0, Id], [-Id, 0]] = -J₀`, of Gutt §2. Paths are continuous maps on `[0, 1]`.
The index is the degree of `ρ̂² ∘ ψ̃` (Gutt, Corollary 12, formula (8)), where `ψ̃` is `ψ`
followed by a path in `Sp*` ending at `W⁺` or `W⁻`, and `ρ̂(A)` is the normalized complex
determinant of the `ℂ`-linear part `½(A - J₀AJ₀)` (formula (9)). Under the identification
`(x, y) ↦ x + i y` of `ℝ²ⁿ` with `ℂⁿ`, `J₀` is multiplication by `i` and a real matrix
`[[X, -Y], [Y, X]]` is the complex matrix `X + i Y`.
-/
namespace ConleyZehnder
noncomputable section
open Matrix Classical
/-- Real `2n × 2n` matrices, indexed by `Fin n ⊕ Fin n`. -/
abbrev Mat (n : ℕ) := Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) ℝ
/-- `J₀ = [[0, -Id], [Id, 0]]`. -/
abbrev J₀ (n : ℕ) : Mat n := Matrix.J (Fin n) ℝ
variable {n : ℕ}
/-- `A ∈ Sp(ℝ²ⁿ, Ω₀)`. -/
def IsSymplectic (A : Mat n) : Prop := A ∈ Matrix.symplecticGroup (Fin n) ℝ
/-- `Sp*(ℝ²ⁿ, Ω₀)`: symplectic matrices without eigenvalue `1`. -/
def SpStar (n : ℕ) : Set (Mat n) := {A | IsSymplectic A ∧ (1 - A).det ≠ 0}
/-- Gutt, Definition 4: `SP(n)`, the continuous paths `ψ : [0, 1] → Sp(ℝ²ⁿ, Ω₀)` with
`ψ(0) = Id` such that `1` is not an eigenvalue of `ψ(1)`. -/
def SP (n : ℕ) : Set C(unitInterval, Mat n) :=
{ψ | (∀ t, IsSymplectic (ψ t)) ∧ ψ 0 = 1 ∧ (1 - ψ 1).det ≠ 0}
/-- A loop `φ : [0, 1] → Sp(ℝ²ⁿ, Ω₀)` with `φ(0) = φ(1) = Id`. -/
def IsSymplecticLoop (φ : C(unitInterval, Mat n)) : Prop :=
(∀ t, IsSymplectic (φ t)) ∧ φ 0 = 1 ∧ φ 1 = 1
/-- `W⁺ = -Id`. -/
def Wplus (n : ℕ) : Mat n := -1
/-- `W⁻ = diag(2, -1, …, -1, 1/2, -1, …, -1)`. -/
def Wminus (n : ℕ) : Mat n :=
Matrix.diagonal (Sum.elim (fun j : Fin n => if j.val = 0 then (2 : ℝ) else -1)
(fun j : Fin n => if j.val = 0 then (1 / 2 : ℝ) else -1))
/-- The `ℂ`-linear part `C_A = ½(A - J₀ A J₀)` of `A`. -/
def complexLinearPart (A : Mat n) : Mat n := (1 / 2 : ℝ) • (A - J₀ n * A * J₀ n)
/-- `det_ℂ C_A`: writing `C_A = [[X, -Y], [Y, X]]`, the determinant of the complex
`n × n` matrix `X + i Y`. -/
def complexLinearDet (A : Mat n) : ℂ :=
((complexLinearPart A).toBlocks₁₁.map (fun x : ℝ => (x : ℂ)) +
Complex.I • (complexLinearPart A).toBlocks₂₁.map (fun x : ℝ => (x : ℂ))).det
/-- Gutt (9): `ρ̂(A) = det_ℂ C_A / |det_ℂ C_A|`. -/
def rhoHat (A : Mat n) : ℂ := complexLinearDet A / (‖complexLinearDet A‖ : ℂ)
/-- `θ` is a continuous argument of `f : [0, 1] → S¹`: `f(t) = e^{i θ(t)}`. -/
def IsArgLift (f : unitInterval → ℂ) (θ : unitInterval → ℝ) : Prop :=
Continuous θ ∧ ∀ t, f t = Complex.exp ((θ t : ℂ) * Complex.I)
/-- `χ` continues `ψ` as in Gutt §2: it starts at `ψ(1)`, stays in `Sp*`, and ends at
`W⁺` or `W⁻`. (The extension `ψ̃ : [0, 2] → Sp` is `ψ` followed by `χ`.) -/
def IsSpStarExtension (ψ χ : C(unitInterval, Mat n)) : Prop :=
χ 0 = ψ 1 ∧ (∀ t, χ t ∈ SpStar n) ∧ (χ 1 = Wplus n ∨ χ 1 = Wminus n)
/-- `k = deg(ρ̂² ∘ ψ̃)` for some extension `ψ̃` of `ψ`: the total change of a continuous
argument of `ρ̂² ∘ ψ̃` along `ψ` followed by `χ` is `2π k`. -/
def IsCZValue (ψ : C(unitInterval, Mat n)) (k : ℤ) : Prop :=
∃ χ : C(unitInterval, Mat n), IsSpStarExtension ψ χ ∧
∃ θ₁ θ₂ : unitInterval → ℝ, IsArgLift (fun t => rhoHat (ψ t)) θ₁ ∧
IsArgLift (fun t => rhoHat (χ t)) θ₂ ∧
2 * ((θ₁ 1 - θ₁ 0) + (θ₂ 1 - θ₂ 0)) = 2 * Real.pi * k
/-- Gutt, Definition 7 / Corollary 12: the Conley–Zehnder index `μ_CZ(ψ) = deg(ρ̂² ∘ ψ̃)`. -/
def czIndex (ψ : C(unitInterval, Mat n)) : ℤ :=
if h : ∃ k, IsCZValue ψ k then h.choose else 0
/-- `k = deg(ρ̂ ∘ φ)` for a loop `φ`. -/
def IsMaslovValue (φ : C(unitInterval, Mat n)) (k : ℤ) : Prop :=
∃ θ : unitInterval → ℝ, IsArgLift (fun t => rhoHat (φ t)) θ ∧ θ 1 - θ 0 = 2 * Real.pi * k
/-- The Maslov index `μ(φ) = deg(ρ̂ ∘ φ)` of a loop of symplectic matrices. -/
def maslovIndex (φ : C(unitInterval, Mat n)) : ℤ :=
if h : ∃ k, IsMaslovValue φ k then h.choose else 0
/-- `Sign(S)`: the number of positive minus the number of negative eigenvalues of a
symmetric matrix, counted with multiplicity. -/
def signature (S : Mat n) (hS : S.IsHermitian) : ℤ :=
((Finset.univ.filter fun i => 0 < hS.eigenvalues i).card : ℤ) -
((Finset.univ.filter fun i => hS.eigenvalues i < 0).card : ℤ)
/-- The block-diagonal embedding `A' ⋄ A''` of `Sp(ℝ²ⁿ') × Sp(ℝ²ⁿ'')` into
`Sp(ℝ^{2(n'+n'')})`, `(q', p') ⊕ (q'', p'') ↦ (q', q'', p', p'')`. -/
def diamond {n' n'' : ℕ} (A : Mat n') (B : Mat n'') : Mat (n' + n'') :=
Matrix.reindex
((Equiv.sumSumSumComm (Fin n') (Fin n') (Fin n'') (Fin n'')).trans
(Equiv.sumCongr finSumFinEquiv finSumFinEquiv))
((Equiv.sumSumSumComm (Fin n') (Fin n') (Fin n'') (Fin n'')).trans
(Equiv.sumCongr finSumFinEquiv finSumFinEquiv))
(Matrix.fromBlocks A 0 0 B)
/-- (Homotopy) `μ` is constant on the connected components of `SP(n)`, a subspace of
`C([0, 1], ℝ^{2n×2n})` with the compact-open topology. -/
def HomotopyAxiom (μ : C(unitInterval, Mat n) → ℤ) : Prop :=
∀ ψ ∈ SP n, ∀ ψ' ∈ connectedComponentIn (SP n) ψ, μ ψ' = μ ψ
/-- (Loop) `μ(φψ) = μ(ψ) + 2 μ(φ)` for every loop `φ` at `Id` and every `ψ ∈ SP(n)`. -/
def LoopAxiom (μ : C(unitInterval, Mat n) → ℤ) : Prop :=
∀ φ, IsSymplecticLoop φ → ∀ ψ ∈ SP n, μ (φ * ψ) = μ ψ + 2 * maslovIndex φ
/-- (Signature) If `S = Sᵀ` is nondegenerate with all eigenvalues of absolute value
`< 2π` and `ψ(t) = exp(J₀ S t)`, then `μ(ψ) = ½ Sign(S)`. -/
def SignatureAxiom (μ : C(unitInterval, Mat n) → ℤ) : Prop :=
∀ (S : Mat n) (hS : S.IsHermitian), S.det ≠ 0 →
(∀ i, |hS.eigenvalues i| < 2 * Real.pi) →
∀ ψ : C(unitInterval, Mat n), (∀ t, ψ t = NormedSpace.exp ((t : ℝ) • (J₀ n * S))) →
2 * μ ψ = signature S hS
end
end ConleyZehnder
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Definition module (all definitions in one namespace, every allowed, including ).
Throughout, for a natural number (including ), denotes the real matrices whose rows and columns are indexed by two copies of : a first ("") block and a second ("") block. is the identity matrix. is the block matrix
A matrix is called symplectic if . A path is a continuous map (with the usual Euclidean topology on matrix entries); the set of paths carries the compact-open topology (equivalently the topology of uniform convergence). Products, inverses and transposes of paths below are always taken pointwise in . For all matrices are the empty matrix, whose determinant is .
Symplectic. is symplectic iff .
. is the set of symplectic with .
. is the set of paths such that is symplectic for every , , and .
Symplectic loop. A symplectic loop is a path with symplectic for every and .
. , and is the diagonal matrix whose -block diagonal is and whose -block diagonal is (the entry resp. sits at index ; all other diagonal entries are ). For , is the empty matrix.
Complex-linear part, its determinant, and . For , let . Let be the upper-left (-row, -column) block of and its lower-left (-row, -column) block, and set
the determinant of the complex matrix (equal to when ). Then
with the convention that division by zero gives , so whenever .
Argument lift. For a function , a function is called an argument lift of if is continuous and for every . (No lift exists if for some , e.g. if takes the junk value ; continuity of is not separately assumed.)
Extension through . For paths : is an extension of iff , for all , and .
CZ value. For a path and an integer , " is a CZ value of " means: there exist a path with , for all , and or ; and argument lifts of and of with
(The lifts are of itself, not of ; the factor appears only in this equation. No condition is part of this notion.)
Conley–Zehnder index. The index of a path is defined as: if some integer is a CZ value of , then is one such chosen by the axiom of choice (an unspecified one if several exist); if no CZ value exists, . It is defined for every path, not only those in .
Maslov value and Maslov index. For a path and an integer , " is a Maslov value of " means: there is an argument lift of with . The Maslov index is a choice-selected such if one exists (an unspecified one if several exist), and otherwise; it is defined for every path, not only loops.
Signature. For a real symmetric matrix (symmetric = Hermitian over ), let be its real eigenvalues listed with multiplicity. is the number of indices with minus the number with . (The eigenvalue list is the one supplied by the spectral theorem for the given symmetry proof; the counts do not depend on that choice.)
Block sum . For and , is the matrix obtained from the block-diagonal matrix (indexed by then ) by relabeling indices so that the new -block is and the new -block is . Concretely, for : the entry of is if , is if , and is otherwise.
Homotopy property. A function from paths in to satisfies the homotopy property if for every and every in the connected component of in (with the subspace topology inherited from the compact-open topology on paths), .
Loop property. satisfies the loop property if for every symplectic loop and every ,
where and is the specific Maslov index defined above (not something derived from ).
Signature property. satisfies the signature property if for every real symmetric with and all eigenvalues satisfying , and for every path with for all (matrix exponential, ), one has
Membership is not a hypothesis here. For the only such is the empty matrix (, ), so the property demands for the unique path.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.