Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Normal Forms for Symplectic Matrices

Definition
QAlgorithms_Papers_Independent_Intake100_P39

by Gohan · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

The 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.

  • RVec
  • CVec
  • realEmbed: 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.
  • cyclicR
  • realPart: 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.
  • rankSignature
  • jordan: 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.
  • SymplecticSumIndex
  • sumSector: 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.
  • catalogueSize
  • catalogueMatrix
  • CatalogueValid: 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.
Definition code
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
Source
Normal Forms for Symplectic Matrices, arXiv:1307.2403v2, https://arxiv.org/abs/1307.2403v2
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 nnn, including 000, let AAA be a real 2n×2n2n\times2n2n×2n matrix, let WWW be a complex linear subspace of C2n\mathbb C^{2n}C2n, let HHH be a finite index type with decidable equality, let (bi)i∈H⊔H(b_i)_{i\in H\sqcup H}(bi​)i∈H⊔H​ be a complex basis of WWW, and let MMM be a complex matrix indexed by H⊔HH\sqcup HH⊔H. Define the complex bilinear form

ω(v,w)=∑ℓ=0n−1(v0,ℓw1,ℓ−v1,ℓw0,ℓ),\omega(v,w)=\sum_{\ell=0}^{n-1}(v_{0,\ell}w_{1,\ell}-v_{1,\ell}w_{0,\ell}),ω(v,w)=ℓ=0∑n−1​(v0,ℓ​w1,ℓ​−v1,ℓ​w0,ℓ​),

and define ωH\omega_HωH​ by the same formula with the sum indexed by HHH. The predicate says that, viewing each bib_ibi​ as a vector in C2n\mathbb C^{2n}C2n, both

ω(bi,bj)=ωH(ei,ej)for every i,j∈H⊔H,ACbj=∑i∈H⊔HMijbifor every j∈H⊔H,\omega(b_i,b_j)=\omega_H(e_i,e_j)\quad\text{for every }i,j\in H\sqcup H, \qquad A_{\mathbb C}b_j=\sum_{i\in H\sqcup H}M_{ij}b_i\quad\text{for every }j\in H\sqcup H,ω(bi​,bj​)=ωH​(ei​,ej​)for every i,j∈H⊔H,AC​bj​=i∈H⊔H∑​Mij​bi​for every j∈H⊔H,

where eie_iei​ is the coordinate vector at iii and ACA_{\mathbb C}AC​ is obtained by treating the entries of AAA as complex numbers. In particular, the form used here is bilinear, without complex conjugation. If HHH is empty, the given basis forces W={0}W=\{0\}W={0}, and both conditions are vacuous.

QAlgorithms.Papers.Independent.Intake100.P39.CVec

For every natural number nnn, CVec(n)\mathrm{CVec}(n)CVec(n) is the complex vector space of functions from the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} to C\mathbb CC, hence the space of complex vectors with 2n2n2n labeled coordinates. This includes n=0n=0n=0, 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: single⁡(z,k,s)\operatorname{single}(z,k,s)single(z,k,s), paired⁡(z,k,s)\operatorname{paired}(z,k,s)paired(z,k,s), or unequal⁡(z,k,s)\operatorname{unequal}(z,k,s)unequal(z,k,s), where zzz is any complex number, kkk is any natural number, and sss is any integer. There are no restrictions on these parameters: z=0z=0z=0, k=0k=0k=0, and arbitrary integer values of sss 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 nnn and every real 2n×2n2n\times2n2n×2n matrix AAA, this defines a predicate on catalogue elements. Write ACA_{\mathbb C}AC​ for the same matrix with complex entries; saying that zzz is an eigenvalue means that there exists v∈C2nv\in\mathbb C^{2n}v∈C2n, v≠0v\ne0v=0, with ACv=zvA_{\mathbb C}v=zvAC​v=zv. A single element single⁡(z,k,s)\operatorname{single}(z,k,s)single(z,k,s) is valid exactly when zzz is such an eigenvalue, k>0k>0k>0, Im⁡z=0\operatorname{Im}z=0Imz=0, and either ∣z∣≠1|z|\ne1∣z∣=1 and s=0s=0s=0, or z∈{1,−1}z\in\{1,-1\}z∈{1,−1}, s∈{0,1,−1}s\in\{0,1,-1\}s∈{0,1,−1}, and s=0s=0s=0 implies that kkk is odd. A paired element paired⁡(z,k,s)\operatorname{paired}(z,k,s)paired(z,k,s) is valid exactly when zzz is an eigenvalue, k>0k>0k>0, Im⁡z≠0\operatorname{Im}z\ne0Imz=0, and either ∣z∣≠1|z|\ne1∣z∣=1 and s=0s=0s=0, or ∣z∣=1|z|=1∣z∣=1 and s∈{1,−1}s\in\{1,-1\}s∈{1,−1}. An unequal element unequal⁡(z,k,s)\operatorname{unequal}(z,k,s)unequal(z,k,s) is valid exactly when zzz is an eigenvalue, ∣z∣=1|z|=1∣z∣=1, Im⁡z≠0\operatorname{Im}z\ne0Imz=0, and s∈{1,−1}s\in\{1,-1\}s∈{1,−1}; this case places no restriction on kkk, so k=0k=0k=0 is included. No symplectic hypothesis on AAA is part of this definition. When n=0n=0n=0, there is no nonzero eigenvector, so no catalogue element is valid.

QAlgorithms.Papers.Independent.Intake100.P39.HalfIndex

For every natural number LLL and function r:{0,…,L−1}→Nr:\{0,\ldots,L-1\}\to\mathbb Nr:{0,…,L−1}→N, this abbreviates the index type consisting of pairs (j,i)(j,i)(j,i) with 0≤j<L0\le j<L0≤j<L and 0≤i<rj0\le i<r_j0≤i<rj​. Its cardinality is ∑j=0L−1rj\sum_{j=0}^{L-1}r_j∑j=0L−1​rj​; an index jjj with rj=0r_j=0rj​=0 contributes no pairs, and L=0L=0L=0 gives an empty index type.

QAlgorithms.Papers.Independent.Intake100.P39.OffClassification

For every natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, and z∈Cz\in\mathbb Cz∈C, this predicate asserts the existence of a list q0,…,qℓ−1q_0,\ldots,q_{\ell-1}q0​,…,qℓ−1​ of natural numbers, where ℓ=dim⁡Cker⁡(AC−zI)\ell=\dim_{\mathbb C}\ker(A_{\mathbb C}-zI)ℓ=dimC​ker(AC​−zI), with the following properties. To specify them, for any real 2d×2d2d\times2d2d×2d matrix CCC write NC,λ=CC−λIN_{C,\lambda}=C_{\mathbb C}-\lambda INC,λ​=CC​−λI, EC,λ=ker⁡NC,λ2dE_{C,\lambda}=\ker N_{C,\lambda}^{2d}EC,λ​=kerNC,λ2d​, and

VC(z)={v∈R2d:vC∈∑λ∈{z,z−1,zˉ,zˉ−1}EC,λ},Ωd((x,y),(x′,y′))=∑i(xiyi′−yixi′).V_C(z)=\left\{v\in\mathbb R^{2d}: v_{\mathbb C}\in\sum_{\lambda\in\{z,z^{-1},\bar z,\bar z^{-1}\}}E_{C,\lambda}\right\}, \qquad \Omega_d((x,y),(x',y'))=\sum_i(x_i y'_i-y_i x'_i).VC​(z)=⎩⎨⎧​v∈R2d:vC​∈λ∈{z,z−1,zˉ,zˉ−1}∑​EC,λ​⎭⎬⎫​,Ωd​((x,y),(x′,y′))=i∑​(xi​yi′​−yi​xi′​).

Repeated elements of the displayed orbit contribute only once. A list h0,…,hH−1h_0,\ldots,h_{H-1}h0​,…,hH−1​ is required to have positive entries and to be nonincreasing, and to give the following representation of CCC on VC(z)V_C(z)VC​(z): there is a real basis grouped into pairs of sectors, with Ωd(ej,i,ej′,i′)=Ωd(fj,i,fj′,i′)=0\Omega_d(e_{j,i},e_{j',i'})=\Omega_d(f_{j,i},f_{j',i'})=0Ωd​(ej,i​,ej′,i′​)=Ωd​(fj,i​,fj′,i′​)=0 and Ωd(ej,i,fj′,i′)=δjj′δii′\Omega_d(e_{j,i},f_{j',i'})=\delta_{jj'}\delta_{ii'}Ωd​(ej,i​,fj′,i′​)=δjj′​δii′​, in which entries between different block labels vanish and each block is

{(Jhj(Re⁡z)−100Jhj(Re⁡z)T),Im⁡z=0,(Rhj(zˉ)−100Rhj(zˉ)T),Im⁡z≠0.\begin{cases} \begin{pmatrix}J_{h_j}(\operatorname{Re}z)^{-1}&0\\0&J_{h_j}(\operatorname{Re}z)^{\mathsf T}\end{pmatrix}, &\operatorname{Im}z=0,\\[6pt] \begin{pmatrix}R_{h_j}(\bar z)^{-1}&0\\0&R_{h_j}(\bar z)^{\mathsf T}\end{pmatrix}, &\operatorname{Im}z\ne0. \end{cases}⎩⎨⎧​(Jhj​​(Rez)−10​0Jhj​​(Rez)T​),(Rhj​​(zˉ)−10​0Rhj​​(zˉ)T​),​Imz=0,Imz=0.​

Here Jh(λ)J_h(\lambda)Jh​(λ) has λ\lambdaλ on its diagonal, ones immediately above the diagonal, and zeros elsewhere; Rh(λ)R_h(\lambda)Rh​(λ) has 2×22\times22×2 diagonal blocks \begin{psmallmatrix}\operatorname{Re}\lambda&-\operatorname{Im}\lambda\\\operatorname{Im}\lambda&\operatorname{Re}\lambda\end{psmallmatrix}, 2×22\times22×2 identity blocks immediately above the block diagonal, and zeros elsewhere. The two sector lengths for block jjj are hjh_jhj​ in the real case and 2hj2h_j2hj​ otherwise. The asserted list qqq gives this representation for C=AC=AC=A; for every natural ppp, if some v∈EA,zv\in E_{A,z}v∈EA,z​ satisfies NA,zpv≠0N_{A,z}^pv\ne0NA,zp​v=0 and every v∈EA,zv\in E_{A,z}v∈EA,z​ satisfies NA,zp+1v=0N_{A,z}^{p+1}v=0NA,zp+1​v=0, then max⁡jqj=p+1\max_j q_j=p+1maxj​qj​=p+1, with the maximum of an empty list defined as zero; and, for every pair of natural numbers N,KN,KN,K, real 2N×2N2N\times2N2N×2N matrix BBB, and list t:{0,…,K−1}→Nt:\{0,\ldots,K-1\}\to\mathbb Nt:{0,…,K−1}→N, if BTΩNB=ΩNB^{\mathsf T}\Omega_NB=\Omega_NBTΩN​B=ΩN​, where \Omega_N=\begin{psmallmatrix}0&I\\-I&0\end{psmallmatrix}, if ttt gives the representation just described for C=BC=BC=B, and if dim⁡Cker⁡NA,zr=dim⁡Cker⁡NB,zr\dim_{\mathbb C}\ker N_{A,z}^r=\dim_{\mathbb C}\ker N_{B,z}^rdimC​kerNA,zr​=dimC​kerNB,zr​ for every natural r≥1r\ge1r≥1, then there is a bijection e:{0,…,ℓ−1}→{0,…,K−1}e:\{0,\ldots,\ell-1\}\to\{0,\ldots,K-1\}e:{0,…,ℓ−1}→{0,…,K−1} with qj=te(j)q_j=t_{e(j)}qj​=te(j)​ for every jjj. No symplecticity assumption on AAA, eigenvalue assumption on zzz, or restriction on ∣z∣|z|∣z∣ 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 n,Ln,Ln,L, a real 2n×2n2n\times2n2n×2n matrix AAA, a complex number zzz, and natural numbers qjq_jqj​ indexed by 0≤j<L0\le j<L0≤j<L, this predicate requires every qj>0q_j>0qj​>0 and qj≥qtq_j\ge q_tqj​≥qt​ whenever j≤tj\le tj≤t. Define Eλ=ker⁡(AC−λI)2nE_\lambda=\ker(A_{\mathbb C}-\lambda I)^{2n}Eλ​=ker(AC​−λI)2n and

P={v∈R2n:vC∈∑λ∈{z,z−1,zˉ,zˉ−1}Eλ},P=\left\{v\in\mathbb R^{2n}:v_{\mathbb C}\in \sum_{\lambda\in\{z,z^{-1},\bar z,\bar z^{-1}\}}E_\lambda\right\},P=⎩⎨⎧​v∈R2n:vC​∈λ∈{z,z−1,zˉ,zˉ−1}∑​Eλ​⎭⎬⎫​,

where ACA_{\mathbb C}AC​ is the entrywise complexification. If Im⁡z=0\operatorname{Im}z=0Imz=0, set dj=qjd_j=q_jdj​=qj​ and

Mj=(Jqj(Re⁡z)−100Jqj(Re⁡z)T),M_j=\begin{pmatrix}J_{q_j}(\operatorname{Re}z)^{-1}&0\\ 0&J_{q_j}(\operatorname{Re}z)^{\mathsf T}\end{pmatrix},Mj​=(Jqj​​(Rez)−10​0Jqj​​(Rez)T​),

where Jq(a)J_q(a)Jq​(a) has aaa on the diagonal, 111 immediately above it, and zeros elsewhere. If Im⁡z≠0\operatorname{Im}z\ne0Imz=0, set dj=2qjd_j=2q_jdj​=2qj​ and

Mj=(Kj−100KjT),M_j=\begin{pmatrix}K_j^{-1}&0\\0&K_j^{\mathsf T}\end{pmatrix},Mj​=(Kj−1​0​0KjT​​),

where KjK_jKj​ is the 2qj×2qj2q_j\times2q_j2qj​×2qj​ block matrix with (Re⁡zˉ−Im⁡zˉIm⁡zˉRe⁡zˉ)\begin{pmatrix}\operatorname{Re}\bar z&-\operatorname{Im}\bar z\\ \operatorname{Im}\bar z&\operatorname{Re}\bar z\end{pmatrix}(RezˉImzˉ​−ImzˉRezˉ​) on the diagonal, I2I_2I2​ immediately above that diagonal, and zeros elsewhere. In the applicable case, there must be a real basis bϵ,j,ℓb_{\epsilon,j,\ell}bϵ,j,ℓ​ of PPP, indexed by ϵ∈{0,1}\epsilon\in\{0,1\}ϵ∈{0,1}, j<Lj<Lj<L, and ℓ<dj\ell<d_jℓ<dj​, such that

ω(b0,j,ℓ,b1,t,h)=δ(j,ℓ),(t,h),ω(b0,j,ℓ,b0,t,h)=ω(b1,j,ℓ,b1,t,h)=0,Abϵ,j,ℓ=∑η=01∑h<dj(Mj)(η,h),(ϵ,ℓ)bη,j,h,\omega(b_{0,j,\ell},b_{1,t,h})=\delta_{(j,\ell),(t,h)},\qquad \omega(b_{0,j,\ell},b_{0,t,h})=\omega(b_{1,j,\ell},b_{1,t,h})=0, \qquad A b_{\epsilon,j,\ell} =\sum_{\eta=0}^{1}\sum_{h<d_j}(M_j)_{(\eta,h),(\epsilon,\ell)}b_{\eta,j,h},ω(b0,j,ℓ​,b1,t,h​)=δ(j,ℓ),(t,h)​,ω(b0,j,ℓ​,b0,t,h​)=ω(b1,j,ℓ​,b1,t,h​)=0,Abϵ,j,ℓ​=η=0∑1​h<dj​∑​(Mj​)(η,h),(ϵ,ℓ)​bη,j,h​,

with reversed pairings negative, where ω(v,w)=∑h<n(v0,hw1,h−v1,hw0,h)\omega(v,w)=\sum_{h<n}(v_{0,h}w_{1,h}-v_{1,h}w_{0,h})ω(v,w)=∑h<n​(v0,h​w1,h​−v1,h​w0,h​). There is no separate requirement that AAA be symplectic, that zzz be an eigenvalue, or that ∣z∣≠1|z|\ne1∣z∣=1. The value z=0z=0z=0 is included: its reciprocal is 000, and singular matrix inverses are 000. Empty block families are allowed and require P={0}P=\{0\}P={0}.

QAlgorithms.Papers.Independent.Intake100.P39.OrthogonalC

For every natural number nnn, every complex subspace WWW of the vectors indexed by the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, and every complex vector vvv on that coordinate set, OrthogonalC(W,v)\mathrm{OrthogonalC}(W,v)OrthogonalC(W,v) means that for every w∈Ww\in Ww∈W,

∑i=0n−1(vleft,iwright,i−vright,iwleft,i)=0.\sum_{i=0}^{n-1} \bigl(v_{\mathrm{left},i}w_{\mathrm{right},i} -v_{\mathrm{right},i}w_{\mathrm{left},i}\bigr)=0.i=0∑n−1​(vleft,i​wright,i​−vright,i​wleft,i​)=0.

The displayed pairing is complex bilinear and uses no complex conjugation. The condition holds for v=0v=0v=0 and for W={0}W=\{0\}W={0}; when n=0n=0n=0, the sum is empty and the condition holds.

QAlgorithms.Papers.Independent.Intake100.P39.PairedEvenRepresentation

For any natural numbers n,kn,kn,k, real 2n×2n2n\times2n2n×2n matrix AAA, complex linear subspace W⊆C2nW\subseteq\mathbb C^{2n}W⊆C2n, complex number zzz, and integer sss, this predicate asserts that WWW has a complex basis

(e0,…,ek−1, e~0,…,e~k−1, f0,…,fk−1, f~0,…,f~k−1)(e_0,\ldots,e_{k-1},\ \widetilde e_0,\ldots,\widetilde e_{k-1},\ f_0,\ldots,f_{k-1},\ \widetilde f_0,\ldots,\widetilde f_{k-1})(e0​,…,ek−1​, e0​,…,ek−1​, f0​,…,fk−1​, f​0​,…,f​k−1​)

with the following properties. For the complex bilinear form Ω((x,y),(x′,y′))=∑i=0n−1(xiyi′−yixi′)\Omega((x,y),(x',y'))=\sum_{i=0}^{n-1}(x_i y'_i-y_i x'_i)Ω((x,y),(x′,y′))=∑i=0n−1​(xi​yi′​−yi​xi′​), its pairings are the standard grouped symplectic pairings: Ω(ei,fj)=Ω(e~i,f~j)=δij\Omega(e_i,f_j)=\Omega(\widetilde e_i,\widetilde f_j)=\delta_{ij}Ω(ei​,fj​)=Ω(ei​,f​j​)=δij​, all pairings within the first 2k2k2k vectors or within the last 2k2k2k vectors vanish, and the mixed pairings Ω(ei,f~j)\Omega(e_i,\widetilde f_j)Ω(ei​,f​j​) and Ω(e~i,fj)\Omega(\widetilde e_i,f_j)Ω(ei​,fj​) vanish. The matrix of ACA_{\mathbb C}AC​ on this ordered basis is

M=(P−1P−1(0DD0)0PT),P=(Jk(zˉ)00Jk(z)),M=\begin{pmatrix} P^{-1}&P^{-1}\begin{pmatrix}0&D\\D&0\end{pmatrix}\\ 0&P^{\mathsf T} \end{pmatrix}, \qquad P=\begin{pmatrix}J_k(\bar z)&0\\0&J_k(z)\end{pmatrix},M=​P−10​P−1(0D​D0​)PT​​,P=(Jk​(zˉ)0​0Jk​(z)​),

where Jk(w)J_k(w)Jk​(w) has diagonal www, superdiagonal entries one, and zeros elsewhere, and DDD is diagonal with last entry sss, viewed in C\mathbb CC, and all other entries zero. Explicitly, for every basis vector bjb_jbj​, ACbj=∑iMijbiA_{\mathbb C}b_j=\sum_iM_{ij}b_iAC​bj​=∑i​Mij​bi​. Finally, e~i=eˉi\widetilde e_i=\bar e_iei​=eˉi​ and f~i=fˉi\widetilde f_i=\bar f_if​i​=fˉ​i​ for every 0≤i<k0\le i<k0≤i<k, with componentwise conjugation. No symplecticity assumption on AAA, eigenvalue or modulus assumption on zzz, or sign restriction on sss is included. Matrix inverses are total and vanish on singular matrices. The case k=0k=0k=0 requires W={0}W=\{0\}W={0} and has no basis vectors or conjugation conditions; n=0n=0n=0 is also allowed.

QAlgorithms.Papers.Independent.Intake100.P39.PairedOddRepresentation

For any natural numbers n,kn,kn,k, real 2n×2n2n\times2n2n×2n matrix AAA, complex linear subspace W⊆C2nW\subseteq\mathbb C^{2n}W⊆C2n, complex number zzz, and integer sss, this predicate asserts that WWW has a complex basis

(e0,…,ek−1, e~0,…,e~k, f0,…,fk−1, f~0,…,f~k)(e_0,\ldots,e_{k-1},\ \widetilde e_0,\ldots,\widetilde e_k,\ f_0,\ldots,f_{k-1},\ \widetilde f_0,\ldots,\widetilde f_k)(e0​,…,ek−1​, e0​,…,ek​, f0​,…,fk−1​, f​0​,…,f​k​)

such that, for Ω((x,y),(x′,y′))=∑i=0n−1(xiyi′−yixi′)\Omega((x,y),(x',y'))=\sum_{i=0}^{n-1}(x_i y'_i-y_i x'_i)Ω((x,y),(x′,y′))=∑i=0n−1​(xi​yi′​−yi​xi′​), the pairings are Ω(ei,fj)=δij\Omega(e_i,f_j)=\delta_{ij}Ω(ei​,fj​)=δij​, Ω(e~i,f~j)=δij\Omega(\widetilde e_i,\widetilde f_j)=\delta_{ij}Ω(ei​,f​j​)=δij​, all pairings within the first 2k+12k+12k+1 vectors or within the last 2k+12k+12k+1 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 ACA_{\mathbb C}AC​ on this ordered basis is

M=(P−1P−1(0SST0)0PT),P=(Jk(zˉ)00Jk+1(z)),M=\begin{pmatrix} P^{-1}&P^{-1}\begin{pmatrix}0&S\\S^{\mathsf T}&0\end{pmatrix}\\ 0&P^{\mathsf T} \end{pmatrix}, \qquad P=\begin{pmatrix}J_k(\bar z)&0\\0&J_{k+1}(z)\end{pmatrix},M=​P−10​P−1(0ST​S0​)PT​​,P=(Jk​(zˉ)0​0Jk+1​(z)​),

where Jh(w)J_h(w)Jh​(w) has diagonal www, superdiagonal entries one, and all other entries zero, while SSS is k×(k+1)k\times(k+1)k×(k+1), zero except for Sk−1,k=zisS_{k-1,k}=z\mathrm i sSk−1,k​=zis and Sk−1,k−1=is/2S_{k-1,k-1}=\mathrm i s/2Sk−1,k−1​=is/2 when k≥1k\ge1k≥1; when k=0k=0k=0, SSS has no rows. The matrix assertion means ACbj=∑iMijbiA_{\mathbb C}b_j=\sum_iM_{ij}b_iAC​bj​=∑i​Mij​bi​ for every basis vector. The additional componentwise conjugation identities are

e~i=eˉi,f~i=fˉi(0≤i<k),e~k=−is f~k‾.\widetilde e_i=\bar e_i,\qquad \widetilde f_i=\bar f_i\quad(0\le i<k), \qquad \widetilde e_k=-\mathrm i s\,\overline{\widetilde f_k}.ei​=eˉi​,f​i​=fˉ​i​(0≤i<k),ek​=−isf​k​​.

The transposes are ordinary transposes, and square matrix inverses are total, vanishing for singular matrices. No symplecticity assumption on AAA, eigenvalue or unit circle condition on zzz, or prescribed sign of sss is included; however, s=0s=0s=0 makes the last displayed identity force a basis vector to be zero, so the predicate cannot then hold. The case k=0k=0k=0 still requires a two-vector basis of WWW, with matrix diag⁡(z−1,z)\operatorname{diag}(z^{-1},z)diag(z−1,z) and the last conjugation identity; n=0n=0n=0 cannot accommodate the required 4k+24k+24k+2 basis vectors.

QAlgorithms.Papers.Independent.Intake100.P39.PrimaryDecomposition

For any natural number nnn, including 000, and any real 2n×2n2n\times2n2n×2n matrix AAA, let ACA_{\mathbb C}AC​ be its entrywise complexification, and, for every z∈Cz\in\mathbb Cz∈C, define

Oz={z,z−1,zˉ,zˉ−1},Ez=ker⁡(AC−zI)2n,Cz=∑λ∈OzEλ,Pz={v∈R2n:vC∈Cz}.O_z=\{z,z^{-1},\bar z,\bar z^{-1}\},\qquad E_z=\ker(A_{\mathbb C}-zI)^{2n},\qquad C_z=\sum_{\lambda\in O_z}E_\lambda,\qquad P_z=\{v\in\mathbb R^{2n}:v_{\mathbb C}\in C_z\}.Oz​={z,z−1,zˉ,zˉ−1},Ez​=ker(AC​−zI)2n,Cz​=λ∈Oz​∑​Eλ​,Pz​={v∈R2n:vC​∈Cz​}.

The orbit OzO_zOz​ is a set, so repeated values occur only once, and 0−1=00^{-1}=00−1=0. With

ω(v,w)=∑ℓ<n(v0,ℓw1,ℓ−v1,ℓw0,ℓ),\omega(v,w)=\sum_{\ell<n}(v_{0,\ell}w_{1,\ell}-v_{1,\ell}w_{0,\ell}),ω(v,w)=ℓ<n∑​(v0,ℓ​w1,ℓ​−v1,ℓ​w0,ℓ​),

the predicate requires, for every complex zzz, that the complex span of {vC:v∈Pz}\{v_{\mathbb C}:v\in P_z\}{vC​:v∈Pz​} equal CzC_zCz​, that Av∈PzAv\in P_zAv∈Pz​ for every v∈Pzv\in P_zv∈Pz​, and that any v∈Pzv\in P_zv∈Pz​ satisfying ω(v,w)=0\omega(v,w)=0ω(v,w)=0 for every w∈Pzw\in P_zw∈Pz​ be zero. It also requires a finite set S⊆CS\subseteq\mathbb CS⊆C such that every z∈Sz\in Sz∈S has a nonzero vector vvv with ACv=zvA_{\mathbb C}v=zvAC​v=zv; every complex number having such an eigenvector belongs to OtO_tOt​ for some t∈St\in St∈S; Oz∩Ot=∅O_z\cap O_t=\varnothingOz​∩Ot​=∅ for distinct z,t∈Sz,t\in Sz,t∈S; and

∑z∈SPz=R2n,Pz∩(∑t∈S∖{z}Pt)={0}(z∈S).\sum_{z\in S}P_z=\mathbb R^{2n},\qquad P_z\cap\left(\sum_{t\in S\setminus\{z\}}P_t\right)=\{0\}\quad(z\in S).z∈S∑​Pz​=R2n,Pz​∩​t∈S∖{z}∑​Pt​​={0}(z∈S).

Finally, for distinct z,t∈Sz,t\in Sz,t∈S, every v∈Pzv\in P_zv∈Pz​ and w∈Ptw\in P_tw∈Pt​ must satisfy ω(v,w)=0\omega(v,w)=0ω(v,w)=0. No symplectic hypothesis on AAA is separately imposed. Empty sums mean the zero subspace; when n=0n=0n=0, the generalized kernels are zero because the exponent is 000, and the empty set SSS satisfies the requirements.

QAlgorithms.Papers.Independent.Intake100.P39.RVec

For every natural number nnn, RVec(n)\mathrm{RVec}(n)RVec(n) is the real vector space of functions from the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1} to R\mathbb RR, hence the space of real vectors with 2n2n2n labeled coordinates. This includes n=0n=0n=0, 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 nnn, real 2n×2n2n\times2n2n×2n matrix AAA, and real number aaa, this predicate asserts that there exist a natural number LLL, positive natural numbers rjr_jrj​, and integers sjs_jsj​, indexed by 0≤j<L0\le j<L0≤j<L, with the following representation, counting, and uniqueness properties. For a real 2d×2d2d\times2d2d×2d matrix CCC, write NC,λ=CC−λIN_{C,\lambda}=C_{\mathbb C}-\lambda INC,λ​=CC​−λI, TC=C−aIT_C=C-aITC​=C−aI, and

VC(a)={v∈R2d:vC∈ker⁡NC,a2d+ker⁡NC,a−12d},Ωd((x,y),(x′,y′))=∑i(xiyi′−yixi′).V_C(a)=\{v\in\mathbb R^{2d}:v_{\mathbb C}\in \ker N_{C,a}^{2d}+\ker N_{C,a^{-1}}^{2d}\}, \qquad \Omega_d((x,y),(x',y'))=\sum_i(x_i y'_i-y_i x'_i).VC​(a)={v∈R2d:vC​∈kerNC,a2d​+kerNC,a−12d​},Ωd​((x,y),(x′,y′))=i∑​(xi​yi′​−yi​xi′​).

Each sjs_jsj​ belongs to {0,1,−1}\{0,1,-1\}{0,1,−1}, and sj=0s_j=0sj​=0 implies that rjr_jrj​ is odd. There is a real basis ej,i,fj,ie_{j,i},f_{j,i}ej,i​,fj,i​, 0≤i<rj0\le i<r_j0≤i<rj​, of VA(a)V_A(a)VA​(a) with pairings Ωn(ej,i,fj′,i′)=δjj′δii′\Omega_n(e_{j,i},f_{j',i'})=\delta_{jj'}\delta_{ii'}Ωn​(ej,i​,fj′,i′​)=δjj′​δii′​ and zero pairings between two eee's or two fff's, in which the matrix of AAA has zero entries between different block labels and block jjj equal to

(Jrj(a)−1Jrj(a)−1Drj(sj)0Jrj(a)T).\begin{pmatrix} J_{r_j}(a)^{-1}&J_{r_j}(a)^{-1}D_{r_j}(s_j)\\ 0&J_{r_j}(a)^{\mathsf T} \end{pmatrix}.(Jrj​​(a)−10​Jrj​​(a)−1Drj​​(sj​)Jrj​​(a)T​).

Here Jh(a)J_h(a)Jh​(a) has diagonal aaa, superdiagonal entries one, and all other entries zero, while Dh(s)D_h(s)Dh​(s) is diagonal with only its last entry equal to sss. For k≥1k\ge1k≥1, define pC,k±p_{C,k}^{\pm}pC,k±​ to be the maximum real dimension of a real subspace of ker⁡TC2k\ker T_C^{2k}kerTC2k​ on which ±a Ωd(TCkv,TCk−1v)>0\pm a\,\Omega_d(T_C^kv,T_C^{k-1}v)>0±aΩd​(TCk​v,TCk−1​v)>0 for every nonzero vvv; zero subspaces are allowed. The required counts are

dim⁡Cker⁡NA,a=2#{j:sj=0}+#{j:sj≠0},pA,k±=#{j:rj=k, sj=±1}(k≥1).\dim_{\mathbb C}\ker N_{A,a} =2\#\{j:s_j=0\}+\#\{j:s_j\ne0\}, \qquad p_{A,k}^{\pm}=\#\{j:r_j=k,\ s_j=\pm1\}\quad(k\ge1).dimC​kerNA,a​=2#{j:sj​=0}+#{j:sj​=0},pA,k±​=#{j:rj​=k, sj​=±1}(k≥1).

Finally, for every natural N,KN,KN,K, real 2N×2N2N\times2N2N×2N matrix BBB, list t:{0,…,K−1}→Nt:\{0,\ldots,K-1\}\to\mathbb Nt:{0,…,K−1}→N, and list u:{0,…,K−1}→Zu:\{0,\ldots,K-1\}\to\mathbb Zu:{0,…,K−1}→Z, if BTΩNB=ΩNB^{\mathsf T}\Omega_NB=\Omega_NBTΩN​B=ΩN​, if t,ut,ut,u satisfy the same positivity, sign, oddness, and basis representation conditions for BBB on VB(a)V_B(a)VB​(a), if dim⁡Cker⁡NA,ah=dim⁡Cker⁡NB,ah\dim_{\mathbb C}\ker N_{A,a}^h=\dim_{\mathbb C}\ker N_{B,a}^hdimC​kerNA,ah​=dimC​kerNB,ah​ for every h≥1h\ge1h≥1, and if

(pA,k++pA,k−, pA,k+−pA,k−)=(pB,k++pB,k−, pB,k+−pB,k−)(k≥1),(p_{A,k}^++p_{A,k}^-,\,p_{A,k}^+-p_{A,k}^-) =(p_{B,k}^++p_{B,k}^-,\,p_{B,k}^+-p_{B,k}^-) \quad(k\ge1),(pA,k+​+pA,k−​,pA,k+​−pA,k−​)=(pB,k+​+pB,k−​,pB,k+​−pB,k−​)(k≥1),

with integer differences, then there is a bijection e:{0,…,L−1}→{0,…,K−1}e:\{0,\ldots,L-1\}\to\{0,\ldots,K-1\}e:{0,…,L−1}→{0,…,K−1} satisfying rj=te(j)r_j=t_{e(j)}rj​=te(j)​ and sj=ue(j)s_j=u_{e(j)}sj​=ue(j)​. The predicate imposes no symplecticity assumption on AAA, no requirement that a=±1a=\pm1a=±1, and no eigenvalue assumption; a=0a=0a=0, n=0n=0n=0, and L=0L=0L=0 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 n,Ln,Ln,L, any real 2n×2n2n\times2n2n×2n matrix AAA, any real number aaa, and any integer list (sj)j<L(s_j)_{j<L}(sj​)j<L​, this predicate is the equality

dim⁡Cker⁡(AC−aI)=2 #{j<L:sj=0}+#{j<L:sj≠0},\dim_{\mathbb C}\ker(A_{\mathbb C}-aI) = 2\,\#\{j<L:s_j=0\}+\#\{j<L:s_j\ne0\},dimC​ker(AC​−aI)=2#{j<L:sj​=0}+#{j<L:sj​=0},

where ACA_{\mathbb C}AC​ is the entrywise complexification and aaa 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 a∈{1,−1}a\in\{1,-1\}a∈{1,−1} is imposed. Both dimensions and list lengths may be zero; in particular, an empty list requires the displayed kernel to have dimension 000.

QAlgorithms.Papers.Independent.Intake100.P39.RealNormal

For natural numbers n,Ln,Ln,L, a real 2n×2n2n\times2n2n×2n matrix AAA, a real number aaa, natural numbers rjr_jrj​ and integers sjs_jsj​ indexed by 0≤j<L0\le j<L0≤j<L, this predicate requires rj>0r_j>0rj​>0, sj∈{0,1,−1}s_j\in\{0,1,-1\}sj​∈{0,1,−1}, and rjr_jrj​ odd whenever sj=0s_j=0sj​=0. Write ACA_{\mathbb C}AC​ for the entrywise complexification, set Eλ=ker⁡(AC−λI)2nE_\lambda=\ker(A_{\mathbb C}-\lambda I)^{2n}Eλ​=ker(AC​−λI)2n, and let

P={v∈R2n:vC∈Ea+Ea−1}.P=\{v\in\mathbb R^{2n}:v_{\mathbb C}\in E_a+E_{a^{-1}}\}.P={v∈R2n:vC​∈Ea​+Ea−1​}.

It further requires a real basis bϵ,j,ℓb_{\epsilon,j,\ell}bϵ,j,ℓ​ of PPP, indexed by ϵ∈{0,1}\epsilon\in\{0,1\}ϵ∈{0,1}, 0≤j<L0\le j<L0≤j<L, and 0≤ℓ<rj0\le\ell<r_j0≤ℓ<rj​, whose pairings under

ω(v,w)=∑h=0n−1(v0,hw1,h−v1,hw0,h)\omega(v,w)=\sum_{h=0}^{n-1}(v_{0,h}w_{1,h}-v_{1,h}w_{0,h})ω(v,w)=h=0∑n−1​(v0,h​w1,h​−v1,h​w0,h​)

satisfy ω(b0,j,ℓ,b1,t,h)=δ(j,ℓ),(t,h)\omega(b_{0,j,\ell},b_{1,t,h})=\delta_{(j,\ell),(t,h)}ω(b0,j,ℓ​,b1,t,h​)=δ(j,ℓ),(t,h)​, with pairings between two first-half or two second-half vectors zero and the reversed pairings negative. In this basis, AAA acts separately on each jjj-block by

Mj=(Jj−1Jj−1Dj0JjT),M_j= \begin{pmatrix} J_j^{-1}&J_j^{-1}D_j\\ 0&J_j^{\mathsf T} \end{pmatrix},Mj​=(Jj−1​0​Jj−1​Dj​JjT​​),

where JjJ_jJj​ is the rj×rjr_j\times r_jrj​×rj​ matrix with diagonal entries aaa, entries 111 immediately above the diagonal, and all other entries zero, while DjD_jDj​ is diagonal with last entry sjs_jsj​ and all other entries zero; explicitly,

Abϵ,j,ℓ=∑η=01∑h=0rj−1(Mj)(η,h),(ϵ,ℓ)bη,j,h.A b_{\epsilon,j,\ell} =\sum_{\eta=0}^{1}\sum_{h=0}^{r_j-1}(M_j)_{(\eta,h),(\epsilon,\ell)}b_{\eta,j,h}.Abϵ,j,ℓ​=η=0∑1​h=0∑rj​−1​(Mj​)(η,h),(ϵ,ℓ)​bη,j,h​.

The number aaa is unrestricted, including a=0a=0a=0; the scalar reciprocal of 000 is 000, and a singular matrix has total matrix inverse 000. No eigenvalue or symplectic hypothesis on AAA is separately imposed. Both n=0n=0n=0 and L=0L=0L=0 are allowed; when L=0L=0L=0, the basis requirement means P={0}P=\{0\}P={0}.

QAlgorithms.Papers.Independent.Intake100.P39.RealSignCounts

For any natural numbers n,Ln,Ln,L, any real 2n×2n2n\times2n2n×2n matrix AAA, any real number aaa, any natural-number list (rj)j<L(r_j)_{j<L}(rj​)j<L​, and any integer list (sj)j<L(s_j)_{j<L}(sj​)j<L​, define, for every natural k≥1k\ge1k≥1,

Wk=ker⁡(A−aI)2k,Qk(v)=a∑ℓ<n(((A−aI)kv)0,ℓ((A−aI)k−1v)1,ℓ−((A−aI)kv)1,ℓ((A−aI)k−1v)0,ℓ).W_k=\ker(A-aI)^{2k},\qquad Q_k(v)=a\sum_{\ell<n} \left( \bigl((A-aI)^kv\bigr)_{0,\ell}\bigl((A-aI)^{k-1}v\bigr)_{1,\ell} - \bigl((A-aI)^kv\bigr)_{1,\ell}\bigl((A-aI)^{k-1}v\bigr)_{0,\ell} \right).Wk​=ker(A−aI)2k,Qk​(v)=aℓ<n∑​(((A−aI)kv)0,ℓ​((A−aI)k−1v)1,ℓ​−((A−aI)kv)1,ℓ​((A−aI)k−1v)0,ℓ​).

Let pkp_kpk​ be the largest real dimension of a real linear subspace of WkW_kWk​ on which QkQ_kQk​ is strictly positive at every nonzero vector, and let qkq_kqk​ be the corresponding largest dimension for −Qk-Q_k−Qk​; the zero subspace is included in both maxima. The predicate requires, for every natural k≥1k\ge1k≥1,

pk=#{j<L:rj=k, sj=1},qk=#{j<L:rj=k, sj=−1}.p_k=\#\{j<L:r_j=k,\ s_j=1\}, \qquad q_k=\#\{j<L:r_j=k,\ s_j=-1\}.pk​=#{j<L:rj​=k, sj​=1},qk​=#{j<L:rj​=k, sj​=−1}.

There are no conditions at k=0k=0k=0, and no separate requirements that the rjr_jrj​ be positive, that the sjs_jsj​ lie in {0,1,−1}\{0,1,-1\}{0,1,−1}, that a=±1a=\pm1a=±1, or that AAA be symplectic. Thus entries with rj=0r_j=0rj​=0, or with sj∉{1,−1}s_j\notin\{1,-1\}sj​∈/{1,−1}, are not counted in these equalities. The cases n=0n=0n=0 and L=0L=0L=0 are included.

QAlgorithms.Papers.Independent.Intake100.P39.RepresentsC

For any natural number nnn, including 000, any real 2n×2n2n\times2n2n×2n matrix AAA, any complex linear subspace W⊆C2nW\subseteq\mathbb C^{2n}W⊆C2n, any finite index type HHH with decidable equality, and any complex matrix MMM indexed by H⊔HH\sqcup HH⊔H, this predicate means that there exists a complex basis (bi)i∈H⊔H(b_i)_{i\in H\sqcup H}(bi​)i∈H⊔H​ of WWW such that

ω(bi,bj)=ωH(ei,ej)for all i,j,ACbj=∑i∈H⊔HMijbifor all j.\omega(b_i,b_j)=\omega_H(e_i,e_j)\quad\text{for all }i,j, \qquad A_{\mathbb C}b_j=\sum_{i\in H\sqcup H}M_{ij}b_i\quad\text{for all }j.ω(bi​,bj​)=ωH​(ei​,ej​)for all i,j,AC​bj​=i∈H⊔H∑​Mij​bi​for all j.

Here ACA_{\mathbb C}AC​ is the entrywise complexification of AAA, eie_iei​ is a coordinate vector, and the two complex bilinear forms are

ω(v,w)=∑ℓ=0n−1(v0,ℓw1,ℓ−v1,ℓw0,ℓ),ωH(x,y)=∑h∈H(x0,hy1,h−x1,hy0,h).\omega(v,w)=\sum_{\ell=0}^{n-1}(v_{0,\ell}w_{1,\ell}-v_{1,\ell}w_{0,\ell}), \qquad \omega_H(x,y)=\sum_{h\in H}(x_{0,h}y_{1,h}-x_{1,h}y_{0,h}).ω(v,w)=ℓ=0∑n−1​(v0,ℓ​w1,ℓ​−v1,ℓ​w0,ℓ​),ωH​(x,y)=h∈H∑​(x0,h​y1,h​−x1,h​y0,h​).

No conjugation occurs in these forms. For empty HHH, the predicate holds exactly when W={0}W=\{0\}W={0}.

QAlgorithms.Papers.Independent.Intake100.P39.RepresentsR

For every natural number nnn, real matrix AAA indexed by two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, real linear subspace WWW of the real vectors on those coordinates, finite index type HHH equipped with a finite enumeration and decidable equality, and real matrix MMM indexed by H⊔HH\sqcup HH⊔H, this proposition means that there exists a real basis (bi)i∈H⊔H(b_i)_{i\in H\sqcup H}(bi​)i∈H⊔H​ of WWW such that, writing its basis vectors as ambient vectors and defining

ω(v,w)=∑ℓ=0n−1(vLℓwRℓ−vRℓwLℓ),\omega(v,w)=\sum_{\ell=0}^{n-1} \bigl(v_{L\ell}w_{R\ell}-v_{R\ell}w_{L\ell}\bigr),ω(v,w)=ℓ=0∑n−1​(vLℓ​wRℓ​−vRℓ​wLℓ​),

one has ω(bLh,bLh′)=ω(bRh,bRh′)=0\omega(b_{Lh},b_{Lh'})=\omega(b_{Rh},b_{Rh'})=0ω(bLh​,bLh′​)=ω(bRh​,bRh′​)=0, ω(bLh,bRh′)=δhh′\omega(b_{Lh},b_{Rh'})=\delta_{hh'}ω(bLh​,bRh′​)=δhh′​, and ω(bRh,bLh′)=−δhh′\omega(b_{Rh},b_{Lh'})=-\delta_{hh'}ω(bRh​,bLh′​)=−δhh′​ for every h,h′∈Hh,h'\in Hh,h′∈H, together with

Abj=∑i∈H⊔HMijbifor every j∈H⊔H.A b_j=\sum_{i\in H\sqcup H}M_{ij}b_i \qquad\text{for every }j\in H\sqcup H.Abj​=i∈H⊔H∑​Mij​bi​for every j∈H⊔H.

No separate hypothesis that AAA is symplectic is included. Empty HHH is allowed: then the basis condition requires W={0}W=\{0\}W={0}, and all pairing and action requirements are vacuous. The case n=0n=0n=0 is also allowed.

QAlgorithms.Papers.Independent.Intake100.P39.SameBlocks

For any natural numbers L,KL,KL,K, natural-number lists rjr_jrj​ and integer lists sjs_jsj​ indexed by 0≤j<L0\le j<L0≤j<L, and natural-number lists tht_hth​ and integer lists uhu_huh​ indexed by 0≤h<K0\le h<K0≤h<K, this predicate means that there exists a bijection

e:{0,…,L−1}⟶{0,…,K−1}e:\{0,\ldots,L-1\}\longrightarrow\{0,\ldots,K-1\}e:{0,…,L−1}⟶{0,…,K−1}

such that rj=te(j)r_j=t_{e(j)}rj​=te(j)​ and sj=ue(j)s_j=u_{e(j)}sj​=ue(j)​ for every j<Lj<Lj<L. 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 nnn, including 000, and any two real 2n×2n2n\times2n2n×2n matrices A,BA,BA,B, define NX(z)=XC−zIN_X(z)=X_{\mathbb C}-zINX​(z)=XC​−zI for X=A,BX=A,BX=A,B, where XCX_{\mathbb C}XC​ is the entrywise complexification, and define the real and complex bilinear forms

ωF(v,w)=∑ℓ<n(v0,ℓw1,ℓ−v1,ℓw0,ℓ),F∈{R,C}.\omega_{\mathbb F}(v,w)=\sum_{\ell<n}(v_{0,\ell}w_{1,\ell}-v_{1,\ell}w_{0,\ell}), \qquad \mathbb F\in\{\mathbb R,\mathbb C\}.ωF​(v,w)=ℓ<n∑​(v0,ℓ​w1,ℓ​−v1,ℓ​w0,ℓ​),F∈{R,C}.

For a subspace WWW over F\mathbb FF and a real-valued function QQQ, let pF(W,Q)p_{\mathbb F}(W,Q)pF​(W,Q) be the largest dimension over F\mathbb FF of a linear subspace L⊆WL\subseteq WL⊆W on which Q(v)>0Q(v)>0Q(v)>0 for every nonzero v∈Lv\in Lv∈L; the zero subspace is allowed, so this maximum is at least 000. For real aaa and k≥1k\ge1k≥1, define

WX,a,kR=ker⁡(X−aI)2k,QX,a,kR(v)=a ωR((X−aI)kv,(X−aI)k−1v),W^R_{X,a,k}=\ker(X-aI)^{2k},\qquad Q^R_{X,a,k}(v)=a\,\omega_{\mathbb R}\bigl((X-aI)^kv,(X-aI)^{k-1}v\bigr),WX,a,kR​=ker(X−aI)2k,QX,a,kR​(v)=aωR​((X−aI)kv,(X−aI)k−1v),

and let (pX,a,kR,qX,a,kR)(p^R_{X,a,k},q^R_{X,a,k})(pX,a,kR​,qX,a,kR​) be the two maxima for QX,a,kRQ^R_{X,a,k}QX,a,kR​ and −QX,a,kR-Q^R_{X,a,k}−QX,a,kR​ on this real subspace. For complex zzz and m≥1m\ge1m≥1, put h=⌊m/2⌋h=\lfloor m/2\rfloorh=⌊m/2⌋, WX,z,mU=ker⁡NX(z)mW^U_{X,z,m}=\ker N_X(z)^mWX,z,mU​=kerNX​(z)m, and

QX,z,mU(v)=Re⁡{z−1ωC(NX(z)hv,NX(zˉ)max⁡(h−1,0)vˉ),m even,i ωC(NX(z)hv,NX(zˉ)hvˉ),m odd.Q^U_{X,z,m}(v)=\operatorname{Re} \begin{cases} z^{-1}\omega_{\mathbb C}\bigl(N_X(z)^h v,N_X(\bar z)^{\max(h-1,0)}\bar v\bigr),&m\text{ even},\\ i\,\omega_{\mathbb C}\bigl(N_X(z)^h v,N_X(\bar z)^h\bar v\bigr),&m\text{ odd}. \end{cases}QX,z,mU​(v)=Re{z−1ωC​(NX​(z)hv,NX​(zˉ)max(h−1,0)vˉ),iωC​(NX​(z)hv,NX​(zˉ)hvˉ),​m even,m odd.​

Let (pX,z,mU,qX,z,mU)(p^U_{X,z,m},q^U_{X,z,m})(pX,z,mU​,qX,z,mU​) be the corresponding maxima over complex linear subspaces for QX,z,mUQ^U_{X,z,m}QX,z,mU​ and its negative. The predicate requires all four conditions: for every z∈Cz\in\mathbb Cz∈C, there is a nonzero vector killed by NA(z)N_A(z)NA​(z) if and only if there is one killed by NB(z)N_B(z)NB​(z); for every z∈Cz\in\mathbb Cz∈C and every natural r≥1r\ge1r≥1, dim⁡Cker⁡NA(z)r=dim⁡Cker⁡NB(z)r\dim_{\mathbb C}\ker N_A(z)^r=\dim_{\mathbb C}\ker N_B(z)^rdimC​kerNA​(z)r=dimC​kerNB​(z)r; for every real a∈{1,−1}a\in\{1,-1\}a∈{1,−1} and every natural k≥1k\ge1k≥1,

(pA,a,kR+qA,a,kR, pA,a,kR−qA,a,kR)=(pB,a,kR+qB,a,kR, pB,a,kR−qB,a,kR);(p^R_{A,a,k}+q^R_{A,a,k},\,p^R_{A,a,k}-q^R_{A,a,k}) =(p^R_{B,a,k}+q^R_{B,a,k},\,p^R_{B,a,k}-q^R_{B,a,k});(pA,a,kR​+qA,a,kR​,pA,a,kR​−qA,a,kR​)=(pB,a,kR​+qB,a,kR​,pB,a,kR​−qB,a,kR​);

and for every zzz with ∣z∣=1|z|=1∣z∣=1, z≠1z\ne1z=1, z≠−1z\ne-1z=−1, and every natural m≥1m\ge1m≥1, the same equality holds with R,a,kR,a,kR,a,k replaced by U,z,mU,z,mU,z,m. 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 n=0n=0n=0, all dimensions and maxima are 000, and there are no eigenvalues.

QAlgorithms.Papers.Independent.Intake100.P39.SameRealData

For any natural numbers n,Nn,Nn,N, real matrices AAA of size 2n×2n2n\times2n2n×2n and BBB of size 2N×2N2N\times2N2N×2N, and real number aaa, this predicate requires two families of equalities. For a real matrix CCC of size 2d×2d2d\times2d2d×2d, put TC=C−aIT_C=C-aITC​=C−aI, NC=CC−aIN_C=C_{\mathbb C}-aINC​=CC​−aI, and

Ωd((x,y),(x′,y′))=∑i=0d−1(xiyi′−yixi′).\Omega_d((x,y),(x',y'))=\sum_{i=0}^{d-1}(x_i y'_i-y_i x'_i).Ωd​((x,y),(x′,y′))=i=0∑d−1​(xi​yi′​−yi​xi′​).

For each k≥1k\ge1k≥1, let pC,k±p_{C,k}^{\pm}pC,k±​ be the largest real dimensions of real linear subspaces U⊆ker⁡TC2kU\subseteq\ker T_C^{2k}U⊆kerTC2k​ on which

±a Ωd(TCkv,TCk−1v)>0for every nonzero v∈U.\pm a\,\Omega_d(T_C^k v,T_C^{k-1}v)>0 \quad\text{for every nonzero }v\in U.±aΩd​(TCk​v,TCk−1​v)>0for every nonzero v∈U.

The zero subspace is allowed in these maxima. The predicate says precisely that

dim⁡Cker⁡NAr=dim⁡Cker⁡NBrfor every natural r≥1,\dim_{\mathbb C}\ker N_A^r=\dim_{\mathbb C}\ker N_B^r \quad\text{for every natural }r\ge1,dimC​kerNAr​=dimC​kerNBr​for every natural r≥1,

and

(pA,k++pA,k−, pA,k+−pA,k−)=(pB,k++pB,k−, pB,k+−pB,k−)for every natural k≥1,\bigl(p_{A,k}^++p_{A,k}^-,\ p_{A,k}^+-p_{A,k}^-\bigr) = \bigl(p_{B,k}^++p_{B,k}^-,\ p_{B,k}^+-p_{B,k}^-\bigr) \quad\text{for every natural }k\ge1,(pA,k+​+pA,k−​, pA,k+​−pA,k−​)=(pB,k+​+pB,k−​, pB,k+​−pB,k−​)for every natural k≥1,

where the first coordinate is a natural number and the second is an integer. No symplecticity, eigenvalue condition, or restriction a=±1a=\pm1a=±1 is imposed; a=0a=0a=0, zero dimensional matrices, and different ambient dimensions are included.

QAlgorithms.Papers.Independent.Intake100.P39.SameUnitData

For any natural numbers n,Nn,Nn,N, real matrices AAA of size 2n×2n2n\times2n2n×2n and BBB of size 2N×2N2N\times2N2N×2N, and complex number zzz, this predicate requires the following equalities. For either matrix CCC, of size 2d×2d2d\times2d2d×2d, write NC,λ=CC−λIN_{C,\lambda}=C_{\mathbb C}-\lambda INC,λ​=CC​−λI, use the complex bilinear form

Ωd((x,y),(x′,y′))=∑i=0d−1(xiyi′−yixi′),\Omega_d((x,y),(x',y'))=\sum_{i=0}^{d-1}(x_i y'_i-y_i x'_i),Ωd​((x,y),(x′,y′))=i=0∑d−1​(xi​yi′​−yi​xi′​),

and, for m≥1m\ge1m≥1, define

qC,m(v,w)={z−1Ωd(NC,zhv,NC,zˉh−1wˉ),m=2h,i Ωd(NC,zhv,NC,zˉhwˉ),m=2h+1.q_{C,m}(v,w)= \begin{cases} z^{-1}\Omega_d(N_{C,z}^h v,N_{C,\bar z}^{h-1}\bar w),&m=2h,\\ \mathrm i\,\Omega_d(N_{C,z}^h v,N_{C,\bar z}^h\bar w),&m=2h+1. \end{cases}qC,m​(v,w)={z−1Ωd​(NC,zh​v,NC,zˉh−1​wˉ),iΩd​(NC,zh​v,NC,zˉh​wˉ),​m=2h,m=2h+1.​

Let pC,m±p_{C,m}^{\pm}pC,m±​ be the largest complex dimensions of complex subspaces U⊆ker⁡NC,zmU\subseteq\ker N_{C,z}^mU⊆kerNC,zm​ satisfying ±Re⁡qC,m(v,v)>0\pm\operatorname{Re}q_{C,m}(v,v)>0±ReqC,m​(v,v)>0 for every nonzero v∈Uv\in Uv∈U; the zero subspace is included. The requirements are

dim⁡Cker⁡NA,zr=dim⁡Cker⁡NB,zr(r≥1),\dim_{\mathbb C}\ker N_{A,z}^r=\dim_{\mathbb C}\ker N_{B,z}^r \quad(r\ge1),dimC​kerNA,zr​=dimC​kerNB,zr​(r≥1),

and

(pA,m++pA,m−, pA,m+−pA,m−)=(pB,m++pB,m−, pB,m+−pB,m−)(m≥1),\bigl(p_{A,m}^++p_{A,m}^-,\ p_{A,m}^+-p_{A,m}^-\bigr) = \bigl(p_{B,m}^++p_{B,m}^-,\ p_{B,m}^+-p_{B,m}^-\bigr) \quad(m\ge1),(pA,m+​+pA,m−​, pA,m+​−pA,m−​)=(pB,m+​+pB,m−​, pB,m+​−pB,m−​)(m≥1),

with natural number first coordinates and integer second coordinates. Neither matrix is assumed symplectic, and zzz need not be an eigenvalue or lie on the unit circle. Zero dimensions and z=0z=0z=0 are allowed, with 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Intake100.P39.SymplecticSumIndex

For every natural number LLL and function r:{0,…,L−1}→Nr:\{0,\ldots,L-1\}\to\mathbb Nr:{0,…,L−1}→N, this abbreviates the disjoint union of two copies of the set of pairs (j,i)(j,i)(j,i) satisfying 0≤j<L0\le j<L0≤j<L and 0≤i<rj0\le i<r_j0≤i<rj​. Each index therefore carries a left or right tag as well as the pair (j,i)(j,i)(j,i), and the total cardinality is 2∑j=0L−1rj2\sum_{j=0}^{L-1}r_j2∑j=0L−1​rj​. Zero values of rjr_jrj​ contribute no indices; in particular, L=0L=0L=0 gives an empty type.

QAlgorithms.Papers.Independent.Intake100.P39.SymplecticallyConjugate

For any natural number nnn, including 000, and any real 2n×2n2n\times2n2n×2n matrices A,BA,BA,B, this predicate means that there exists a real 2n×2n2n\times2n2n×2n matrix PPP satisfying

PTJP=J,BP=PA,J=(0−InIn0).P^{\mathsf T}JP=J,\qquad BP=PA, \qquad J=\begin{pmatrix}0&-I_n\\I_n&0\end{pmatrix}.PTJP=J,BP=PA,J=(0In​​−In​0​).

There is no separate assumption that AAA or BBB is symplectic. When n=0n=0n=0, the matrices are empty, and their unique possible PPP satisfies both equalities.

QAlgorithms.Papers.Independent.Intake100.P39.UnitClassification

For any natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, and z∈Cz\in\mathbb Cz∈C, this predicate asserts that there exist a natural number LLL, positive natural numbers mjm_jmj​, and signs sj∈{1,−1}s_j\in\{1,-1\}sj​∈{1,−1}, indexed by 0≤j<L0\le j<L0≤j<L, satisfying the following conditions. For a real 2d×2d2d\times2d2d×2d matrix CCC, put NC,λ=CC−λIN_{C,\lambda}=C_{\mathbb C}-\lambda INC,λ​=CC​−λI,

VC(z)={v∈R2d:vC∈∑λ∈{z,z−1,zˉ,zˉ−1}ker⁡NC,λ2d},Ωd((x,y),(x′,y′))=∑i(xiyi′−yixi′).V_C(z)=\left\{v\in\mathbb R^{2d}: v_{\mathbb C}\in\sum_{\lambda\in\{z,z^{-1},\bar z,\bar z^{-1}\}} \ker N_{C,\lambda}^{2d}\right\}, \qquad \Omega_d((x,y),(x',y'))=\sum_i(x_i y'_i-y_i x'_i).VC​(z)=⎩⎨⎧​v∈R2d:vC​∈λ∈{z,z−1,zˉ,zˉ−1}∑​kerNC,λ2d​⎭⎬⎫​,Ωd​((x,y),(x′,y′))=i∑​(xi​yi′​−yi​xi′​).

There must be a real basis ej,i,fj,ie_{j,i},f_{j,i}ej,i​,fj,i​, 0≤i<mj0\le i<m_j0≤i<mj​, of VA(z)V_A(z)VA​(z), with Ωn(ej,i,fj′,i′)=δjj′δii′\Omega_n(e_{j,i},f_{j',i'})=\delta_{jj'}\delta_{ii'}Ωn​(ej,i​,fj′,i′​)=δjj′​δii′​ and zero pairings between two eee's or two fff's, in which entries between different block labels vanish and block jjj is the following explicitly defined matrix Umj(z,sj)U_{m_j}(z,s_j)Umj​​(z,sj​). Set

R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w),R(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\ \operatorname{Im}w&\operatorname{Re}w\end{pmatrix},R(w)=(RewImw​−ImwRew​),

let JhJ_hJh​ be the 2h×2h2h\times2h2h×2h block matrix with diagonal blocks R(zˉ)R(\bar z)R(zˉ), identity blocks immediately above the block diagonal, and zeros elsewhere, and let the 2h×22h\times22h×2 matrices V,UV,UV,U have block rows

Vℓ=(−1)h−ℓ−1R(zh−ℓ)(0≤ℓ<h),U=VR(z).V_\ell=(-1)^{h-\ell-1}R(z^{h-\ell})\quad(0\le\ell<h), \qquad U=VR(z).Vℓ​=(−1)h−ℓ−1R(zh−ℓ)(0≤ℓ<h),U=VR(z).

For m=2hm=2hm=2h,

U2h(z,s)=(Jh−1E0JhT),U_{2h}(z,s)= \begin{pmatrix}J_h^{-1}&E\\0&J_h^{\mathsf T}\end{pmatrix},U2h​(z,s)=(Jh−1​0​EJhT​​),

where EEE is zero except in its final two columns, which equal sVsVsV. For m=2h+1m=2h+1m=2h+1, splitting each sector into lengths 2h2h2h and one,

U2h+1(z,s)=(Jh−1sU∙,1HU∙,00Re⁡ze2h−2TsIm⁡z00JhT00−sIm⁡z−se2h−1TRe⁡z),U_{2h+1}(z,s)= \begin{pmatrix} J_h^{-1}&sU_{\bullet,1}&H&U_{\bullet,0}\\ 0&\operatorname{Re}z&e_{2h-2}^{\mathsf T}&s\operatorname{Im}z\\ 0&0&J_h^{\mathsf T}&0\\ 0&-s\operatorname{Im}z&-s e_{2h-1}^{\mathsf T}&\operatorname{Re}z \end{pmatrix},U2h+1​(z,s)=​Jh−1​000​sU∙,1​Rez0−sImz​He2h−2T​JhT​−se2h−1T​​U∙,0​sImz0Rez​​,

where HHH is zero except for its final two columns, respectively (s/2)V∙,1(s/2)V_{\bullet,1}(s/2)V∙,1​ and −(s/2)V∙,0-(s/2)V_{\bullet,0}−(s/2)V∙,0​, and ere_rer​ is the rrr-th standard vector of R2h\mathbb R^{2h}R2h, interpreted as zero when its index is outside that range; when h=0h=0h=0, the matrices with 2h2h2h rows or columns are empty. In addition to this basis representation, the predicate requires dim⁡Cker⁡NA,z=L\dim_{\mathbb C}\ker N_{A,z}=LdimC​kerNA,z​=L. For any CCC and natural t≥1t\ge1t≥1, define

qC,t(v,w)={z−1Ωd(NC,zhv,NC,zˉh−1wˉ),t=2h,i Ωd(NC,zhv,NC,zˉhwˉ),t=2h+1,q_{C,t}(v,w)= \begin{cases} z^{-1}\Omega_d(N_{C,z}^h v,N_{C,\bar z}^{h-1}\bar w),&t=2h,\\ \mathrm i\,\Omega_d(N_{C,z}^h v,N_{C,\bar z}^h\bar w),&t=2h+1, \end{cases}qC,t​(v,w)={z−1Ωd​(NC,zh​v,NC,zˉh−1​wˉ),iΩd​(NC,zh​v,NC,zˉh​wˉ),​t=2h,t=2h+1,​

and let pC,t±p_{C,t}^{\pm}pC,t±​ be the maximum complex dimension of a complex subspace of ker⁡NC,zt\ker N_{C,z}^tkerNC,zt​ on which ±Re⁡qC,t(v,v)>0\pm\operatorname{Re}q_{C,t}(v,v)>0±ReqC,t​(v,v)>0 for every nonzero vvv, allowing the zero subspace. The required sign counts are

pA,t±=#{j:mj=t, sj=±1}(t≥1).p_{A,t}^{\pm}=\#\{j:m_j=t,\ s_j=\pm1\}\quad(t\ge1).pA,t±​=#{j:mj​=t, sj​=±1}(t≥1).

Finally, for every natural N,KN,KN,K, real 2N×2N2N\times2N2N×2N matrix BBB, natural list ttt of length KKK, and integer list uuu of length KKK, if BTΩNB=ΩNB^{\mathsf T}\Omega_NB=\Omega_NBTΩN​B=ΩN​, if t,ut,ut,u satisfy the same positivity, sign, and basis representation conditions using the matrices Utj(z,uj)U_{t_j}(z,u_j)Utj​​(z,uj​), if dim⁡Cker⁡NA,zr=dim⁡Cker⁡NB,zr\dim_{\mathbb C}\ker N_{A,z}^r=\dim_{\mathbb C}\ker N_{B,z}^rdimC​kerNA,zr​=dimC​kerNB,zr​ for every r≥1r\ge1r≥1, and if

(pA,r++pA,r−, pA,r+−pA,r−)=(pB,r++pB,r−, pB,r+−pB,r−)(r≥1),(p_{A,r}^++p_{A,r}^-,\,p_{A,r}^+-p_{A,r}^-) =(p_{B,r}^++p_{B,r}^-,\,p_{B,r}^+-p_{B,r}^-) \quad(r\ge1),(pA,r+​+pA,r−​,pA,r+​−pA,r−​)=(pB,r+​+pB,r−​,pB,r+​−pB,r−​)(r≥1),

with integer differences, then there is a bijection e:{0,…,L−1}→{0,…,K−1}e:\{0,\ldots,L-1\}\to\{0,\ldots,K-1\}e:{0,…,L−1}→{0,…,K−1} with mj=te(j)m_j=t_{e(j)}mj​=te(j)​ and sj=ue(j)s_j=u_{e(j)}sj​=ue(j)​. No symplecticity assumption on AAA, eigenvalue assumption on zzz, 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 n,Ln,Ln,L, a real 2n×2n2n\times2n2n×2n matrix AAA, a complex number zzz, natural numbers mjm_jmj​, and integers sjs_jsj​, indexed by 0≤j<L0\le j<L0≤j<L, this predicate requires mj>0m_j>0mj​>0 and sj∈{1,−1}s_j\in\{1,-1\}sj​∈{1,−1}. Put Eλ=ker⁡(AC−λI)2nE_\lambda=\ker(A_{\mathbb C}-\lambda I)^{2n}Eλ​=ker(AC​−λI)2n, where ACA_{\mathbb C}AC​ is the entrywise complexification, and put

P={v∈R2n:vC∈∑λ∈{z,z−1,zˉ,zˉ−1}Eλ}.P=\left\{v\in\mathbb R^{2n}:v_{\mathbb C}\in \sum_{\lambda\in\{z,z^{-1},\bar z,\bar z^{-1}\}}E_\lambda\right\}.P=⎩⎨⎧​v∈R2n:vC​∈λ∈{z,z−1,zˉ,zˉ−1}∑​Eλ​⎭⎬⎫​.

It requires a real basis bϵ,j,ℓb_{\epsilon,j,\ell}bϵ,j,ℓ​ of PPP, indexed by ϵ∈{0,1}\epsilon\in\{0,1\}ϵ∈{0,1}, 0≤j<L0\le j<L0≤j<L, and 0≤ℓ<mj0\le\ell<m_j0≤ℓ<mj​, with

ω(b0,j,ℓ,b1,t,h)=δ(j,ℓ),(t,h),ω(b0,j,ℓ,b0,t,h)=ω(b1,j,ℓ,b1,t,h)=0,\omega(b_{0,j,\ell},b_{1,t,h})=\delta_{(j,\ell),(t,h)},\qquad \omega(b_{0,j,\ell},b_{0,t,h})=\omega(b_{1,j,\ell},b_{1,t,h})=0,ω(b0,j,ℓ​,b1,t,h​)=δ(j,ℓ),(t,h)​,ω(b0,j,ℓ​,b0,t,h​)=ω(b1,j,ℓ​,b1,t,h​)=0,

where ω(v,w)=∑h<n(v0,hw1,h−v1,hw0,h)\omega(v,w)=\sum_{h<n}(v_{0,h}w_{1,h}-v_{1,h}w_{0,h})ω(v,w)=∑h<n​(v0,h​w1,h​−v1,h​w0,h​), and with reversed pairings given by skew symmetry. Its matrix for AAA has no entries connecting distinct jjj-blocks, and the block belonging to m=mj,s=sjm=m_j,s=s_jm=mj​,s=sj​ is specified as follows. Define

R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w),R(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\ \operatorname{Im}w&\operatorname{Re}w\end{pmatrix},R(w)=(RewImw​−ImwRew​),

let JJJ be the 2k×2k2k\times2k2k×2k block matrix with R(zˉ)R(\bar z)R(zˉ) on its diagonal, I2I_2I2​ immediately above that diagonal, and zeros elsewhere, and, for 0≤i<2k0\le i<2k0≤i<2k, α∈{0,1}\alpha\in\{0,1\}α∈{0,1}, define

Viα=(−1)k−⌊i/2⌋−1R ⁣(z k−⌊i/2⌋)i mod 2,α,U=VR(z).V_{i\alpha}=(-1)^{k-\lfloor i/2\rfloor-1} R\!\left(z^{\,k-\lfloor i/2\rfloor}\right)_{i\bmod2,\alpha}, \qquad U=VR(z).Viα​=(−1)k−⌊i/2⌋−1R(zk−⌊i/2⌋)imod2,α​,U=VR(z).

If m=2km=2km=2k, the block is

Mj=(J−1C0JT),Cih={sVi,h mod 2,h+2≥2k,0,h+2<2k.M_j=\begin{pmatrix}J^{-1}&C\\0&J^{\mathsf T}\end{pmatrix}, \qquad C_{ih}= \begin{cases} sV_{i,h\bmod2},&h+2\ge2k,\\ 0,&h+2<2k. \end{cases}Mj​=(J−10​CJT​),Cih​={sVi,hmod2​,0,​h+2≥2k,h+2<2k.​

If m=2k+1m=2k+1m=2k+1, its matrix, partitioning each half into its first 2k2k2k coordinates and its last coordinate, is

Mj=(J−1sU⋅,1DU⋅,00Re⁡zrTsIm⁡z00JT00−sIm⁡ztTRe⁡z),M_j= \begin{pmatrix} J^{-1}&sU_{\cdot,1}&D&U_{\cdot,0}\\ 0&\operatorname{Re}z&r^{\mathsf T}&s\operatorname{Im}z\\ 0&0&J^{\mathsf T}&0\\ 0&-s\operatorname{Im}z&t^{\mathsf T}&\operatorname{Re}z \end{pmatrix},Mj​=​J−1000​sU⋅,1​Rez0−sImz​DrTJTtT​U⋅,0​sImz0Rez​​,

where, for 0≤i,h<2k0\le i,h<2k0≤i,h<2k,

Dih={s2Vi1,h+2≥2k and h is even,−s2Vi0,h+2≥2k and h is odd,0,h+2<2k,rh=1{h+2=2k},th=−s1{h+1=2k}.D_{ih}= \begin{cases} \frac{s}{2}V_{i1},&h+2\ge2k\text{ and }h\text{ is even},\\ -\frac{s}{2}V_{i0},&h+2\ge2k\text{ and }h\text{ is odd},\\ 0,&h+2<2k, \end{cases} \qquad r_h=\mathbf1_{\{h+2=2k\}},\qquad t_h=-s\mathbf1_{\{h+1=2k\}}.Dih​=⎩⎨⎧​2s​Vi1​,−2s​Vi0​,0,​h+2≥2k and h is even,h+2≥2k and h is odd,h+2<2k,​rh​=1{h+2=2k}​,th​=−s1{h+1=2k}​.

The representation condition is precisely Abϵ,j,ℓ=∑η=01∑h<mj(Mj)(η,h),(ϵ,ℓ)bη,j,hA b_{\epsilon,j,\ell}=\sum_{\eta=0}^{1}\sum_{h<m_j}(M_j)_{(\eta,h),(\epsilon,\ell)}b_{\eta,j,h}Abϵ,j,ℓ​=∑η=01​∑h<mj​​(Mj​)(η,h),(ϵ,ℓ)​bη,j,h​. No hypothesis requires zzz to have modulus 111, to be nonreal, or to be an eigenvalue, and no symplectic hypothesis on AAA is separately imposed. Reciprocals and matrix inverses are total, with 0−1=00^{-1}=00−1=0 and singular matrix inverse 000. The odd case permits k=0k=0k=0, in which its 2k2k2k-coordinate parts are empty; L=0L=0L=0 is also allowed and requires P={0}P=\{0\}P={0}.

QAlgorithms.Papers.Independent.Intake100.P39.UnitSignCounts

For any natural numbers n,Ln,Ln,L, real 2n×2n2n\times2n2n×2n matrix AAA, complex number zzz, and lists m:{0,…,L−1}→Nm:\{0,\ldots,L-1\}\to\mathbb Nm:{0,…,L−1}→N and s:{0,…,L−1}→Zs:\{0,\ldots,L-1\}\to\mathbb Zs:{0,…,L−1}→Z, this predicate asserts the following counts for every natural number t≥1t\ge1t≥1. Write Nλ=AC−λIN_\lambda=A_{\mathbb C}-\lambda INλ​=AC​−λI, where ACA_{\mathbb C}AC​ is obtained by viewing the entries of AAA as complex numbers, and write

ΩC((x,y),(x′,y′))=∑i=0n−1(xiyi′−yixi′).\Omega_{\mathbb C}((x,y),(x',y'))=\sum_{i=0}^{n-1}(x_i y'_i-y_i x'_i).ΩC​((x,y),(x′,y′))=i=0∑n−1​(xi​yi′​−yi​xi′​).

On Wt=ker⁡NztW_t=\ker N_z^tWt​=kerNzt​, define

qt(v,w)={z−1ΩC(Nzhv,Nzˉh−1wˉ),t=2h,i ΩC(Nzhv,Nzˉhwˉ),t=2h+1.q_t(v,w)= \begin{cases} z^{-1}\Omega_{\mathbb C}(N_z^h v,N_{\bar z}^{h-1}\bar w),&t=2h,\\ \mathrm i\,\Omega_{\mathbb C}(N_z^h v,N_{\bar z}^h\bar w),&t=2h+1. \end{cases}qt​(v,w)={z−1ΩC​(Nzh​v,Nzˉh−1​wˉ),iΩC​(Nzh​v,Nzˉh​wˉ),​t=2h,t=2h+1.​

Let pt+p_t^+pt+​ and pt−p_t^-pt−​ be the largest complex dimensions of complex linear subspaces U⊆WtU\subseteq W_tU⊆Wt​ on which, respectively, Re⁡qt(v,v)>0\operatorname{Re}q_t(v,v)>0Reqt​(v,v)>0 and −Re⁡qt(v,v)>0-\operatorname{Re}q_t(v,v)>0−Reqt​(v,v)>0 for every nonzero v∈Uv\in Uv∈U. The zero subspace is allowed, so either maximum can be zero. The required equalities are

pt+=#{j:mj=t, sj=1},pt−=#{j:mj=t, sj=−1}.p_t^+=\#\{j:m_j=t,\ s_j=1\}, \qquad p_t^-=\#\{j:m_j=t,\ s_j=-1\}.pt+​=#{j:mj​=t, sj​=1},pt−​=#{j:mj​=t, sj​=−1}.

There are no assumptions that AAA is symplectic, that zzz is an eigenvalue or has modulus one, or that the entries of m,sm,sm,s satisfy any restrictions; entries with mj=0m_j=0mj​=0 or sj∉{1,−1}s_j\notin\{1,-1\}sj​∈/{1,−1} contribute to neither count. Both n=0n=0n=0 and L=0L=0L=0 are included, and the complex inverse is total, with 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Intake100.P39.VectorHeight

For every natural number nnn, every real matrix AAA indexed by CnC_nCn​, the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, every z∈Cz\in\mathbb Cz∈C, every vector v:Cn→Cv:C_n\to\mathbb Cv:Cn​→C, and every natural number ppp, VectorHeight(A,z,v,p)\mathrm{VectorHeight}(A,z,v,p)VectorHeight(A,z,v,p) means exactly

(AC−zI)pv≠0and(AC−zI)p+1v=0,(A_{\mathbb C}-zI)^pv\ne0 \quad\text{and}\quad (A_{\mathbb C}-zI)^{p+1}v=0,(AC​−zI)pv=0and(AC​−zI)p+1v=0,

where ACA_{\mathbb C}AC​ is the entrywise complex embedding of AAA. In particular, p=0p=0p=0 means v≠0v\ne0v=0 and ACv=zvA_{\mathbb C}v=zvAC​v=zv. The condition cannot hold for v=0v=0v=0, and consequently cannot hold when n=0n=0n=0.

QAlgorithms.Papers.Independent.Intake100.P39.catalogueMatrix

For every catalogue element ccc, this defines a complex square matrix indexed by two copies of {0,…,size⁡(c)−1}\{0,\ldots,\operatorname{size}(c)-1\}{0,…,size(c)−1}, hence of dimension 2size⁡(c)2\operatorname{size}(c)2size(c). To describe its entries, let Jr(λ)J_r(\lambda)Jr​(λ) be the r×rr\times rr×r matrix with λ\lambdaλ on the diagonal, 111 immediately above the diagonal, and 000 elsewhere, and let Er(s)E_r(s)Er​(s) be diagonal with last diagonal entry sss and all other entries zero; integers sss are regarded as complex numbers. The three cases are

single⁡(z,k,s):(Jk(z)−1Jk(z)−1Ek(s)0Jk(z)T),paired⁡(z,k,s):(P−1P−1(0Ek(s)Ek(s)0)0PT),P=diag⁡(Jk(zˉ),Jk(z)),unequal⁡(z,k,s):(P−1P−1(0RRT0)0PT),P=diag⁡(Jk(zˉ),Jk+1(z)).\begin{aligned} \operatorname{single}(z,k,s)&:\quad \begin{pmatrix} J_k(z)^{-1}&J_k(z)^{-1}E_k(s)\\ 0&J_k(z)^{\mathsf T} \end{pmatrix},\\ \operatorname{paired}(z,k,s)&:\quad \begin{pmatrix} P^{-1}&P^{-1}\begin{pmatrix}0&E_k(s)\\E_k(s)&0\end{pmatrix}\\ 0&P^{\mathsf T} \end{pmatrix}, \qquad P=\operatorname{diag}(J_k(\bar z),J_k(z)),\\ \operatorname{unequal}(z,k,s)&:\quad \begin{pmatrix} P^{-1}&P^{-1}\begin{pmatrix}0&R\\R^{\mathsf T}&0\end{pmatrix}\\ 0&P^{\mathsf T} \end{pmatrix}, \qquad P=\operatorname{diag}(J_k(\bar z),J_{k+1}(z)). \end{aligned}single(z,k,s)paired(z,k,s)unequal(z,k,s)​:(Jk​(z)−10​Jk​(z)−1Ek​(s)Jk​(z)T​),:​P−10​P−1(0Ek​(s)​Ek​(s)0​)PT​​,P=diag(Jk​(zˉ),Jk​(z)),:​P−10​P−1(0RT​R0​)PT​​,P=diag(Jk​(zˉ),Jk+1​(z)).​

Here RRR is k×(k+1)k\times(k+1)k×(k+1), with zero entries except

Rk−1,k=z is,Rk−1,k−1=is2R_{k-1,k}=z\,\mathrm{i}s,\qquad R_{k-1,k-1}=\frac{\mathrm{i}s}{2}Rk−1,k​=zis,Rk−1,k−1​=2is​

when k>0k>0k>0; when k=0k=0k=0, RRR has no rows. In the paired and unequal cases, the indices within each outer half are concatenated in the displayed order, giving half-sizes 2k2k2k and 2k+12k+12k+1, 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 k=0k=0k=0, the single and paired cases give empty matrices, while the unequal case gives diag⁡(z−1,z)\operatorname{diag}(z^{-1},z)diag(z−1,z), with 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Intake100.P39.catalogueSign

This defines an integer-valued function that returns the third parameter of every catalogue element:

sign⁡(single⁡(z,k,s))=sign⁡(paired⁡(z,k,s))=sign⁡(unequal⁡(z,k,s))=s.\operatorname{sign}(\operatorname{single}(z,k,s)) =\operatorname{sign}(\operatorname{paired}(z,k,s)) =\operatorname{sign}(\operatorname{unequal}(z,k,s))=s.sign(single(z,k,s))=sign(paired(z,k,s))=sign(unequal(z,k,s))=s.

The complex parameter zzz, natural number kkk, and choice of constructor do not affect this value. No validity condition is required, so the returned integer need not belong to {0,1,−1}\{0,1,-1\}{0,1,−1}.

QAlgorithms.Papers.Independent.Intake100.P39.catalogueSize

This defines a natural-number-valued function on the three kinds of catalogue elements by

size⁡(single⁡(z,k,s))=k,size⁡(paired⁡(z,k,s))=2k,size⁡(unequal⁡(z,k,s))=2k+1.\operatorname{size}(\operatorname{single}(z,k,s))=k,\qquad \operatorname{size}(\operatorname{paired}(z,k,s))=2k,\qquad \operatorname{size}(\operatorname{unequal}(z,k,s))=2k+1.size(single(z,k,s))=k,size(paired(z,k,s))=2k,size(unequal(z,k,s))=2k+1.

The value depends only on the constructor and kkk, and is independent of the complex parameter zzz and integer parameter sss. In particular, when k=0k=0k=0, the respective sizes are 0,0,10,0,10,0,1.

QAlgorithms.Papers.Independent.Intake100.P39.chainT

For every natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, complex number zzz, complex vector v∈C2nv\in\mathbb C^{2n}v∈C2n, and natural numbers i,ji,ji,j, this defines

Ti,j(A,z,v)=(ziz‾ j)−1∑r=0n−1(xr+yr−−xr−yr+),x=(AC−zI)iv,y=(AC−z‾I)jv‾.T_{i,j}(A,z,v)= \bigl(z^i\overline z^{\,j}\bigr)^{-1} \sum_{r=0}^{n-1} \left(x_r^+y_r^- -x_r^-y_r^+\right), \qquad x=(A_{\mathbb C}-zI)^iv,\quad y=(A_{\mathbb C}-\overline zI)^j\overline v.Ti,j​(A,z,v)=(zizj)−1r=0∑n−1​(xr+​yr−​−xr−​yr+​),x=(AC​−zI)iv,y=(AC​−zI)jv.

Here coordinates are grouped into two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, superscripts +++ and −-− denote these two groups, ACA_{\mathbb C}AC​ is obtained by viewing each real entry of AAA as complex, and conjugation of vectors is coordinatewise. Zeroth powers of operators are identities. Complex inversion is total, with 0−1=00^{-1}=00−1=0: when z=0z=0z=0, the prefactor is 111 if i=j=0i=j=0i=j=0 and 000 otherwise. The definition includes n=0n=0n=0, when the sum is empty and the value is 000.

QAlgorithms.Papers.Independent.Intake100.P39.complexEvenBlock

For any complex numbers z,sz,sz,s and natural number kkk, let Jk(w)J_k(w)Jk​(w) denote the k×kk\times kk×k matrix with diagonal entries www, entries one immediately above the diagonal, and zeros elsewhere, and let Dk(s)D_k(s)Dk​(s) be diagonal with its final diagonal entry equal to sss and all others zero. This definition gives the complex 4k×4k4k\times4k4k×4k matrix, with four consecutive sectors of length kkk,

P=(Jk(zˉ)00Jk(z)),M=(P−1P−1(0Dk(s)Dk(s)0)0PT).P=\begin{pmatrix}J_k(\bar z)&0\\0&J_k(z)\end{pmatrix}, \qquad M= \begin{pmatrix} P^{-1}&P^{-1}\begin{pmatrix}0&D_k(s)\\D_k(s)&0\end{pmatrix}\\ 0&P^{\mathsf T} \end{pmatrix}.P=(Jk​(zˉ)0​0Jk​(z)​),M=​P−10​P−1(0Dk​(s)​Dk​(s)0​)PT​​.

The transpose is the ordinary transpose, without conjugation. There are no restrictions on zzz or sss. The inverse is the total square matrix inverse, equal to zero for a singular matrix; in particular, z=0z=0z=0 is allowed. If k=0k=0k=0, all sectors are empty and the result is the empty square matrix.

QAlgorithms.Papers.Independent.Intake100.P39.complexOddBlock

For any complex numbers z,sz,sz,s and natural number kkk, let Jh(w)J_h(w)Jh​(w) be the h×hh\times hh×h matrix with diagonal www, superdiagonal entries one, and all other entries zero. Let SSS be the k×(k+1)k\times(k+1)k×(k+1) matrix whose only potentially nonzero entries, when k≥1k\ge1k≥1, are

Sk−1,k=z i s,Sk−1,k−1=i s/2;S_{k-1,k}=z\,\mathrm i\,s,\qquad S_{k-1,k-1}=\mathrm i\,s/2;Sk−1,k​=zis,Sk−1,k−1​=is/2;

for k=0k=0k=0, it has no rows and one column. This definition gives the complex (4k+2)×(4k+2)(4k+2)\times(4k+2)(4k+2)×(4k+2) matrix, with sector lengths k,k+1,k,k+1k,k+1,k,k+1k,k+1,k,k+1,

P=(Jk(zˉ)00Jk+1(z)),M=(P−1P−1(0SST0)0PT).P=\begin{pmatrix}J_k(\bar z)&0\\0&J_{k+1}(z)\end{pmatrix}, \qquad M= \begin{pmatrix} P^{-1}&P^{-1}\begin{pmatrix}0&S\\S^{\mathsf T}&0\end{pmatrix}\\ 0&P^{\mathsf T} \end{pmatrix}.P=(Jk​(zˉ)0​0Jk+1​(z)​),M=​P−10​P−1(0ST​S0​)PT​​.

Both transposes are ordinary transposes, without conjugation. There are no restrictions on z,sz,sz,s, and the inverse is total, equal to zero for a singular matrix. In particular, k=0k=0k=0 gives diag⁡(z−1,z)\operatorname{diag}(z^{-1},z)diag(z−1,z), independently of sss, with 0−1=00^{-1}=00−1=0.

QAlgorithms.Papers.Independent.Intake100.P39.cyclicC

For every natural number nnn, every real matrix AAA indexed by CnC_nCn​, the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, every z∈Cz\in\mathbb Cz∈C, and every vector v:Cn→Cv:C_n\to\mathbb Cv:Cn​→C, cyclicC(A,z,v)\mathrm{cyclicC}(A,z,v)cyclicC(A,z,v) is the complex subspace

span⁡C{(AC−zI)jv:j∈N},\operatorname{span}_{\mathbb C} \{(A_{\mathbb C}-zI)^jv:j\in\mathbb N\},spanC​{(AC​−zI)jv:j∈N},

where ACA_{\mathbb C}AC​ is AAA with complex entries. The exponent j=0j=0j=0 is included, so vvv itself is among the generators. No eigenvalue or generalized-eigenvector condition is required. If v=0v=0v=0, including necessarily when n=0n=0n=0, the resulting subspace is zero.

QAlgorithms.Papers.Independent.Intake100.P39.cyclicR

For every natural number nnn, every real matrix AAA indexed by CnC_nCn​, the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, every a∈Ra\in\mathbb Ra∈R, and every real vector v:Cn→Rv:C_n\to\mathbb Rv:Cn​→R, cyclicR(A,a,v)\mathrm{cyclicR}(A,a,v)cyclicR(A,a,v) is the real subspace

span⁡R{(A−aI)jv:j∈N}.\operatorname{span}_{\mathbb R} \{(A-aI)^jv:j\in\mathbb N\}.spanR​{(A−aI)jv:j∈N}.

The exponent j=0j=0j=0 is included, so vvv itself is among the generators. There are no additional conditions on AAA, aaa, or vvv. If v=0v=0v=0, including necessarily when n=0n=0n=0, the resulting subspace is zero.

QAlgorithms.Papers.Independent.Intake100.P39.definiteIndex

For every field KKK, additive commutative group EEE equipped with a KKK-vector-space structure of finite dimension, KKK-linear subspace W⊆EW\subseteq EW⊆E, and arbitrary function q:E→Rq:E\to\mathbb Rq:E→R, this defines the natural number

max⁡{d∈{0,…,dim⁡KE}:∃ K-linear subspace L⊆W, dim⁡KL=d, ∀v∈L∖{0}, q(v)>0}.\max\left\{ d\in\{0,\ldots,\dim_KE\}: \exists\,K\text{-linear subspace }L\subseteq W,\ \dim_KL=d,\ \forall v\in L\setminus\{0\},\ q(v)>0 \right\}.max{d∈{0,…,dimK​E}:∃K-linear subspace L⊆W, dimK​L=d, ∀v∈L∖{0}, q(v)>0}.

No quadratic-form or regularity assumption is made on qqq. The zero subspace always qualifies, since its positivity condition is vacuous, so the set being maximized is nonempty. In particular, the value is 000 when W={0}W=\{0\}W={0}, including when EEE has dimension zero.

QAlgorithms.Papers.Independent.Intake100.P39.eigenOrbit

For every complex number zzz, eigenOrbit(z)\mathrm{eigenOrbit}(z)eigenOrbit(z) is the finite set

{z,z−1,z‾,(z‾)−1}.\{z,z^{-1},\overline z,(\overline z)^{-1}\}.{z,z−1,z,(z)−1}.

Repeated elements are included only once. No nonzero assumption is imposed: inversion is defined at zero by 0−1=00^{-1}=00−1=0, so eigenOrbit(0)={0}\mathrm{eigenOrbit}(0)=\{0\}eigenOrbit(0)={0}.

QAlgorithms.Papers.Independent.Intake100.P39.groupedOmega

For every commutative ring KKK, every type HHH equipped with a finite enumeration, and every pair of functions v,w:H⊔H→Kv,w:H\sqcup H\to Kv,w:H⊔H→K, this defines

Ω(v,w)=∑h∈H(vLhwRh−vRhwLh),\Omega(v,w)=\sum_{h\in H} \bigl(v_{Lh}w_{Rh}-v_{Rh}w_{Lh}\bigr),Ω(v,w)=h∈H∑​(vLh​wRh​−vRh​wLh​),

where LhLhLh and RhRhRh denote the indices in the left and right copies of HHH. The ring need not be a field or have characteristic different from two. If HHH is empty, the sum is zero for every v,wv,wv,w.

QAlgorithms.Papers.Independent.Intake100.P39.jordan

For every field KKK, element z∈Kz\in Kz∈K, and natural number mmm, this defines the m×mm\times mm×m matrix JJJ over KKK, with rows and columns numbered 0,…,m−10,\ldots,m-10,…,m−1, by

Jij={z,i=j,1,i+1=j,0,otherwise.J_{ij}= \begin{cases} z,&i=j,\\ 1,&i+1=j,\\ 0,&\text{otherwise}. \end{cases}Jij​=⎩⎨⎧​z,1,0,​i=j,i+1=j,otherwise.​

Thus zzz occupies the diagonal and 111 the immediately superdiagonal. The definition allows z=0z=0z=0 and m=0m=0m=0, with m=0m=0m=0 yielding the empty matrix.

QAlgorithms.Papers.Independent.Intake100.P39.kernelDim

For any natural number nnn, any real 2n×2n2n\times2n2n×2n matrix AAA, any complex number zzz, and any natural number rrr, this is the complex dimension

dim⁡Cker⁡((AC−zI)r),\dim_{\mathbb C}\ker\bigl((A_{\mathbb C}-zI)^r\bigr),dimC​ker((AC​−zI)r),

where ACA_{\mathbb C}AC​ is obtained by treating each entry of AAA as a complex number. No eigenvalue or symplectic hypothesis is imposed. The exponent r=0r=0r=0 is included: the operator is then the identity and the defined dimension is 000. When n=0n=0n=0, the ambient space is zero-dimensional and the value is 000 for every z,rz,rz,r.

QAlgorithms.Papers.Independent.Intake100.P39.lastDiagonal

For every field KKK, natural number mmm, and element s∈Ks\in Ks∈K, this defines the m×mm\times mm×m diagonal matrix DDD, indexed by 0,…,m−10,\ldots,m-10,…,m−1, with

Dij={s,i=j and i+1=m,0,otherwise.D_{ij}= \begin{cases} s,&i=j\text{ and }i+1=m,\\ 0,&\text{otherwise}. \end{cases}Dij​={s,0,​i=j and i+1=m,otherwise.​

For m>0m>0m>0, its only possibly nonzero entry is the final diagonal entry sss. For m=0m=0m=0, it is the empty matrix; s=0s=0s=0 gives the zero matrix for every mmm.

QAlgorithms.Papers.Independent.Intake100.P39.offComplexBlock

For every complex number zzz and natural number mmm, this defines the real 4m×4m4m\times4m4m×4m matrix

(J−100JT),\begin{pmatrix}J^{-1}&0\\0&J^{\mathsf T}\end{pmatrix},(J−10​0JT​),

where JJJ is the real 2m×2m2m\times2m2m×2m matrix whose diagonal 2×22\times22×2 blocks are (Re⁡zIm⁡z−Im⁡zRe⁡z)\begin{pmatrix}\operatorname{Re}z&\operatorname{Im}z\\-\operatorname{Im}z&\operatorname{Re}z\end{pmatrix}(Rez−Imz​ImzRez​), whose blocks immediately above that block diagonal are I2I_2I2​, and whose remaining blocks are zero. The two main coordinate groups each have 2m2m2m entries. No condition on zzz is imposed; the inverse is the total matrix inverse, which is zero when JJJ is singular. For m=0m=0m=0, the resulting matrix is empty.

QAlgorithms.Papers.Independent.Intake100.P39.primaryComplex

For every natural number nnn, every real matrix AAA indexed by CnC_nCn​, the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, and every z∈Cz\in\mathbb Cz∈C, let ACA_{\mathbb C}AC​ be AAA with its entries regarded as complex numbers. Then primaryComplex(A,z)\mathrm{primaryComplex}(A,z)primaryComplex(A,z) is the complex subspace of Cn→CC_n\to\mathbb CCn​→C given by

∑t∈{z,z−1,z‾,(z‾)−1}ker⁡((AC−tI)2n),\sum_{t\in\{z,z^{-1},\overline z,(\overline z)^{-1}\}} \ker\bigl((A_{\mathbb C}-tI)^{2n}\bigr),t∈{z,z−1,z,(z)−1}∑​ker((AC​−tI)2n),

where the sum means the smallest complex subspace containing all the displayed kernels, and repeated values of ttt are counted only once. Neither an eigenvalue condition on zzz nor any restriction on AAA is required; inverse zero is zero. For n=0n=0n=0, 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 nnn, every real matrix AAA indexed by CnC_nCn​, the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, and every z∈Cz\in\mathbb Cz∈C, primaryReal(A,z)\mathrm{primaryReal}(A,z)primaryReal(A,z) is the real subspace consisting of precisely those real vectors v:Cn→Rv:C_n\to\mathbb Rv:Cn​→R whose coordinatewise embedding into C\mathbb CC belongs to

∑t∈{z,z−1,z‾,(z‾)−1}ker⁡((AC−tI)2n),\sum_{t\in\{z,z^{-1},\overline z,(\overline z)^{-1}\}} \ker\bigl((A_{\mathbb C}-tI)^{2n}\bigr),t∈{z,z−1,z,(z)−1}∑​ker((AC​−tI)2n),

where ACA_{\mathbb C}AC​ is the entrywise complex embedding of AAA, 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 0−1=00^{-1}=00−1=0; no eigenvalue or symplectic hypothesis is imposed. For n=0n=0n=0, this is the zero real subspace.

QAlgorithms.Papers.Independent.Intake100.P39.rankSignature

For every ordered pair (p,q)(p,q)(p,q) of natural numbers, this defines

rankSignature⁡(p,q)=(p+q, p−q)∈N×Z,\operatorname{rankSignature}(p,q)=(p+q,\ p-q)\in\mathbb N\times\mathbb Z,rankSignature(p,q)=(p+q, p−q)∈N×Z,

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 nnn, let CnC_nCn​ be the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. The map realEmbed(n)\mathrm{realEmbed}(n)realEmbed(n) is the R\mathbb RR-linear map from Cn→RC_n\to\mathbb RCn​→R to Cn→CC_n\to\mathbb CCn​→C, with the latter regarded as a real vector space, that sends vvv to the vector whose coordinate at each i∈Cni\in C_ni∈Cn​ is the complex number vi+0iv_i+0ivi​+0i. For n=0n=0n=0, this is the unique map between the corresponding zero vector spaces.

QAlgorithms.Papers.Independent.Intake100.P39.realInertia

For every natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, real number aaa, and natural number kkk, let

W=ker⁡(A−aI)2k,q(v)=a∑r=0n−1(xr+yr−−xr−yr+),x=(A−aI)kv,y=(A−aI)max⁡(k−1,0)v,W=\ker(A-aI)^{2k},\qquad q(v)=a\sum_{r=0}^{n-1}\left(x_r^+y_r^- -x_r^-y_r^+\right), \quad x=(A-aI)^kv,\quad y=(A-aI)^{\max(k-1,0)}v,W=ker(A−aI)2k,q(v)=ar=0∑n−1​(xr+​yr−​−xr−​yr+​),x=(A−aI)kv,y=(A−aI)max(k−1,0)v,

using two groups of nnn coordinates. This defines the ordered pair (p+,p−)(p_+,p_-)(p+​,p−​), where p+p_+p+​ is the largest real dimension of a real linear subspace L⊆WL\subseteq WL⊆W on which q(v)>0q(v)>0q(v)>0 for every nonzero v∈Lv\in Lv∈L, and p−p_-p−​ is the largest such dimension with q(v)<0q(v)<0q(v)<0. Each maximum is taken among dimensions 0,…,2n0,\ldots,2n0,…,2n; the zero subspace always qualifies. Exponent subtraction is truncated at zero and zeroth operator powers are identities. Thus k=0k=0k=0 gives W={0}W=\{0\}W={0} and pair (0,0)(0,0)(0,0); the pair is also (0,0)(0,0)(0,0) if a=0a=0a=0 or n=0n=0n=0.

QAlgorithms.Papers.Independent.Intake100.P39.realJordan

For every complex number zzz and natural number kkk, this defines a real 2k×2k2k\times2k2k×2k matrix consisting of kkk consecutive 2×22\times22×2 diagonal blocks

Rz=(Re⁡z−Im⁡zIm⁡zRe⁡z),R_z= \begin{pmatrix} \operatorname{Re}z&-\operatorname{Im}z\\ \operatorname{Im}z&\operatorname{Re}z \end{pmatrix},Rz​=(RezImz​−ImzRez​),

with I2I_2I2​ in each immediately superdiagonal block and zero in every other block. More explicitly, for row and column indices i,j∈{0,…,2k−1}i,j\in\{0,\ldots,2k-1\}i,j∈{0,…,2k−1}, the entry is (Rz)i mod 2,j mod 2(R_z)_{i\bmod2,j\bmod2}(Rz​)imod2,jmod2​ if ⌊i/2⌋=⌊j/2⌋\lfloor i/2\rfloor=\lfloor j/2\rfloor⌊i/2⌋=⌊j/2⌋, is 111 if ⌊i/2⌋+1=⌊j/2⌋\lfloor i/2\rfloor+1=\lfloor j/2\rfloor⌊i/2⌋+1=⌊j/2⌋ and i mod 2=j mod 2i\bmod2=j\bmod2imod2=jmod2, and is 000 otherwise. The definition allows all zzz, including zero, and k=0k=0k=0 yields the empty matrix.

QAlgorithms.Papers.Independent.Intake100.P39.realMultiplicationBlock

For every complex number zzz, this defines the real 2×22\times22×2 matrix, with rows and columns indexed by 0,10,10,1,

(Re⁡z−Im⁡zIm⁡zRe⁡z).\begin{pmatrix} \operatorname{Re}z&-\operatorname{Im}z\\ \operatorname{Im}z&\operatorname{Re}z \end{pmatrix}.(RezImz​−ImzRez​).

No restriction is imposed on zzz, including z=0z=0z=0.

QAlgorithms.Papers.Independent.Intake100.P39.realPart

For every natural number nnn, let CnC_nCn​ be the disjoint union of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. For every complex subspace WWW of Cn→CC_n\to\mathbb CCn​→C, realPart(W)\mathrm{realPart}(W)realPart(W) is the real subspace

{v:Cn→R:(vi+0i)i∈Cn∈W}.\{v:C_n\to\mathbb R:(v_i+0i)_{i\in C_n}\in W\}.{v:Cn​→R:(vi​+0i)i∈Cn​​∈W}.

Thus it is the inverse image of WWW, regarded as a real subspace, under the coordinatewise embedding of real vectors into complex vectors. For n=0n=0n=0, this is the zero real subspace.

QAlgorithms.Papers.Independent.Intake100.P39.realQ

For every natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, real number aaa, natural number kkk, and real vectors v,w∈R2nv,w\in\mathbb R^{2n}v,w∈R2n, this defines

QA,a,kR(v,w)=a∑r=0n−1(xr+yr−−xr−yr+),x=(A−aI)kv,y=(A−aI)max⁡(k−1,0)w,Q^{\mathbb R}_{A,a,k}(v,w) = a\sum_{r=0}^{n-1}\left(x_r^+y_r^- -x_r^-y_r^+\right), \qquad x=(A-aI)^kv,\quad y=(A-aI)^{\max(k-1,0)}w,QA,a,kR​(v,w)=ar=0∑n−1​(xr+​yr−​−xr−​yr+​),x=(A−aI)kv,y=(A−aI)max(k−1,0)w,

where the +++ and −-− coordinates are the two groups of nnn coordinates. Subtraction in the exponent is truncated at zero, and zeroth operator powers are identities; in particular, k=0k=0k=0 gives a∑r(vr+wr−−vr−wr+)a\sum_r(v_r^+w_r^- -v_r^-w_r^+)a∑r​(vr+​wr−​−vr−​wr+​). If a=0a=0a=0 or n=0n=0n=0, the value is 000.

QAlgorithms.Papers.Independent.Intake100.P39.realShift

For every natural number nnn, every real matrix AAA whose rows and columns are indexed by the disjoint union CnC_nCn​ of two copies of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, and every a∈Ra\in\mathbb Ra∈R, realShift(A,a)\mathrm{realShift}(A,a)realShift(A,a) is the real linear endomorphism of Cn→RC_n\to\mathbb RCn​→R given by

v⟼Av−av,(realShift(A,a)v)i=∑j∈CnAijvj−avi.v\longmapsto Av-av,\qquad \bigl(\mathrm{realShift}(A,a)v\bigr)_i =\sum_{j\in C_n}A_{ij}v_j-av_i.v⟼Av−av,(realShift(A,a)v)i​=j∈Cn​∑​Aij​vj​−avi​.

There are no restrictions on AAA or aaa. For n=0n=0n=0, this is the unique endomorphism of the zero vector space.

QAlgorithms.Papers.Independent.Intake100.P39.rectangularS

For any complex numbers z,sz,sz,s and natural number kkk, this definition gives a complex k×(k+1)k\times(k+1)k×(k+1) matrix SSS, with rows numbered 0,…,k−10,\ldots,k-10,…,k−1 and columns numbered 0,…,k0,\ldots,k0,…,k, whose entries are

Sij={z i s,i+1=k and j=k,i s/2,i+1=k and j+1=k,0,otherwise.S_{ij}= \begin{cases} z\,\mathrm i\,s,&i+1=k\ \text{and }j=k,\\ \mathrm i\,s/2,&i+1=k\ \text{and }j+1=k,\\ 0,&\text{otherwise}. \end{cases}Sij​=⎩⎨⎧​zis,is/2,0,​i+1=k and j=k,i+1=k and j+1=k,otherwise.​

For k≥1k\ge1k≥1, only the last row can be nonzero, with its last two entries is/2\mathrm i s/2is/2 and zisz\mathrm i szis, in that order. For k=0k=0k=0, the matrix has no rows and one column. No restrictions on zzz or sss are imposed.

QAlgorithms.Papers.Independent.Intake100.P39.sectorDiagonal

For any type KKK equipped with a specified element 000, any natural numbers a,ba,ba,b, any a×aa\times aa×a matrix PPP over KKK, and any b×bb\times bb×b matrix QQQ over KKK, this definition gives the matrix indexed by the disjoint union {0,…,a−1}⊔{0,…,b−1}\{0,\ldots,a-1\}\sqcup\{0,\ldots,b-1\}{0,…,a−1}⊔{0,…,b−1} in both rows and columns whose block form is

(P00Q).\begin{pmatrix}P&0\\0&Q\end{pmatrix}.(P0​0Q​).

Thus entries within the first sector come from PPP, entries within the second come from QQQ, and entries between the sectors are the specified zero of KKK. No field, ring, or other algebraic structure is assumed. Either sector may be empty, including a=b=0a=b=0a=b=0.

QAlgorithms.Papers.Independent.Intake100.P39.signCharacteristic

For every natural number LLL and every indexed family c0,…,cL−1c_0,\ldots,c_{L-1}c0​,…,cL−1​ of catalogue elements, this defines the multiset of their nonzero third parameters. Each index contributes one occurrence of its integer parameter sss, regardless of whether its element is single, paired, or unequal, and all occurrences of 000 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 L=0L=0L=0, or when all third parameters are zero, the resulting multiset is empty.

QAlgorithms.Papers.Independent.Intake100.P39.signedBlock

For every field KKK equipped with decidable equality, elements z,s∈Kz,s\in Kz,s∈K, and natural number mmm, let JJJ be the m×mm\times mm×m matrix with diagonal entries zzz, immediately superdiagonal entries 111, and all other entries zero, and let DDD be the m×mm\times mm×m matrix whose only possibly nonzero entry is Dm−1,m−1=sD_{m-1,m-1}=sDm−1,m−1​=s when m>0m>0m>0. This defines the 2m×2m2m\times2m2m×2m matrix, indexed by two copies of {0,…,m−1}\{0,\ldots,m-1\}{0,…,m−1},

(J−1J−1D0JT).\begin{pmatrix} J^{-1}&J^{-1}D\\ 0&J^{\mathsf T} \end{pmatrix}.(J−10​J−1DJT​).

The inverse is the total matrix inverse: it is the usual inverse when JJJ is invertible and the zero matrix when JJJ is singular. In particular, m>0m>0m>0 and z=0z=0z=0 give zero upper blocks, while the lower-right block remains JTJ^{\mathsf T}JT. No restriction is imposed on sss, and m=0m=0m=0 yields the empty matrix.

QAlgorithms.Papers.Independent.Intake100.P39.sumSector

For any type KKK equipped with a designated zero, natural number LLL, function r:{0,…,L−1}→Nr:\{0,\ldots,L-1\}\to\mathbb Nr:{0,…,L−1}→N, and family of KKK-valued matrices MpM_pMp​ whose rows and columns are indexed by two disjoint copies of {0,…,rp−1}\{0,\ldots,r_p-1\}{0,…,rp​−1}, this defines a KKK-valued entry for any two Boolean values a,ba,ba,b and indices (p,u),(q,v)(p,u),(q,v)(p,u),(q,v), where u<rpu<r_pu<rp​ and v<rqv<r_qv<rq​:

sumSector⁡a,b((p,u),(q,v))={(Mp)(a,u),(b,v),p=q,0,p≠q.\operatorname{sumSector}_{a,b}\bigl((p,u),(q,v)\bigr)= \begin{cases} (M_p)_{(a,u),(b,v)},&p=q,\\ 0,&p\ne q. \end{cases}sumSectora,b​((p,u),(q,v))={(Mp​)(a,u),(b,v)​,0,​p=q,p=q.​

Here a false Boolean selects the left copy and a true Boolean selects the right copy; when p=qp=qp=q, the column index vvv is regarded as an index less than rpr_prp​ using that equality. No addition or multiplication on KKK is assumed. Values rp=0r_p=0rp​=0 contribute no indices, and L=0L=0L=0 leaves no possible input index pairs.

QAlgorithms.Papers.Independent.Intake100.P39.symplecticBlockSum

For any type KKK equipped with a designated zero, natural number LLL, function r:{0,…,L−1}→Nr:\{0,\ldots,L-1\}\to\mathbb Nr:{0,…,L−1}→N, and family of KKK-valued matrices MpM_pMp​ indexed by two copies of {0,…,rp−1}\{0,\ldots,r_p-1\}{0,…,rp​−1}, this defines a square matrix indexed by two copies of the pairs (p,u)(p,u)(p,u) with p<Lp<Lp<L and u<rpu<r_pu<rp​. If a,ba,ba,b denote left or right tags, its entries are

S(a,p,u),(b,q,v)={(Mp)(a,u),(b,v),p=q,0,p≠q.S_{(a,p,u),(b,q,v)}= \begin{cases} (M_p)_{(a,u),(b,v)},&p=q,\\ 0,&p\ne q. \end{cases}S(a,p,u),(b,q,v)​={(Mp​)(a,u),(b,v)​,0,​p=q,p=q.​

Thus all left-tagged coordinates form the first main coordinate group and all right-tagged coordinates the second, while entries between different labels p,qp,qp,q are zero. This definition requires only a zero on KKK and imposes no symplectic condition on the matrices. Labels with rp=0r_p=0rp​=0 contribute no coordinates; if L=0L=0L=0, the resulting matrix is empty.

QAlgorithms.Papers.Independent.Intake100.P39.symplecticDiamond

For any natural numbers k,lk,lk,l, any real matrix AAA indexed by two copies of {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1}, and any real matrix BBB indexed by two copies of {0,…,l−1}\{0,\ldots,l-1\}{0,…,l−1}, write their four sectors as A11,A12,A21,A22A_{11},A_{12},A_{21},A_{22}A11​,A12​,A21​,A22​ and B11,B12,B21,B22B_{11},B_{12},B_{21},B_{22}B11​,B12​,B21​,B22​. This defines a real matrix whose coordinate order is first the first half of AAA, then the first half of BBB, then the second half of AAA, then the second half of BBB, by

(A110A1200B110B12A210A2200B210B22).\begin{pmatrix} A_{11}&0&A_{12}&0\\ 0&B_{11}&0&B_{12}\\ A_{21}&0&A_{22}&0\\ 0&B_{21}&0&B_{22} \end{pmatrix}.​A11​0A21​0​0B11​0B21​​A12​0A22​0​0B12​0B22​​​.

Its index set is ({0,…,k−1}⊔{0,…,l−1})⊔({0,…,k−1}⊔{0,…,l−1})(\{0,\ldots,k-1\}\sqcup\{0,\ldots,l-1\})\sqcup(\{0,\ldots,k-1\}\sqcup\{0,\ldots,l-1\})({0,…,k−1}⊔{0,…,l−1})⊔({0,…,k−1}⊔{0,…,l−1}). 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 zzz and natural number kkk, this defines a real 2k×22k\times22k×2 matrix U=VR(z)U=VR(z)U=VR(z), where

R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w),Vij=(−1) k−⌊i/2⌋−1R ⁣(z k−⌊i/2⌋) i mod 2,jR(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\\operatorname{Im}w&\operatorname{Re}w\end{pmatrix}, \qquad V_{ij}=(-1)^{\,k-\lfloor i/2\rfloor-1} R\!\left(z^{\,k-\lfloor i/2\rfloor}\right)_{\,i\bmod2,j}R(w)=(RewImw​−ImwRew​),Vij​=(−1)k−⌊i/2⌋−1R(zk−⌊i/2⌋)imod2,j​

for 0≤i<2k0\le i<2k0≤i<2k and 0≤j<20\le j<20≤j<2. Thus Uij=∑ℓ=01ViℓR(z)ℓjU_{ij}=\sum_{\ell=0}^{1}V_{i\ell}R(z)_{\ell j}Uij​=∑ℓ=01​Viℓ​R(z)ℓj​. The exponent subtractions are natural-number subtraction, truncated at zero. There is no restriction on zzz, and k=0k=0k=0 gives a matrix with no rows and two columns.

QAlgorithms.Papers.Independent.Intake100.P39.unitBlock

For every complex number zzz, natural number mmm, and real number sss, this defines a real 2m×2m2m\times2m2m×2m matrix with two coordinate groups of size mmm, using k=⌊m/2⌋k=\lfloor m/2\rfloork=⌊m/2⌋. Its full specification is as follows: put d=2kd=2kd=2k, define R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w)R(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\\operatorname{Im}w&\operatorname{Re}w\end{pmatrix}R(w)=(RewImw​−ImwRew​), let JJJ be the d×dd\times dd×d matrix with diagonal 2×22\times22×2 blocks R(z‾)R(\overline z)R(z), immediately superdiagonal blocks I2I_2I2​, and all other blocks zero, and put

Viℓ=(−1) k−⌊i/2⌋−1R ⁣(z k−⌊i/2⌋) i mod 2,ℓ,U=VR(z).V_{i\ell}=(-1)^{\,k-\lfloor i/2\rfloor-1} R\!\left(z^{\,k-\lfloor i/2\rfloor}\right)_{\,i\bmod2,\ell}, \qquad U=VR(z).Viℓ​=(−1)k−⌊i/2⌋−1R(zk−⌊i/2⌋)imod2,ℓ​,U=VR(z).

If mmm is even, the matrix is (J−1E0JT)\begin{pmatrix}J^{-1}&E\\0&J^{\mathsf T}\end{pmatrix}(J−10​EJT​), where Eij=sVi,j mod 2E_{ij}=sV_{i,j\bmod2}Eij​=sVi,jmod2​ when j+2≥dj+2\ge dj+2≥d, and Eij=0E_{ij}=0Eij​=0 otherwise, for 0≤i,j<d0\le i,j<d0≤i,j<d. If mmm is odd, its four m×mm\times mm×m blocks, with the last coordinate separated from the first ddd, are

A=(J−1sU∙10Re⁡z),B=(FU∙0gTsIm⁡z),C=(000−sIm⁡z),D=(JT0hTRe⁡z),A=\begin{pmatrix}J^{-1}&sU_{\bullet1}\\0&\operatorname{Re}z\end{pmatrix}, \quad B=\begin{pmatrix}F&U_{\bullet0}\\g^{\mathsf T}&s\operatorname{Im}z\end{pmatrix}, \quad C=\begin{pmatrix}0&0\\0&-s\operatorname{Im}z\end{pmatrix}, \quad D=\begin{pmatrix}J^{\mathsf T}&0\\h^{\mathsf T}&\operatorname{Re}z\end{pmatrix},A=(J−10​sU∙1​Rez​),B=(FgT​U∙0​sImz​),C=(00​0−sImz​),D=(JThT​0Rez​),

where, for 0≤i,j<d0\le i,j<d0≤i,j<d,

Fij={s2Vi1,j+2≥d, j even,−s2Vi0,j+2≥d, j odd,0,j+2<d,gj={1,j+2=d,0,otherwise,hj={−s,j+1=d,0,otherwise.F_{ij}= \begin{cases} \frac{s}{2}V_{i1},&j+2\ge d,\ j\text{ even},\\ -\frac{s}{2}V_{i0},&j+2\ge d,\ j\text{ odd},\\ 0,&j+2<d, \end{cases} \qquad g_j=\begin{cases}1,&j+2=d,\\0,&\text{otherwise},\end{cases} \quad h_j=\begin{cases}-s,&j+1=d,\\0,&\text{otherwise}.\end{cases}Fij​=⎩⎨⎧​2s​Vi1​,−2s​Vi0​,0,​j+2≥d, j even,j+2≥d, j odd,j+2<d,​gj​={1,0,​j+2=d,otherwise,​hj​={−s,0,​j+1=d,otherwise.​

The index identifications in either branch preserve the numerical indices within each coordinate group. Exponent subtractions are truncated natural-number subtraction, and singular JJJ has total inverse zero. No restriction on zzz or sss is imposed; m=0m=0m=0 gives the empty matrix, and m=1m=1m=1 gives (Re⁡zsIm⁡z−sIm⁡zRe⁡z)\begin{pmatrix}\operatorname{Re}z&s\operatorname{Im}z\\-s\operatorname{Im}z&\operatorname{Re}z\end{pmatrix}(Rez−sImz​sImzRez​).

QAlgorithms.Papers.Independent.Intake100.P39.unitEvenBlock

For every complex number zzz, natural number kkk, and real number sss, this defines the real 4k×4k4k\times4k4k×4k matrix

(J−1B0JT).\begin{pmatrix}J^{-1}&B\\0&J^{\mathsf T}\end{pmatrix}.(J−10​BJT​).

Here R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w)R(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\\operatorname{Im}w&\operatorname{Re}w\end{pmatrix}R(w)=(RewImw​−ImwRew​), and JJJ is the 2k×2k2k\times2k2k×2k block matrix with diagonal blocks R(z‾)R(\overline z)R(z), immediately superdiagonal blocks I2I_2I2​, and all other blocks zero. For 0≤i,j<2k0\le i,j<2k0≤i,j<2k, put

Viℓ=(−1) k−⌊i/2⌋−1R ⁣(z k−⌊i/2⌋) i mod 2,ℓ,Bij={sVi,j mod 2,j+2≥2k,0,j+2<2k.V_{i\ell}=(-1)^{\,k-\lfloor i/2\rfloor-1} R\!\left(z^{\,k-\lfloor i/2\rfloor}\right)_{\,i\bmod2,\ell}, \qquad B_{ij}= \begin{cases} sV_{i,j\bmod2},&j+2\ge2k,\\ 0,&j+2<2k. \end{cases}Viℓ​=(−1)k−⌊i/2⌋−1R(zk−⌊i/2⌋)imod2,ℓ​,Bij​={sVi,jmod2​,0,​j+2≥2k,j+2<2k.​

The exponent subtractions are truncated natural-number subtraction. For k≥1k\ge1k≥1, only the last two columns of BBB can be nonzero. There is no unit-modulus condition on zzz or sign condition on sss; J−1J^{-1}J−1 is zero when JJJ is singular. For k=0k=0k=0, the whole matrix is empty.

QAlgorithms.Papers.Independent.Intake100.P39.unitInertia

For every natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, complex number zzz, and natural number mmm, let ACA_{\mathbb C}AC​ be the entrywise complexification of AAA, set h=⌊m/2⌋h=\lfloor m/2\rfloorh=⌊m/2⌋, and put W=ker⁡(AC−zI)mW=\ker(A_{\mathbb C}-zI)^mW=ker(AC​−zI)m. With Ω(x,y)=∑r=0n−1(xr+yr−−xr−yr+)\Omega(x,y)=\sum_{r=0}^{n-1}(x_r^+y_r^- -x_r^-y_r^+)Ω(x,y)=∑r=0n−1​(xr+​yr−​−xr−​yr+​) in the two groups of nnn coordinates, define the real-valued function

q(v)={Re⁡ ⁣[z−1Ω ⁣((AC−zI)hv, (AC−z‾I)max⁡(h−1,0)v‾)],m even,Re⁡ ⁣[i Ω ⁣((AC−zI)hv, (AC−z‾I)hv‾)],m odd.q(v)= \begin{cases} \operatorname{Re}\!\left[z^{-1}\Omega\!\left((A_{\mathbb C}-zI)^hv,\, (A_{\mathbb C}-\overline zI)^{\max(h-1,0)}\overline v\right)\right], & m\text{ even},\\[2mm] \operatorname{Re}\!\left[\mathrm i\,\Omega\!\left((A_{\mathbb C}-zI)^hv,\, (A_{\mathbb C}-\overline zI)^h\overline v\right)\right], & m\text{ odd}. \end{cases}q(v)=⎩⎨⎧​Re[z−1Ω((AC​−zI)hv,(AC​−zI)max(h−1,0)v)],Re[iΩ((AC​−zI)hv,(AC​−zI)hv)],​m even,m odd.​

The declaration defines the ordered pair (p+,p−)(p_+,p_-)(p+​,p−​), where p+p_+p+​ is the largest complex dimension of a complex linear subspace L⊆WL\subseteq WL⊆W on which q(v)>0q(v)>0q(v)>0 for every nonzero v∈Lv\in Lv∈L, and p−p_-p−​ is the largest such complex dimension with q(v)<0q(v)<0q(v)<0. These maxima range over 0,…,2n0,\ldots,2n0,…,2n, and the zero subspace qualifies vacuously. Conjugation is coordinatewise, zeroth powers are identities, subtraction in exponents is truncated at zero, and 0−1=00^{-1}=00−1=0. Consequently m=0m=0m=0 or n=0n=0n=0 gives (0,0)(0,0)(0,0); z=0z=0z=0 with even mmm also gives (0,0)(0,0)(0,0).

QAlgorithms.Papers.Independent.Intake100.P39.unitOddBlock

For every complex number zzz, natural number kkk, and real number sss, this defines a real 4k+24k+24k+2 square matrix (ABCD)\begin{pmatrix}A&B\\C&D\end{pmatrix}(AC​BD​), with each of its four blocks of size 2k+12k+12k+1. To specify its entries, let d=2kd=2kd=2k, let R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w)R(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\\operatorname{Im}w&\operatorname{Re}w\end{pmatrix}R(w)=(RewImw​−ImwRew​), let JJJ be the d×dd\times dd×d block matrix with diagonal blocks R(z‾)R(\overline z)R(z), immediately superdiagonal blocks I2I_2I2​, and all other blocks zero, and set

Viℓ=(−1) k−⌊i/2⌋−1R ⁣(z k−⌊i/2⌋) i mod 2,ℓ,Uiℓ=∑h=01VihR(z)hℓ(0≤i<d, 0≤ℓ<2).V_{i\ell}=(-1)^{\,k-\lfloor i/2\rfloor-1} R\!\left(z^{\,k-\lfloor i/2\rfloor}\right)_{\,i\bmod2,\ell}, \qquad U_{i\ell}=\sum_{h=0}^{1}V_{ih}R(z)_{h\ell} \quad(0\le i<d,\ 0\le\ell<2).Viℓ​=(−1)k−⌊i/2⌋−1R(zk−⌊i/2⌋)imod2,ℓ​,Uiℓ​=h=0∑1​Vih​R(z)hℓ​(0≤i<d, 0≤ℓ<2).

For 0≤i,j≤d0\le i,j\le d0≤i,j≤d, the four blocks are

Aij={(J−1)ij,i<d, j<d,sUi1,i<d, j=d,0,i=d, j<d,Re⁡z,i=j=d,Bij={s2Vi1,i<d, j<d, j+2≥d, j even,−s2Vi0,i<d, j<d, j+2≥d, j odd,0,i<d, j<d, j+2<d,Ui0,i<d, j=d,1,i=d, j<d, j+2=d,0,i=d, j<d, j+2≠d,sIm⁡z,i=j=d,A_{ij}= \begin{cases} (J^{-1})_{ij},&i<d,\ j<d,\\ sU_{i1},&i<d,\ j=d,\\ 0,&i=d,\ j<d,\\ \operatorname{Re}z,&i=j=d, \end{cases} \qquad B_{ij}= \begin{cases} \frac{s}{2}V_{i1},&i<d,\ j<d,\ j+2\ge d,\ j\text{ even},\\ -\frac{s}{2}V_{i0},&i<d,\ j<d,\ j+2\ge d,\ j\text{ odd},\\ 0,&i<d,\ j<d,\ j+2<d,\\ U_{i0},&i<d,\ j=d,\\ 1,&i=d,\ j<d,\ j+2=d,\\ 0,&i=d,\ j<d,\ j+2\ne d,\\ s\operatorname{Im}z,&i=j=d, \end{cases}Aij​=⎩⎨⎧​(J−1)ij​,sUi1​,0,Rez,​i<d, j<d,i<d, j=d,i=d, j<d,i=j=d,​Bij​=⎩⎨⎧​2s​Vi1​,−2s​Vi0​,0,Ui0​,1,0,sImz,​i<d, j<d, j+2≥d, j even,i<d, j<d, j+2≥d, j odd,i<d, j<d, j+2<d,i<d, j=d,i=d, j<d, j+2=d,i=d, j<d, j+2=d,i=j=d,​ Cij={−sIm⁡z,i=j=d,0,otherwise,Dij={(JT)ij,i<d, j<d,0,i<d, j=d,−s,i=d, j<d, j+1=d,0,i=d, j<d, j+1≠d,Re⁡z,i=j=d.C_{ij}= \begin{cases} -s\operatorname{Im}z,&i=j=d,\\ 0,&\text{otherwise}, \end{cases} \qquad D_{ij}= \begin{cases} (J^{\mathsf T})_{ij},&i<d,\ j<d,\\ 0,&i<d,\ j=d,\\ -s,&i=d,\ j<d,\ j+1=d,\\ 0,&i=d,\ j<d,\ j+1\ne d,\\ \operatorname{Re}z,&i=j=d. \end{cases}Cij​={−sImz,0,​i=j=d,otherwise,​Dij​=⎩⎨⎧​(JT)ij​,0,−s,0,Rez,​i<d, j<d,i<d, j=d,i=d, j<d, j+1=d,i=d, j<d, j+1=d,i=j=d.​

The exponent subtractions are truncated natural-number subtraction, and the matrix inverse is zero when JJJ is singular. No restriction on zzz or sss is assumed. In particular, k=0k=0k=0 gives (Re⁡zsIm⁡z−sIm⁡zRe⁡z)\begin{pmatrix}\operatorname{Re}z&s\operatorname{Im}z\\-s\operatorname{Im}z&\operatorname{Re}z\end{pmatrix}(Rez−sImz​sImzRez​).

QAlgorithms.Papers.Independent.Intake100.P39.unitQ

For every natural number nnn, real 2n×2n2n\times2n2n×2n matrix AAA, complex number zzz, natural number mmm, and complex vectors v,w∈C2nv,w\in\mathbb C^{2n}v,w∈C2n, put h=⌊m/2⌋h=\lfloor m/2\rfloorh=⌊m/2⌋, let ACA_{\mathbb C}AC​ denote entrywise complexification of AAA, and write Ω(x,y)=∑r=0n−1(xr+yr−−xr−yr+)\Omega(x,y)=\sum_{r=0}^{n-1}(x_r^+y_r^- -x_r^-y_r^+)Ω(x,y)=∑r=0n−1​(xr+​yr−​−xr−​yr+​) in the two groups of nnn coordinates. This defines

QA,z,mC(v,w)={z−1Ω ⁣((AC−zI)hv, (AC−z‾I)max⁡(h−1,0)w‾),m even,i Ω ⁣((AC−zI)hv, (AC−z‾I)hw‾),m odd.Q^{\mathbb C}_{A,z,m}(v,w)= \begin{cases} z^{-1}\Omega\!\left((A_{\mathbb C}-zI)^hv,\, (A_{\mathbb C}-\overline zI)^{\max(h-1,0)}\overline w\right), & m\text{ even},\\[2mm] \mathrm i\,\Omega\!\left((A_{\mathbb C}-zI)^hv,\, (A_{\mathbb C}-\overline zI)^h\overline w\right), & m\text{ odd}. \end{cases}QA,z,mC​(v,w)=⎩⎨⎧​z−1Ω((AC​−zI)hv,(AC​−zI)max(h−1,0)w),iΩ((AC​−zI)hv,(AC​−zI)hw),​m even,m odd.​

Vector conjugation is coordinatewise, zeroth operator powers are identities, and z−1=0z^{-1}=0z−1=0 when z=0z=0z=0. In particular, m=0m=0m=0 gives z−1Ω(v,w‾)z^{-1}\Omega(v,\overline w)z−1Ω(v,w), while m=1m=1m=1 gives i Ω(v,w‾)\mathrm i\,\Omega(v,\overline w)iΩ(v,w). No condition on ∣z∣|z|∣z∣ is imposed, and n=0n=0n=0 gives value 000.

QAlgorithms.Papers.Independent.Intake100.P39.vColumns

For every complex number zzz and natural number kkk, this defines a real 2k×22k\times22k×2 matrix VVV. Put R(w)=(Re⁡w−Im⁡wIm⁡wRe⁡w)R(w)=\begin{pmatrix}\operatorname{Re}w&-\operatorname{Im}w\\\operatorname{Im}w&\operatorname{Re}w\end{pmatrix}R(w)=(RewImw​−ImwRew​). For zero-based row and column indices 0≤i<2k0\le i<2k0≤i<2k and 0≤j<20\le j<20≤j<2, its entries are

Vij=(−1) k−⌊i/2⌋−1R ⁣(z k−⌊i/2⌋) i mod 2,j.V_{ij}=(-1)^{\,k-\lfloor i/2\rfloor-1} R\!\left(z^{\,k-\lfloor i/2\rfloor}\right)_{\,i\bmod2,j}.Vij​=(−1)k−⌊i/2⌋−1R(zk−⌊i/2⌋)imod2,j​.

Both subtractions in the exponents are natural-number subtraction, truncated at zero; for the indicated row indices, k−⌊i/2⌋≥1k-\lfloor i/2\rfloor\ge1k−⌊i/2⌋≥1. No restriction on zzz is imposed. When k=0k=0k=0, the matrix has no rows and two columns.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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