Matrices #
def
DMatrix.map
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
(M : DMatrix m n α)
{β : m → n → Type w}
(f : ⦃i : m⦄ → ⦃j : n⦄ → α i j → β i j)
:
DMatrix m n β
M.map f
is the DMatrix obtained by applying f
to each entry of the matrix M
.
Equations
- DMatrix.map M f i j = f i j (M i j)
Instances For
@[simp]
theorem
DMatrix.map_map
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
{M : DMatrix m n α}
{β : m → n → Type w}
{γ : m → n → Type z}
{f : ⦃i : m⦄ → ⦃j : n⦄ → α i j → β i j}
{g : ⦃i : m⦄ → ⦃j : n⦄ → β i j → γ i j}
:
DMatrix.map (DMatrix.map M f) g = DMatrix.map M fun i j x => g i j (f i j x)
The transpose of a dmatrix.
Equations
- DMatrix.«term_ᵀ» = Lean.ParserDescr.trailingNode `DMatrix.term_ᵀ 1024 1024 (Lean.ParserDescr.symbol "ᵀ")
Instances For
DMatrix.col u
is the column matrix whose entries are given by u
.
Equations
- DMatrix.col w x x = match x, x with | x, _y => w x
Instances For
DMatrix.row u
is the row matrix whose entries are given by u
.
Equations
- DMatrix.row v x x = match x, x with | _x, y => v y
Instances For
instance
DMatrix.instAddSemigroupDMatrix
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddSemigroup (α i j)]
:
AddSemigroup (DMatrix m n α)
Equations
- DMatrix.instAddSemigroupDMatrix = Pi.addSemigroup
instance
DMatrix.instAddCommSemigroupDMatrix
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddCommSemigroup (α i j)]
:
AddCommSemigroup (DMatrix m n α)
Equations
- DMatrix.instAddCommSemigroupDMatrix = Pi.addCommSemigroup
instance
DMatrix.instAddCommMonoidDMatrix
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddCommMonoid (α i j)]
:
AddCommMonoid (DMatrix m n α)
Equations
- DMatrix.instAddCommMonoidDMatrix = Pi.addCommMonoid
instance
DMatrix.instAddCommGroupDMatrix
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddCommGroup (α i j)]
:
AddCommGroup (DMatrix m n α)
Equations
- DMatrix.instAddCommGroupDMatrix = Pi.addCommGroup
instance
DMatrix.instSubsingletonDMatrix
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[∀ (i : m) (j : n), Subsingleton (α i j)]
:
Subsingleton (DMatrix m n α)
@[simp]
theorem
DMatrix.map_add
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddMonoid (α i j)]
{β : m → n → Type w}
[(i : m) → (j : n) → AddMonoid (β i j)]
(f : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j)
(M : DMatrix m n α)
(N : DMatrix m n α)
:
(DMatrix.map (M + N) fun i j => ↑(f i j)) = (DMatrix.map M fun i j => ↑(f i j)) + DMatrix.map N fun i j => ↑(f i j)
theorem
DMatrix.map_sub
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddGroup (α i j)]
{β : m → n → Type w}
[(i : m) → (j : n) → AddGroup (β i j)]
(f : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j)
(M : DMatrix m n α)
(N : DMatrix m n α)
:
(DMatrix.map (M - N) fun i j => ↑(f i j)) = (DMatrix.map M fun i j => ↑(f i j)) - DMatrix.map N fun i j => ↑(f i j)
instance
DMatrix.subsingleton_of_empty_left
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[IsEmpty m]
:
Subsingleton (DMatrix m n α)
instance
DMatrix.subsingleton_of_empty_right
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[IsEmpty n]
:
Subsingleton (DMatrix m n α)
def
AddMonoidHom.mapDMatrix
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddMonoid (α i j)]
{β : m → n → Type w}
[(i : m) → (j : n) → AddMonoid (β i j)]
(f : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j)
:
The AddMonoidHom
between spaces of dependently typed matrices
induced by an AddMonoidHom
between their coefficients.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem
AddMonoidHom.mapDMatrix_apply
{m : Type u_2}
{n : Type u_3}
[Fintype m]
[Fintype n]
{α : m → n → Type v}
[(i : m) → (j : n) → AddMonoid (α i j)]
{β : m → n → Type w}
[(i : m) → (j : n) → AddMonoid (β i j)]
(f : ⦃i : m⦄ → ⦃j : n⦄ → α i j →+ β i j)
(M : DMatrix m n α)
:
↑(AddMonoidHom.mapDMatrix f) M = DMatrix.map M fun i j => ↑(f i j)