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] (σ : Equiv.Perm n) [Zero R] [One R] :
Matrix n n R

the permutation matrix associated with an Equiv.Perm

Equations
Instances For
    @[simp]
    theorem Matrix.det_permutation {n : Type u_1} {R : Type u_2} [DecidableEq n] [Fintype n] (σ : Equiv.Perm 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] [Fintype n] (σ : Equiv.Perm n) [AddCommMonoidWithOne R] :
    (Equiv.Perm.permMatrix R σ).trace = (Function.fixedPoints σ).ncard

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