While this submission is a draft, it cannot be used by other submissions.

Matrix-symmetric circuits

Lax461425.MatrixSymmetry · concepts/Lax461425/MatrixSymmetry.lean · lax-461425

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    For n∈Nn \in \mathbb{N}, let Xn={xi,j:i,j∈[n]}\mathcal{X}_n = \{x_{i,j} : i, j \in [n]\} be the entries of an n×nn \times n matrix of variables. The group Γn=Symn×Symn\Gamma_n = \mathbf{Sym}_n \times \mathbf{Sym}_n acts on Xn\mathcal{X}_n by permuting rows and columns independently, (σ,τ) xi,j=xσ(i),τ(j)(\sigma, \tau)\, x_{i,j} = x_{\sigma(i), \tau(j)}, and on the disjoint union [n]⊎[n][n] \uplus [n] of a copy of [n][n] indexing the rows (the left side) and a copy indexing the columns (the right side).

    Let CC be an algebraic circuit with variables Xn\mathcal{X}_n. A permutation σ\sigma of the gates of CC extends γ∈Γn\gamma \in \Gamma_n if it preserves the labels of internal gates and the multiplicities of wires, m(σg,σh)=m(g,h)m(\sigma g, \sigma h) = m(g, h), and maps every input gate labelled by a variable xx to a gate labelled by γx\gamma x and every input gate labelled by a constant to a gate labelled by the same constant. Such permutations are the circuit automorphisms extending γ\gamma.

    The circuit CC is matrix-symmetric if every γ∈Γn\gamma \in \Gamma_n extends to a circuit automorphism, and rigid if every γ∈Γn\gamma \in \Gamma_n extends to a unique circuit automorphism. Let AutΓ(C)\mathbf{Aut}_\Gamma(C) be the group of circuit automorphisms extending some element of Γn\Gamma_n. The orbit size of CC is

    max⁡g∣{σ(g):σ∈AutΓ(C)}∣,\max_{g} \bigl|\{\sigma(g) : \sigma \in \mathbf{Aut}_\Gamma(C)\}\bigr|,

    the maximum taken over all gates gg of CC.

    Concept map
    2 concepts; 8 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.GroupTheory.Perm.Basic
    2import Lax461425.Circuits
    3
    4/-!
    5---
    6title: Matrix-symmetric circuits
    7type: definition
    8---
    9For n∈Nn \in \mathbb{N}, let Xn={xi,j:i,j∈[n]}\mathcal{X}_n = \{x_{i,j} : i, j \in [n]\} be the entries of an
    10n×nn \times n matrix of variables. The group Γn=Symn×Symn\Gamma_n = \mathbf{Sym}_n \times \mathbf{Sym}_n
    11acts on Xn\mathcal{X}_n by permuting rows and columns independently,
    12(σ,τ) xi,j=xσ(i),τ(j)(\sigma, \tau)\, x_{i,j} = x_{\sigma(i), \tau(j)}, and on the disjoint union
    13[n]⊎[n][n] \uplus [n] of a copy of [n][n] indexing the rows (the left side) and a copy indexing the
    14columns (the right side).
    15
    16Let CC be an algebraic circuit with variables Xn\mathcal{X}_n. A permutation σ\sigma of the
    17gates of CC *extends* γ∈Γn\gamma \in \Gamma_n if it preserves the labels of internal gates and
    18the multiplicities of wires, m(σg,σh)=m(g,h)m(\sigma g, \sigma h) = m(g, h), and maps every input gate
    19labelled by a variable xx to a gate labelled by γx\gamma x and every input gate labelled by a
    20constant to a gate labelled by the same constant. Such permutations are the circuit
    21automorphisms extending γ\gamma.
    22
    23The circuit CC is *matrix-symmetric* if every γ∈Γn\gamma \in \Gamma_n extends to a circuit
    24automorphism, and *rigid* if every γ∈Γn\gamma \in \Gamma_n extends to a unique circuit
    25automorphism. Let AutΓ(C)\mathbf{Aut}_\Gamma(C) be the group of circuit automorphisms extending
    26some element of Γn\Gamma_n. The *orbit size* of CC is
    27
    28max⁡g∣{σ(g):σ∈AutΓ(C)}∣,\max_{g} \bigl|\{\sigma(g) : \sigma \in \mathbf{Aut}_\Gamma(C)\}\bigr|,
    29
    30the maximum taken over all gates gg of CC.
    31-/
    32
    33namespace Lax461425.MatrixSymmetry
    34
    35open Circuits
    36
    37/-- The group `Γₙ = Symₙ × Symₙ` permuting rows and columns. -/
    38abbrev Γ (n : ℕ) := Equiv.Perm (Fin n) × Equiv.Perm (Fin n)
    39
    40/-- The action of `Γₙ` on the variables: `(σ, τ) x_{i,j} = x_{σ(i), τ(j)}`. -/
    41def actVar {n : ℕ} (γ : Γ n) (x : Fin n × Fin n) : Fin n × Fin n :=
    42 (γ.1 x.1, γ.2 x.2)
    43
    44/-- The action of `Γₙ` on `[n] ⊎ [n]`: rows on the left, columns on the right. -/
    45def actPoint {n : ℕ} (γ : Γ n) : Fin n ⊕ Fin n → Fin n ⊕ Fin n :=
    46 Sum.map γ.1 γ.2
    47
    48variable {V K : Type*}
    49
    50/-- The permutation `σ` of the gates is a circuit automorphism extending the renaming `π` of
    51the variables. -/
    52def Extends (C : Circuit V K) (σ : C.Gate ≃ C.Gate) (π : V → V) : Prop :=
    53 (∀ g, C.label (σ g) = (C.label g).map π) ∧ ∀ g h, C.wire (σ g) (σ h) = C.wire g h
    54
    55variable {n : ℕ} (C : Circuit (Fin n × Fin n) K)
    56
    57/-- Every element of `Γₙ` extends to a circuit automorphism. -/
    58def IsMatrixSymmetric : Prop :=
    59 ∀ γ : Γ n, ∃ σ : C.Gate ≃ C.Gate, Extends C σ (actVar γ)
    60
    61/-- Every element of `Γₙ` extends to a unique circuit automorphism. -/
    62def IsRigid : Prop :=
    63 ∀ γ : Γ n, ∃! σ : C.Gate ≃ C.Gate, Extends C σ (actVar γ)
    64
    65/-- The orbit of a gate under the circuit automorphisms extending elements of `Γₙ`. -/
    66def orbit (g : C.Gate) : Set C.Gate :=
    67 {g' | ∃ (γ : Γ n) (σ : C.Gate ≃ C.Gate), Extends C σ (actVar γ) ∧ σ g = g'}
    68
    69/-- The maximum size of an orbit of a gate. -/
    70noncomputable def orbitSize : ℕ :=
    71 Finset.univ.sup fun g => (orbit C g).ncard
    72
    73end Lax461425.MatrixSymmetry
    74

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…