linear_algebra.free_module.finite.basic
⟷
Mathlib.LinearAlgebra.FreeModule.Finite.Basic
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)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2021 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
-import LinearAlgebra.Dimension
+import LinearAlgebra.Dimension.Basic
import LinearAlgebra.FreeModule.Basic
import RingTheory.Finiteness
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -62,6 +62,8 @@ theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [
by
cases nonempty_fintype ι
classical
+ refine' ⟨⟨finset.univ.image b, _⟩⟩
+ simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -62,8 +62,6 @@ theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [
by
cases nonempty_fintype ι
classical
- refine' ⟨⟨finset.univ.image b, _⟩⟩
- simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2021 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
-import Mathbin.LinearAlgebra.Dimension
-import Mathbin.LinearAlgebra.FreeModule.Basic
-import Mathbin.RingTheory.Finiteness
+import LinearAlgebra.Dimension
+import LinearAlgebra.FreeModule.Basic
+import RingTheory.Finiteness
#align_import linear_algebra.free_module.finite.basic from "leanprover-community/mathlib"@"25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e"
mathlib commit https://github.com/leanprover-community/mathlib/commit/48a058d7e39a80ed56858505719a0b2197900999
@@ -43,7 +43,7 @@ noncomputable instance [Nontrivial R] [Module.Finite R M] :
by
obtain ⟨h⟩ := id ‹Module.Finite R M›
choose s hs using h
- exact basisFintypeOfFiniteSpans (↑s) hs (choose_basis _ _)
+ exact basis_finite_of_finite_spans (↑s) hs (choose_basis _ _)
end Ring
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2021 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-
-! This file was ported from Lean 3 source module linear_algebra.free_module.finite.basic
-! leanprover-community/mathlib commit 25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.Dimension
import Mathbin.LinearAlgebra.FreeModule.Basic
import Mathbin.RingTheory.Finiteness
+#align_import linear_algebra.free_module.finite.basic from "leanprover-community/mathlib"@"25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e"
+
/-!
# Finite and free modules
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -58,6 +58,7 @@ variable [AddCommGroup N] [Module R N] [Module.Free R N]
variable {R}
+#print Module.Finite.of_basis /-
/-- A free module with a basis indexed by a `fintype` is finite. -/
theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [Module R M]
[Finite ι] (b : Basis ι R M) : Module.Finite R M :=
@@ -67,6 +68,7 @@ theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [
refine' ⟨⟨finset.univ.image b, _⟩⟩
simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
+-/
#print Module.Finite.matrix /-
instance Module.Finite.matrix {ι₁ ι₂ : Type _} [Finite ι₁] [Finite ι₂] :
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -64,8 +64,8 @@ theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [
by
cases nonempty_fintype ι
classical
- refine' ⟨⟨finset.univ.image b, _⟩⟩
- simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
+ refine' ⟨⟨finset.univ.image b, _⟩⟩
+ simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
#print Module.Finite.matrix /-
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -58,12 +58,6 @@ variable [AddCommGroup N] [Module R N] [Module.Free R N]
variable {R}
-/- warning: module.finite.of_basis -> Module.Finite.of_basis is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {M : Type.{u2}} {ι : Type.{u3}} [_inst_8 : CommRing.{u1} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u3} ι], (Basis.{u3, u1, u2} ι R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
-but is expected to have type
- forall {R : Type.{u3}} {M : Type.{u2}} {ι : Type.{u1}} [_inst_8 : CommRing.{u3} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u3, u2} R M (CommSemiring.toSemiring.{u3} R (CommRing.toCommSemiring.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u1} ι], (Basis.{u1, u3, u2} ι R M (CommSemiring.toSemiring.{u3} R (CommRing.toCommSemiring.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u3, u2} R M (CommSemiring.toSemiring.{u3} R (CommRing.toCommSemiring.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
-Case conversion may be inaccurate. Consider using '#align module.finite.of_basis Module.Finite.of_basisₓ'. -/
/-- A free module with a basis indexed by a `fintype` is finite. -/
theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [Module R M]
[Finite ι] (b : Basis ι R M) : Module.Finite R M :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -78,8 +78,7 @@ theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [
instance Module.Finite.matrix {ι₁ ι₂ : Type _} [Finite ι₁] [Finite ι₂] :
Module.Finite R (Matrix ι₁ ι₂ R) :=
by
- cases nonempty_fintype ι₁
- cases nonempty_fintype ι₂
+ cases nonempty_fintype ι₁; cases nonempty_fintype ι₂
exact Module.Finite.of_basis (Pi.basis fun i => Pi.basisFun R _)
#align module.finite.matrix Module.Finite.matrix
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -62,7 +62,7 @@ variable {R}
lean 3 declaration is
forall {R : Type.{u1}} {M : Type.{u2}} {ι : Type.{u3}} [_inst_8 : CommRing.{u1} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u3} ι], (Basis.{u3, u1, u2} ι R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
but is expected to have type
- forall {R : Type.{u3}} {M : Type.{u2}} {ι : Type.{u1}} [_inst_8 : CommRing.{u3} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u3, u2} R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u1} ι], (Basis.{u1, u3, u2} ι R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u3, u2} R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
+ forall {R : Type.{u3}} {M : Type.{u2}} {ι : Type.{u1}} [_inst_8 : CommRing.{u3} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u3, u2} R M (CommSemiring.toSemiring.{u3} R (CommRing.toCommSemiring.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u1} ι], (Basis.{u1, u3, u2} ι R M (CommSemiring.toSemiring.{u3} R (CommRing.toCommSemiring.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u3, u2} R M (CommSemiring.toSemiring.{u3} R (CommRing.toCommSemiring.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
Case conversion may be inaccurate. Consider using '#align module.finite.of_basis Module.Finite.of_basisₓ'. -/
/-- A free module with a basis indexed by a `fintype` is finite. -/
theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [Module R M]
mathlib commit https://github.com/leanprover-community/mathlib/commit/039ef89bef6e58b32b62898dd48e9d1a4312bb65
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module linear_algebra.free_module.finite.basic
-! leanprover-community/mathlib commit 59628387770d82eb6f6dd7b7107308aa2509ec95
+! leanprover-community/mathlib commit 25a9423c6b2c8626e91c688bfd6c1d0a986a3e6e
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.RingTheory.Finiteness
/-!
# Finite and free modules
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
We provide some instances for finite and free modules.
## Main results
mathlib commit https://github.com/leanprover-community/mathlib/commit/e05ead7993520a432bec94ac504842d90707ad63
@@ -55,6 +55,12 @@ variable [AddCommGroup N] [Module R N] [Module.Free R N]
variable {R}
+/- warning: module.finite.of_basis -> Module.Finite.of_basis is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {M : Type.{u2}} {ι : Type.{u3}} [_inst_8 : CommRing.{u1} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u3} ι], (Basis.{u3, u1, u2} ι R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u1, u2} R M (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
+but is expected to have type
+ forall {R : Type.{u3}} {M : Type.{u2}} {ι : Type.{u1}} [_inst_8 : CommRing.{u3} R] [_inst_9 : AddCommGroup.{u2} M] [_inst_10 : Module.{u3, u2} R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9)] [_inst_11 : Finite.{succ u1} ι], (Basis.{u1, u3, u2} ι R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10) -> (Module.Finite.{u3, u2} R M (Ring.toSemiring.{u3} R (CommRing.toRing.{u3} R _inst_8)) (AddCommGroup.toAddCommMonoid.{u2} M _inst_9) _inst_10)
+Case conversion may be inaccurate. Consider using '#align module.finite.of_basis Module.Finite.of_basisₓ'. -/
/-- A free module with a basis indexed by a `fintype` is finite. -/
theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [Module R M]
[Finite ι] (b : Basis ι R M) : Module.Finite R M :=
@@ -65,6 +71,7 @@ theorem Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [
simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
+#print Module.Finite.matrix /-
instance Module.Finite.matrix {ι₁ ι₂ : Type _} [Finite ι₁] [Finite ι₂] :
Module.Finite R (Matrix ι₁ ι₂ R) :=
by
@@ -72,6 +79,7 @@ instance Module.Finite.matrix {ι₁ ι₂ : Type _} [Finite ι₁] [Finite ι
cases nonempty_fintype ι₂
exact Module.Finite.of_basis (Pi.basis fun i => Pi.basisFun R _)
#align module.finite.matrix Module.Finite.matrix
+-/
end CommRing
mathlib commit https://github.com/leanprover-community/mathlib/commit/3cacc945118c8c637d89950af01da78307f59325
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module linear_algebra.free_module.finite.basic
-! leanprover-community/mathlib commit bf2a9e0156cc11bf44893ea1b4b2da8ae655c901
+! leanprover-community/mathlib commit 59628387770d82eb6f6dd7b7107308aa2509ec95
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
+import Mathbin.LinearAlgebra.Dimension
import Mathbin.LinearAlgebra.FreeModule.Basic
import Mathbin.RingTheory.Finiteness
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)
@@ -46,9 +46,7 @@ end Ring
section CommRing
variable [CommRing R] [AddCommGroup M] [Module R M] [Module.Free R M]
-
variable [AddCommGroup N] [Module R N] [Module.Free R N]
-
variable {R}
/-- A free module with a basis indexed by a `Fintype` is finite. -/
rank
and finrank
. (#9349)
The files Mathlib.LinearAlgebra.FreeModule.Rank
, Mathlib.LinearAlgebra.FreeModule.Finite.Rank
, Mathlib.LinearAlgebra.Dimension
and Mathlib.LinearAlgebra.Finrank
were reorganized into a
folder Mathlib.LinearAlgebra.Dimension
, containing the following files
Basic.lean
: Contains the definition of Module.rank
.Finrank.lean
: Contains the definition of FiniteDimensional.finrank
.StrongRankCondition.lean
: Contains results about rank
and finrank
over rings satisfying strong rank conditionFree.lean
: Contains results about rank
and finrank
of free modulesFinite.lean
: Contains conditions or consequences for rank
to be finite or zeroConstructions.lean
: Contains the calculation of the rank
of various constructions.DivisionRing.lean
: Contains results about rank
and finrank
of spaces over division rings.LinearMap.lean
: Contains results about LinearMap.rank
API changes:
IsNoetherian.rank_lt_aleph0
and FiniteDimensional.rank_lt_aleph0
are replaced with
rank_lt_aleph0
.
Module.Free.finite_basis
was renamed to Module.Finite.finite_basis
.
FiniteDimensional.finrank_eq_rank
was renamed to finrank_eq_rank
.
rank_eq_cardinal_basis
and rank_eq_cardinal_basis'
were removed
in favour of Basis.mk_eq_mk
and Basis.mk_eq_mk''
.
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
@@ -3,9 +3,8 @@ Copyright (c) 2021 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
-import Mathlib.LinearAlgebra.Dimension
-import Mathlib.LinearAlgebra.FreeModule.Basic
import Mathlib.RingTheory.Finiteness
+import Mathlib.LinearAlgebra.FreeModule.Basic
#align_import linear_algebra.free_module.finite.basic from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95"
@@ -31,13 +30,6 @@ section Ring
variable [Ring R] [AddCommGroup M] [Module R M] [Module.Free R M]
-/-- If a free module is finite, then any arbitrary basis is finite. -/
-lemma finite_basis {R M} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M]
- {ι} [Module.Finite R M] (b : Basis ι R M) :
- _root_.Finite ι :=
- let ⟨s, hs⟩ := ‹Module.Finite R M›
- basis_finite_of_finite_spans (↑s) s.finite_toSet hs b
-
/-- If a free module is finite, then the arbitrary basis is finite. -/
noncomputable instance ChooseBasisIndex.fintype [Module.Finite R M] :
Fintype (Module.Free.ChooseBasisIndex R M) := by
@@ -46,7 +38,7 @@ noncomputable instance ChooseBasisIndex.fintype [Module.Finite R M] :
· have := Module.subsingleton R M
rw [ChooseBasisIndex]
infer_instance
- · exact finite_basis (chooseBasis _ _)
+ · exact Module.Finite.finite_basis (chooseBasis _ _)
#align module.free.choose_basis_index.fintype Module.Free.ChooseBasisIndex.fintype
end Ring
finrank
to rings. (#8912)
A portion of results in Mathlib/LinearAlgebra/FiniteDimensional.lean
were generalized to rings and moved to Mathlib/LinearAlgebra/FreeModule/Finite/Rank.lean
. Most API lemmas for FiniteDimensional
are kept but replaced with one lemma proofs. Definitions and niche lemmas are replaced by the generalized version completely.
Co-authored-by: erd1 <the.erd.one@gmail.com> Co-authored-by: Andrew Yang <the.erd.one@gmail.com>
@@ -31,6 +31,13 @@ section Ring
variable [Ring R] [AddCommGroup M] [Module R M] [Module.Free R M]
+/-- If a free module is finite, then any arbitrary basis is finite. -/
+lemma finite_basis {R M} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M]
+ {ι} [Module.Finite R M] (b : Basis ι R M) :
+ _root_.Finite ι :=
+ let ⟨s, hs⟩ := ‹Module.Finite R M›
+ basis_finite_of_finite_spans (↑s) s.finite_toSet hs b
+
/-- If a free module is finite, then the arbitrary basis is finite. -/
noncomputable instance ChooseBasisIndex.fintype [Module.Finite R M] :
Fintype (Module.Free.ChooseBasisIndex R M) := by
@@ -39,8 +46,7 @@ noncomputable instance ChooseBasisIndex.fintype [Module.Finite R M] :
· have := Module.subsingleton R M
rw [ChooseBasisIndex]
infer_instance
- · obtain ⟨s, hs⟩ := id ‹Module.Finite R M›
- exact basis_finite_of_finite_spans (↑s) s.finite_toSet hs (chooseBasis _ _)
+ · exact finite_basis (chooseBasis _ _)
#align module.free.choose_basis_index.fintype Module.Free.ChooseBasisIndex.fintype
end Ring
@@ -54,7 +60,7 @@ variable [AddCommGroup N] [Module R N] [Module.Free R N]
variable {R}
/-- A free module with a basis indexed by a `Fintype` is finite. -/
-theorem _root_.Module.Finite.of_basis {R M ι : Type*} [CommRing R] [AddCommGroup M] [Module R M]
+theorem _root_.Module.Finite.of_basis {R M ι : Type*} [Semiring R] [AddCommMonoid M] [Module R M]
[_root_.Finite ι] (b : Basis ι R M) : Module.Finite R M := by
cases nonempty_fintype ι
classical
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -54,7 +54,7 @@ variable [AddCommGroup N] [Module R N] [Module.Free R N]
variable {R}
/-- A free module with a basis indexed by a `Fintype` is finite. -/
-theorem _root_.Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGroup M] [Module R M]
+theorem _root_.Module.Finite.of_basis {R M ι : Type*} [CommRing R] [AddCommGroup M] [Module R M]
[_root_.Finite ι] (b : Basis ι R M) : Module.Finite R M := by
cases nonempty_fintype ι
classical
@@ -62,7 +62,7 @@ theorem _root_.Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGro
simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
-instance _root_.Module.Finite.matrix {ι₁ ι₂ : Type _} [_root_.Finite ι₁] [_root_.Finite ι₂] :
+instance _root_.Module.Finite.matrix {ι₁ ι₂ : Type*} [_root_.Finite ι₁] [_root_.Finite ι₂] :
Module.Finite R (Matrix ι₁ ι₂ R) := by
cases nonempty_fintype ι₁
cases nonempty_fintype ι₂
ChooseBasisIndex
is finite on trivial modules (#6322)
This also changes basisFintypeOfFiniteSpans
to use Finite
rather than Fintype
, as it was noncomputable anyway.
This means it has to be renamed to basis_finite_of_finite_spans
as it now is a proof!
Co-authored-by: Oliver Nash <github@olivernash.org>
@@ -31,12 +31,16 @@ section Ring
variable [Ring R] [AddCommGroup M] [Module R M] [Module.Free R M]
-/-- If a free module is finite, then any basis is finite. -/
-noncomputable instance ChooseBasisIndex.fintype [Nontrivial R] [Module.Finite R M] :
+/-- If a free module is finite, then the arbitrary basis is finite. -/
+noncomputable instance ChooseBasisIndex.fintype [Module.Finite R M] :
Fintype (Module.Free.ChooseBasisIndex R M) := by
- obtain ⟨h⟩ := id ‹Module.Finite R M›
- choose s hs using h
- exact basisFintypeOfFiniteSpans (↑s) hs (chooseBasis _ _)
+ refine @Fintype.ofFinite _ ?_
+ cases subsingleton_or_nontrivial R
+ · have := Module.subsingleton R M
+ rw [ChooseBasisIndex]
+ infer_instance
+ · obtain ⟨s, hs⟩ := id ‹Module.Finite R M›
+ exact basis_finite_of_finite_spans (↑s) s.finite_toSet hs (chooseBasis _ _)
#align module.free.choose_basis_index.fintype Module.Free.ChooseBasisIndex.fintype
end Ring
@@ -2,16 +2,13 @@
Copyright (c) 2021 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-
-! This file was ported from Lean 3 source module linear_algebra.free_module.finite.basic
-! leanprover-community/mathlib commit 59628387770d82eb6f6dd7b7107308aa2509ec95
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.LinearAlgebra.Dimension
import Mathlib.LinearAlgebra.FreeModule.Basic
import Mathlib.RingTheory.Finiteness
+#align_import linear_algebra.free_module.finite.basic from "leanprover-community/mathlib"@"59628387770d82eb6f6dd7b7107308aa2509ec95"
+
/-!
# Finite and free modules
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>
@@ -61,7 +61,6 @@ theorem _root_.Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGro
simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
-set_option synthInstance.etaExperiment true in
instance _root_.Module.Finite.matrix {ι₁ ι₂ : Type _} [_root_.Finite ι₁] [_root_.Finite ι₂] :
Module.Finite R (Matrix ι₁ ι₂ R) := by
cases nonempty_fintype ι₁
This is to fix timeouts in https://github.com/leanprover-community/mathlib4/pull/3552.
See discussion at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/!4.233552.20.28LinearAlgebra.2EMatrix.2EToLin.29.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -61,6 +61,7 @@ theorem _root_.Module.Finite.of_basis {R M ι : Type _} [CommRing R] [AddCommGro
simp only [Set.image_univ, Finset.coe_univ, Finset.coe_image, Basis.span_eq]
#align module.finite.of_basis Module.Finite.of_basis
+set_option synthInstance.etaExperiment true in
instance _root_.Module.Finite.matrix {ι₁ ι₂ : Type _} [_root_.Finite ι₁] [_root_.Finite ι₂] :
Module.Finite R (Matrix ι₁ ι₂ R) := by
cases nonempty_fintype ι₁
The unported dependencies are