File: Mathlib/Data/Matrix/DMatrix.lean

full_name: DMatrix
code: /-- `DMatrix m n` is the type of dependently typed matrices
whose rows are indexed by the type `m` and
whose columns are indexed by the type `n`.

In most applications `m` and `n` are finite types. -/
def DMatrix (m : Type u) (n : Type u') (α : m → n → Type v) : Type max u u' v 
goal: Type (max u u' v)

full_name: DMatrix.ext_iff
code: theorem ext_iff : (∀ i j, M i j = N i j) ↔ M = N 
goal: (∀ (i : m) (j : n), M i j = N i j) ↔ M = N

full_name: DMatrix.ext
code: @[ext]
theorem ext : (∀ i j, M i j = N i j) → M = N 
goal: (∀ (i : m) (j : n), M i j = N i j) → M = N

full_name: DMatrix.map
code: /-- `M.map f` is the DMatrix obtained by applying `f` to each entry of the matrix `M`. -/
def map (M : DMatrix m n α) {β : m → n → Type w} (f : ∀ ⦃i j⦄, α i j → β i j) : DMatrix m n β 
goal: DMatrix m n β

full_name: DMatrix.map_apply
code: @[simp]
theorem map_apply {M : DMatrix m n α} {β : m → n → Type w} {f : ∀ ⦃i j⦄, α i j → β i j} {i : m}
    {j : n} : M.map f i j = f (M i j) 
goal: M.map f i j = f (M i j)

full_name: DMatrix.map_map
code: @[simp]
theorem map_map {M : DMatrix m n α} {β : m → n → Type w} {γ : m → n → Type z}
    {f : ∀ ⦃i j⦄, α i j → β i j} {g : ∀ ⦃i j⦄, β i j → γ i j} :
    (M.map f).map g = M.map fun i j x => g (f x) 
goal: (M.map f).map g = M.map fun i j x => g (f x)

full_name: DMatrix.transpose
code: /-- The transpose of a dmatrix. -/
def transpose (M : DMatrix m n α) : DMatrix n m fun j i => α i j
  
goal: DMatrix n m fun j i => α i j

full_name: DMatrix.«_aux_Mathlib_Data_Matrix_DMatrix___macroRules_DMatrix_term_ᵀ_1»
code: @[inherit_doc]
scoped postfix:1024 "ᵀ" => DMatrix.transpose
goal: Lean.Macro

full_name: DMatrix._aux_Mathlib_Data_Matrix_DMatrix___unexpand_DMatrix_transpose_1
code: @[inherit_doc]
scoped postfix:1024 "ᵀ" => DMatrix.transpose
goal: Lean.PrettyPrinter.Unexpander

full_name: DMatrix.col
code: /-- `DMatrix.col u` is the column matrix whose entries are given by `u`. -/
def col {α : m → Type v} (w : ∀ i, α i) : DMatrix m Unit fun i _j => α i
  
goal: DMatrix m Unit fun i _j => α i

full_name: DMatrix.row
code: /-- `DMatrix.row u` is the row matrix whose entries are given by `u`. -/
def row {α : n → Type v} (v : ∀ j, α j) : DMatrix Unit n fun _i j => α j
  
goal: DMatrix Unit n fun _i j => α j

full_name: DMatrix.instInhabited
code: instance [∀ i j, Inhabited (α i j)] : Inhabited (DMatrix m n α) 
goal: Inhabited (DMatrix m n α)

full_name: DMatrix.instAdd
code: instance [∀ i j, Add (α i j)] : Add (DMatrix m n α) 
goal: Add (DMatrix m n α)

full_name: DMatrix.instAddSemigroup
code: instance [∀ i j, AddSemigroup (α i j)] : AddSemigroup (DMatrix m n α) 
goal: AddSemigroup (DMatrix m n α)

full_name: DMatrix.instAddCommSemigroup
code: instance [∀ i j, AddCommSemigroup (α i j)] : AddCommSemigroup (DMatrix m n α) 
goal: AddCommSemigroup (DMatrix m n α)

full_name: DMatrix.instZero
code: instance [∀ i j, Zero (α i j)] : Zero (DMatrix m n α) 
goal: Zero (DMatrix m n α)

full_name: DMatrix.instAddMonoid
code: instance [∀ i j, AddMonoid (α i j)] : AddMonoid (DMatrix m n α) 
goal: AddMonoid (DMatrix m n α)

full_name: DMatrix.instAddCommMonoid
code: instance [∀ i j, AddCommMonoid (α i j)] : AddCommMonoid (DMatrix m n α) 
goal: AddCommMonoid (DMatrix m n α)

full_name: DMatrix.instNeg
code: instance [∀ i j, Neg (α i j)] : Neg (DMatrix m n α) 
goal: Neg (DMatrix m n α)

full_name: DMatrix.instSub
code: instance [∀ i j, Sub (α i j)] : Sub (DMatrix m n α) 
goal: Sub (DMatrix m n α)

full_name: DMatrix.instAddGroup
code: instance [∀ i j, AddGroup (α i j)] : AddGroup (DMatrix m n α) 
goal: AddGroup (DMatrix m n α)

full_name: DMatrix.instAddCommGroup
code: instance [∀ i j, AddCommGroup (α i j)] : AddCommGroup (DMatrix m n α) 
goal: AddCommGroup (DMatrix m n α)

full_name: DMatrix.instUnique
code: instance [∀ i j, Unique (α i j)] : Unique (DMatrix m n α) 
goal: Unique (DMatrix m n α)

full_name: DMatrix.instSubsingleton
code: instance [∀ i j, Subsingleton (α i j)] : Subsingleton (DMatrix m n α) 
goal: Subsingleton (DMatrix m n α)

full_name: DMatrix.zero_apply
code: @[simp, nolint simpNF]
theorem zero_apply [∀ i j, Zero (α i j)] (i j) : (0 : DMatrix m n α) i j = 0 
goal: 0 i j = 0

full_name: DMatrix.neg_apply
code: @[simp]
theorem neg_apply [∀ i j, Neg (α i j)] (M : DMatrix m n α) (i j) : (-M) i j = -M i j 
goal: (-M) i j = -M i j

full_name: DMatrix.add_apply
code: @[simp]
theorem add_apply [∀ i j, Add (α i j)] (M N : DMatrix m n α) (i j) : (M + N) i j = M i j + N i j 
goal: (M + N) i j = M i j + N i j

full_name: DMatrix.sub_apply
code: @[simp]
theorem sub_apply [∀ i j, Sub (α i j)] (M N : DMatrix m n α) (i j) : (M - N) i j = M i j - N i j 
goal: (M - N) i j = M i j - N i j

full_name: DMatrix.map_zero
code: @[simp]
theorem map_zero [∀ i j, Zero (α i j)] {β : m → n → Type w} [∀ i j, Zero (β i j)]
    {f : ∀ ⦃i j⦄, α i j → β i j} (h : ∀ i j, f (0 : α i j) = 0) :
    (0 : DMatrix m n α).map f = 0 
goal: DMatrix.map 0 f = 0

full_name: DMatrix.map_add
code: theorem map_add [∀ i j, AddMonoid (α i j)] {β : m → n → Type w} [∀ i j, AddMonoid (β i j)]
    (f : ∀ ⦃i j⦄, α i j →+ β i j) (M N : DMatrix m n α) :
    ((M + N).map fun i j => @f i j) = (M.map fun i j => @f i j) + N.map fun i j => @f i j 
goal: ((M + N).map fun i j => ⇑f) = (M.map fun i j => ⇑f) + N.map fun i j => ⇑f

full_name: DMatrix.map_sub
code: theorem map_sub [∀ i j, AddGroup (α i j)] {β : m → n → Type w} [∀ i j, AddGroup (β i j)]
    (f : ∀ ⦃i j⦄, α i j →+ β i j) (M N : DMatrix m n α) :
    ((M - N).map fun i j => @f i j) = (M.map fun i j => @f i j) - N.map fun i j => @f i j 
goal: ((M - N).map fun i j => ⇑f) = (M.map fun i j => ⇑f) - N.map fun i j => ⇑f

full_name: DMatrix.subsingleton_of_empty_left
code: instance subsingleton_of_empty_left [IsEmpty m] : Subsingleton (DMatrix m n α) 
goal: Subsingleton (DMatrix m n α)

full_name: DMatrix.subsingleton_of_empty_right
code: instance subsingleton_of_empty_right [IsEmpty n] : Subsingleton (DMatrix m n α) 
goal: Subsingleton (DMatrix m n α)

full_name: AddMonoidHom.mapDMatrix
code: /-- The `AddMonoidHom` between spaces of dependently typed matrices
induced by an `AddMonoidHom` between their coefficients. -/
def AddMonoidHom.mapDMatrix [∀ i j, AddMonoid (α i j)] {β : m → n → Type w}
    [∀ i j, AddMonoid (β i j)] (f : ∀ ⦃i j⦄, α i j →+ β i j) : DMatrix m n α →+ DMatrix m n β 
goal: DMatrix m n α →+ DMatrix m n β

full_name: AddMonoidHom.mapDMatrix_apply
code: @[simp]
theorem AddMonoidHom.mapDMatrix_apply [∀ i j, AddMonoid (α i j)] {β : m → n → Type w}
    [∀ i j, AddMonoid (β i j)] (f : ∀ ⦃i j⦄, α i j →+ β i j) (M : DMatrix m n α) :
    AddMonoidHom.mapDMatrix f M = M.map fun i j => @f i j 
goal: (AddMonoidHom.mapDMatrix f) M = M.map fun i j => ⇑f