Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Partition Algebras

Definition
QAlgorithms_Papers_Independent_Intake100_P88

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

prove2quantum

The objects the formalized statements of Partition Algebras (arXiv:math/0401314) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Vertex: The two rows of vertices; false is the top row (PDF pp.3--4).
  • PartitionDiagram: A diagram is its set partition, independent of a drawing (PDF p.3, (1.1)).
  • upperVertex: Place a vertex in the upper or lower diagram of a stack (PDF p.4).
  • lowerVertex: Place a vertex in the lower diagram of a stack (PDF p.4).
  • outerVertex: Retained outer vertices of a stack (PDF p.4).
  • stackEdge: Edges coming from either factor, with the middle row identified (PDF p.4).
  • diagramCompose: Stack the left factor above the right; discard middle-only blocks (PDF p.4).
  • propagatingNumber: Blocks meeting both rows, counted without multiplicity (PDF p.3, (1.2)).
  • boundaryIndex: Clockwise boundary order: top left-to-right, bottom right-to-left (PDF p.4).
  • IsPlanar: Noncrossing set partitions in the boundary order, i.e. planar diagrams (PDF p.4).
  • IsPairing: Every block has exactly two vertices (PDF p.4, Brauer diagrams).
  • IsPermutation: A permutation diagram has one vertex from each row in every pair (PDF p.4).
  • permutationDiagram: Permutation diagram of a bijection, with the named row convention (PDF p.4).
  • LevelDiagram: Integer/half-integer level m/2, with the last pair joined at odd m (PDF p.3).
  • DiagramSpace: The diagram vector space; no multiplication is assumed (PDF p.9).
  • IsOrbitBasis: Coarsening-sum characterization of the orbit basis (PDF pp.9--10, corrected (2.3)).
  • diagramIndex: Label a physical vertex; at odd levels the distinguished pair is fixed to n (PDF p.19).
  • partitionDiagramMatrix: The actual equality-constraint matrix, including restriction at odd levels (PDF pp.18--19).
  • partitionDiagramAction: Linear extension of the diagram action, without postulating algebra laws (PDF p.19, (3.3)).
  • simultaneousValuePermutation: Simultaneous permutation of every tensor-basis index (PDF p.19, (3.7)).
  • blockNumber: Number of all blocks, including the distinguished block at odd levels (PDF p.19).
  • precedingDiagram: Canonical diagram inclusion from the preceding half-step (PDF p.9, (2.2)). When the physical rank increases, the new top/bottom pair forms a new block; when it is unchanged, the original relation is retained.
  • precedingGenerator: The generator p_(m/2) in its physical diagram space (PDF p.6, (1.10)). At even m it isolates the last pair; at odd m ≥ 3 it merges the last two columns. The statement using it requires m ≥ 2, so no undefined p_(1/2) is used.
  • deficientDiagrams: The actual deficient-propagation diagram set (PDF pp.4,11, (1.4), (2.10)). At odd levels the distinguished block is included in the physical count.
  • principalLeftIdeal: The left ideal Ap, expressed as the fixed points of right multiplication (PDF p.16).
  • StableLabel: Stable Young labels at doubled level m (PDF p.13, (2.23)).
  • TensorLabel: Finite-parameter labels: partitions of n or n-1 (PDF p.21, (3.21)).
  • stableEdge: Edges in the stable graph: stay/remove, then stay/add (PDF p.13).
  • tensorEdge: Edges in the tensor-space graph: remove, then add one box (PDF p.21).
  • traceCoefficient: Integer-level trace coefficient polynomial, explicitly (3.24), PDF p.23.
  • halfTraceCoefficient: Half-level coefficient, including the unnormalized closure factor n (PDF p.23).
  • levelTraceCoefficient: Select the coefficient polynomial by level parity (PDF pp.23--24).
  • coefficientRoots: Union of zero sets over all labels, not the roots of each individual coefficient.
  • transpositionSum: Sum of all transpositions in the group algebra (PDF p.25, (3.28)).
  • contentSum: Sum of box contents, using the source convention column - row (PDF pp.27,31).
  • splitMatrixUnit: A matrix unit in a fixed split decomposition (PDF pp.35--37, (4.23), (4.31)).
  • splitTrace: A trace expanded in the irreducible matrix characters (PDF p.37, (4.31)).
  • edgeMatrix: Coordinate inclusion of one branching-edge copy, including its multiplicity (PDF pp.35--36).
  • TraceNondegenerate: Nondegeneracy excludes the zero test vector (PDF p.39, proof of Lemma 5.1).
  • traceGram: The Gram matrix of the actual trace product form (PDF p.39).
  • IsTraceDualBasis: A trace-dual basis, with the same index set (PDF pp.39--40).
  • algebraAverage: Algebra trace averaging, with the actual dual basis (PDF p.40).
  • moduleAverage: Module trace averaging; both sides are actions, not algebra multiplication (PDF p.40).
  • IrreducibleAction: Irreducibility for an explicitly given commuting action (PDF pp.41--42). This is the invariant-subspace formulation of simplicity, including nonzero space.
  • regularTrace: Trace of actual left multiplication on the regular representation (PDF p.43).
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_SpechtModules
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P65
import Definitions.Def_QAlgorithms_Papers_Independent_Renew46_P30

/-!
Statements from Halverson--Ram, Partition Algebras, arXiv:math/0401314v2.
Levels are doubled natural numbers. No weighted partition-algebra structure is
postulated: results needing that additional construction are explicitly deferred.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P88

attribute [local instance] Classical.propDecidable

open scoped BigOperators Matrix

open QAlgorithms.Papers.Independent.Information100.P65 (hookLength)
open QAlgorithms.Papers.Independent.Renew46.P30 (TensorIndex)

universe u v w x y

/-- The two rows of vertices; `false` is the top row (PDF pp.3--4). -/
abbrev Vertex (k : ℕ) := Bool × Fin k

/-- A diagram is its set partition, independent of a drawing (PDF p.3, (1.1)). -/
abbrev PartitionDiagram (k : ℕ) := Setoid (Vertex k)

instance diagramFinite (k : ℕ) : Finite (PartitionDiagram k) := by
  apply Finite.of_injective (fun d : PartitionDiagram k => d.r)
  intro d e h
  exact Setoid.ext fun a b => Iff.of_eq (congrFun (congrFun h a) b)

/-- Place a vertex in the upper or lower diagram of a stack (PDF p.4). -/
def upperVertex {k : ℕ} (a : Vertex k) : Fin 3 × Fin k :=
  (if a.1 then 1 else 0, a.2)

/-- Place a vertex in the lower diagram of a stack (PDF p.4). -/
def lowerVertex {k : ℕ} (a : Vertex k) : Fin 3 × Fin k :=
  (if a.1 then 2 else 1, a.2)

/-- Retained outer vertices of a stack (PDF p.4). -/
def outerVertex {k : ℕ} (a : Vertex k) : Fin 3 × Fin k :=
  (if a.1 then 2 else 0, a.2)

/-- Edges coming from either factor, with the middle row identified (PDF p.4). -/
def stackEdge {k : ℕ} (d e : PartitionDiagram k) (a b : Fin 3 × Fin k) : Prop :=
  (∃ c f : Vertex k, upperVertex c = a ∧ upperVertex f = b ∧ d c f) ∨
  (∃ c f : Vertex k, lowerVertex c = a ∧ lowerVertex f = b ∧ e c f)

/-- Stack the left factor above the right; discard middle-only blocks (PDF p.4). -/
def diagramCompose {k : ℕ} (d e : PartitionDiagram k) : PartitionDiagram k :=
  Setoid.ker (fun a => Quotient.mk (Relation.EqvGen.setoid (stackEdge d e)) (outerVertex a))

example (d e : PartitionDiagram 0) : diagramCompose d e = d := by
  apply Setoid.ext
  intro a _
  exact Fin.elim0 a.2

/-- Blocks meeting both rows, counted without multiplicity (PDF p.3, (1.2)). -/
def propagatingNumber {k : ℕ} (d : PartitionDiagram k) : ℕ :=
  Nat.card {c : Quotient d //
    (∃ i : Fin k, Quotient.mk d (false, i) = c) ∧
    (∃ i : Fin k, Quotient.mk d (true, i) = c)}

/-- Clockwise boundary order: top left-to-right, bottom right-to-left (PDF p.4). -/
def boundaryIndex {k : ℕ} (a : Vertex k) : ℕ :=
  if a.1 then 2 * k - 1 - a.2.val else a.2.val

/-- Noncrossing set partitions in the boundary order, i.e. planar diagrams (PDF p.4). -/
def IsPlanar {k : ℕ} (d : PartitionDiagram k) : Prop :=
  ∀ a b c f : Vertex k,
    boundaryIndex a < boundaryIndex b → boundaryIndex b < boundaryIndex c →
    boundaryIndex c < boundaryIndex f → d a c → d b f → d a b

/-- Every block has exactly two vertices (PDF p.4, Brauer diagrams). -/
def IsPairing {k : ℕ} (d : PartitionDiagram k) : Prop :=
  ∀ a : Vertex k, ∃ b : Vertex k, b ≠ a ∧ ∀ c : Vertex k, d a c ↔ c = a ∨ c = b

/-- A permutation diagram has one vertex from each row in every pair (PDF p.4). -/
def IsPermutation {k : ℕ} (d : PartitionDiagram k) : Prop :=
  IsPairing d ∧ ∀ a b : Vertex k, d a b → a.1 = b.1 → a = b

/-- Permutation diagram of a bijection, with the named row convention (PDF p.4). -/
def permutationDiagram {k : ℕ} (s : Equiv.Perm (Fin k)) : PartitionDiagram k :=
  Setoid.ker (fun a : Vertex k => if a.1 then s a.2 else a.2)

/-- Integer/half-integer level `m/2`, with the last pair joined at odd `m` (PDF p.3). -/
def LevelDiagram (m : ℕ) :=
  {d : PartitionDiagram ((m + 1) / 2) // m % 2 = 1 →
    ∀ i : Fin ((m + 1) / 2), i.val + 1 = (m + 1) / 2 → d (false, i) (true, i)}

instance levelDiagramFinite (m : ℕ) : Finite (LevelDiagram m) :=
  inferInstanceAs (Finite {d : PartitionDiagram ((m + 1) / 2) // _})

instance levelDiagramFintype (m : ℕ) : Fintype (LevelDiagram m) := Fintype.ofFinite _

/-- The diagram vector space; no multiplication is assumed (PDF p.9). -/
abbrev DiagramSpace (m : ℕ) := LevelDiagram m →₀ ℂ

example : (permutationDiagram (Equiv.refl (Fin 1))) (false, 0) (true, 0) := rfl

example : ¬ (permutationDiagram (Equiv.refl (Fin 2))) (false, 0) (true, 1) := by
  change (0 : Fin 2) ≠ 1
  intro h
  have hval := congrArg Fin.val h
  omega

/-- Coarsening-sum characterization of the orbit basis (PDF pp.9--10, corrected (2.3)). -/
def IsOrbitBasis (m : ℕ) (b : Module.Basis (LevelDiagram m) ℂ (DiagramSpace m)) : Prop :=
  ∀ d : LevelDiagram m,
    Finsupp.single d 1 = ∑ e ∈ Finset.univ.filter (fun e : LevelDiagram m => d.val ≤ e.val), b e

/-- Label a physical vertex; at odd levels the distinguished pair is fixed to `n` (PDF p.19). -/
def diagramIndex {n m : ℕ} (hn : 0 < n) (input output : TensorIndex n (m / 2))
    (a : Vertex ((m + 1) / 2)) : Fin n :=
  if h : a.2.val < m / 2 then
    if a.1 then output ⟨a.2.val, h⟩ else input ⟨a.2.val, h⟩
  else ⟨n - 1, by omega⟩

/-- The actual equality-constraint matrix, including restriction at odd levels (PDF pp.18--19). -/
def partitionDiagramMatrix {n m : ℕ} (hn : 0 < n) (d : LevelDiagram m) :
    Matrix (TensorIndex n (m / 2)) (TensorIndex n (m / 2)) ℂ := fun output input =>
  if ∀ a c : Vertex ((m + 1) / 2), d.val a c →
    diagramIndex hn input output a = diagramIndex hn input output c then 1 else 0

/-- Linear extension of the diagram action, without postulating algebra laws (PDF p.19, (3.3)). -/
def partitionDiagramAction {n m : ℕ} (hn : 0 < n) :
    DiagramSpace m →ₗ[ℂ] Matrix (TensorIndex n (m / 2)) (TensorIndex n (m / 2)) ℂ :=
  Finsupp.linearCombination ℂ (partitionDiagramMatrix (m := m) hn)

/-- Simultaneous permutation of every tensor-basis index (PDF p.19, (3.7)). -/
def simultaneousValuePermutation {n m : ℕ} (s : Equiv.Perm (Fin n)) :
    Matrix (TensorIndex n (m / 2)) (TensorIndex n (m / 2)) ℂ := fun output input =>
  if output = fun i => s (input i) then 1 else 0

/-- Number of all blocks, including the distinguished block at odd levels (PDF p.19). -/
def blockNumber {m : ℕ} (d : LevelDiagram m) : ℕ := Nat.card (Quotient d.val)

example {n m : ℕ} (hn : 0 < n) (d : LevelDiagram m) :
    partitionDiagramAction hn (Finsupp.single d 1) = partitionDiagramMatrix hn d := by
  simp [partitionDiagramAction]

/-- Canonical diagram inclusion from the preceding half-step (PDF p.9, (2.2)).
When the physical rank increases, the new top/bottom pair forms a new block;
when it is unchanged, the original relation is retained. -/
def precedingDiagram (m : ℕ) (d : LevelDiagram (m - 1)) : PartitionDiagram ((m + 1) / 2) :=
  Setoid.ker (fun a : Vertex ((m + 1) / 2) =>
    if h : a.2.val < ((m - 1) + 1) / 2 then
      some (Quotient.mk d.val (a.1, ⟨a.2.val, h⟩)) else none)

/-- The generator `p_(m/2)` in its physical diagram space (PDF p.6, (1.10)).
At even `m` it isolates the last pair; at odd `m ≥ 3` it merges the last two columns.
The statement using it requires `m ≥ 2`, so no undefined `p_(1/2)` is used. -/
def precedingGenerator (m : ℕ) : PartitionDiagram ((m + 1) / 2) :=
  if m % 2 = 0 then
    Setoid.ker (fun a : Vertex ((m + 1) / 2) =>
      if a.2.val + 1 = (m + 1) / 2 then (Sum.inl a.1 : Bool ⊕ Fin ((m + 1) / 2))
      else Sum.inr a.2)
  else
    Setoid.ker (fun a : Vertex ((m + 1) / 2) =>
      if (m + 1) / 2 ≤ a.2.val + 2 then none else some a.2)

/-- The actual deficient-propagation diagram set (PDF pp.4,11, (1.4), (2.10)).
At odd levels the distinguished block is included in the physical count. -/
def deficientDiagrams (m : ℕ) : Set (LevelDiagram m) :=
  {d | propagatingNumber d.val < (m + 1) / 2}

example : ¬ precedingGenerator 2 (false, 0) (true, 0) := by
  change (Sum.inl false : Bool ⊕ Fin 1) ≠ Sum.inl true
  simp

example : precedingGenerator 3 (false, 0) (true, 1) := rfl

/-- The left ideal `Ap`, expressed as the fixed points of right multiplication (PDF p.16). -/
def principalLeftIdeal {A : Type u} [Ring A] (p : A) : Submodule A A where
  carrier := {a | a * p = a}
  zero_mem' := by simp
  add_mem' := by intro a b ha hb; change (a + b) * p = a + b; rw [add_mul, ha, hb]
  smul_mem' := by intro a b hb; change (a * b) * p = a * b; rw [mul_assoc, hb]

example {A : Type u} [Ring A] (a : A) : a ∈ principalLeftIdeal (1 : A) := by
  change a * 1 = a
  exact mul_one a

/-- Stable Young labels at doubled level `m` (PDF p.13, (2.23)). -/
abbrev StableLabel (m : ℕ) := {mu : YoungDiagram // mu.card ≤ m / 2}

/-- Finite-parameter labels: partitions of `n` or `n-1` (PDF p.21, (3.21)). -/
abbrev TensorLabel (n m : ℕ) :=
  {lam : YoungDiagram // lam.card = n - m % 2 ∧ lam.card - lam.rowLen 0 ≤ m / 2}

/-- Edges in the stable graph: stay/remove, then stay/add (PDF p.13). -/
def stableEdge (m : ℕ) (lam mu : YoungDiagram) : Prop :=
  if m % 2 = 0 then mu = lam ∨ (mu ≤ lam ∧ lam.card = mu.card + 1)
  else mu = lam ∨ (lam ≤ mu ∧ mu.card = lam.card + 1)

/-- Edges in the tensor-space graph: remove, then add one box (PDF p.21). -/
def tensorEdge (m : ℕ) (lam mu : YoungDiagram) : Prop :=
  if m % 2 = 0 then mu ≤ lam ∧ lam.card = mu.card + 1
  else lam ≤ mu ∧ mu.card = lam.card + 1

example : stableEdge 0 (⊥ : YoungDiagram) ⊥ := by simp [stableEdge]

/-- Integer-level trace coefficient polynomial, explicitly (3.24), PDF p.23. -/
def traceCoefficient (mu : YoungDiagram) : Polynomial ℂ :=
  Polynomial.C (∏ b ∈ mu.cells, (1 / (hookLength mu b.1 b.2 : ℂ))) *
    ∏ j ∈ Finset.range mu.card,
      (Polynomial.X - Polynomial.C ((mu.card : ℂ) + (mu.rowLen j : ℂ) - ((j + 1 : ℕ) : ℂ)))

/-- Half-level coefficient, including the unnormalized closure factor `n` (PDF p.23). -/
def halfTraceCoefficient (mu : YoungDiagram) : Polynomial ℂ :=
  Polynomial.X * (traceCoefficient mu).comp (Polynomial.X - 1)

/-- Select the coefficient polynomial by level parity (PDF pp.23--24). -/
def levelTraceCoefficient (m : ℕ) (mu : YoungDiagram) : Polynomial ℂ :=
  if m % 2 = 0 then traceCoefficient mu else halfTraceCoefficient mu

/-- Union of zero sets over all labels, not the roots of each individual coefficient. -/
def coefficientRoots (m : ℕ) : Set ℂ :=
  {z | ∃ mu : StableLabel m, (levelTraceCoefficient m mu.val).eval z = 0}

example : traceCoefficient (⊥ : YoungDiagram) = 1 := by
  simp [traceCoefficient, YoungDiagram.card]

example : halfTraceCoefficient (⊥ : YoungDiagram) = Polynomial.X := by
  simp [halfTraceCoefficient, traceCoefficient, YoungDiagram.card]

/-- Sum of all transpositions in the group algebra (PDF p.25, (3.28)). -/
def transpositionSum (n : ℕ) : MonoidAlgebra ℂ (Equiv.Perm (Fin n)) :=
  ∑ i : Fin n, ∑ j ∈ Finset.univ.filter (fun j : Fin n => i.val < j.val),
    MonoidAlgebra.single (Equiv.swap i j) 1

/-- Sum of box contents, using the source convention `column - row` (PDF pp.27,31). -/
def contentSum (mu : YoungDiagram) : ℂ :=
  ∑ b ∈ mu.cells, ((b.2 : ℂ) - (b.1 : ℂ))

example : transpositionSum 0 = 0 := by simp [transpositionSum]

/-- A matrix unit in a fixed split decomposition (PDF pp.35--37, (4.23), (4.31)). -/
def splitMatrixUnit {F A I : Type*} [Field F] [Ring A] [Algebra F A]
    [Fintype I] [DecidableEq I] (dim : I → ℕ)
    (e : A ≃ₐ[F] ((i : I) → Matrix (Fin (dim i)) (Fin (dim i)) F))
    (mu : I) (p q : Fin (dim mu)) : A :=
  e.symm (Pi.single mu (Matrix.single p q 1))

/-- A trace expanded in the irreducible matrix characters (PDF p.37, (4.31)). -/
def splitTrace {F A I : Type*} [Field F] [Ring A] [Algebra F A]
    [Fintype I] (dim : I → ℕ)
    (e : A ≃ₐ[F] ((i : I) → Matrix (Fin (dim i)) (Fin (dim i)) F))
    (coeff : I → F) (a : A) : F := ∑ i, coeff i * (e a i).trace

/-- Coordinate inclusion of one branching-edge copy, including its multiplicity (PDF pp.35--36). -/
def edgeMatrix {F : Type*} [Field F] {a b : ℕ} (j : Fin a ↪ Fin b) :
    Matrix (Fin b) (Fin a) F := fun r p => if r = j p then 1 else 0

example {F A I : Type*} [Field F] [Ring A] [Algebra F A] [Fintype I]
    (dim : I → ℕ) (e : A ≃ₐ[F] ((i : I) → Matrix (Fin (dim i)) (Fin (dim i)) F))
    (c : I → F) : splitTrace dim e c 0 = 0 := by simp [splitTrace]

example {F : Type*} [Field F] (n : ℕ) :
    edgeMatrix (F := F) (Function.Embedding.refl (Fin n)) = 1 := by
  ext i j
  simp [edgeMatrix, Matrix.one_apply]

/-- Nondegeneracy excludes the zero test vector (PDF p.39, proof of Lemma 5.1). -/
def TraceNondegenerate {F A : Type*} [Zero F] [Zero A] [Mul A] (t : A → F) : Prop :=
  ∀ b : A, b ≠ 0 → ∃ a : A, t (b * a) ≠ 0

/-- The Gram matrix of the actual trace product form (PDF p.39). -/
def traceGram {F A I : Type*} [Field F] [Ring A] [Algebra F A]
    (t : A →ₗ[F] F) (b : Module.Basis I F A) : Matrix I I F := fun i j => t (b i * b j)

/-- A trace-dual basis, with the same index set (PDF pp.39--40). -/
def IsTraceDualBasis {F A I : Type*} [Field F] [Ring A] [Algebra F A] [DecidableEq I]
    (t : A →ₗ[F] F) (b c : Module.Basis I F A) : Prop :=
  ∀ i j : I, t (b i * c j) = if i = j then 1 else 0

/-- Algebra trace averaging, with the actual dual basis (PDF p.40). -/
def algebraAverage {F A I : Type*} [Field F] [Ring A] [Algebra F A] [Fintype I]
    (b c : Module.Basis I F A) (a : A) : A := ∑ i, b i * a * c i

/-- Module trace averaging; both sides are actions, not algebra multiplication (PDF p.40). -/
def moduleAverage {F A I M N : Type*} [Field F] [Ring A] [Algebra F A] [Fintype I]
    [AddCommGroup M] [AddCommGroup N] [Module F M] [Module F N]
    [Module A M] [Module A N] (b c : Module.Basis I F A) (phi : M →ₗ[F] N) (m : M) : N :=
  ∑ i, b i • phi (c i • m)

example {F A I : Type*} [Field F] [Ring A] [Algebra F A] [Fintype I]
    (b c : Module.Basis I F A) : algebraAverage b c (0 : A) = 0 := by
  simp [algebraAverage]

example {F A I M N : Type*} [Field F] [Ring A] [Algebra F A] [Fintype I]
    [AddCommGroup M] [AddCommGroup N] [Module F M] [Module F N]
    [Module A M] [Module A N] (b c : Module.Basis I F A) (m : M) :
    moduleAverage b c (0 : M →ₗ[F] N) m = 0 := by
  simp [moduleAverage]

example {F : Type*} [Field F] : TraceNondegenerate (fun a : F => a) := by
  intro b hb
  exact ⟨1, by simpa using hb⟩

/-- Irreducibility for an explicitly given commuting action (PDF pp.41--42).
This is the invariant-subspace formulation of simplicity, including nonzero space. -/
def IrreducibleAction {F Z V : Type*} [Field F] [AddCommGroup V] [Module F V]
    (act : Z → V → V) : Prop :=
  Nontrivial V ∧ ∀ W : Submodule F V,
    (∀ z v, v ∈ W → act z v ∈ W) → W = ⊥ ∨ W = ⊤

example {F : Type*} [Field F] : IrreducibleAction (F := F) (fun a v : F => a * v) := by
  refine ⟨inferInstance, ?_⟩
  intro W _
  exact eq_bot_or_eq_top W

/-- Trace of actual left multiplication on the regular representation (PDF p.43). -/
def regularTrace {F A : Type*} [Field F] [Ring A] [Algebra F A]
    [FiniteDimensional F A] (a : A) : F :=
  LinearMap.trace F A (Algebra.lmul F A a)

example {F A : Type*} [Field F] [Ring A] [Algebra F A]
    [FiniteDimensional F A] : regularTrace (F := F) (0 : A) = 0 := by
  simp [regularTrace]

end QAlgorithms.Papers.Independent.Intake100.P88
Source
Partition Algebras, arXiv:math/0401314v2, https://arxiv.org/abs/math/0401314v2
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

QAlgorithms.Papers.Independent.Intake100.P88.DiagramSpace

For every natural number mmm, this denotes the complex vector space of finitely supported complex-valued functions on the following set of diagrams: equivalence relations on {false,true}×{0,…,⌊(m+1)/2⌋−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,\lfloor(m+1)/2\rfloor-1\}{false,true}×{0,…,⌊(m+1)/2⌋−1}, with the two last-index vertices required to be related if mmm is odd. Since this diagram set is finite, every complex-valued function on it has finite support. For m=0m=0m=0, the diagram set is a singleton, so this space is one-dimensional.

QAlgorithms.Papers.Independent.Intake100.P88.IrreducibleAction

For any field FFF, any type ZZZ, any additive commutative group VVV equipped with an FFF-vector space structure, and any function act⁡:Z×V→V\operatorname{act}:Z\times V\to Vact:Z×V→V, this predicate means that VVV has at least two distinct elements and every FFF-linear subspace W⊆VW\subseteq VW⊆V satisfying act⁡(z,v)∈W\operatorname{act}(z,v)\in Wact(z,v)∈W for every z∈Zz\in Zz∈Z and v∈Wv\in Wv∈W is either {0}\{0\}{0} or VVV. No linearity, composition law, or identity law is required of act⁡\operatorname{act}act. The type ZZZ may be empty; in that case every subspace satisfies the invariance condition.

QAlgorithms.Papers.Independent.Intake100.P88.IsOrbitBasis

For every natural number mmm and every complex vector-space basis (be)e∈Lm(b_e)_{e\in\mathcal L_m}(be​)e∈Lm​​ of the finitely supported functions Lm→C\mathcal L_m\to\mathbb CLm​→C, this predicate means that δd=∑e∈Lm: d≤ebe\delta_d=\sum_{e\in\mathcal L_m:\,d\leq e}b_eδd​=∑e∈Lm​:d≤e​be​ for every d∈Lmd\in\mathcal L_md∈Lm​. Here Lm\mathcal L_mLm​ consists of equivalence relations on two Boolean rows of ⌊(m+1)/2⌋\lfloor(m+1)/2\rfloor⌊(m+1)/2⌋ vertices each, with the last-index vertices required to be related when mmm is odd; δd\delta_dδd​ equals 111 at ddd and 000 elsewhere; and d≤ed\leq ed≤e means that every relation in ddd also holds in eee. The definition includes m=0m=0m=0, when there is one diagram and the condition fixes its basis vector to be the delta function.

QAlgorithms.Papers.Independent.Intake100.P88.IsPairing

For every natural number kkk and equivalence relation ddd on V={false,true}×{0,…,k−1}V=\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}V={false,true}×{0,…,k−1}, the defined pairing condition is that for every a∈Va\in Va∈V there exists b∈Vb\in Vb∈V with b≠ab\ne ab=a such that, for every c∈Vc\in Vc∈V, aaa is related to ccc if and only if c=ac=ac=a or c=bc=bc=b. Thus every equivalence class has exactly two elements, with no restriction on their Boolean coordinates. When k=0k=0k=0, this condition is vacuously satisfied.

QAlgorithms.Papers.Independent.Intake100.P88.IsPermutation

For every natural number kkk and every equivalence relation ddd on the vertex set {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, this predicate means that every equivalence class has exactly two vertices, and any two related vertices with the same Boolean coordinate are equal. Thus every class contains one vertex from each Boolean row. The definition includes k=0k=0k=0, when both conditions hold vacuously for the unique equivalence relation on the empty vertex set.

QAlgorithms.Papers.Independent.Intake100.P88.IsPlanar

For every natural number kkk and equivalence relation ddd on V={false,true}×{0,…,k−1}V=\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}V={false,true}×{0,…,k−1}, the defined planarity condition is that, for all a,b,c,f∈Va,b,c,f\in Va,b,c,f∈V, if ∂(a)<∂(b)<∂(c)<∂(f)\partial(a)<\partial(b)<\partial(c)<\partial(f)∂(a)<∂(b)<∂(c)<∂(f), aaa is related to ccc, and bbb is related to fff, then aaa is related to bbb, where ∂(false,i)=i\partial(\mathrm{false},i)=i∂(false,i)=i and ∂(true,i)=2k−1−i\partial(\mathrm{true},i)=2k-1-i∂(true,i)=2k−1−i. When fewer than four vertices exist, including k=0k=0k=0 and k=1k=1k=1, the strict-order hypotheses cannot hold, so the condition is vacuously satisfied.

QAlgorithms.Papers.Independent.Intake100.P88.IsTraceDualBasis

Let FFF be a field, AAA a ring equipped with an FFF-algebra structure, and III an index type with decidable equality. Given an FFF-linear map t:A→Ft:A\to Ft:A→F and two FFF-bases (bi)i∈I(b_i)_{i\in I}(bi​)i∈I​ and (ci)i∈I(c_i)_{i\in I}(ci​)i∈I​ of AAA, this property means that t(bicj)=1t(b_i c_j)=1t(bi​cj​)=1 when i=ji=ji=j and t(bicj)=0t(b_i c_j)=0t(bi​cj​)=0 when i≠ji\ne ji=j, for every i,j∈Ii,j\in Ii,j∈I. No finiteness or cyclic trace identity is assumed; if III is empty, the stated equalities are vacuous.

QAlgorithms.Papers.Independent.Intake100.P88.LevelDiagram

For every natural number mmm, let q=⌊(m+1)/2⌋q=\lfloor(m+1)/2\rfloorq=⌊(m+1)/2⌋. This defines the type of equivalence relations ddd on {false,true}×{0,…,q−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,q-1\}{false,true}×{0,…,q−1} subject to the following condition: if mmm has remainder 111 upon division by 222, then, for every index iii satisfying i+1=qi+1=qi+1=q, the vertices (false,i)(\mathrm{false},i)(false,i) and (true,i)(\mathrm{true},i)(true,i) are related. Thus for odd mmm the two vertices with the last index must be related; for even mmm there is no additional restriction. For m=0m=0m=0, the vertex set is empty and there is exactly one such diagram.

QAlgorithms.Papers.Independent.Intake100.P88.PartitionDiagram

For every natural number kkk, a partition diagram is an equivalence relation on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, including its reflexivity, symmetry, and transitivity properties. No further restriction is imposed. When k=0k=0k=0, this is the unique equivalence relation on the empty set.

QAlgorithms.Papers.Independent.Intake100.P88.StableLabel

For any natural number mmm, this abbreviation denotes the type of Young diagrams μ\muμ whose number of cells satisfies ∣μ∣≤⌊m/2⌋|\mu|\le\lfloor m/2\rfloor∣μ∣≤⌊m/2⌋. Each element consists of such a diagram together with this bound. There is no restriction on its number of rows or columns beyond the cell-count bound, and the empty diagram is included; for m=0m=0m=0 or m=1m=1m=1, it is the only possible diagram.

QAlgorithms.Papers.Independent.Intake100.P88.TensorLabel

For natural numbers n,mn,mn,m, this is the type of Young diagrams λ\lambdaλ satisfying

∣λ∣=n−(m mod 2),∣λ∣−λ0≤⌊m2⌋,|\lambda|=n-(m\bmod 2), \qquad |\lambda|-\lambda_0\le \left\lfloor\frac m2\right\rfloor,∣λ∣=n−(mmod2),∣λ∣−λ0​≤⌊2m​⌋,

where ∣λ∣|\lambda|∣λ∣ is the number of cells and λ0\lambda_0λ0​ is the length of row 000. Both subtractions are natural-number subtractions, truncated at zero. Thus the required size is nnn when mmm is even and max⁡(n−1,0)\max(n-1,0)max(n−1,0) when mmm is odd. The parameters may be zero, and empty diagrams are included whenever these conditions permit them.

QAlgorithms.Papers.Independent.Intake100.P88.TraceNondegenerate

For types F,AF,AF,A equipped with chosen zero elements, with AAA also equipped with multiplication, and any function t:A→Ft:A\to Ft:A→F, this property means that for every b∈Ab\in Ab∈A with b≠0b\ne0b=0 there exists a∈Aa\in Aa∈A such that t(ba)≠0t(ba)\ne0t(ba)=0. No field, ring, additivity, or linearity assumption is imposed here. If AAA has no nonzero elements, the property holds vacuously.

QAlgorithms.Papers.Independent.Intake100.P88.Vertex

For every natural number kkk, the vertex type is {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}. Thus a vertex consists of a Boolean and an index less than kkk; there are 2k2k2k vertices, and none when k=0k=0k=0.

QAlgorithms.Papers.Independent.Intake100.P88.algebraAverage

Let FFF be a field, AAA a ring equipped with an FFF-algebra structure, and III a finite index type. Given two FFF-bases (bi)i∈I,(ci)i∈I(b_i)_{i\in I},(c_i)_{i\in I}(bi​)i∈I​,(ci​)i∈I​ of AAA and an element a∈Aa\in Aa∈A, this defines ∑i∈Ibiaci∈A\sum_{i\in I}b_i a c_i\in A∑i∈I​bi​aci​∈A, with multiplication in the displayed order. No duality relation between the bases is required. If III is empty, the value is zero.

QAlgorithms.Papers.Independent.Intake100.P88.blockNumber

For any natural number mmm and any level diagram ddd, this definition gives the number of equivalence classes of ddd. Here a level diagram is an equivalence relation on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, where k=⌊(m+1)/2⌋k=\lfloor(m+1)/2\rfloork=⌊(m+1)/2⌋, with (false,k−1)(\mathrm{false},k-1)(false,k−1) and (true,k−1)(\mathrm{true},k-1)(true,k−1) required to be equivalent when mmm is odd. All equivalence classes are counted, regardless of which rows they meet. In particular, the number is 000 for m=0m=0m=0 and 111 for m=1m=1m=1.

QAlgorithms.Papers.Independent.Intake100.P88.boundaryIndex

For every natural number kkk and vertex (β,i)∈{false,true}×{0,…,k−1}(\beta,i)\in\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}(β,i)∈{false,true}×{0,…,k−1}, its boundary index is iii if β=false\beta=\mathrm{false}β=false and 2k−1−i2k-1-i2k−1−i if β=true\beta=\mathrm{true}β=true. The subtractions are natural-number subtractions, truncated at zero, although for an existing vertex i<ki<ki<k no truncation changes this formula. When k=0k=0k=0, there are no vertices to evaluate.

QAlgorithms.Papers.Independent.Intake100.P88.coefficientRoots

For a natural number mmm, this is the set of complex numbers zzz for which there exists a Young diagram μ\muμ with ∣μ∣≤⌊m/2⌋|\mu|\le\lfloor m/2\rfloor∣μ∣≤⌊m/2⌋ such that

{Tμ(z)=0,m even,z Tμ(z−1)=0,m odd,Tμ(X)=(∏(a,c)∈μ1hμ(a,c))∏j=0∣μ∣−1(X−(∣μ∣+μj−(j+1))).\begin{cases} T_\mu(z)=0,&m\text{ even},\\ z\,T_\mu(z-1)=0,&m\text{ odd}, \end{cases} \qquad T_\mu(X)= \left(\prod_{(a,c)\in\mu}\frac1{h_\mu(a,c)}\right) \prod_{j=0}^{|\mu|-1} \left(X-\bigl(|\mu|+\mu_j-(j+1)\bigr)\right).{Tμ​(z)=0,zTμ​(z−1)=0,​m even,m odd,​Tμ​(X)=​(a,c)∈μ∏​hμ​(a,c)1​​j=0∏∣μ∣−1​(X−(∣μ∣+μj​−(j+1))).

Here hμ(a,c)=max⁡(μa−c−1,0)+max⁡(μc′−a−1,0)+1h_\mu(a,c)=\max(\mu_a-c-1,0)+\max(\mu'_c-a-1,0)+1hμ​(a,c)=max(μa​−c−1,0)+max(μc′​−a−1,0)+1, with row lengths μa\mu_aμa​, column lengths μc′\mu'_cμc′​, truncated natural-number subtraction in the hook lengths, and complex arithmetic in the factors. The empty diagram is among the witnesses allowed at every level and has T∅=1T_\varnothing=1T∅​=1; in particular the set at level zero is empty, while zero belongs at every odd level.

QAlgorithms.Papers.Independent.Intake100.P88.contentSum

For a Young diagram μ\muμ, this defines the complex number

∑(a,c)∈μ(c−a),\sum_{(a,c)\in\mu}(c-a),(a,c)∈μ∑​(c−a),

where aaa is the zero-based row coordinate and ccc the zero-based column coordinate of a cell. Each coordinate is cast to C\mathbb CC before subtraction, so negative contents are retained. For the empty diagram the sum is zero.

QAlgorithms.Papers.Independent.Intake100.P88.deficientDiagrams

For any natural number mmm, put k=⌊(m+1)/2⌋k=\lfloor(m+1)/2\rfloork=⌊(m+1)/2⌋. This definition gives the set of level diagrams ddd whose number of equivalence classes meeting both rows is strictly less than kkk. Here ddd is an equivalence relation on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, with the last two vertices required to be equivalent when mmm is odd; a class meets both rows if it contains some (false,i)(\mathrm{false},i)(false,i) and some (true,j)(\mathrm{true},j)(true,j), with no requirement that i=ji=ji=j. For m=0m=0m=0 the strict inequality is 0<00<00<0, so the set is empty; it is also empty for m=1m=1m=1.

QAlgorithms.Papers.Independent.Intake100.P88.diagramCompose

For every natural number kkk and equivalence relations d,ed,ed,e on V={false,true}×{0,…,k−1}V=\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}V={false,true}×{0,…,k−1}, their defined composition is the following equivalence relation on VVV. In the three-row set {0,1,2}×{0,…,k−1}\{0,1,2\}\times\{0,\ldots,k-1\}{0,1,2}×{0,…,k−1}, place each ddd-relation using (false,i)↦(0,i)(\mathrm{false},i)\mapsto(0,i)(false,i)↦(0,i) and (true,i)↦(1,i)(\mathrm{true},i)\mapsto(1,i)(true,i)↦(1,i), and each eee-relation using (false,i)↦(1,i)(\mathrm{false},i)\mapsto(1,i)(false,i)↦(1,i) and (true,i)↦(2,i)(\mathrm{true},i)\mapsto(2,i)(true,i)↦(2,i); take the smallest equivalence relation containing all these pairs. Two vertices of VVV are related by the composition exactly when their images under (false,i)↦(0,i)(\mathrm{false},i)\mapsto(0,i)(false,i)↦(0,i) and (true,i)↦(2,i)(\mathrm{true},i)\mapsto(2,i)(true,i)↦(2,i) belong to the same class of that generated equivalence relation. When k=0k=0k=0, this gives the unique equivalence relation on the empty set.

QAlgorithms.Papers.Independent.Intake100.P88.diagramFinite

For every natural number kkk, the collection of all equivalence relations on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1} is finite. This includes k=0k=0k=0, when the collection contains exactly the equivalence relation on the empty set.

QAlgorithms.Papers.Independent.Intake100.P88.diagramIndex

For natural numbers n,mn,mn,m with n>0n>0n>0, two functions input,output:{0,…,⌊m/2⌋−1}→{0,…,n−1}\mathrm{input},\mathrm{output}:\{0,\ldots,\lfloor m/2\rfloor-1\}\to\{0,\ldots,n-1\}input,output:{0,…,⌊m/2⌋−1}→{0,…,n−1}, and a vertex a=(β,i)a=(\beta,i)a=(β,i) with Boolean row coordinate β\betaβ and 0≤i<⌊(m+1)/2⌋0\leq i<\lfloor(m+1)/2\rfloor0≤i<⌊(m+1)/2⌋, this defines an index in {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. If i<⌊m/2⌋i<\lfloor m/2\rfloori<⌊m/2⌋, the index is output(i)\mathrm{output}(i)output(i) when β=true\beta=\mathrm{true}β=true and input(i)\mathrm{input}(i)input(i) when β=false\beta=\mathrm{false}β=false; otherwise it is n−1n-1n−1. Thus when mmm is odd, both vertices at the extra last index receive n−1n-1n−1; when mmm is even, every vertex uses the corresponding input or output value. For m=0m=0m=0 there are no vertices to which the function can be applied, and for n=1n=1n=1 every returned index is 000.

QAlgorithms.Papers.Independent.Intake100.P88.edgeMatrix

For any field FFF, natural numbers a,ba,ba,b, and injection j:{0,…,a−1}↪{0,…,b−1}j:\{0,\ldots,a-1\}\hookrightarrow\{0,\ldots,b-1\}j:{0,…,a−1}↪{0,…,b−1}, this defines the b×ab\times ab×a matrix HHH over FFF by Hrp=1H_{rp}=1Hrp​=1 if r=j(p)r=j(p)r=j(p) and Hrp=0H_{rp}=0Hrp​=0 otherwise. The case a=0a=0a=0 is included and gives a matrix with no columns; if b=0b=0b=0, the required injection can exist only when a=0a=0a=0.

QAlgorithms.Papers.Independent.Intake100.P88.halfTraceCoefficient

For a Young diagram μ\muμ, this defines the complex polynomial

X Tμ(X−1)=X(∏(a,c)∈μ1hμ(a,c))∏j=0∣μ∣−1(X−1−(∣μ∣+μj−(j+1))),X\,T_\mu(X-1) = X\left(\prod_{(a,c)\in\mu}\frac1{h_\mu(a,c)}\right) \prod_{j=0}^{|\mu|-1} \left(X-1-\bigl(|\mu|+\mu_j-(j+1)\bigr)\right),XTμ​(X−1)=X​(a,c)∈μ∏​hμ​(a,c)1​​j=0∏∣μ∣−1​(X−1−(∣μ∣+μj​−(j+1))),

where μj\mu_jμj​ is row jjj's length and

hμ(a,c)=max⁡(μa−(c+1),0)+max⁡(μc′−(a+1),0)+1,h_\mu(a,c)= \max\bigl(\mu_a-(c+1),0\bigr) +\max\bigl(\mu'_c-(a+1),0\bigr)+1,hμ​(a,c)=max(μa​−(c+1),0)+max(μc′​−(a+1),0)+1,

with μc′\mu'_cμc′​ the length of column ccc. Hook-length subtractions are truncated natural-number subtractions; the polynomial factors use complex subtraction. For the empty diagram this polynomial is XXX.

QAlgorithms.Papers.Independent.Intake100.P88.levelDiagramFinite

For every natural number mmm, the collection of equivalence relations on {false,true}×{0,…,⌊(m+1)/2⌋−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,\lfloor(m+1)/2\rfloor-1\}{false,true}×{0,…,⌊(m+1)/2⌋−1} satisfying the requirement that the two last-index vertices are related when mmm is odd is finite. This includes m=0m=0m=0, for which the collection consists of the unique equivalence relation on the empty set.

QAlgorithms.Papers.Independent.Intake100.P88.levelDiagramFintype

For every natural number mmm, this supplies a finite enumeration, containing every element exactly once, of the equivalence relations on {false,true}×{0,…,⌊(m+1)/2⌋−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,\lfloor(m+1)/2\rfloor-1\}{false,true}×{0,…,⌊(m+1)/2⌋−1} whose two last-index vertices are required to be related when mmm is odd. This includes m=0m=0m=0, when the enumeration has one element, the empty equivalence relation.

QAlgorithms.Papers.Independent.Intake100.P88.levelTraceCoefficient

For a natural number mmm and a Young diagram μ\muμ, this defines

Lm,μ(X)={Tμ(X),m even,X Tμ(X−1),m odd,Tμ(X)=(∏(a,c)∈μ1hμ(a,c))∏j=0∣μ∣−1(X−(∣μ∣+μj−(j+1))).L_{m,\mu}(X)= \begin{cases} T_\mu(X),&m\text{ even},\\ X\,T_\mu(X-1),&m\text{ odd}, \end{cases} \qquad T_\mu(X)= \left(\prod_{(a,c)\in\mu}\frac1{h_\mu(a,c)}\right) \prod_{j=0}^{|\mu|-1} \left(X-\bigl(|\mu|+\mu_j-(j+1)\bigr)\right).Lm,μ​(X)={Tμ​(X),XTμ​(X−1),​m even,m odd,​Tμ​(X)=​(a,c)∈μ∏​hμ​(a,c)1​​j=0∏∣μ∣−1​(X−(∣μ∣+μj​−(j+1))).

Here μj\mu_jμj​ and μc′\mu'_cμc′​ are row and column lengths, and hμ(a,c)=max⁡(μa−c−1,0)+max⁡(μc′−a−1,0)+1h_\mu(a,c)=\max(\mu_a-c-1,0)+\max(\mu'_c-a-1,0)+1hμ​(a,c)=max(μa​−c−1,0)+max(μc′​−a−1,0)+1. The hook-length subtractions are truncated natural-number subtractions, whereas the polynomial factors use complex arithmetic. There is no bound on ∣μ∣|\mu|∣μ∣ in this definition. The case m=0m=0m=0 uses TμT_\muTμ​; for the empty diagram the result is 111 at even levels and XXX at odd levels.

QAlgorithms.Papers.Independent.Intake100.P88.lowerVertex

For every natural number kkk and vertex (β,i)∈{false,true}×{0,…,k−1}(\beta,i)\in\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}(β,i)∈{false,true}×{0,…,k−1}, the lower-vertex map takes values in {0,1,2}×{0,…,k−1}\{0,1,2\}\times\{0,\ldots,k-1\}{0,1,2}×{0,…,k−1} and sends (false,i)(\mathrm{false},i)(false,i) to (1,i)(1,i)(1,i) and (true,i)(\mathrm{true},i)(true,i) to (2,i)(2,i)(2,i). When k=0k=0k=0, its domain is empty.

QAlgorithms.Papers.Independent.Intake100.P88.moduleAverage

Let FFF be a field, AAA a ring equipped with an FFF-algebra structure, and III a finite index type. Let M,NM,NM,N be additive commutative groups, each equipped with both an FFF-module structure and an AAA-module structure. Given FFF-bases (bi)i∈I,(ci)i∈I(b_i)_{i\in I},(c_i)_{i\in I}(bi​)i∈I​,(ci​)i∈I​ of AAA, an FFF-linear map ϕ:M→N\phi:M\to Nϕ:M→N, and m∈Mm\in Mm∈M, this defines ∑i∈Ibi⋅ϕ(ci⋅m)∈N\sum_{i\in I}b_i\cdot\phi(c_i\cdot m)\in N∑i∈I​bi​⋅ϕ(ci​⋅m)∈N, using the AAA-actions for both displayed scalar multiplications. This definition assumes neither compatibility between the FFF- and AAA-actions nor a duality relation between the bases. An empty index type gives zero.

QAlgorithms.Papers.Independent.Intake100.P88.outerVertex

For every natural number kkk and vertex (β,i)∈{false,true}×{0,…,k−1}(\beta,i)\in\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}(β,i)∈{false,true}×{0,…,k−1}, the outer-vertex map takes values in {0,1,2}×{0,…,k−1}\{0,1,2\}\times\{0,\ldots,k-1\}{0,1,2}×{0,…,k−1} and sends (false,i)(\mathrm{false},i)(false,i) to (0,i)(0,i)(0,i) and (true,i)(\mathrm{true},i)(true,i) to (2,i)(2,i)(2,i). When k=0k=0k=0, its domain is empty.

QAlgorithms.Papers.Independent.Intake100.P88.partitionDiagramAction

For natural numbers n,mn,mn,m with n>0n>0n>0, let r=⌊m/2⌋r=\lfloor m/2\rfloorr=⌊m/2⌋ and k=⌊(m+1)/2⌋k=\lfloor(m+1)/2\rfloork=⌊(m+1)/2⌋. Consider equivalence relations ddd on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, with the last two vertices (false,k−1)(\mathrm{false},k-1)(false,k−1) and (true,k−1)(\mathrm{true},k-1)(true,k−1) required to be equivalent when mmm is odd. The diagram space consists of finitely supported complex coefficient functions ccc on these diagrams. This definition gives the complex linear map

c⟼∑dc(d)Md,c\longmapsto\sum_d c(d)M_d,c⟼d∑​c(d)Md​,

where MdM_dMd​ is indexed by words x,yx,yx,y of length rrr over {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}: its (y,x)(y,x)(y,x)-entry is 111 precisely when the labels xix_ixi​ on (false,i)(\mathrm{false},i)(false,i), yiy_iyi​ on (true,i)(\mathrm{true},i)(true,i), and n−1n-1n−1 on any vertices with i≥ri\ge ri≥r, are constant on each equivalence class of ddd, and is 000 otherwise. The sum uses the finite support of ccc, including the empty support, which maps to the zero matrix.

QAlgorithms.Papers.Independent.Intake100.P88.partitionDiagramMatrix

For natural numbers n,mn,mn,m with n>0n>0n>0, put r=⌊m/2⌋r=\lfloor m/2\rfloorr=⌊m/2⌋ and k=⌊(m+1)/2⌋k=\lfloor(m+1)/2\rfloork=⌊(m+1)/2⌋. A level diagram ddd is an equivalence relation on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, required, when mmm is odd, to identify (false,k−1)(\mathrm{false},k-1)(false,k−1) with (true,k−1)(\mathrm{true},k-1)(true,k−1). This definition assigns ddd a complex matrix whose rows and columns are words of length rrr over {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. For a column word xxx and row word yyy, label vertex (false,i)(\mathrm{false},i)(false,i) by xix_ixi​ and vertex (true,i)(\mathrm{true},i)(true,i) by yiy_iyi​ when i<ri<ri<r; label any remaining vertices by n−1n-1n−1. The matrix entry at (y,x)(y,x)(y,x) is 111 if every pair of vertices equivalent under ddd has equal labels, and 000 otherwise. For m=0m=0m=0, the condition is vacuous and the matrix has its sole entry equal to 111; for m=1m=1m=1, it also has its sole entry equal to 111.

QAlgorithms.Papers.Independent.Intake100.P88.permutationDiagram

For every natural number kkk and every permutation sss of {0,…,k−1}\{0,\ldots,k-1\}{0,…,k−1}, this defines an equivalence relation on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1} by assigning the label iii to (false,i)(\mathrm{false},i)(false,i) and the label s(i)s(i)s(i) to (true,i)(\mathrm{true},i)(true,i), and declaring two vertices equivalent exactly when their assigned labels are equal. In particular, (false,i)(\mathrm{false},i)(false,i) is related to (true,j)(\mathrm{true},j)(true,j) exactly when i=s(j)i=s(j)i=s(j). For k=0k=0k=0, this is the unique equivalence relation on the empty set.

QAlgorithms.Papers.Independent.Intake100.P88.precedingDiagram

For any natural number mmm, put k=⌊(m+1)/2⌋k=\lfloor(m+1)/2\rfloork=⌊(m+1)/2⌋ and k′=⌊((m−1)+1)/2⌋k'=\lfloor((m-1)+1)/2\rfloork′=⌊((m−1)+1)/2⌋, with natural-number subtraction truncated at zero. Given a level diagram ddd at level m−1m-1m−1—an equivalence relation on {false,true}×{0,…,k′−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k'-1\}{false,true}×{0,…,k′−1}, identifying its last two vertices if m−1m-1m−1 is odd—this definition gives an equivalence relation on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}. It maps (β,i)(\beta,i)(β,i) with i<k′i<k'i<k′ to a tagged copy of its equivalence class under ddd, and maps every vertex with i≥k′i\ge k'i≥k′ to one additional common value; two vertices are equivalent exactly when these assigned values agree. Consequently, old equivalence classes remain distinct, all added vertices form one class if any exist, and that class is distinct from every old class. At m=0m=0m=0, the vertex set is empty.

QAlgorithms.Papers.Independent.Intake100.P88.precedingGenerator

For any natural number mmm, put k=⌊(m+1)/2⌋k=\lfloor(m+1)/2\rfloork=⌊(m+1)/2⌋. This definition gives an equivalence relation on vertices (β,i)∈{false,true}×{0,…,k−1}(\beta,i)\in\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}(β,i)∈{false,true}×{0,…,k−1} by equality of assigned values. If mmm is even, a vertex with i+1=ki+1=ki+1=k receives a tagged value recording β\betaβ, while every other vertex receives a differently tagged value recording iii; thus each nonlast pair (false,i),(true,i)(\mathrm{false},i),(\mathrm{true},i)(false,i),(true,i) forms a class, and the two last vertices are separate singleton classes. If mmm is odd, every vertex satisfying k≤i+2k\le i+2k≤i+2 receives one common value, while each remaining vertex receives a tagged value recording iii; thus the last min⁡(2,k)\min(2,k)min(2,k) pairs form one class and every earlier pair forms its own class. For m=0m=0m=0, the relation is on the empty set; for m=1m=1m=1, both vertices belong to one class.

QAlgorithms.Papers.Independent.Intake100.P88.principalLeftIdeal

For any ring AAA and any element p∈Ap\in Ap∈A, this definition gives the left AAA-submodule of the regular left module AAA whose underlying set is

{a∈A:ap=a}.\{a\in A:ap=a\}.{a∈A:ap=a}.

Addition and left scalar multiplication are inherited from AAA. Neither commutativity of AAA, idempotence of ppp, nor p≠0p\ne0p=0 is assumed. In particular, p=0p=0p=0 gives the zero submodule and p=1p=1p=1 gives all of AAA.

QAlgorithms.Papers.Independent.Intake100.P88.propagatingNumber

For every natural number kkk and equivalence relation ddd on {false,true}×{0,…,k−1}\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}{false,true}×{0,…,k−1}, its propagating number is the number of equivalence classes containing both some vertex (false,i)(\mathrm{false},i)(false,i) and some vertex (true,j)(\mathrm{true},j)(true,j), where i,j<ki,j<ki,j<k need not be equal. Each such class is counted once. When k=0k=0k=0, the number is 000.

QAlgorithms.Papers.Independent.Intake100.P88.regularTrace

For any field FFF, any ring AAA equipped with a finite-dimensional FFF-algebra structure, and any a∈Aa\in Aa∈A, the regular trace of aaa is the FFF-linear trace of left multiplication by aaa on AAA:

regularTrace⁡(a)=tr⁡F(La),La(x)=ax.\operatorname{regularTrace}(a)=\operatorname{tr}_F(L_a), \qquad L_a(x)=ax.regularTrace(a)=trF​(La​),La​(x)=ax.

The definition includes the zero-dimensional algebra, where this trace is zero.

QAlgorithms.Papers.Independent.Intake100.P88.simultaneousValuePermutation

For any natural numbers n,mn,mn,m and any permutation sss of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}, this definition gives a complex matrix indexed by words of length ⌊m/2⌋\lfloor m/2\rfloor⌊m/2⌋ over that set. Its entry at row yyy and column xxx is 111 exactly when yi=s(xi)y_i=s(x_i)yi​=s(xi​) for every coordinate iii, and is 000 otherwise. No positivity assumption on nnn is imposed: if the word length is zero, there is one empty word and the matrix is [1][1][1], even when n=0n=0n=0; if n=0n=0n=0 and the word length is positive, the indexing set is empty.

QAlgorithms.Papers.Independent.Intake100.P88.splitMatrixUnit

Let FFF be a field, AAA a ring equipped with an FFF-algebra structure, and III a finite index type with decidable equality. Given dimensions di∈Nd_i\in\mathbb Ndi​∈N and an FFF-algebra isomorphism e:A≅∏i∈IMdi(F)e:A\cong\prod_{i\in I}M_{d_i}(F)e:A≅∏i∈I​Mdi​​(F), for μ∈I\mu\in Iμ∈I and p,q∈{0,…,dμ−1}p,q\in\{0,\ldots,d_\mu-1\}p,q∈{0,…,dμ​−1} this defines the element e−1(X)∈Ae^{-1}(X)\in Ae−1(X)∈A, where XμX_\muXμ​ has entry 111 in row ppp, column qqq, and zero elsewhere, and Xi=0X_i=0Xi​=0 for every i≠μi\ne\mui=μ. Zero dimensions are allowed, but choosing p,qp,qp,q requires dμ>0d_\mu>0dμ​>0.

QAlgorithms.Papers.Independent.Intake100.P88.splitTrace

Let FFF be a field, AAA a ring equipped with an FFF-algebra structure, and III a finite index type. Given dimensions di∈Nd_i\in\mathbb Ndi​∈N, an FFF-algebra isomorphism e:A≅∏i∈IMdi(F)e:A\cong\prod_{i\in I}M_{d_i}(F)e:A≅∏i∈I​Mdi​​(F), coefficients ci∈Fc_i\in Fci​∈F, and a∈Aa\in Aa∈A, this defines the scalar ∑i∈Icitr⁡((e(a))i)\sum_{i\in I}c_i\operatorname{tr}((e(a))_i)∑i∈I​ci​tr((e(a))i​). The coefficients are unrestricted, including zero; a zero-dimensional matrix contributes trace zero, and an empty index type gives the empty sum zero.

QAlgorithms.Papers.Independent.Intake100.P88.stableEdge

For a natural number mmm and Young diagrams λ,μ\lambda,\muλ,μ, this predicate holds exactly when

{μ=λ or (μ⊆λ and ∣λ∣=∣μ∣+1),m even,μ=λ or (λ⊆μ and ∣μ∣=∣λ∣+1),m odd.\begin{cases} \mu=\lambda\ \text{or}\ \bigl(\mu\subseteq\lambda\ \text{and}\ |\lambda|=|\mu|+1\bigr), & m\text{ even},\\ \mu=\lambda\ \text{or}\ \bigl(\lambda\subseteq\mu\ \text{and}\ |\mu|=|\lambda|+1\bigr), & m\text{ odd}. \end{cases}{μ=λ or (μ⊆λ and ∣λ∣=∣μ∣+1),μ=λ or (λ⊆μ and ∣μ∣=∣λ∣+1),​m even,m odd.​

Here inclusion means inclusion of their cell sets. Equality is allowed in both parity cases; otherwise exactly one cell is removed from λ\lambdaλ in the even case or added to λ\lambdaλ in the odd case. No size restrictions on either diagram are imposed beyond these conditions, and m=0m=0m=0 uses the even case.

QAlgorithms.Papers.Independent.Intake100.P88.stackEdge

For every natural number kkk, let ddd and eee be equivalence relations on V={false,true}×{0,…,k−1}V=\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}V={false,true}×{0,…,k−1}. For a,b∈{0,1,2}×{0,…,k−1}a,b\in\{0,1,2\}\times\{0,\ldots,k-1\}a,b∈{0,1,2}×{0,…,k−1}, the stack-edge relation holds exactly when either there exist c,f∈Vc,f\in Vc,f∈V related by ddd whose images under (false,i)↦(0,i)(\mathrm{false},i)\mapsto(0,i)(false,i)↦(0,i) and (true,i)↦(1,i)(\mathrm{true},i)\mapsto(1,i)(true,i)↦(1,i) are respectively a,ba,ba,b, or there exist c,f∈Vc,f\in Vc,f∈V related by eee whose images under (false,i)↦(1,i)(\mathrm{false},i)\mapsto(1,i)(false,i)↦(1,i) and (true,i)↦(2,i)(\mathrm{true},i)\mapsto(2,i)(true,i)↦(2,i) are respectively a,ba,ba,b. The alternatives are joined by inclusive “or”; no transitive closure is taken in this definition. When k=0k=0k=0, the relation has an empty domain.

QAlgorithms.Papers.Independent.Intake100.P88.tensorEdge

For a natural number mmm and Young diagrams λ,μ\lambda,\muλ,μ, this predicate holds exactly when

{μ⊆λ and ∣λ∣=∣μ∣+1,m even,λ⊆μ and ∣μ∣=∣λ∣+1,m odd.\begin{cases} \mu\subseteq\lambda\ \text{and}\ |\lambda|=|\mu|+1, & m\text{ even},\\ \lambda\subseteq\mu\ \text{and}\ |\mu|=|\lambda|+1, & m\text{ odd}. \end{cases}{μ⊆λ and ∣λ∣=∣μ∣+1,λ⊆μ and ∣μ∣=∣λ∣+1,​m even,m odd.​

Thus exactly one cell is removed in the even case or added in the odd case. Equal diagrams do not satisfy this predicate. There are no additional size restrictions, and m=0m=0m=0 uses the even case.

QAlgorithms.Papers.Independent.Intake100.P88.traceCoefficient

For a Young diagram μ\muμ, this defines the complex polynomial

Tμ(X)=(∏(a,c)∈μ1hμ(a,c))∏j=0∣μ∣−1(X−(∣μ∣+μj−(j+1))),T_\mu(X)= \left(\prod_{(a,c)\in\mu}\frac1{h_\mu(a,c)}\right) \prod_{j=0}^{|\mu|-1} \left(X-\bigl(|\mu|+\mu_j-(j+1)\bigr)\right),Tμ​(X)=​(a,c)∈μ∏​hμ​(a,c)1​​j=0∏∣μ∣−1​(X−(∣μ∣+μj​−(j+1))),

where μj\mu_jμj​ is the length of row jjj, and

hμ(a,c)=max⁡(μa−(c+1),0)+max⁡(μc′−(a+1),0)+1h_\mu(a,c)= \max\bigl(\mu_a-(c+1),0\bigr) +\max\bigl(\mu'_c-(a+1),0\bigr)+1hμ​(a,c)=max(μa​−(c+1),0)+max(μc′​−(a+1),0)+1

with μc′\mu'_cμc′​ the length of column ccc. The hook-length subtractions take place in the natural numbers, while the subtraction in each polynomial factor takes place in C\mathbb CC after casting the natural numbers. Both products are empty for the empty diagram, giving T∅(X)=1T_\varnothing(X)=1T∅​(X)=1.

QAlgorithms.Papers.Independent.Intake100.P88.traceGram

Let FFF be a field, AAA a ring equipped with an FFF-algebra structure, and III any index type. Given an FFF-linear map t:A→Ft:A\to Ft:A→F and an FFF-basis (bi)i∈I(b_i)_{i\in I}(bi​)i∈I​ of AAA, this defines the matrix GGG indexed by I×II\times II×I with entries Gij=t(bibj)G_{ij}=t(b_i b_j)Gij​=t(bi​bj​). Finiteness of III and the identity t(ab)=t(ba)t(ab)=t(ba)t(ab)=t(ba) are not required by this definition.

QAlgorithms.Papers.Independent.Intake100.P88.transpositionSum

For every natural number nnn, this defines the element

∑0≤i<j<n[(i j)]\sum_{0\le i<j<n}[(i\,j)]0≤i<j<n∑​[(ij)]

of the complex group algebra of the permutation group of {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. Here [(i j)][(i\,j)][(ij)] is the finitely supported function on that permutation group taking value 111 at the permutation swapping iii and jjj, and value 000 elsewhere. Each unordered pair occurs once. For n=0n=0n=0 or n=1n=1n=1, the sum is empty and equals zero.

QAlgorithms.Papers.Independent.Intake100.P88.upperVertex

For every natural number kkk and vertex (β,i)∈{false,true}×{0,…,k−1}(\beta,i)\in\{\mathrm{false},\mathrm{true}\}\times\{0,\ldots,k-1\}(β,i)∈{false,true}×{0,…,k−1}, the upper-vertex map takes values in {0,1,2}×{0,…,k−1}\{0,1,2\}\times\{0,\ldots,k-1\}{0,1,2}×{0,…,k−1} and sends (false,i)(\mathrm{false},i)(false,i) to (0,i)(0,i)(0,i) and (true,i)(\mathrm{true},i)(true,i) to (1,i)(1,i)(1,i). When k=0k=0k=0, its domain is empty.

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