Definitions for RepLAB: a computational/numerical approach to representation theory
DefinitionQAlgorithms_Papers_Independent_Extend50_P23The objects the formalized statements of RepLAB: a computational/numerical approach to representation theory (arXiv:1911.09154) are stated in. Each was checked against the paper by a blind read-back and a moderator.
IsUnitaryRepresentation: PDF p.3, Eq.(2) and footnote 8: a continuous complex unitary representation. The matrix homomorphism laws are included, even for zero-dimensional spaces.Commutes: PDF p.3, Eq.(4): membership in the full complex commutant, without a Hermitian, positivity, or trace restriction.representationHaarProjection: PDF p.4, Eq.(8): exact normalized-Haar averaging. Theorems supply the probability-Haar and continuity assumptions which make this integral genuine.representationInvariant: PDF pp.3,5: invariance of a complex linear subspace.IrreducibleOn: PDF pp.3,5: an irreducible subrepresentation is nonzero, invariant, and has no invariant subspace other than zero and itself.rowCompression: PDF p.5, Eq.(10): representation in an orthonormal row basis B.eigenSpace: PDF p.5: eigenspace in the original coordinates, with no simple-spectrum assumption on the full n by n matrix.multiplicityBlock: PDF p.3, Eq.(7): the multiplicity block extracted from the actual matrix in an independently fixed Eq.(6) isotypic basis. The first irreducible coordinate exists because deg i is positive. The scalar-tensor identity is not assumed.GaussianCoordinates: PDF p.4, §2.1: independent real Gaussian coordinates used to sample GUE.gaussianCoordinatesLaw: PDF p.4, §2.1: independent standard normals, before any fixed basis is examined. Using the coordinate probability space avoids an implicit pushforward.gueMatrix: PDF p.4, §2.1: GUE sample H=(Z+Z†)/2, where Z has independent N(0,1) real and imaginary entries. Diagonal variance is 1 and off-diagonal real and imaginary variances are 1/2. An overall positive scale is immaterial here.NonzeroCertificate: PDF pp.5–6, Proposition 1: the full nonzero-block certificate, including similarity in the printed direction and a nonzero scalar making F unitary.DetectionLaw: PDF pp.5–6, Proposition 1: zero detects inequivalence almost surely; nonzero gives an exact certificate for every draw. The probability law is concrete, and the bases are chosen before this law is quantified.representationDirectSum: PDF p.6, §2.3: the constructed representation sigma ⊕ tau. The sum index is the canonical coordinate model for C^(n1+n2). Reuses the frozen matrix direct-sum constructor pointwise in g.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Basic
import Definitions.Def_QAlgorithms_Papers_Independent_Support21_P09
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P05
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P35
/-!
Exact components of RepLAB, arXiv:1911.09154v1, PDF pp.3–6.
Paper-specific definitions are local; matching concepts reuse pinned accepted libraries. No floating point correctness,
unspecified stochastic limit, or numerical complexity guarantee is asserted.
-/
noncomputable section
namespace QAlgorithms.Papers.Independent.Extend50.P23
open MeasureTheory
open scoped ComplexConjugate BigOperators Matrix.Norms.Elementwise
open QAlgorithms.Papers.Independent.Support21.P09 (EquivalentModels)
open QAlgorithms.Papers.Independent.Dependency50.P05 (UnitaryBetween)
/-- PDF p.3, Eq.(2) and footnote 8: a continuous complex unitary representation.
The matrix homomorphism laws are included, even for zero-dimensional spaces. -/
def IsUnitaryRepresentation {G ι : Type*} [Group G] [TopologicalSpace G]
[Fintype ι] [DecidableEq ι] (rho : G → Matrix ι ι ℂ) : Prop :=
rho 1 = 1 ∧ (∀ g h, rho (g * h) = rho g * rho h) ∧
(∀ g, rho g ∈ Matrix.unitaryGroup ι ℂ) ∧ Continuous rho
/-- PDF p.3, Eq.(4): membership in the full complex commutant, without a
Hermitian, positivity, or trace restriction. -/
def Commutes {G ι : Type*} [Fintype ι]
(rho : G → Matrix ι ι ℂ) (X : Matrix ι ι ℂ) : Prop :=
∀ g, rho g * X = X * rho g
/-- PDF p.4, Eq.(8): exact normalized-Haar averaging. Theorems supply the
probability-Haar and continuity assumptions which make this integral genuine. -/
def representationHaarProjection {G ι : Type*} [MeasurableSpace G] [Fintype ι]
(rho : G → Matrix ι ι ℂ) (mu : Measure G) (X : Matrix ι ι ℂ) : Matrix ι ι ℂ :=
∫ g, rho g * X * (rho g).conjTranspose ∂mu
/-- PDF pp.3,5: invariance of a complex linear subspace. -/
def representationInvariant {G ι : Type*} [Fintype ι] (rho : G → Matrix ι ι ℂ)
(S : Submodule ℂ (ι → ℂ)) : Prop :=
∀ g v, v ∈ S → (rho g).mulVec v ∈ S
/-- PDF pp.3,5: an irreducible subrepresentation is nonzero, invariant, and has
no invariant subspace other than zero and itself. -/
def IrreducibleOn {G ι : Type*} [Fintype ι] (rho : G → Matrix ι ι ℂ)
(S : Submodule ℂ (ι → ℂ)) : Prop :=
S ≠ ⊥ ∧ representationInvariant rho S ∧
∀ T : Submodule ℂ (ι → ℂ), T ≤ S → representationInvariant rho T → T = ⊥ ∨ T = S
/-- PDF p.5, Eq.(10): representation in an orthonormal row basis B. -/
def rowCompression {G ι κ : Type*} [Fintype ι]
(rho : G → Matrix ι ι ℂ) (B : Matrix κ ι ℂ) : G → Matrix κ κ ℂ :=
fun g => B * rho g * B.conjTranspose
/-- PDF p.5: eigenspace in the original coordinates, with no simple-spectrum
assumption on the full n by n matrix. -/
def eigenSpace {ι : Type*} [Fintype ι] [DecidableEq ι]
(X : Matrix ι ι ℂ) (z : ℂ) : Submodule ℂ (ι → ℂ) :=
LinearMap.ker (Matrix.toLin' X - z • LinearMap.id)
/-- PDF p.3, Eq.(7): the multiplicity block extracted from the actual matrix
in an independently fixed Eq.(6) isotypic basis. The first irreducible coordinate
exists because deg i is positive. The scalar-tensor identity is not assumed. -/
def multiplicityBlock {k n : ℕ} (deg mult : Fin k → ℕ)
(hdeg : ∀ i, 0 < deg i)
(U : Matrix (QAlgorithms.Papers.Independent.Support21.P09.BlockIndex mult deg) (Fin n) ℂ)
(X : Matrix (Fin n) (Fin n) ℂ) (i : Fin k) :
Matrix (Fin (mult i)) (Fin (mult i)) ℂ :=
fun a b => (U * X * U.conjTranspose)
⟨i, (a, ⟨0, hdeg i⟩)⟩ ⟨i, (b, ⟨0, hdeg i⟩)⟩
/-- PDF p.4, §2.1: independent real Gaussian coordinates used to sample GUE. -/
abbrev GaussianCoordinates (ι : Type*) := (ι × ι × Bool) → ℝ
/-- PDF p.4, §2.1: independent standard normals, before any fixed basis is
examined. Using the coordinate probability space avoids an implicit pushforward. -/
def gaussianCoordinatesLaw (ι : Type*) [Fintype ι] : Measure (GaussianCoordinates ι) :=
Measure.pi (fun _ : ι × ι × Bool => ProbabilityTheory.gaussianReal 0 1)
/-- PDF p.4, §2.1: GUE sample H=(Z+Z†)/2, where Z has independent N(0,1)
real and imaginary entries. Diagonal variance is 1 and off-diagonal real and
imaginary variances are 1/2. An overall positive scale is immaterial here. -/
def gueMatrix {ι : Type*} (x : GaussianCoordinates ι) : Matrix ι ι ℂ :=
fun a b => (((x (a, b, false) : ℂ) + Complex.I * (x (a, b, true) : ℂ)) +
conj ((x (b, a, false) : ℂ) + Complex.I * (x (b, a, true) : ℂ))) / 2
/-- PDF pp.5–6, Proposition 1: the full nonzero-block certificate, including
similarity in the printed direction and a nonzero scalar making F unitary. -/
def NonzeroCertificate {G : Type*} {ι κ : Type} [Fintype ι] [Fintype κ]
[DecidableEq ι] [DecidableEq κ]
(sigma : G → Matrix ι ι ℂ) (tau : G → Matrix κ κ ℂ) (F : Matrix ι κ ℂ) : Prop :=
EquivalentModels sigma tau ∧
(∃ B : Matrix κ ι ℂ, F * B = 1 ∧ B * F = 1 ∧
∀ g, sigma g = F * tau g * B) ∧
∃ alpha : ℂ, alpha ≠ 0 ∧ UnitaryBetween (alpha • F)
/-- PDF pp.5–6, Proposition 1: zero detects inequivalence almost surely;
nonzero gives an exact certificate for every draw. The probability law is
concrete, and the bases are chosen before this law is quantified. -/
def DetectionLaw {G Ω : Type*} {ι κ : Type} [MeasurableSpace Ω] [Fintype ι] [Fintype κ]
[DecidableEq ι] [DecidableEq κ]
(sigma : G → Matrix ι ι ℂ) (tau : G → Matrix κ κ ℂ)
(sample : Ω → Matrix ι κ ℂ) (nu : Measure Ω) : Prop :=
(∀ᵐ x ∂nu, sample x = 0 ↔ ¬ EquivalentModels sigma tau) ∧
∀ x, sample x ≠ 0 → NonzeroCertificate sigma tau (sample x)
/-- PDF p.6, §2.3: the constructed representation sigma ⊕ tau.
The sum index is the canonical coordinate model for C^(n1+n2).
Reuses the frozen matrix direct-sum constructor pointwise in g. -/
def representationDirectSum {G : Type*} {ι κ : Type}
(sigma : G → Matrix ι ι ℂ) (tau : G → Matrix κ κ ℂ) :
G → Matrix (ι ⊕ κ) (ι ⊕ κ) ℂ :=
fun g => QAlgorithms.Papers.Independent.Dependency50.P35.directSum (sigma g) (tau g)
/-- Sanity: the commutant includes the identity. -/
example {G ι : Type*} [Fintype ι] [DecidableEq ι] (rho : G → Matrix ι ι ℂ) :
Commutes rho 1 := by
intro g
simp
/-- Sanity: Haar averaging never creates a vector from the zero matrix. -/
example {G ι : Type*} [MeasurableSpace G] [Fintype ι]
(rho : G → Matrix ι ι ℂ) (mu : Measure G) : representationHaarProjection rho mu 0 = 0 := by
simp [representationHaarProjection]
/-- Sanity: the extracted multiplicity block is precisely the stated coordinate
slice of U X U†, with no diagonalization premise. -/
example {k n : ℕ} (deg mult : Fin k → ℕ) (hdeg : ∀ i, 0 < deg i)
(U : Matrix (QAlgorithms.Papers.Independent.Support21.P09.BlockIndex mult deg) (Fin n) ℂ)
(X : Matrix (Fin n) (Fin n) ℂ) (i : Fin k) (a b : Fin (mult i)) :
multiplicityBlock deg mult hdeg U X i a b =
(U * X * U.conjTranspose) ⟨i, (a, ⟨0, hdeg i⟩)⟩ ⟨i, (b, ⟨0, hdeg i⟩)⟩ := rfl
/-- Sanity: the GUE sample is zero on zero Gaussian coordinates. -/
example {ι : Type*} : gueMatrix (0 : GaussianCoordinates ι) = 0 := by
ext a b
simp [gueMatrix]
/-- Sanity: irreducibility excludes the zero representation space. -/
example {G ι : Type*} [Fintype ι] (rho : G → Matrix ι ι ℂ)
(h : QAlgorithms.Papers.Independent.Support21.P09.Irreducible rho) : Nonempty ι := h.1
/-- Sanity: the constructed direct sum has zero off-diagonal blocks. -/
example {G : Type*} {ι κ : Type} (sigma : G → Matrix ι ι ℂ) (tau : G → Matrix κ κ ℂ)
(g : G) (i : ι) (j : κ) : representationDirectSum sigma tau g (Sum.inl i) (Sum.inr j) = 0 := rfl
end QAlgorithms.Papers.Independent.Extend50.P23
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Extend50.P23.Commutes
For arbitrary types and finite , a function , and a matrix , this predicate means that for every . Neither a group structure on nor any representation or unitarity property of is required. If is empty, the condition is vacuous; if is empty, the matrix equality always holds.
QAlgorithms.Papers.Independent.Extend50.P23.CopyIndex
For a natural number and a family of natural numbers , indexed by , this abbreviates the type of pairs with and . Thus the second coordinate has a range depending on the first, and the type has elements. It is empty when , and an index with contributes no elements.
QAlgorithms.Papers.Independent.Extend50.P23.DetectionLaw
Let be any type, let be a measurable space with any measure , let be finite types equipped with decidable equality, and let , , and be arbitrary. Say that the two families are equivalent if there exist and with , , and for every . This predicate says that, for -almost every , if and only if the families are not equivalent; moreover, for every , including points in exceptional null sets, implies that the families are equivalent, that there exists with , , and for every , and that some satisfies and . Neither measurability of nor a probability-measure assumption on is required. In particular, for the zero measure the almost-everywhere clause is vacuous, while the condition at every nonzero sample remains required; empty index types are also permitted.
QAlgorithms.Papers.Independent.Extend50.P23.GaussianCoordinates
For an arbitrary type , this abbreviates the type of all real-valued functions on . An element therefore assigns a real number to each and Boolean value . No finiteness or probabilistic assumption is part of this abbreviation. If is empty, there is exactly one such function.
QAlgorithms.Papers.Independent.Extend50.P23.IrreducibleOn
For arbitrary types and finite , a function , and a complex linear subspace , this predicate means that , that for every and , and that every complex linear subspace satisfying for every and is either or . No group, representation, or unitarity assumptions are imposed on . If is empty, the required nonzero subspace cannot exist; if is empty, the invariance conditions are vacuous, so the predicate requires to be one-dimensional.
QAlgorithms.Papers.Independent.Extend50.P23.IsUnitaryRepresentation
For a group equipped with a topology, a finite index type with decidable equality, and a function , this predicate means that , that for every , that every is unitary, and that is continuous into the usual topology on complex matrices. No compatibility between the topology and the group operations is assumed. The index type may be empty; in that case all these conditions hold for its unique matrix-valued function.
QAlgorithms.Papers.Independent.Extend50.P23.NonzeroCertificate
Let be any type, let be finite types equipped with decidable equality, and let , , and be arbitrary. This predicate requires all three of the following: there exist matrices and such that , , and for every ; there exists such that , , and for every ; and there exists a complex scalar such that
where denotes conjugate transpose. No group, representation, or unitarity assumptions are imposed on the families . The predicate does not separately require ; when both index types are empty, their unique matrix is zero and satisfies the predicate.
QAlgorithms.Papers.Independent.Extend50.P23.copyAction
For an arbitrary type , a natural number , natural numbers for , functions , and an element , this defines a matrix indexed by pairs with and . Its entry at row and column is when , identifying the coordinate ranges through that equality, and is zero when . No group, representation, or unitarity assumptions are required. Zero values of give empty blocks, and gives an empty matrix.
QAlgorithms.Papers.Independent.Extend50.P23.copyRows
For natural numbers , natural numbers indexed by , a matrix whose rows are indexed by pairs with and and whose columns are indexed by , and a chosen index , this defines the matrix with entry at . No property of is assumed. The result has no rows if and no columns if ; when , there is no possible chosen index .
QAlgorithms.Papers.Independent.Extend50.P23.eigenSpace
For a finite index type with decidable equality, a matrix , and an arbitrary complex number , this defines the complex linear subspace , namely the kernel of the linear map . No Hermitian assumption on or eigenvalue assumption on is required; the subspace may be and always contains the zero vector. If is empty, it is the zero-dimensional space.
QAlgorithms.Papers.Independent.Extend50.P23.gaussianCoordinatesLaw
For a finite type , this defines the product measure on the space of real coordinate arrays , with a Gaussian distribution of mean zero and variance one on each coordinate. Thus all coordinates are independent standard real Gaussian variables. No nonemptiness or decidable-equality assumption on is required. If is empty, the product measure is the probability measure concentrated on the unique empty coordinate array.
QAlgorithms.Papers.Independent.Extend50.P23.gueMatrix
For any type , with no finiteness or nonemptiness assumption, and any real coordinate array , this defines the complex matrix indexed by by
In particular, its diagonal entry at is . The argument is arbitrary; the definition itself imposes no probability distribution on its coordinates. If is empty, it defines the unique empty matrix.
QAlgorithms.Papers.Independent.Extend50.P23.multiplicityBlock
For natural numbers , functions , proofs that for every , an arbitrary complex matrix whose rows are indexed by triples with and and whose columns are indexed by , an arbitrary complex matrix , and an index , this defines the complex matrix by
Here is the conjugate transpose; the positivity of makes the coordinate available. No unitarity, Hermiticity, or commutation condition is imposed. Multiplicities may be zero, producing an empty matrix; is allowed, in which case the displayed sums are zero. When , there is no index to supply.
QAlgorithms.Papers.Independent.Extend50.P23.representationDirectSum
For arbitrary types and arbitrary matrix families and , this defines a family on the disjoint union by the block-diagonal formula
Explicitly, entries whose row and column both lie in are the corresponding entries of , entries whose row and column both lie in are those of , and both cross blocks are zero. No finiteness, group, continuity, or representation assumptions are imposed, and either index type may be empty.
QAlgorithms.Papers.Independent.Extend50.P23.representationHaarProjection
For a measurable type , a finite index type , an arbitrary function , a measure on , and a matrix , this defines the matrix , where denotes conjugate transpose and the integral is the Bochner integral. No group structure, Haar property or normalization of , representation property of , or measurability or integrability hypothesis is imposed. The integral uses the total convention that a nonintegrable integrand has integral zero. Empty is permitted.
QAlgorithms.Papers.Independent.Extend50.P23.representationInvariant
For arbitrary types and finite , a function , and a complex linear subspace , this predicate means that for every and every , the vector with coordinates also belongs to . No group or representation assumptions are required. If is empty, every subspace satisfies the condition; the zero subspace always satisfies it.
QAlgorithms.Papers.Independent.Extend50.P23.rowCompression
For arbitrary types with finite, a function , and a matrix , this defines the function with values in . Its entry is . There is no finiteness assumption on or , and no representation or normalization assumption on or . If is empty, the result is the zero matrix for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.