The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.LinearAlgebra.Matrix.Circulant

28 declarations. Mathlib docs · Source

Circulant matrices

This file contains the definition and basic results about circulant matrices. Given a vector v : n → α indexed by a type that is endowed with subtraction, Matrix.circulant v is the matrix whose (i, j)th entry is v (i - j).

Main results

  • Matrix.circulant: the circulant matrix generated by a given vector v : n → α.
  • Matrix.circulant_mul: the product of two circulant matrices circulant v and circulant w is the circulant matrix generated by circulant v *ᵥ w.
  • Matrix.circulant_mul_comm: multiplication of circulant matrices commutes when the elements do.

Implementation notes

Matrix.Fin.foo is the Fin n version of Matrix.foo. Namely, the index type of the circulant matrices in discussion is Fin n.

Tags

circulant, matrix

def Matrix.circulant E3 #

{α : Type u_1} → {n : Type u_3} → [Sub n] → (n → α) → Matrix n n α

Given the condition [Sub n] and a vector v : n → α, we define circulant v to be the circulant matrix generated by v of type Matrix n n α. The (i,j)th entry is defined to be v (i - j).

theorem Matrix.circulant_apply E0 #

∀ {α : Type u_1} {n : Type u_3} [inst : Sub n] (v : n → α) (i j : n), Matrix.circulant v i j = v (i - j)

theorem Matrix.circulant_col_zero_eq E0 #

∀ {α : Type u_1} {n : Type u_3} [inst : SubtractionMonoid n] (v : n → α) (i : n), Matrix.circulant v i 0 = v i

theorem Matrix.circulant_injective E1 #

∀ {α : Type u_1} {n : Type u_3} [inst : SubtractionMonoid n], Function.Injective Matrix.circulant

theorem Matrix.Fin.circulant_injective E1 #

∀ {α : Type u_1} (n : ℕ), Function.Injective fun v ↦ Matrix.circulant v

theorem Matrix.circulant_inj E0 #

∀ {α : Type u_1} {n : Type u_3} [inst : SubtractionMonoid n] {v w : n → α},
  Matrix.circulant v = Matrix.circulant w ↔ v = w

theorem Matrix.Fin.circulant_inj E0 #

∀ {α : Type u_1} {n : ℕ} {v w : Fin n → α}, Matrix.circulant v = Matrix.circulant w ↔ v = w

theorem Matrix.transpose_circulant E1 #

∀ {α : Type u_1} {n : Type u_3} [inst : SubtractionMonoid n] (v : n → α),
  (Matrix.circulant v).transpose = Matrix.circulant fun i ↦ v (-i)

theorem Matrix.conjTranspose_circulant E1 #

∀ {α : Type u_1} {n : Type u_3} [inst : Star α] [inst_1 : SubtractionMonoid n] (v : n → α),
  (Matrix.circulant v).conjTranspose = Matrix.circulant (star fun i ↦ v (-i))

theorem Matrix.Fin.transpose_circulant E1 #

∀ {α : Type u_1} {n : ℕ} (v : Fin n → α), (Matrix.circulant v).transpose = Matrix.circulant fun i ↦ v (-i)

theorem Matrix.Fin.conjTranspose_circulant E1 #

∀ {α : Type u_1} [inst : Star α] {n : ℕ} (v : Fin n → α),
  (Matrix.circulant v).conjTranspose = Matrix.circulant (star fun i ↦ v (-i))

theorem Matrix.map_circulant E0 #

∀ {α : Type u_1} {β : Type u_2} {n : Type u_3} [inst : Sub n] (v : n → α) (f : α → β),
  (Matrix.circulant v).map f = Matrix.circulant fun i ↦ f (v i)

theorem Matrix.circulant_neg E1 #

∀ {α : Type u_1} {n : Type u_3} [inst : Neg α] [inst_1 : Sub n] (v : n → α), Matrix.circulant (-v) = -Matrix.circulant v

theorem Matrix.circulant_zero E0 #

∀ (α : Type u_5) (n : Type u_6) [inst : Zero α] [inst_1 : Sub n], Matrix.circulant 0 = 0

theorem Matrix.circulant_add E1 #

∀ {α : Type u_1} {n : Type u_3} [inst : Add α] [inst_1 : Sub n] (v w : n → α),
  Matrix.circulant (v + w) = Matrix.circulant v + Matrix.circulant w

theorem Matrix.circulant_sub E1 #

∀ {α : Type u_1} {n : Type u_3} [inst : Sub α] [inst_1 : Sub n] (v w : n → α),
  Matrix.circulant (v - w) = Matrix.circulant v - Matrix.circulant w

theorem Matrix.circulant_mul E3 #

∀ {α : Type u_1} {n : Type u_3} [inst : NonUnitalNonAssocSemiring α] [inst_1 : Fintype n] [inst_2 : AddGroup n]
  (v w : n → α), Matrix.circulant v * Matrix.circulant w = Matrix.circulant ((Matrix.circulant v).mulVec w)

The product of two circulant matrices circulant v and circulant w is the circulant matrix generated by circulant v *ᵥ w.

theorem Matrix.Fin.circulant_mul E1 #

∀ {α : Type u_1} [inst : NonUnitalNonAssocSemiring α] {n : ℕ} (v w : Fin n → α),
  Matrix.circulant v * Matrix.circulant w = Matrix.circulant ((Matrix.circulant v).mulVec w)

theorem Matrix.circulant_mul_comm E3 #

∀ {α : Type u_1} {n : Type u_3} [inst : CommMagma α] [inst_1 : AddCommMonoid α] [inst_2 : Fintype n]
  [inst_3 : AddCommGroup n] (v w : n → α),
  Matrix.circulant v * Matrix.circulant w = Matrix.circulant w * Matrix.circulant v

Multiplication of circulant matrices commutes when the elements do.

theorem Matrix.Fin.circulant_mul_comm E1 #

∀ {α : Type u_1} [inst : CommMagma α] [inst_1 : AddCommMonoid α] {n : ℕ} (v w : Fin n → α),
  Matrix.circulant v * Matrix.circulant w = Matrix.circulant w * Matrix.circulant v

theorem Matrix.circulant_smul E1 #

∀ {α : Type u_1} {n : Type u_3} {R : Type u_4} [inst : Sub n] [inst_1 : SMul R α] (k : R) (v : n → α),
  Matrix.circulant (k • v) = k • Matrix.circulant v

k • circulant v is another circulant matrix circulant (k • v).

theorem Matrix.circulant_single_one E0 #

∀ (α : Type u_5) (n : Type u_6) [inst : Zero α] [inst_1 : One α] [inst_2 : DecidableEq n] [inst_3 : AddGroup n],
  Matrix.circulant (Pi.single 0 1) = 1

theorem Matrix.circulant_single E0 #

∀ {α : Type u_1} (n : Type u_5) [inst : Semiring α] [inst_1 : DecidableEq n] [inst_2 : AddGroup n] [inst_3 : Fintype n]
  (a : α), Matrix.circulant (Pi.single 0 a) = (Matrix.scalar n) a

theorem Matrix.Fin.circulant_ite E1 #

∀ (α : Type u_5) [inst : Zero α] [inst_1 : One α] (n : ℕ), (Matrix.circulant fun i ↦ if ↑i = 0 then 1 else 0) = 1

Note we use ↑i = 0 instead of i = 0 as Fin 0 has no 0. This means that we cannot state this with Pi.single as we did with Matrix.circulant_single.

theorem Matrix.circulant_isSymm_iff E0 #

∀ {α : Type u_1} {n : Type u_3} [inst : SubtractionMonoid n] {v : n → α},
  (Matrix.circulant v).IsSymm ↔ ∀ (i : n), v (-i) = v i

A circulant of v is symmetric iff v equals its reverse.

theorem Matrix.Fin.circulant_isSymm_iff E0 #

∀ {α : Type u_1} {n : ℕ} {v : Fin n → α}, (Matrix.circulant v).IsSymm ↔ ∀ (i : Fin n), v (-i) = v i

theorem Matrix.circulant_isSymm_apply E0 #

∀ {α : Type u_1} {n : Type u_3} [inst : SubtractionMonoid n] {v : n → α},
  (Matrix.circulant v).IsSymm → ∀ (i : n), v (-i) = v i

If circulant v is symmetric, ∀ i j : I, v (- i) = v i.

theorem Matrix.Fin.circulant_isSymm_apply E0 #

∀ {α : Type u_1} {n : ℕ} {v : Fin n → α}, (Matrix.circulant v).IsSymm → ∀ (i : Fin n), v (-i) = v i