Definitions for Normal Forms for Symplectic Matrices
DefinitionQAlgorithms_Papers_Independent_Intake100_P39The objects the formalized statements of Normal Forms for Symplectic Matrices (arXiv:1307.2403) are stated in. Each was checked against the paper by a blind read-back and a moderator.
RVecCVecrealEmbed: PDF p.2: actual inclusion of real vectors into the complexification.realShift: PDF p.17: shifted real endomorphism.eigenOrbit: PDF p.3, (1): a SET of eigenvalues, so coincidences are never repeated.primaryComplex: PDF p.7, (7): the constructed primary space over C; joins deduplicate.primaryReal: PDF pp.7–8: the REAL primary space, pulled back from (7).cyclicC: PDF pp.11–25: cyclic subspace constructed from the vector, not an input space.cyclicRrealPart: Real form of a conjugation-stable complex space, PDF pp.12,20,25.VectorHeight: PDF p.9: height of ONE vector, including nonzeroness.OrthogonalC: PDF p.7: symmetric orthogonality in the bilinear complex form.chainT: PDF p.10, (15): conjugate lambda and conjugate vector occur in slot two.realQ: PDF p.17, (21): real kernel-form expression; its domain is ker N^(2k).unitQ: PDF p.26, Definition 16: complex-linear first and conjugate-linear second.definiteIndex: Finite dimensional positive index; dimension is over the specified field. PDF pp.17,26. The finite range contains every possible subspace dimension.realInertia: Positive and negative inertia; zero eigenvalues do not contribute.unitInertia: PDF p.26: COMPLEX dimensions of Hermitian positive/negative subspaces.rankSignaturejordan: PDF pp.4,13: elementary upper Jordan matrix with superdiagonal ONE.lastDiagonal: PDF p.3: D(m,s), with only the LAST diagonal entry nonzero.realMultiplicationBlock: PDF p.13, (20): R(z)=[[Re z,-Im z],[Im z,Re z]].realJordan: PDF p.13, (20): JR(z,2k), indexed by interleaved two-coordinate blocks.signedBlock: PDF pp.4,17: signed Jordan symplectic block. Ordinary transpose.offComplexBlock: PDF pp.4,14: nonreal off-circle real block; argument is bar(lambda).vColumns: PDF p.26, (31): the stacked two-column matrix V, top exponent k.uColumns: PDF p.26, (32): U=V R(lambda).unitEvenBlock: PDF pp.20,25: the 4k by 4k odd-height block (k>=1 at use).unitOddBlock: PDF p.25: all four sectors of the (4k+2)-dimensional even-height block. For k=0 this is [[Re z,s Im z],[-s Im z,Re z]].unitBlock: PDF pp.25–26: one sign and one positive complex chain length m per block.HalfIndex: PDF p.2: variable-length sum with ALL e-coordinates before ALL f-coordinates.SymplecticSumIndexsumSector: PDF p.2: one sector of the dependent symplectic direct sum.symplecticBlockSum: PDF p.2: the actual symplectic direct sum, including the empty family.groupedOmega: PDF p.1: standard bilinear symplectic pairing for arbitrary grouped indices.RepresentsR: PDF pp.1,7: an ACTUAL symplectic basis of W, representing the ambient A. The matrix action equation also asserts invariance of W.BasisRepresentsC: PDF pp.3,20,24: a specific complex symplectic basis and its action matrix.RepresentsC: PDF p.3: complex version, with ordinary bilinear symplectic basis.RealNormal: PDF p.17: one real signed-block family with its genuine primary-space basis.UnitNormal: PDF pp.25–26: both unit-circle block families, encoded by parity of m.OffNormal: PDF pp.13–14: off-circle Jordan decomposition, with positive ordered lengths.kernelDim: Kernel dimensions are computed from A, PDF pp.6,18,26.SameInvariants: PDF p.6: redundant all-eigenvalue data, equivalent to consistent orbit representatives.SymplecticallyConjugate: PDF p.6: symplectic conjugacy in the SAME ambient coordinates.SameBlocks: PDF pp.18,26: equality of unordered signed block data is literal permutation.PrimaryDecomposition: PDF p.7: real-primary conclusions including complexification and direct sum.RealKernelCount: PDF pp.5,17: exact eigenspace count, including TWO for every zero sign.RealSignCounts: PDF pp.5,17: the positive AND negative sign counts at every block size.UnitSignCounts: PDF pp.6,26: each real 2m block contributes its sign to Q_m.SameRealData: PDF p.18: primary invariants, with no assumption that the forms are nondegenerate.SameUnitData: PDF p.26: the chosen eigenvalue z is held FIXED in comparisons.OffClassification: PDF pp.4,13–14: existence, maximal chain length, and determination by kernel data.RealClassification: PDF pp.5,17–18: all real-primary clauses of Theorem 1, including uniqueness.UnitClassification: PDF pp.5–6,25–26: both families, eigenspace count, inertia, and uniqueness.sectorDiagonal: PDF pp.20,24: ordinary block diagonal, used inside a symplectic sector.complexEvenBlock: PDF p.20, (23): the paired COMPLEX signed block.rectangularS: PDF p.24, (28): rectangular S; all entries, including the penultimate one.complexOddBlock: PDF p.24, (27): the unequal-sector COMPLEX signed block; ordinary transpose.PairedEvenRepresentation: PDF pp.19–20: conjugate-paired basis in (23), retaining the real structure.PairedOddRepresentation: PDF pp.23–24: conjugate-paired basis in (27); the central pair has factor -i*s.CatalogueBlock: PDF p.3: the three explicitly displayed catalogue families.catalogueSizecatalogueMatrixCatalogueValid: PDF pp.3–6: the catalogue is restricted to the source's spectral regimes.catalogueSign: PDF p.3: the integer carried by a catalogue block.signCharacteristic: PDF p.3: sign characteristic is the multiset of NONZERO signs.symplecticDiamond: PDF p.2: fixed two-summand coordinate permutation.
import Mathlib
import Definitions.Def_QAlgorithms_Papers_Independent_Gap50repair_P01
/-! Jean Gutt, Normal Forms for Symplectic Matrices, arXiv:1307.2403v2.
The ambient space is expressed in an arbitrary symplectic coordinate system;
this models every finite dimensional real symplectic space, including dimension zero.
The symplectic substrate reuses the pinned accepted library; new interfaces stay paper local.
Complex omega is BILINEAR.
Compilation is pending the batch mechanical check. -/
noncomputable section
open scoped BigOperators Matrix
namespace QAlgorithms.Papers.Independent.Intake100.P39
attribute [local instance] Classical.propDecidable Classical.decEq
-- Reuse only the pinned accepted substrate, with definitionally identical coordinate models.
-- The imported symplectic predicate preserves -Omega0, equivalent to preserving Omega0.
open QAlgorithms.Papers.Independent.Dependency50.P10 (complexify)
open QAlgorithms.Papers.Independent.Frontier30.P02 (IsSymplectic)
open QAlgorithms.Papers.Independent.Gap50repair.P01
(Coord GroupedRealMatrix omegaMatrix omegaR omegaC shifted generalizedSpace
IsEigenvalue HasNilpotentHeight restrictedKernel GeneralizedQuotient)
abbrev RVec (n : ℕ) := Coord n → ℝ
abbrev CVec (n : ℕ) := Coord n → ℂ
/-- PDF p.2: actual inclusion of real vectors into the complexification. -/
def realEmbed (n : ℕ) : RVec n →ₗ[ℝ] CVec n where
toFun v i := (v i : ℂ)
map_add' v w := by ext i; simp
map_smul' a v := by ext i; simp
/-- PDF p.17: shifted real endomorphism. -/
def realShift {n : ℕ} (A : GroupedRealMatrix n) (a : ℝ) : Module.End ℝ (RVec n) :=
Matrix.toLin' A - a • 1
/-- PDF p.3, (1): a SET of eigenvalues, so coincidences are never repeated. -/
def eigenOrbit (z : ℂ) : Finset ℂ := {z, z⁻¹, star z, (star z)⁻¹}
/-- PDF p.7, (7): the constructed primary space over C; joins deduplicate. -/
def primaryComplex {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) : Submodule ℂ (CVec n) :=
⨆ t ∈ eigenOrbit z, generalizedSpace A t
/-- PDF pp.7–8: the REAL primary space, pulled back from (7). -/
def primaryReal {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) : Submodule ℝ (RVec n) :=
((primaryComplex A z).restrictScalars ℝ).comap (realEmbed n)
/-- PDF pp.11–25: cyclic subspace constructed from the vector, not an input space. -/
def cyclicC {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (v : CVec n) : Submodule ℂ (CVec n) :=
Submodule.span ℂ (Set.range fun j : ℕ => (shifted A z ^ j) v)
def cyclicR {n : ℕ} (A : GroupedRealMatrix n) (a : ℝ) (v : RVec n) : Submodule ℝ (RVec n) :=
Submodule.span ℝ (Set.range fun j : ℕ => (realShift A a ^ j) v)
/-- Real form of a conjugation-stable complex space, PDF pp.12,20,25. -/
def realPart {n : ℕ} (W : Submodule ℂ (CVec n)) : Submodule ℝ (RVec n) :=
(W.restrictScalars ℝ).comap (realEmbed n)
/-- PDF p.9: height of ONE vector, including nonzeroness. -/
def VectorHeight {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (v : CVec n) (p : ℕ) : Prop :=
(shifted A z ^ p) v ≠ 0 ∧ (shifted A z ^ (p + 1)) v = 0
/-- PDF p.7: symmetric orthogonality in the bilinear complex form. -/
def OrthogonalC {n : ℕ} (W : Submodule ℂ (CVec n)) (v : CVec n) : Prop :=
∀ w ∈ W, omegaC v w = 0
/-- PDF p.10, (15): conjugate lambda and conjugate vector occur in slot two. -/
def chainT {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (v : CVec n) (i j : ℕ) : ℂ :=
(z ^ i * (star z) ^ j)⁻¹ *
omegaC ((shifted A z ^ i) v) ((shifted A (star z) ^ j) (star v))
/-- PDF p.17, (21): real kernel-form expression; its domain is ker N^(2k). -/
def realQ {n : ℕ} (A : GroupedRealMatrix n) (a : ℝ) (k : ℕ) (v w : RVec n) : ℝ :=
a * omegaR ((realShift A a ^ k) v) ((realShift A a ^ (k - 1)) w)
/-- PDF p.26, Definition 16: complex-linear first and conjugate-linear second. -/
def unitQ {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (m : ℕ) (v w : CVec n) : ℂ :=
if m % 2 = 0 then
z⁻¹ * omegaC ((shifted A z ^ (m / 2)) v)
((shifted A (star z) ^ (m / 2 - 1)) (star w))
else Complex.I * omegaC ((shifted A z ^ (m / 2)) v)
((shifted A (star z) ^ (m / 2)) (star w))
/-- Finite dimensional positive index; dimension is over the specified field.
PDF pp.17,26. The finite range contains every possible subspace dimension. -/
def definiteIndex (K : Type*) [Field K] {E : Type*} [AddCommGroup E]
[Module K E] [FiniteDimensional K E] (W : Submodule K E) (q : E → ℝ) : ℕ :=
((Finset.range (Module.finrank K E + 1)).filter fun d =>
∃ L : Submodule K E, L ≤ W ∧ Module.finrank K L = d ∧
∀ v ∈ L, v ≠ 0 → 0 < q v).sup id
/-- Positive and negative inertia; zero eigenvalues do not contribute. -/
def realInertia {n : ℕ} (A : GroupedRealMatrix n) (a : ℝ) (k : ℕ) : ℕ × ℕ :=
let W := LinearMap.ker (realShift A a ^ (2 * k))
(definiteIndex ℝ W (fun v => realQ A a k v v),
definiteIndex ℝ W (fun v => -realQ A a k v v))
/-- PDF p.26: COMPLEX dimensions of Hermitian positive/negative subspaces. -/
def unitInertia {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (m : ℕ) : ℕ × ℕ :=
let W := LinearMap.ker (shifted A z ^ m)
(definiteIndex ℂ W (fun v => (unitQ A z m v v).re),
definiteIndex ℂ W (fun v => -(unitQ A z m v v).re))
def rankSignature (pq : ℕ × ℕ) : ℕ × ℤ := (pq.1 + pq.2, (pq.1 : ℤ) - pq.2)
/-- PDF pp.4,13: elementary upper Jordan matrix with superdiagonal ONE. -/
def jordan {K : Type*} [Field K] (z : K) (m : ℕ) : Matrix (Fin m) (Fin m) K :=
fun i j => if i = j then z else if i.val + 1 = j.val then 1 else 0
/-- PDF p.3: D(m,s), with only the LAST diagonal entry nonzero. -/
def lastDiagonal {K : Type*} [Field K] (m : ℕ) (s : K) : Matrix (Fin m) (Fin m) K :=
Matrix.diagonal fun i => if i.val + 1 = m then s else 0
/-- PDF p.13, (20): R(z)=[[Re z,-Im z],[Im z,Re z]]. -/
def realMultiplicationBlock (z : ℂ) : Matrix (Fin 2) (Fin 2) ℝ :=
!![z.re, -z.im; z.im, z.re]
/-- PDF p.13, (20): JR(z,2k), indexed by interleaved two-coordinate blocks. -/
def realJordan (z : ℂ) (k : ℕ) : Matrix (Fin (2 * k)) (Fin (2 * k)) ℝ :=
fun i j => if i.val / 2 = j.val / 2 then
realMultiplicationBlock z ⟨i.val % 2, Nat.mod_lt _ (by omega)⟩ ⟨j.val % 2, Nat.mod_lt _ (by omega)⟩
else if i.val / 2 + 1 = j.val / 2 ∧ i.val % 2 = j.val % 2 then 1 else 0
/-- PDF pp.4,17: signed Jordan symplectic block. Ordinary transpose. -/
def signedBlock {K : Type*} [Field K] [DecidableEq K] (z : K) (m : ℕ) (s : K) :
Matrix (Coord m) (Coord m) K :=
Matrix.fromBlocks (jordan z m)⁻¹ ((jordan z m)⁻¹ * lastDiagonal m s) 0 (jordan z m).transpose
/-- PDF pp.4,14: nonreal off-circle real block; argument is bar(lambda). -/
def offComplexBlock (z : ℂ) (m : ℕ) : GroupedRealMatrix (2 * m) :=
Matrix.fromBlocks (realJordan (star z) m)⁻¹ 0 0 (realJordan (star z) m).transpose
/-- PDF p.26, (31): the stacked two-column matrix V, top exponent k. -/
def vColumns (z : ℂ) (k : ℕ) : Matrix (Fin (2 * k)) (Fin 2) ℝ :=
fun i j => (-1 : ℝ) ^ (k - i.val / 2 - 1) *
realMultiplicationBlock (z ^ (k - i.val / 2)) ⟨i.val % 2, Nat.mod_lt _ (by omega)⟩ j
/-- PDF p.26, (32): U=V R(lambda). -/
def uColumns (z : ℂ) (k : ℕ) : Matrix (Fin (2 * k)) (Fin 2) ℝ :=
vColumns z k * realMultiplicationBlock z
/-- PDF pp.20,25: the 4k by 4k odd-height block (k>=1 at use). -/
def unitEvenBlock (z : ℂ) (k : ℕ) (s : ℝ) : GroupedRealMatrix (2 * k) :=
Matrix.fromBlocks (realJordan (star z) k)⁻¹
(fun i j => if j.val + 2 ≥ 2 * k then
s * vColumns z k i ⟨j.val % 2, Nat.mod_lt _ (by omega)⟩ else 0)
0 (realJordan (star z) k).transpose
/-- PDF p.25: all four sectors of the (4k+2)-dimensional even-height block.
For k=0 this is [[Re z,s Im z],[-s Im z,Re z]]. -/
def unitOddBlock (z : ℂ) (k : ℕ) (s : ℝ) : GroupedRealMatrix (2 * k + 1) :=
let J := realJordan (star z) k
let V := vColumns z k
let U := uColumns z k
Matrix.fromBlocks
(fun i j => if hi : i.val < 2 * k then
if hj : j.val < 2 * k then J⁻¹ ⟨i.val, hi⟩ ⟨j.val, hj⟩
else s * U ⟨i.val, hi⟩ 1
else if j.val < 2 * k then 0 else z.re)
(fun i j => if hi : i.val < 2 * k then
if j.val < 2 * k then
if j.val + 2 ≥ 2 * k then
if j.val % 2 = 0 then s / 2 * V ⟨i.val, hi⟩ 1
else -s / 2 * V ⟨i.val, hi⟩ 0
else 0
else U ⟨i.val, hi⟩ 0
else if j.val < 2 * k then (if j.val + 2 = 2 * k then 1 else 0)
else s * z.im)
(fun i j => if i.val = 2 * k ∧ j.val = 2 * k then -s * z.im else 0)
(fun i j => if hi : i.val < 2 * k then
if hj : j.val < 2 * k then J.transpose ⟨i.val, hi⟩ ⟨j.val, hj⟩ else 0
else if j.val < 2 * k then (if j.val + 1 = 2 * k then -s else 0)
else z.re)
/-- PDF pp.25–26: one sign and one positive complex chain length m per block. -/
def unitBlock (z : ℂ) (m : ℕ) (s : ℝ) : GroupedRealMatrix m :=
if h : m % 2 = 0 then
Matrix.reindex (Equiv.sumCongr (finCongr (by omega : 2 * (m / 2) = m))
(finCongr (by omega : 2 * (m / 2) = m)))
(Equiv.sumCongr (finCongr (by omega : 2 * (m / 2) = m))
(finCongr (by omega : 2 * (m / 2) = m))) (unitEvenBlock z (m / 2) s)
else
Matrix.reindex (Equiv.sumCongr (finCongr (by omega : 2 * (m / 2) + 1 = m))
(finCongr (by omega : 2 * (m / 2) + 1 = m)))
(Equiv.sumCongr (finCongr (by omega : 2 * (m / 2) + 1 = m))
(finCongr (by omega : 2 * (m / 2) + 1 = m))) (unitOddBlock z (m / 2) s)
/-- PDF p.2: variable-length sum with ALL e-coordinates before ALL f-coordinates. -/
abbrev HalfIndex {L : ℕ} (r : Fin L → ℕ) := (j : Fin L) × Fin (r j)
abbrev SymplecticSumIndex {L : ℕ} (r : Fin L → ℕ) := HalfIndex r ⊕ HalfIndex r
/-- PDF p.2: one sector of the dependent symplectic direct sum. -/
def sumSector {K : Type*} [Zero K] {L : ℕ} (r : Fin L → ℕ)
(M : (j : Fin L) → Matrix (Coord (r j)) (Coord (r j)) K)
(a b : Bool) (i j : HalfIndex r) : K :=
if h : i.1 = j.1 then
M i.1 (if a then Sum.inr i.2 else Sum.inl i.2)
(if b then Sum.inr (Fin.cast (congrArg r h.symm) j.2)
else Sum.inl (Fin.cast (congrArg r h.symm) j.2))
else 0
/-- PDF p.2: the actual symplectic direct sum, including the empty family. -/
def symplecticBlockSum {K : Type*} [Zero K] {L : ℕ} (r : Fin L → ℕ)
(M : (j : Fin L) → Matrix (Coord (r j)) (Coord (r j)) K) :
Matrix (SymplecticSumIndex r) (SymplecticSumIndex r) K :=
Matrix.fromBlocks (sumSector r M false false) (sumSector r M false true)
(sumSector r M true false) (sumSector r M true true)
/-- PDF p.1: standard bilinear symplectic pairing for arbitrary grouped indices. -/
def groupedOmega {K : Type*} [CommRing K] {H : Type*} [Fintype H]
(v w : H ⊕ H → K) : K :=
∑ i, (v (Sum.inl i) * w (Sum.inr i) - v (Sum.inr i) * w (Sum.inl i))
/-- PDF pp.1,7: an ACTUAL symplectic basis of W, representing the ambient A.
The matrix action equation also asserts invariance of W. -/
def RepresentsR {n : ℕ} (A : GroupedRealMatrix n) (W : Submodule ℝ (RVec n))
{H : Type*} [Fintype H] [DecidableEq H]
(M : Matrix (H ⊕ H) (H ⊕ H) ℝ) : Prop :=
∃ b : Module.Basis (H ⊕ H) ℝ W,
(∀ i j, omegaR (b i).val (b j).val =
groupedOmega (Pi.single i 1) (Pi.single j 1)) ∧
∀ j, A.mulVec (b j).val = ∑ i, M i j • (b i).val
/-- PDF pp.3,20,24: a specific complex symplectic basis and its action matrix. -/
def BasisRepresentsC {n : ℕ} (A : GroupedRealMatrix n) (W : Submodule ℂ (CVec n))
{H : Type*} [Fintype H] [DecidableEq H] (b : Module.Basis (H ⊕ H) ℂ W)
(M : Matrix (H ⊕ H) (H ⊕ H) ℂ) : Prop :=
(∀ i j, omegaC (b i).val (b j).val =
groupedOmega (Pi.single i 1) (Pi.single j 1)) ∧
∀ j, (complexify A).mulVec (b j).val = ∑ i, M i j • (b i).val
/-- PDF p.3: complex version, with ordinary bilinear symplectic basis. -/
def RepresentsC {n : ℕ} (A : GroupedRealMatrix n) (W : Submodule ℂ (CVec n))
{H : Type*} [Fintype H] [DecidableEq H]
(M : Matrix (H ⊕ H) (H ⊕ H) ℂ) : Prop :=
∃ b : Module.Basis (H ⊕ H) ℂ W, BasisRepresentsC A W b M
/-- PDF p.17: one real signed-block family with its genuine primary-space basis. -/
def RealNormal {n L : ℕ} (A : GroupedRealMatrix n) (a : ℝ) (r : Fin L → ℕ) (s : Fin L → ℤ) : Prop :=
(∀ j, 0 < r j ∧ (s j = 0 ∨ s j = 1 ∨ s j = -1) ∧
(s j = 0 → Odd (r j))) ∧
RepresentsR A (primaryReal A (a : ℂ)) (symplecticBlockSum r fun j => signedBlock a (r j) (s j : ℝ))
/-- PDF pp.25–26: both unit-circle block families, encoded by parity of m. -/
def UnitNormal {n L : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (m : Fin L → ℕ) (s : Fin L → ℤ) : Prop :=
(∀ j, 0 < m j ∧ (s j = 1 ∨ s j = -1)) ∧
RepresentsR A (primaryReal A z) (symplecticBlockSum m fun j => unitBlock z (m j) (s j : ℝ))
/-- PDF pp.13–14: off-circle Jordan decomposition, with positive ordered lengths. -/
def OffNormal {n L : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (q : Fin L → ℕ) : Prop :=
(∀ j, 0 < q j) ∧ Antitone q ∧
if z.im = 0 then
RepresentsR A (primaryReal A z) (symplecticBlockSum q fun j => signedBlock z.re (q j) 0)
else RepresentsR A (primaryReal A z)
(symplecticBlockSum (fun j => 2 * q j) fun j => offComplexBlock z (q j))
/-- Kernel dimensions are computed from A, PDF pp.6,18,26. -/
def kernelDim {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) (r : ℕ) : ℕ :=
Module.finrank ℂ (LinearMap.ker (shifted A z ^ r))
/-- PDF p.6: redundant all-eigenvalue data, equivalent to consistent orbit representatives. -/
def SameInvariants {n : ℕ} (A B : GroupedRealMatrix n) : Prop :=
(∀ z, IsEigenvalue A z ↔ IsEigenvalue B z) ∧
(∀ z, ∀ r ≥ 1, kernelDim A z r = kernelDim B z r) ∧
(∀ a : ℝ, (a = 1 ∨ a = -1) → ∀ k ≥ 1,
rankSignature (realInertia A a k) = rankSignature (realInertia B a k)) ∧
(∀ z : ℂ, ‖z‖ = 1 → z ≠ 1 → z ≠ -1 → ∀ m ≥ 1,
rankSignature (unitInertia A z m) = rankSignature (unitInertia B z m))
/-- PDF p.6: symplectic conjugacy in the SAME ambient coordinates. -/
def SymplecticallyConjugate {n : ℕ} (A B : GroupedRealMatrix n) : Prop :=
∃ P : GroupedRealMatrix n, IsSymplectic P ∧ B * P = P * A
/-- PDF pp.18,26: equality of unordered signed block data is literal permutation. -/
def SameBlocks {L K : ℕ} (r : Fin L → ℕ) (s : Fin L → ℤ)
(t : Fin K → ℕ) (u : Fin K → ℤ) : Prop :=
∃ e : Fin L ≃ Fin K, ∀ j, r j = t (e j) ∧ s j = u (e j)
/-- PDF p.7: real-primary conclusions including complexification and direct sum. -/
def PrimaryDecomposition {n : ℕ} (A : GroupedRealMatrix n) : Prop :=
(∀ z, Submodule.span ℂ (realEmbed n '' (primaryReal A z : Set (RVec n))) =
primaryComplex A z) ∧
(∀ z, ∀ v ∈ primaryReal A z, A.mulVec v ∈ primaryReal A z) ∧
(∀ z, ∀ v ∈ primaryReal A z,
(∀ w ∈ primaryReal A z, omegaR v w = 0) → v = 0) ∧
∃ S : Finset ℂ,
(∀ z ∈ S, IsEigenvalue A z) ∧
(∀ z, IsEigenvalue A z → ∃ t ∈ S, z ∈ eigenOrbit t) ∧
(∀ z ∈ S, ∀ t ∈ S, z ≠ t → Disjoint (eigenOrbit z) (eigenOrbit t)) ∧
(⨆ z ∈ S, primaryReal A z) = ⊤ ∧
(∀ z ∈ S, Disjoint (primaryReal A z) (⨆ t ∈ S.erase z, primaryReal A t)) ∧
∀ z ∈ S, ∀ t ∈ S, z ≠ t → ∀ v ∈ primaryReal A z,
∀ w ∈ primaryReal A t, omegaR v w = 0
/-- Sanity: the Jordan convention has superdiagonal +1, PDF p.13. -/
example (a : ℝ) : jordan a 2 0 1 = 1 := by simp [jordan]
/-- Sanity: the two-dimensional signed block is [[1,s],[0,1]], PDF p.17. -/
example (s : ℝ) : lastDiagonal 1 s 0 0 = s := by simp [lastDiagonal]
/-- Sanity: the realification convention has upper-right -Im z, PDF p.13. -/
example (z : ℂ) : realMultiplicationBlock z 0 1 = -z.im := rfl
/-- Sanity: odd-size unit block at k=0 is the signed planar rotation, PDF p.25. -/
example (z : ℂ) (s : ℝ) :
unitOddBlock z 0 s (Sum.inl 0) (Sum.inr 0) = s * z.im := by
simp [unitOddBlock, Matrix.fromBlocks]
/-- PDF pp.5,17: exact eigenspace count, including TWO for every zero sign. -/
def RealKernelCount {n L : ℕ} (A : GroupedRealMatrix n) (a : ℝ) (s : Fin L → ℤ) : Prop :=
kernelDim A (a : ℂ) 1 =
2 * (Finset.univ.filter fun j => s j = 0).card +
(Finset.univ.filter fun j => s j ≠ 0).card
/-- PDF pp.5,17: the positive AND negative sign counts at every block size. -/
def RealSignCounts {n L : ℕ} (A : GroupedRealMatrix n) (a : ℝ)
(r : Fin L → ℕ) (s : Fin L → ℤ) : Prop :=
∀ k ≥ 1, (realInertia A a k).1 =
(Finset.univ.filter fun j => r j = k ∧ s j = 1).card ∧
(realInertia A a k).2 =
(Finset.univ.filter fun j => r j = k ∧ s j = -1).card
/-- PDF pp.6,26: each real 2m block contributes its sign to Q_m. -/
def UnitSignCounts {n L : ℕ} (A : GroupedRealMatrix n) (z : ℂ)
(m : Fin L → ℕ) (s : Fin L → ℤ) : Prop :=
∀ t ≥ 1, (unitInertia A z t).1 =
(Finset.univ.filter fun j => m j = t ∧ s j = 1).card ∧
(unitInertia A z t).2 =
(Finset.univ.filter fun j => m j = t ∧ s j = -1).card
/-- PDF p.18: primary invariants, with no assumption that the forms are nondegenerate. -/
def SameRealData {n N : ℕ} (A : GroupedRealMatrix n) (B : GroupedRealMatrix N) (a : ℝ) : Prop :=
(∀ r ≥ 1, kernelDim A (a : ℂ) r = kernelDim B (a : ℂ) r) ∧
∀ k ≥ 1, rankSignature (realInertia A a k) = rankSignature (realInertia B a k)
/-- PDF p.26: the chosen eigenvalue z is held FIXED in comparisons. -/
def SameUnitData {n N : ℕ} (A : GroupedRealMatrix n) (B : GroupedRealMatrix N) (z : ℂ) : Prop :=
(∀ r ≥ 1, kernelDim A z r = kernelDim B z r) ∧
∀ m ≥ 1, rankSignature (unitInertia A z m) = rankSignature (unitInertia B z m)
/-- PDF pp.4,13–14: existence, maximal chain length, and determination by kernel data. -/
def OffClassification {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) : Prop :=
∃ q : Fin (kernelDim A z 1) → ℕ,
OffNormal A z q ∧
(∀ p, HasNilpotentHeight A z p → Finset.univ.sup q = p + 1) ∧
∀ (N K : ℕ) (B : GroupedRealMatrix N) (t : Fin K → ℕ),
IsSymplectic B → OffNormal B z t →
(∀ r ≥ 1, kernelDim A z r = kernelDim B z r) →
SameBlocks q (fun _ => 0) t (fun _ => 0)
/-- PDF pp.5,17–18: all real-primary clauses of Theorem 1, including uniqueness. -/
def RealClassification {n : ℕ} (A : GroupedRealMatrix n) (a : ℝ) : Prop :=
∃ (L : ℕ) (r : Fin L → ℕ) (s : Fin L → ℤ),
RealNormal A a r s ∧ RealKernelCount A a s ∧ RealSignCounts A a r s ∧
∀ (N K : ℕ) (B : GroupedRealMatrix N) (t : Fin K → ℕ) (u : Fin K → ℤ),
IsSymplectic B → RealNormal B a t u → SameRealData A B a → SameBlocks r s t u
/-- PDF pp.5–6,25–26: both families, eigenspace count, inertia, and uniqueness. -/
def UnitClassification {n : ℕ} (A : GroupedRealMatrix n) (z : ℂ) : Prop :=
∃ (L : ℕ) (m : Fin L → ℕ) (s : Fin L → ℤ),
UnitNormal A z m s ∧ kernelDim A z 1 = L ∧ UnitSignCounts A z m s ∧
∀ (N K : ℕ) (B : GroupedRealMatrix N) (t : Fin K → ℕ) (u : Fin K → ℤ),
IsSymplectic B → UnitNormal B z t u → SameUnitData A B z → SameBlocks m s t u
/-- PDF pp.20,24: ordinary block diagonal, used inside a symplectic sector. -/
def sectorDiagonal {K : Type*} [Zero K] {a b : ℕ}
(P : Matrix (Fin a) (Fin a) K) (Q : Matrix (Fin b) (Fin b) K) :
Matrix (Fin a ⊕ Fin b) (Fin a ⊕ Fin b) K := Matrix.fromBlocks P 0 0 Q
/-- PDF p.20, (23): the paired COMPLEX signed block. -/
def complexEvenBlock (z : ℂ) (k : ℕ) (s : ℂ) :
Matrix ((Fin k ⊕ Fin k) ⊕ (Fin k ⊕ Fin k))
((Fin k ⊕ Fin k) ⊕ (Fin k ⊕ Fin k)) ℂ :=
let P := sectorDiagonal (jordan (star z) k) (jordan z k)
let D := lastDiagonal k s
Matrix.fromBlocks P⁻¹ (P⁻¹ * Matrix.fromBlocks 0 D D 0) 0 P.transpose
/-- PDF p.24, (28): rectangular S; all entries, including the penultimate one. -/
def rectangularS (z : ℂ) (k : ℕ) (s : ℂ) : Matrix (Fin k) (Fin (k + 1)) ℂ :=
fun i j => if i.val + 1 = k then
if j.val = k then z * Complex.I * s
else if j.val + 1 = k then Complex.I * s / 2 else 0
else 0
/-- PDF p.24, (27): the unequal-sector COMPLEX signed block; ordinary transpose. -/
def complexOddBlock (z : ℂ) (k : ℕ) (s : ℂ) :
Matrix ((Fin k ⊕ Fin (k + 1)) ⊕ (Fin k ⊕ Fin (k + 1)))
((Fin k ⊕ Fin (k + 1)) ⊕ (Fin k ⊕ Fin (k + 1))) ℂ :=
let P := sectorDiagonal (jordan (star z) k) (jordan z (k + 1))
let S := rectangularS z k s
Matrix.fromBlocks P⁻¹ (P⁻¹ * Matrix.fromBlocks 0 S S.transpose 0) 0 P.transpose
/-- PDF pp.19–20: conjugate-paired basis in (23), retaining the real structure. -/
def PairedEvenRepresentation {n : ℕ} (A : GroupedRealMatrix n) (W : Submodule ℂ (CVec n))
(z : ℂ) (k : ℕ) (s : ℤ) : Prop :=
∃ b : Module.Basis ((Fin k ⊕ Fin k) ⊕ (Fin k ⊕ Fin k)) ℂ W,
BasisRepresentsC A W b (complexEvenBlock z k (s : ℂ)) ∧
(∀ i, (b (Sum.inl (Sum.inr i))).val = star (b (Sum.inl (Sum.inl i))).val) ∧
∀ i, (b (Sum.inr (Sum.inr i))).val = star (b (Sum.inr (Sum.inl i))).val
/-- PDF pp.23–24: conjugate-paired basis in (27); the central pair has factor -i*s. -/
def PairedOddRepresentation {n : ℕ} (A : GroupedRealMatrix n) (W : Submodule ℂ (CVec n))
(z : ℂ) (k : ℕ) (s : ℤ) : Prop :=
∃ b : Module.Basis ((Fin k ⊕ Fin (k + 1)) ⊕ (Fin k ⊕ Fin (k + 1))) ℂ W,
BasisRepresentsC A W b (complexOddBlock z k (s : ℂ)) ∧
(∀ i : Fin k, (b (Sum.inl (Sum.inr i.castSucc))).val =
star (b (Sum.inl (Sum.inl i))).val) ∧
(∀ i : Fin k, (b (Sum.inr (Sum.inr i.castSucc))).val =
star (b (Sum.inr (Sum.inl i))).val) ∧
(b (Sum.inl (Sum.inr (Fin.last k)))).val =
(-Complex.I * (s : ℂ)) • star (b (Sum.inr (Sum.inr (Fin.last k)))).val
/-- PDF p.3: the three explicitly displayed catalogue families. -/
inductive CatalogueBlock where
| single (z : ℂ) (k : ℕ) (s : ℤ)
| paired (z : ℂ) (k : ℕ) (s : ℤ)
| unequal (z : ℂ) (k : ℕ) (s : ℤ)
def catalogueSize : CatalogueBlock → ℕ
| .single _ k _ => k
| .paired _ k _ => k + k
| .unequal _ k _ => k + (k + 1)
def catalogueMatrix (c : CatalogueBlock) :
Matrix (Coord (catalogueSize c)) (Coord (catalogueSize c)) ℂ :=
match c with
| .single z k s => signedBlock z k (s : ℂ)
| .paired z k s => Matrix.reindex (Equiv.sumCongr finSumFinEquiv finSumFinEquiv)
(Equiv.sumCongr finSumFinEquiv finSumFinEquiv) (complexEvenBlock z k (s : ℂ))
| .unequal z k s => Matrix.reindex (Equiv.sumCongr finSumFinEquiv finSumFinEquiv)
(Equiv.sumCongr finSumFinEquiv finSumFinEquiv) (complexOddBlock z k (s : ℂ))
/-- PDF pp.3–6: the catalogue is restricted to the source's spectral regimes. -/
def CatalogueValid {n : ℕ} (A : GroupedRealMatrix n) : CatalogueBlock → Prop
| .single z k s => IsEigenvalue A z ∧ 0 < k ∧ z.im = 0 ∧
((‖z‖ ≠ 1 ∧ s = 0) ∨
((z = 1 ∨ z = -1) ∧ (s = 0 ∨ s = 1 ∨ s = -1) ∧ (s = 0 → Odd k)))
| .paired z k s => IsEigenvalue A z ∧ 0 < k ∧ z.im ≠ 0 ∧
((‖z‖ ≠ 1 ∧ s = 0) ∨ (‖z‖ = 1 ∧ (s = 1 ∨ s = -1)))
| .unequal z _ s => IsEigenvalue A z ∧ ‖z‖ = 1 ∧ z.im ≠ 0 ∧ (s = 1 ∨ s = -1)
/-- PDF p.3: the integer carried by a catalogue block. -/
def catalogueSign : CatalogueBlock → ℤ
| .single _ _ s => s
| .paired _ _ s => s
| .unequal _ _ s => s
/-- PDF p.3: sign characteristic is the multiset of NONZERO signs. -/
def signCharacteristic {L : ℕ} (c : Fin L → CatalogueBlock) : Multiset ℤ :=
(((Finset.univ : Finset (Fin L)).val.map fun j => catalogueSign (c j))).filter
(fun s => s ≠ 0)
/-- PDF p.2: fixed two-summand coordinate permutation. -/
def symplecticDiamond {k l : ℕ} (A : GroupedRealMatrix k) (B : GroupedRealMatrix l) :
Matrix ((Fin k ⊕ Fin l) ⊕ (Fin k ⊕ Fin l))
((Fin k ⊕ Fin l) ⊕ (Fin k ⊕ Fin l)) ℝ :=
Matrix.fromBlocks
(sectorDiagonal (A.submatrix Sum.inl Sum.inl) (B.submatrix Sum.inl Sum.inl))
(sectorDiagonal (A.submatrix Sum.inl Sum.inr) (B.submatrix Sum.inl Sum.inr))
(sectorDiagonal (A.submatrix Sum.inr Sum.inl) (B.submatrix Sum.inr Sum.inl))
(sectorDiagonal (A.submatrix Sum.inr Sum.inr) (B.submatrix Sum.inr Sum.inr))
end QAlgorithms.Papers.Independent.Intake100.P39
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intake100.P39.BasisRepresentsC
For any natural number , including , let be a real matrix, let be a complex linear subspace of , let be a finite index type with decidable equality, let be a complex basis of , and let be a complex matrix indexed by . Define the complex bilinear form
and define by the same formula with the sum indexed by . The predicate says that, viewing each as a vector in , both
where is the coordinate vector at and is obtained by treating the entries of as complex numbers. In particular, the form used here is bilinear, without complex conjugation. If is empty, the given basis forces , and both conditions are vacuous.
QAlgorithms.Papers.Independent.Intake100.P39.CVec
For every natural number , is the complex vector space of functions from the disjoint union of two copies of to , hence the space of complex vectors with labeled coordinates. This includes , when the coordinate set is empty and the vector space contains only the zero vector.
QAlgorithms.Papers.Independent.Intake100.P39.CatalogueBlock
This defines a type whose elements have exactly one of three distinct forms: , , or , where is any complex number, is any natural number, and is any integer. There are no restrictions on these parameters: , , and arbitrary integer values of are included. Each constructor is injective in its parameters, and elements made with different constructors are distinct.
QAlgorithms.Papers.Independent.Intake100.P39.CatalogueValid
For every natural number and every real matrix , this defines a predicate on catalogue elements. Write for the same matrix with complex entries; saying that is an eigenvalue means that there exists , , with . A single element is valid exactly when is such an eigenvalue, , , and either and , or , , and implies that is odd. A paired element is valid exactly when is an eigenvalue, , , and either and , or and . An unequal element is valid exactly when is an eigenvalue, , , and ; this case places no restriction on , so is included. No symplectic hypothesis on is part of this definition. When , there is no nonzero eigenvector, so no catalogue element is valid.
QAlgorithms.Papers.Independent.Intake100.P39.HalfIndex
For every natural number and function , this abbreviates the index type consisting of pairs with and . Its cardinality is ; an index with contributes no pairs, and gives an empty index type.
QAlgorithms.Papers.Independent.Intake100.P39.OffClassification
For every natural number , real matrix , and , this predicate asserts the existence of a list of natural numbers, where , with the following properties. To specify them, for any real matrix write , , and
Repeated elements of the displayed orbit contribute only once. A list is required to have positive entries and to be nonincreasing, and to give the following representation of on : there is a real basis grouped into pairs of sectors, with and , in which entries between different block labels vanish and each block is
Here has on its diagonal, ones immediately above the diagonal, and zeros elsewhere; has diagonal blocks \begin{psmallmatrix}\operatorname{Re}\lambda&-\operatorname{Im}\lambda\\\operatorname{Im}\lambda&\operatorname{Re}\lambda\end{psmallmatrix}, identity blocks immediately above the block diagonal, and zeros elsewhere. The two sector lengths for block are in the real case and otherwise. The asserted list gives this representation for ; for every natural , if some satisfies and every satisfies , then , with the maximum of an empty list defined as zero; and, for every pair of natural numbers , real matrix , and list , if , where \Omega_N=\begin{psmallmatrix}0&I\\-I&0\end{psmallmatrix}, if gives the representation just described for , and if for every natural , then there is a bijection with for every . No symplecticity assumption on , eigenvalue assumption on , or restriction on is included; zero dimensions and empty lists are allowed. Scalar inverses send zero to zero, and singular square matrix inverses are zero.
QAlgorithms.Papers.Independent.Intake100.P39.OffNormal
For natural numbers , a real matrix , a complex number , and natural numbers indexed by , this predicate requires every and whenever . Define and
where is the entrywise complexification. If , set and
where has on the diagonal, immediately above it, and zeros elsewhere. If , set and
where is the block matrix with on the diagonal, immediately above that diagonal, and zeros elsewhere. In the applicable case, there must be a real basis of , indexed by , , and , such that
with reversed pairings negative, where . There is no separate requirement that be symplectic, that be an eigenvalue, or that . The value is included: its reciprocal is , and singular matrix inverses are . Empty block families are allowed and require .
QAlgorithms.Papers.Independent.Intake100.P39.OrthogonalC
For every natural number , every complex subspace of the vectors indexed by the disjoint union of two copies of , and every complex vector on that coordinate set, means that for every ,
The displayed pairing is complex bilinear and uses no complex conjugation. The condition holds for and for ; when , the sum is empty and the condition holds.
QAlgorithms.Papers.Independent.Intake100.P39.PairedEvenRepresentation
For any natural numbers , real matrix , complex linear subspace , complex number , and integer , this predicate asserts that has a complex basis
with the following properties. For the complex bilinear form , its pairings are the standard grouped symplectic pairings: , all pairings within the first vectors or within the last vectors vanish, and the mixed pairings and vanish. The matrix of on this ordered basis is
where has diagonal , superdiagonal entries one, and zeros elsewhere, and is diagonal with last entry , viewed in , and all other entries zero. Explicitly, for every basis vector , . Finally, and for every , with componentwise conjugation. No symplecticity assumption on , eigenvalue or modulus assumption on , or sign restriction on is included. Matrix inverses are total and vanish on singular matrices. The case requires and has no basis vectors or conjugation conditions; is also allowed.
QAlgorithms.Papers.Independent.Intake100.P39.PairedOddRepresentation
For any natural numbers , real matrix , complex linear subspace , complex number , and integer , this predicate asserts that has a complex basis
such that, for , the pairings are , , all pairings within the first vectors or within the last vectors vanish, and mixed pairings between an untilded vector in the first sector and a tilded vector in the second sector, or vice versa, vanish. The matrix of on this ordered basis is
where has diagonal , superdiagonal entries one, and all other entries zero, while is , zero except for and when ; when , has no rows. The matrix assertion means for every basis vector. The additional componentwise conjugation identities are
The transposes are ordinary transposes, and square matrix inverses are total, vanishing for singular matrices. No symplecticity assumption on , eigenvalue or unit circle condition on , or prescribed sign of is included; however, makes the last displayed identity force a basis vector to be zero, so the predicate cannot then hold. The case still requires a two-vector basis of , with matrix and the last conjugation identity; cannot accommodate the required basis vectors.
QAlgorithms.Papers.Independent.Intake100.P39.PrimaryDecomposition
For any natural number , including , and any real matrix , let be its entrywise complexification, and, for every , define
The orbit is a set, so repeated values occur only once, and . With
the predicate requires, for every complex , that the complex span of equal , that for every , and that any satisfying for every be zero. It also requires a finite set such that every has a nonzero vector with ; every complex number having such an eigenvector belongs to for some ; for distinct ; and
Finally, for distinct , every and must satisfy . No symplectic hypothesis on is separately imposed. Empty sums mean the zero subspace; when , the generalized kernels are zero because the exponent is , and the empty set satisfies the requirements.
QAlgorithms.Papers.Independent.Intake100.P39.RVec
For every natural number , is the real vector space of functions from the disjoint union of two copies of to , hence the space of real vectors with labeled coordinates. This includes , when the coordinate set is empty and the vector space contains only the zero vector.
QAlgorithms.Papers.Independent.Intake100.P39.RealClassification
For any natural number , real matrix , and real number , this predicate asserts that there exist a natural number , positive natural numbers , and integers , indexed by , with the following representation, counting, and uniqueness properties. For a real matrix , write , , and
Each belongs to , and implies that is odd. There is a real basis , , of with pairings and zero pairings between two 's or two 's, in which the matrix of has zero entries between different block labels and block equal to
Here has diagonal , superdiagonal entries one, and all other entries zero, while is diagonal with only its last entry equal to . For , define to be the maximum real dimension of a real subspace of on which for every nonzero ; zero subspaces are allowed. The required counts are
Finally, for every natural , real matrix , list , and list , if , if satisfy the same positivity, sign, oddness, and basis representation conditions for on , if for every , and if
with integer differences, then there is a bijection satisfying and . The predicate imposes no symplecticity assumption on , no requirement that , and no eigenvalue assumption; , , and are included. Inverses are total, with scalar zero inverse zero and singular square matrix inverse zero.
QAlgorithms.Papers.Independent.Intake100.P39.RealKernelCount
For any natural numbers , any real matrix , any real number , and any integer list , this predicate is the equality
where is the entrywise complexification and is viewed as a complex scalar on the left. Each zero list entry contributes twice and each nonzero integer entry contributes once, regardless of its value. No symplectic assumption, eigenvalue assumption, or restriction is imposed. Both dimensions and list lengths may be zero; in particular, an empty list requires the displayed kernel to have dimension .
QAlgorithms.Papers.Independent.Intake100.P39.RealNormal
For natural numbers , a real matrix , a real number , natural numbers and integers indexed by , this predicate requires , , and odd whenever . Write for the entrywise complexification, set , and let
It further requires a real basis of , indexed by , , and , whose pairings under
satisfy , with pairings between two first-half or two second-half vectors zero and the reversed pairings negative. In this basis, acts separately on each -block by
where is the matrix with diagonal entries , entries immediately above the diagonal, and all other entries zero, while is diagonal with last entry and all other entries zero; explicitly,
The number is unrestricted, including ; the scalar reciprocal of is , and a singular matrix has total matrix inverse . No eigenvalue or symplectic hypothesis on is separately imposed. Both and are allowed; when , the basis requirement means .
QAlgorithms.Papers.Independent.Intake100.P39.RealSignCounts
For any natural numbers , any real matrix , any real number , any natural-number list , and any integer list , define, for every natural ,
Let be the largest real dimension of a real linear subspace of on which is strictly positive at every nonzero vector, and let be the corresponding largest dimension for ; the zero subspace is included in both maxima. The predicate requires, for every natural ,
There are no conditions at , and no separate requirements that the be positive, that the lie in , that , or that be symplectic. Thus entries with , or with , are not counted in these equalities. The cases and are included.
QAlgorithms.Papers.Independent.Intake100.P39.RepresentsC
For any natural number , including , any real matrix , any complex linear subspace , any finite index type with decidable equality, and any complex matrix indexed by , this predicate means that there exists a complex basis of such that
Here is the entrywise complexification of , is a coordinate vector, and the two complex bilinear forms are
No conjugation occurs in these forms. For empty , the predicate holds exactly when .
QAlgorithms.Papers.Independent.Intake100.P39.RepresentsR
For every natural number , real matrix indexed by two copies of , real linear subspace of the real vectors on those coordinates, finite index type equipped with a finite enumeration and decidable equality, and real matrix indexed by , this proposition means that there exists a real basis of such that, writing its basis vectors as ambient vectors and defining
one has , , and for every , together with
No separate hypothesis that is symplectic is included. Empty is allowed: then the basis condition requires , and all pairing and action requirements are vacuous. The case is also allowed.
QAlgorithms.Papers.Independent.Intake100.P39.SameBlocks
For any natural numbers , natural-number lists and integer lists indexed by , and natural-number lists and integer lists indexed by , this predicate means that there exists a bijection
such that and for every . No positivity, ordering, or restriction on the integer entries is required. Empty lists are included: two empty lists satisfy the predicate, whereas a bijection cannot exist if exactly one index set is empty.
QAlgorithms.Papers.Independent.Intake100.P39.SameInvariants
For any natural number , including , and any two real matrices , define for , where is the entrywise complexification, and define the real and complex bilinear forms
For a subspace over and a real-valued function , let be the largest dimension over of a linear subspace on which for every nonzero ; the zero subspace is allowed, so this maximum is at least . For real and , define
and let be the two maxima for and on this real subspace. For complex and , put , , and
Let be the corresponding maxima over complex linear subspaces for and its negative. The predicate requires all four conditions: for every , there is a nonzero vector killed by if and only if there is one killed by ; for every and every natural , ; for every real and every natural ,
and for every with , , , and every natural , the same equality holds with replaced by . The sums in these pairs are natural numbers and the differences are integers. Neither matrix is assumed symplectic, and the last two conditions do not require their parameters to be eigenvalues; for , all dimensions and maxima are , and there are no eigenvalues.
QAlgorithms.Papers.Independent.Intake100.P39.SameRealData
For any natural numbers , real matrices of size and of size , and real number , this predicate requires two families of equalities. For a real matrix of size , put , , and
For each , let be the largest real dimensions of real linear subspaces on which
The zero subspace is allowed in these maxima. The predicate says precisely that
and
where the first coordinate is a natural number and the second is an integer. No symplecticity, eigenvalue condition, or restriction is imposed; , zero dimensional matrices, and different ambient dimensions are included.
QAlgorithms.Papers.Independent.Intake100.P39.SameUnitData
For any natural numbers , real matrices of size and of size , and complex number , this predicate requires the following equalities. For either matrix , of size , write , use the complex bilinear form
and, for , define
Let be the largest complex dimensions of complex subspaces satisfying for every nonzero ; the zero subspace is included. The requirements are
and
with natural number first coordinates and integer second coordinates. Neither matrix is assumed symplectic, and need not be an eigenvalue or lie on the unit circle. Zero dimensions and are allowed, with .
QAlgorithms.Papers.Independent.Intake100.P39.SymplecticSumIndex
For every natural number and function , this abbreviates the disjoint union of two copies of the set of pairs satisfying and . Each index therefore carries a left or right tag as well as the pair , and the total cardinality is . Zero values of contribute no indices; in particular, gives an empty type.
QAlgorithms.Papers.Independent.Intake100.P39.SymplecticallyConjugate
For any natural number , including , and any real matrices , this predicate means that there exists a real matrix satisfying
There is no separate assumption that or is symplectic. When , the matrices are empty, and their unique possible satisfies both equalities.
QAlgorithms.Papers.Independent.Intake100.P39.UnitClassification
For any natural number , real matrix , and , this predicate asserts that there exist a natural number , positive natural numbers , and signs , indexed by , satisfying the following conditions. For a real matrix , put ,
There must be a real basis , , of , with and zero pairings between two 's or two 's, in which entries between different block labels vanish and block is the following explicitly defined matrix . Set
let be the block matrix with diagonal blocks , identity blocks immediately above the block diagonal, and zeros elsewhere, and let the matrices have block rows
For ,
where is zero except in its final two columns, which equal . For , splitting each sector into lengths and one,
where is zero except for its final two columns, respectively and , and is the -th standard vector of , interpreted as zero when its index is outside that range; when , the matrices with rows or columns are empty. In addition to this basis representation, the predicate requires . For any and natural , define
and let be the maximum complex dimension of a complex subspace of on which for every nonzero , allowing the zero subspace. The required sign counts are
Finally, for every natural , real matrix , natural list of length , and integer list of length , if , if satisfy the same positivity, sign, and basis representation conditions using the matrices , if for every , and if
with integer differences, then there is a bijection with and . No symplecticity assumption on , eigenvalue assumption on , or unit circle condition is included; zero dimensions and empty lists are permitted, scalar zero inverse is zero, and singular square matrix inverse is zero.
QAlgorithms.Papers.Independent.Intake100.P39.UnitNormal
For natural numbers , a real matrix , a complex number , natural numbers , and integers , indexed by , this predicate requires and . Put , where is the entrywise complexification, and put
It requires a real basis of , indexed by , , and , with
where , and with reversed pairings given by skew symmetry. Its matrix for has no entries connecting distinct -blocks, and the block belonging to is specified as follows. Define
let be the block matrix with on its diagonal, immediately above that diagonal, and zeros elsewhere, and, for , , define
If , the block is
If , its matrix, partitioning each half into its first coordinates and its last coordinate, is
where, for ,
The representation condition is precisely . No hypothesis requires to have modulus , to be nonreal, or to be an eigenvalue, and no symplectic hypothesis on is separately imposed. Reciprocals and matrix inverses are total, with and singular matrix inverse . The odd case permits , in which its -coordinate parts are empty; is also allowed and requires .
QAlgorithms.Papers.Independent.Intake100.P39.UnitSignCounts
For any natural numbers , real matrix , complex number , and lists and , this predicate asserts the following counts for every natural number . Write , where is obtained by viewing the entries of as complex numbers, and write
On , define
Let and be the largest complex dimensions of complex linear subspaces on which, respectively, and for every nonzero . The zero subspace is allowed, so either maximum can be zero. The required equalities are
There are no assumptions that is symplectic, that is an eigenvalue or has modulus one, or that the entries of satisfy any restrictions; entries with or contribute to neither count. Both and are included, and the complex inverse is total, with .
QAlgorithms.Papers.Independent.Intake100.P39.VectorHeight
For every natural number , every real matrix indexed by , the disjoint union of two copies of , every , every vector , and every natural number , means exactly
where is the entrywise complex embedding of . In particular, means and . The condition cannot hold for , and consequently cannot hold when .
QAlgorithms.Papers.Independent.Intake100.P39.catalogueMatrix
For every catalogue element , this defines a complex square matrix indexed by two copies of , hence of dimension . To describe its entries, let be the matrix with on the diagonal, immediately above the diagonal, and elsewhere, and let be diagonal with last diagonal entry and all other entries zero; integers are regarded as complex numbers. The three cases are
Here is , with zero entries except
when ; when , has no rows. In the paired and unequal cases, the indices within each outer half are concatenated in the displayed order, giving half-sizes and , respectively. No eigenvalue, nonzero, or sign condition is imposed. The matrix inverse is the total matrix inverse, which is the zero matrix for a singular matrix. For , the single and paired cases give empty matrices, while the unequal case gives , with .
QAlgorithms.Papers.Independent.Intake100.P39.catalogueSign
This defines an integer-valued function that returns the third parameter of every catalogue element:
The complex parameter , natural number , and choice of constructor do not affect this value. No validity condition is required, so the returned integer need not belong to .
QAlgorithms.Papers.Independent.Intake100.P39.catalogueSize
This defines a natural-number-valued function on the three kinds of catalogue elements by
The value depends only on the constructor and , and is independent of the complex parameter and integer parameter . In particular, when , the respective sizes are .
QAlgorithms.Papers.Independent.Intake100.P39.chainT
For every natural number , real matrix , complex number , complex vector , and natural numbers , this defines
Here coordinates are grouped into two copies of , superscripts and denote these two groups, is obtained by viewing each real entry of as complex, and conjugation of vectors is coordinatewise. Zeroth powers of operators are identities. Complex inversion is total, with : when , the prefactor is if and otherwise. The definition includes , when the sum is empty and the value is .
QAlgorithms.Papers.Independent.Intake100.P39.complexEvenBlock
For any complex numbers and natural number , let denote the matrix with diagonal entries , entries one immediately above the diagonal, and zeros elsewhere, and let be diagonal with its final diagonal entry equal to and all others zero. This definition gives the complex matrix, with four consecutive sectors of length ,
The transpose is the ordinary transpose, without conjugation. There are no restrictions on or . The inverse is the total square matrix inverse, equal to zero for a singular matrix; in particular, is allowed. If , all sectors are empty and the result is the empty square matrix.
QAlgorithms.Papers.Independent.Intake100.P39.complexOddBlock
For any complex numbers and natural number , let be the matrix with diagonal , superdiagonal entries one, and all other entries zero. Let be the matrix whose only potentially nonzero entries, when , are
for , it has no rows and one column. This definition gives the complex matrix, with sector lengths ,
Both transposes are ordinary transposes, without conjugation. There are no restrictions on , and the inverse is total, equal to zero for a singular matrix. In particular, gives , independently of , with .
QAlgorithms.Papers.Independent.Intake100.P39.cyclicC
For every natural number , every real matrix indexed by , the disjoint union of two copies of , every , and every vector , is the complex subspace
where is with complex entries. The exponent is included, so itself is among the generators. No eigenvalue or generalized-eigenvector condition is required. If , including necessarily when , the resulting subspace is zero.
QAlgorithms.Papers.Independent.Intake100.P39.cyclicR
For every natural number , every real matrix indexed by , the disjoint union of two copies of , every , and every real vector , is the real subspace
The exponent is included, so itself is among the generators. There are no additional conditions on , , or . If , including necessarily when , the resulting subspace is zero.
QAlgorithms.Papers.Independent.Intake100.P39.definiteIndex
For every field , additive commutative group equipped with a -vector-space structure of finite dimension, -linear subspace , and arbitrary function , this defines the natural number
No quadratic-form or regularity assumption is made on . The zero subspace always qualifies, since its positivity condition is vacuous, so the set being maximized is nonempty. In particular, the value is when , including when has dimension zero.
QAlgorithms.Papers.Independent.Intake100.P39.eigenOrbit
For every complex number , is the finite set
Repeated elements are included only once. No nonzero assumption is imposed: inversion is defined at zero by , so .
QAlgorithms.Papers.Independent.Intake100.P39.groupedOmega
For every commutative ring , every type equipped with a finite enumeration, and every pair of functions , this defines
where and denote the indices in the left and right copies of . The ring need not be a field or have characteristic different from two. If is empty, the sum is zero for every .
QAlgorithms.Papers.Independent.Intake100.P39.jordan
For every field , element , and natural number , this defines the matrix over , with rows and columns numbered , by
Thus occupies the diagonal and the immediately superdiagonal. The definition allows and , with yielding the empty matrix.
QAlgorithms.Papers.Independent.Intake100.P39.kernelDim
For any natural number , any real matrix , any complex number , and any natural number , this is the complex dimension
where is obtained by treating each entry of as a complex number. No eigenvalue or symplectic hypothesis is imposed. The exponent is included: the operator is then the identity and the defined dimension is . When , the ambient space is zero-dimensional and the value is for every .
QAlgorithms.Papers.Independent.Intake100.P39.lastDiagonal
For every field , natural number , and element , this defines the diagonal matrix , indexed by , with
For , its only possibly nonzero entry is the final diagonal entry . For , it is the empty matrix; gives the zero matrix for every .
QAlgorithms.Papers.Independent.Intake100.P39.offComplexBlock
For every complex number and natural number , this defines the real matrix
where is the real matrix whose diagonal blocks are , whose blocks immediately above that block diagonal are , and whose remaining blocks are zero. The two main coordinate groups each have entries. No condition on is imposed; the inverse is the total matrix inverse, which is zero when is singular. For , the resulting matrix is empty.
QAlgorithms.Papers.Independent.Intake100.P39.primaryComplex
For every natural number , every real matrix indexed by , the disjoint union of two copies of , and every , let be with its entries regarded as complex numbers. Then is the complex subspace of given by
where the sum means the smallest complex subspace containing all the displayed kernels, and repeated values of are counted only once. Neither an eigenvalue condition on nor any restriction on is required; inverse zero is zero. For , the power is the zeroth power, namely the identity on the zero vector space, and the resulting subspace is zero.
QAlgorithms.Papers.Independent.Intake100.P39.primaryReal
For every natural number , every real matrix indexed by , the disjoint union of two copies of , and every , is the real subspace consisting of precisely those real vectors whose coordinatewise embedding into belongs to
where is the entrywise complex embedding of , and the sum is a sum of complex subspaces. The complex subspace is regarded as a real subspace before taking this inverse image. Repeated orbit values are removed and ; no eigenvalue or symplectic hypothesis is imposed. For , this is the zero real subspace.
QAlgorithms.Papers.Independent.Intake100.P39.rankSignature
For every ordered pair of natural numbers, this defines
where the second component subtracts after interpreting both numbers as integers, so it may be negative. Either input may be zero; no additional conditions are imposed.
QAlgorithms.Papers.Independent.Intake100.P39.realEmbed
For every natural number , let be the disjoint union of two copies of . The map is the -linear map from to , with the latter regarded as a real vector space, that sends to the vector whose coordinate at each is the complex number . For , this is the unique map between the corresponding zero vector spaces.
QAlgorithms.Papers.Independent.Intake100.P39.realInertia
For every natural number , real matrix , real number , and natural number , let
using two groups of coordinates. This defines the ordered pair , where is the largest real dimension of a real linear subspace on which for every nonzero , and is the largest such dimension with . Each maximum is taken among dimensions ; the zero subspace always qualifies. Exponent subtraction is truncated at zero and zeroth operator powers are identities. Thus gives and pair ; the pair is also if or .
QAlgorithms.Papers.Independent.Intake100.P39.realJordan
For every complex number and natural number , this defines a real matrix consisting of consecutive diagonal blocks
with in each immediately superdiagonal block and zero in every other block. More explicitly, for row and column indices , the entry is if , is if and , and is otherwise. The definition allows all , including zero, and yields the empty matrix.
QAlgorithms.Papers.Independent.Intake100.P39.realMultiplicationBlock
For every complex number , this defines the real matrix, with rows and columns indexed by ,
No restriction is imposed on , including .
QAlgorithms.Papers.Independent.Intake100.P39.realPart
For every natural number , let be the disjoint union of two copies of . For every complex subspace of , is the real subspace
Thus it is the inverse image of , regarded as a real subspace, under the coordinatewise embedding of real vectors into complex vectors. For , this is the zero real subspace.
QAlgorithms.Papers.Independent.Intake100.P39.realQ
For every natural number , real matrix , real number , natural number , and real vectors , this defines
where the and coordinates are the two groups of coordinates. Subtraction in the exponent is truncated at zero, and zeroth operator powers are identities; in particular, gives . If or , the value is .
QAlgorithms.Papers.Independent.Intake100.P39.realShift
For every natural number , every real matrix whose rows and columns are indexed by the disjoint union of two copies of , and every , is the real linear endomorphism of given by
There are no restrictions on or . For , this is the unique endomorphism of the zero vector space.
QAlgorithms.Papers.Independent.Intake100.P39.rectangularS
For any complex numbers and natural number , this definition gives a complex matrix , with rows numbered and columns numbered , whose entries are
For , only the last row can be nonzero, with its last two entries and , in that order. For , the matrix has no rows and one column. No restrictions on or are imposed.
QAlgorithms.Papers.Independent.Intake100.P39.sectorDiagonal
For any type equipped with a specified element , any natural numbers , any matrix over , and any matrix over , this definition gives the matrix indexed by the disjoint union in both rows and columns whose block form is
Thus entries within the first sector come from , entries within the second come from , and entries between the sectors are the specified zero of . No field, ring, or other algebraic structure is assumed. Either sector may be empty, including .
QAlgorithms.Papers.Independent.Intake100.P39.signCharacteristic
For every natural number and every indexed family of catalogue elements, this defines the multiset of their nonzero third parameters. Each index contributes one occurrence of its integer parameter , regardless of whether its element is single, paired, or unequal, and all occurrences of are then removed. Repeated nonzero values retain their multiplicities; neither order nor distinctness is recorded. No validity assumption is imposed on the elements, so any nonzero integer may occur. For , or when all third parameters are zero, the resulting multiset is empty.
QAlgorithms.Papers.Independent.Intake100.P39.signedBlock
For every field equipped with decidable equality, elements , and natural number , let be the matrix with diagonal entries , immediately superdiagonal entries , and all other entries zero, and let be the matrix whose only possibly nonzero entry is when . This defines the matrix, indexed by two copies of ,
The inverse is the total matrix inverse: it is the usual inverse when is invertible and the zero matrix when is singular. In particular, and give zero upper blocks, while the lower-right block remains . No restriction is imposed on , and yields the empty matrix.
QAlgorithms.Papers.Independent.Intake100.P39.sumSector
For any type equipped with a designated zero, natural number , function , and family of -valued matrices whose rows and columns are indexed by two disjoint copies of , this defines a -valued entry for any two Boolean values and indices , where and :
Here a false Boolean selects the left copy and a true Boolean selects the right copy; when , the column index is regarded as an index less than using that equality. No addition or multiplication on is assumed. Values contribute no indices, and leaves no possible input index pairs.
QAlgorithms.Papers.Independent.Intake100.P39.symplecticBlockSum
For any type equipped with a designated zero, natural number , function , and family of -valued matrices indexed by two copies of , this defines a square matrix indexed by two copies of the pairs with and . If denote left or right tags, its entries are
Thus all left-tagged coordinates form the first main coordinate group and all right-tagged coordinates the second, while entries between different labels are zero. This definition requires only a zero on and imposes no symplectic condition on the matrices. Labels with contribute no coordinates; if , the resulting matrix is empty.
QAlgorithms.Papers.Independent.Intake100.P39.symplecticDiamond
For any natural numbers , any real matrix indexed by two copies of , and any real matrix indexed by two copies of , write their four sectors as and . This defines a real matrix whose coordinate order is first the first half of , then the first half of , then the second half of , then the second half of , by
Its index set is . There is no symplectic assumption on either input. Either size may be zero, in which case its corresponding rows and columns are empty.
QAlgorithms.Papers.Independent.Intake100.P39.uColumns
For every complex number and natural number , this defines a real matrix , where
for and . Thus . The exponent subtractions are natural-number subtraction, truncated at zero. There is no restriction on , and gives a matrix with no rows and two columns.
QAlgorithms.Papers.Independent.Intake100.P39.unitBlock
For every complex number , natural number , and real number , this defines a real matrix with two coordinate groups of size , using . Its full specification is as follows: put , define , let be the matrix with diagonal blocks , immediately superdiagonal blocks , and all other blocks zero, and put
If is even, the matrix is , where when , and otherwise, for . If is odd, its four blocks, with the last coordinate separated from the first , are
where, for ,
The index identifications in either branch preserve the numerical indices within each coordinate group. Exponent subtractions are truncated natural-number subtraction, and singular has total inverse zero. No restriction on or is imposed; gives the empty matrix, and gives .
QAlgorithms.Papers.Independent.Intake100.P39.unitEvenBlock
For every complex number , natural number , and real number , this defines the real matrix
Here , and is the block matrix with diagonal blocks , immediately superdiagonal blocks , and all other blocks zero. For , put
The exponent subtractions are truncated natural-number subtraction. For , only the last two columns of can be nonzero. There is no unit-modulus condition on or sign condition on ; is zero when is singular. For , the whole matrix is empty.
QAlgorithms.Papers.Independent.Intake100.P39.unitInertia
For every natural number , real matrix , complex number , and natural number , let be the entrywise complexification of , set , and put . With in the two groups of coordinates, define the real-valued function
The declaration defines the ordered pair , where is the largest complex dimension of a complex linear subspace on which for every nonzero , and is the largest such complex dimension with . These maxima range over , and the zero subspace qualifies vacuously. Conjugation is coordinatewise, zeroth powers are identities, subtraction in exponents is truncated at zero, and . Consequently or gives ; with even also gives .
QAlgorithms.Papers.Independent.Intake100.P39.unitOddBlock
For every complex number , natural number , and real number , this defines a real square matrix , with each of its four blocks of size . To specify its entries, let , let , let be the block matrix with diagonal blocks , immediately superdiagonal blocks , and all other blocks zero, and set
For , the four blocks are
The exponent subtractions are truncated natural-number subtraction, and the matrix inverse is zero when is singular. No restriction on or is assumed. In particular, gives .
QAlgorithms.Papers.Independent.Intake100.P39.unitQ
For every natural number , real matrix , complex number , natural number , and complex vectors , put , let denote entrywise complexification of , and write in the two groups of coordinates. This defines
Vector conjugation is coordinatewise, zeroth operator powers are identities, and when . In particular, gives , while gives . No condition on is imposed, and gives value .
QAlgorithms.Papers.Independent.Intake100.P39.vColumns
For every complex number and natural number , this defines a real matrix . Put . For zero-based row and column indices and , its entries are
Both subtractions in the exponents are natural-number subtraction, truncated at zero; for the indicated row indices, . No restriction on is imposed. When , the matrix has no rows and two columns.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.