Documentation

Mathlib.LinearAlgebra.Matrix.Permutation

Permutation matrices #

This file defines the matrix associated with a permutation

Main definitions #

Main results #

@[reducible, inline]
abbrev Equiv.Perm.permMatrix {n : Type u_1} (R : Type u_2) [DecidableEq n] (ฯƒ : Perm n) [Zero R] [One R] :
Matrix n n R

the permutation matrix associated with an Equiv.Perm

Equations
    Instances For
      @[simp]
      theorem Matrix.permMatrix_one {n : Type u_1} {R : Type u_2} [DecidableEq n] [Zero R] [One R] :
      @[simp]
      theorem Matrix.det_permutation {n : Type u_1} {R : Type u_2} [DecidableEq n] (ฯƒ : Equiv.Perm n) [Fintype n] [CommRing R] :
      (Equiv.Perm.permMatrix R ฯƒ).det = โ†‘โ†‘(Equiv.Perm.sign ฯƒ)

      The determinant of a permutation matrix equals its sign.

      theorem Matrix.trace_permutation {n : Type u_1} {R : Type u_2} [DecidableEq n] (ฯƒ : Equiv.Perm n) [Fintype n] [AddCommMonoidWithOne R] :
      (Equiv.Perm.permMatrix R ฯƒ).trace = โ†‘(Function.fixedPoints โ‡‘ฯƒ).ncard

      The trace of a permutation matrix equals the number of fixed points.

      theorem Matrix.permMatrix_mulVec {n : Type u_1} {R : Type u_2} [DecidableEq n] (ฯƒ : Equiv.Perm n) [Fintype n] {v : n โ†’ R} [CommRing R] :
      (Equiv.Perm.permMatrix R ฯƒ).mulVec v = v โˆ˜ โ‡‘ฯƒ
      theorem Matrix.vecMul_permMatrix {n : Type u_1} {R : Type u_2} [DecidableEq n] (ฯƒ : Equiv.Perm n) [Fintype n] {v : n โ†’ R} [CommRing R] :
      vecMul v (Equiv.Perm.permMatrix R ฯƒ) = v โˆ˜ โ‡‘(Equiv.symm ฯƒ)
      @[simp]
      theorem Matrix.permMatrix_mul {n : Type u_1} {R : Type u_2} [DecidableEq n] (ฯƒ ฯ„ : Equiv.Perm n) [Fintype n] [NonAssocSemiring R] :

      permMatrix as a homomorphism.

      Equations
        Instances For
          theorem Matrix.permMatrix_l2_opNorm_le {n : Type u_1} [DecidableEq n] (ฯƒ : Equiv.Perm n) [Fintype n] {๐•œ : Type u_3} [RCLike ๐•œ] :

          The l2-operator norm of a permutation matrix is bounded above by 1. See Matrix.permMatrix_l2_opNorm_eq for the equality statement assuming the matrix is nonempty.

          theorem Matrix.permMatrix_l2_opNorm_eq {n : Type u_1} [DecidableEq n] (ฯƒ : Equiv.Perm n) [Fintype n] {๐•œ : Type u_3} [RCLike ๐•œ] [Nonempty n] :

          The l2-operator norm of a nonempty permutation matrix is equal to 1. Note that this is not true for the empty case, since the empty matrix has l2-operator norm 0. See Matrix.permMatrix_l2_opNorm_le for the inequality version of the empty case.