linear_algebra.matrix.finite_dimensional
⟷
Mathlib.LinearAlgebra.Matrix.FiniteDimensional
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
-/
-import Mathbin.Data.Matrix.Basic
-import Mathbin.LinearAlgebra.FiniteDimensional
-import Mathbin.LinearAlgebra.FreeModule.Finite.Matrix
-import Mathbin.LinearAlgebra.Matrix.ToLin
+import Data.Matrix.Basic
+import LinearAlgebra.FiniteDimensional
+import LinearAlgebra.FreeModule.Finite.Matrix
+import LinearAlgebra.Matrix.ToLin
#align_import linear_algebra.matrix.finite_dimensional from "leanprover-community/mathlib"@"f2b757fc5c341d88741b9c4630b1e8ba973c5726"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2019 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.finite_dimensional
-! leanprover-community/mathlib commit f2b757fc5c341d88741b9c4630b1e8ba973c5726
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Matrix.Basic
import Mathbin.LinearAlgebra.FiniteDimensional
import Mathbin.LinearAlgebra.FreeModule.Finite.Matrix
import Mathbin.LinearAlgebra.Matrix.ToLin
+#align_import linear_algebra.matrix.finite_dimensional from "leanprover-community/mathlib"@"f2b757fc5c341d88741b9c4630b1e8ba973c5726"
+
/-!
# The finite-dimensional space of matrices
mathlib commit https://github.com/leanprover-community/mathlib/commit/86d04064ca33ee3d3405fbfc497d494fd2dd4796
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.matrix.finite_dimensional
-! leanprover-community/mathlib commit b1c23399f01266afe392a0d8f71f599a0dad4f7b
+! leanprover-community/mathlib commit f2b757fc5c341d88741b9c4630b1e8ba973c5726
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -16,6 +16,9 @@ import Mathbin.LinearAlgebra.Matrix.ToLin
/-!
# The finite-dimensional space of matrices
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file shows that `m` by `n` matrices form a finite-dimensional space.
Note that this is proven more generally elsewhere over modules as `module.finite.matrix`; this file
exists only to provide an entry in the instance list for `finite_dimensional`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/fa78268d4d77cb2b2fbc89f0527e2e7807763780
@@ -55,18 +55,22 @@ variable {V : Type _} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
variable {W : Type _} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
+#print LinearMap.finiteDimensional /-
instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
Module.Finite.linearMap _ _
#align linear_map.finite_dimensional LinearMap.finiteDimensional
+-/
variable {A : Type _} [Ring A] [Algebra K A] [Module A V] [IsScalarTower K A V] [Module A W]
[IsScalarTower K A W]
+#print LinearMap.finiteDimensional' /-
/-- Linear maps over a `k`-algebra are finite dimensional (over `k`) if both the source and
target are, as they form a subspace of all `k`-linear maps. -/
-instance finite_dimensional' : FiniteDimensional K (V →ₗ[A] W) :=
+instance finiteDimensional' : FiniteDimensional K (V →ₗ[A] W) :=
FiniteDimensional.of_injective (restrictScalarsLinearMap K A V W) (restrictScalars_injective _)
-#align linear_map.finite_dimensional' LinearMap.finite_dimensional'
+#align linear_map.finite_dimensional' LinearMap.finiteDimensional'
+-/
end LinearMap
mathlib commit https://github.com/leanprover-community/mathlib/commit/e05ead7993520a432bec94ac504842d90707ad63
@@ -4,23 +4,26 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.matrix.finite_dimensional
-! leanprover-community/mathlib commit 1cfdf5f34e1044ecb65d10be753008baaf118edf
+! leanprover-community/mathlib commit b1c23399f01266afe392a0d8f71f599a0dad4f7b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Data.Matrix.Basic
import Mathbin.LinearAlgebra.FiniteDimensional
+import Mathbin.LinearAlgebra.FreeModule.Finite.Matrix
+import Mathbin.LinearAlgebra.Matrix.ToLin
/-!
# The finite-dimensional space of matrices
-This file shows that `m` by `n` matrices form a finite-dimensional space,
-and proves the `finrank` of that space is equal to `card m * card n`.
+This file shows that `m` by `n` matrices form a finite-dimensional space.
+Note that this is proven more generally elsewhere over modules as `module.finite.matrix`; this file
+exists only to provide an entry in the instance list for `finite_dimensional`.
## Main definitions
* `matrix.finite_dimensional`: matrices form a finite dimensional vector space over a field `K`
- * `matrix.finrank_matrix`: the `finrank` of `matrix m n R` is `card m * card n`
+ * `linear_map.finite_dimensional`
## Tags
@@ -38,19 +41,32 @@ section FiniteDimensional
variable {m n : Type _} {R : Type v} [Field R]
instance [Finite m] [Finite n] : FiniteDimensional R (Matrix m n R) :=
- LinearEquiv.finiteDimensional (LinearEquiv.curry R m n)
-
-/-- The dimension of the space of finite dimensional matrices
-is the product of the number of rows and columns.
--/
-@[simp]
-theorem finrank_matrix [Fintype m] [Fintype n] :
- FiniteDimensional.finrank R (Matrix m n R) = Fintype.card m * Fintype.card n := by
- rw [@LinearEquiv.finrank_eq R (Matrix m n R) _ _ _ _ _ _ (LinearEquiv.curry R m n).symm,
- FiniteDimensional.finrank_fintype_fun_eq_card, Fintype.card_prod]
-#align matrix.finrank_matrix Matrix.finrank_matrix
+ Module.Finite.matrix
end FiniteDimensional
end Matrix
+namespace LinearMap
+
+variable {K : Type _} [Field K]
+
+variable {V : Type _} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
+
+variable {W : Type _} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
+
+instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
+ Module.Finite.linearMap _ _
+#align linear_map.finite_dimensional LinearMap.finiteDimensional
+
+variable {A : Type _} [Ring A] [Algebra K A] [Module A V] [IsScalarTower K A V] [Module A W]
+ [IsScalarTower K A W]
+
+/-- Linear maps over a `k`-algebra are finite dimensional (over `k`) if both the source and
+target are, as they form a subspace of all `k`-linear maps. -/
+instance finite_dimensional' : FiniteDimensional K (V →ₗ[A] W) :=
+ FiniteDimensional.of_injective (restrictScalarsLinearMap K A V W) (restrictScalars_injective _)
+#align linear_map.finite_dimensional' LinearMap.finite_dimensional'
+
+end LinearMap
+
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -48,9 +48,7 @@ end Matrix
namespace LinearMap
variable {K : Type*} [Field K]
-
variable {V : Type*} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
-
variable {W : Type*} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
@@ -7,6 +7,7 @@ import Mathlib.Data.Matrix.Basic
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix
import Mathlib.LinearAlgebra.Matrix.ToLin
+import Mathlib.Algebra.Module.Algebra
#align_import linear_algebra.matrix.finite_dimensional from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
Module.rank
of LinearMap
. (#9677)
LinearAlgebra/LinearIndependent: generalize linearIndependent_algHom_toLinearMap(')
to allow different domain and codomain of the AlgHom.
LinearAlgebra/Basic: add LinearEquiv.congrLeft
that works for two rings with commuting actions on the codomain.
LinearAlgebra/FreeModule/Finite/Matrix: generalize Module.Free.linearMap
, Module.Finite.linearMap
, and FiniteDimensional.finrank_linearMap
to work with two different rings that may be noncommutative. Add FiniteDimensional.rank_linearMap
, FiniteDimensional.(fin)rank_linearMap_self
, and card/cardinal_mk_algHom_le_rank
.
FieldTheory/Tower: remove the instance LinearMap.finite_dimensional''
which becomes redundant; mark finrank_linear_map'
as deprecated (superseded by finrank_linearMap_self
.
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -53,7 +53,7 @@ variable {V : Type*} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
variable {W : Type*} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
- Module.Finite.linearMap _ _
+ Module.Finite.linearMap _ _ _ _
#align linear_map.finite_dimensional LinearMap.finiteDimensional
variable {A : Type*} [Ring A] [Algebra K A] [Module A V] [IsScalarTower K A V] [Module A W]
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -35,7 +35,7 @@ namespace Matrix
section FiniteDimensional
-variable {m n : Type _} {R : Type v} [Field R]
+variable {m n : Type*} {R : Type v} [Field R]
instance finiteDimensional [Finite m] [Finite n] : FiniteDimensional R (Matrix m n R) :=
Module.Finite.matrix
@@ -46,17 +46,17 @@ end Matrix
namespace LinearMap
-variable {K : Type _} [Field K]
+variable {K : Type*} [Field K]
-variable {V : Type _} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
+variable {V : Type*} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
-variable {W : Type _} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
+variable {W : Type*} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
Module.Finite.linearMap _ _
#align linear_map.finite_dimensional LinearMap.finiteDimensional
-variable {A : Type _} [Ring A] [Algebra K A] [Module A V] [IsScalarTower K A V] [Module A W]
+variable {A : Type*} [Ring A] [Algebra K A] [Module A V] [IsScalarTower K A V] [Module A W]
[IsScalarTower K A W]
/-- Linear maps over a `k`-algebra are finite dimensional (over `k`) if both the source and
@@ -2,17 +2,14 @@
Copyright (c) 2019 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Patrick Massot, Casper Putz, Anne Baanen
-
-! This file was ported from Lean 3 source module linear_algebra.matrix.finite_dimensional
-! leanprover-community/mathlib commit b1c23399f01266afe392a0d8f71f599a0dad4f7b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Matrix.Basic
import Mathlib.LinearAlgebra.FiniteDimensional
import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix
import Mathlib.LinearAlgebra.Matrix.ToLin
+#align_import linear_algebra.matrix.finite_dimensional from "leanprover-community/mathlib"@"b1c23399f01266afe392a0d8f71f599a0dad4f7b"
+
/-!
# The finite-dimensional space of matrices
Now that leanprover/lean4#2210 has been merged, this PR:
set_option synthInstance.etaExperiment true
commands (and some etaExperiment%
term elaborators)set_option maxHeartbeats
commandsCo-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>
@@ -55,7 +55,6 @@ variable {V : Type _} [AddCommGroup V] [Module K V] [FiniteDimensional K V]
variable {W : Type _} [AddCommGroup W] [Module K W] [FiniteDimensional K W]
-set_option synthInstance.etaExperiment true in
instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
Module.Finite.linearMap _ _
#align linear_map.finite_dimensional LinearMap.finiteDimensional
@@ -63,8 +62,6 @@ instance finiteDimensional : FiniteDimensional K (V →ₗ[K] W) :=
variable {A : Type _} [Ring A] [Algebra K A] [Module A V] [IsScalarTower K A V] [Module A W]
[IsScalarTower K A W]
-set_option synthInstance.maxHeartbeats 50000 in
-set_option synthInstance.etaExperiment true in
/-- Linear maps over a `k`-algebra are finite dimensional (over `k`) if both the source and
target are, as they form a subspace of all `k`-linear maps. -/
instance finiteDimensional' : FiniteDimensional K (V →ₗ[A] W) :=
The unported dependencies are