linear_algebra.free_algebra
⟷
Mathlib.LinearAlgebra.FreeAlgebra
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -5,7 +5,7 @@ Authors: Eric Wieser
-/
import LinearAlgebra.Basis
import Algebra.FreeAlgebra
-import LinearAlgebra.Dimension
+import LinearAlgebra.Dimension.Basic
import LinearAlgebra.FinsuppVectorSpace
#align_import linear_algebra.free_algebra from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-/
-import Mathbin.LinearAlgebra.Basis
-import Mathbin.Algebra.FreeAlgebra
-import Mathbin.LinearAlgebra.Dimension
-import Mathbin.LinearAlgebra.FinsuppVectorSpace
+import LinearAlgebra.Basis
+import Algebra.FreeAlgebra
+import LinearAlgebra.Dimension
+import LinearAlgebra.FinsuppVectorSpace
#align_import linear_algebra.free_algebra from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module linear_algebra.free_algebra
-! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.Basis
import Mathbin.Algebra.FreeAlgebra
import Mathbin.LinearAlgebra.Dimension
import Mathbin.LinearAlgebra.FinsuppVectorSpace
+#align_import linear_algebra.free_algebra from "leanprover-community/mathlib"@"814d76e2247d5ba8bc024843552da1278bfe9e5c"
+
/-!
# Linear algebra properties of `free_algebra R X`
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -28,6 +28,7 @@ universe u v
namespace FreeAlgebra
+#print FreeAlgebra.basisFreeMonoid /-
/-- The `free_monoid X` basis on the `free_algebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
@[simps]
@@ -36,12 +37,15 @@ noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
Finsupp.basisSingleOne.map
(equivMonoidAlgebraFreeMonoid.symm.toLinearEquiv : _ ≃ₗ[R] FreeAlgebra R X)
#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoid
+-/
+#print FreeAlgebra.rank_eq /-
-- TODO: generalize to `X : Type v`
theorem rank_eq {K : Type u} {X : Type max u v} [Field K] :
Module.rank K (FreeAlgebra K X) = Cardinal.mk (List X) :=
(Cardinal.lift_inj.mp (basisFreeMonoid K X).mk_eq_rank).symm
#align free_algebra.rank_eq FreeAlgebra.rank_eq
+-/
end FreeAlgebra
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -28,12 +28,6 @@ universe u v
namespace FreeAlgebra
-/- warning: free_algebra.basis_free_monoid -> FreeAlgebra.basisFreeMonoid is a dubious translation:
-lean 3 declaration is
- forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u1 u2} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toAddCommGroup.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.ring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.semiring.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.algebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
-but is expected to have type
- forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u2 u1} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.instSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
-Case conversion may be inaccurate. Consider using '#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoidₓ'. -/
/-- The `free_monoid X` basis on the `free_algebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
@[simps]
@@ -43,12 +37,6 @@ noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
(equivMonoidAlgebraFreeMonoid.symm.toLinearEquiv : _ ≃ₗ[R] FreeAlgebra R X)
#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoid
-/- warning: free_algebra.rank_eq -> FreeAlgebra.rank_eq is a dubious translation:
-lean 3 declaration is
- forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toSemiring.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_1))) (AddCommGroup.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toAddCommGroup.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.ring.{max u1 u2, u1} X K (EuclideanDomain.toCommRing.{u1} K (Field.toEuclideanDomain.{u1} K _inst_1))))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.semiring.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.algebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
-but is expected to have type
- forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{max u1 u2, u1} X K (EuclideanDomain.toCommRing.{u1} K (Field.toEuclideanDomain.{u1} K _inst_1))))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.instSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
-Case conversion may be inaccurate. Consider using '#align free_algebra.rank_eq FreeAlgebra.rank_eqₓ'. -/
-- TODO: generalize to `X : Type v`
theorem rank_eq {K : Type u} {X : Type max u v} [Field K] :
Module.rank K (FreeAlgebra K X) = Cardinal.mk (List X) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -47,7 +47,7 @@ noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
lean 3 declaration is
forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toSemiring.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_1))) (AddCommGroup.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toAddCommGroup.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.ring.{max u1 u2, u1} X K (EuclideanDomain.toCommRing.{u1} K (Field.toEuclideanDomain.{u1} K _inst_1))))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.semiring.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.algebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
but is expected to have type
- forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{max u1 u2, u1} X K (Field.toCommRing.{u1} K _inst_1)))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.instSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
+ forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{max u1 u2, u1} X K (EuclideanDomain.toCommRing.{u1} K (Field.toEuclideanDomain.{u1} K _inst_1))))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.instSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
Case conversion may be inaccurate. Consider using '#align free_algebra.rank_eq FreeAlgebra.rank_eqₓ'. -/
-- TODO: generalize to `X : Type v`
theorem rank_eq {K : Type u} {X : Type max u v} [Field K] :
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -32,7 +32,7 @@ namespace FreeAlgebra
lean 3 declaration is
forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u1 u2} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toAddCommGroup.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.ring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.semiring.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.algebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
but is expected to have type
- forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u2 u1} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.instSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
+ forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u2 u1} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.instSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
Case conversion may be inaccurate. Consider using '#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoidₓ'. -/
/-- The `free_monoid X` basis on the `free_algebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/347636a7a80595d55bedf6e6fbd996a3c39da69a
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
! This file was ported from Lean 3 source module linear_algebra.free_algebra
-! leanprover-community/mathlib commit 039a089d2a4b93c761b234f3e5f5aeb752bac60f
+! leanprover-community/mathlib commit 814d76e2247d5ba8bc024843552da1278bfe9e5c
! 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.FinsuppVectorSpace
/-!
# Linear algebra properties of `free_algebra R X`
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file provides a `free_monoid X` basis on the `free_algebra R X`, and uses it to show the
dimension of the algebra is the cardinality of `list X`
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/c9236f47f5b9df573443aa499c0d3968769628b7
@@ -25,6 +25,12 @@ universe u v
namespace FreeAlgebra
+/- warning: free_algebra.basis_free_monoid -> FreeAlgebra.basisFreeMonoid is a dubious translation:
+lean 3 declaration is
+ forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u1 u2} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (AddCommGroup.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toAddCommGroup.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.ring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.semiring.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.algebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
+but is expected to have type
+ forall (R : Type.{u1}) (X : Type.{u2}) [_inst_1 : CommRing.{u1} R], Basis.{u2, u1, max u2 u1} (FreeMonoid.{u2} X) R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{u2, u1} X R _inst_1))))) (Algebra.toModule.{u1, max u1 u2} R (FreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (CommRing.toCommSemiring.{u1} R _inst_1) (FreeAlgebra.instSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, u2} R (CommRing.toCommSemiring.{u1} R _inst_1) X))
+Case conversion may be inaccurate. Consider using '#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoidₓ'. -/
/-- The `free_monoid X` basis on the `free_algebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
@[simps]
@@ -34,6 +40,12 @@ noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
(equivMonoidAlgebraFreeMonoid.symm.toLinearEquiv : _ ≃ₗ[R] FreeAlgebra R X)
#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoid
+/- warning: free_algebra.rank_eq -> FreeAlgebra.rank_eq is a dubious translation:
+lean 3 declaration is
+ forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{succ (succ (max u1 u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toSemiring.{u1} K (DivisionRing.toRing.{u1} K (Field.toDivisionRing.{u1} K _inst_1))) (AddCommGroup.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toAddCommGroup.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.ring.{max u1 u2, u1} X K (EuclideanDomain.toCommRing.{u1} K (Field.toEuclideanDomain.{u1} K _inst_1))))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.semiring.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.algebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
+but is expected to have type
+ forall {K : Type.{u1}} {X : Type.{max u1 u2}} [_inst_1 : Field.{u1} K], Eq.{max (succ (succ u1)) (succ (succ u2))} Cardinal.{max u1 u2} (Module.rank.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (DivisionSemiring.toSemiring.{u1} K (Semifield.toDivisionSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (NonAssocRing.toNonUnitalNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Ring.toNonAssocRing.{max u1 u2} (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instRingFreeAlgebraToCommSemiring.{max u1 u2, u1} X K (Field.toCommRing.{u1} K _inst_1)))))) (Algebra.toModule.{u1, max u1 u2} K (FreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) (FreeAlgebra.instSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X) (FreeAlgebra.instAlgebraFreeAlgebraInstSemiringFreeAlgebra.{u1, max u1 u2} K (Semifield.toCommSemiring.{u1} K (Field.toSemifield.{u1} K _inst_1)) X))) (Cardinal.mk.{max u1 u2} (List.{max u1 u2} X))
+Case conversion may be inaccurate. Consider using '#align free_algebra.rank_eq FreeAlgebra.rank_eqₓ'. -/
-- TODO: generalize to `X : Type v`
theorem rank_eq {K : Type u} {X : Type max u v} [Field K] :
Module.rank K (FreeAlgebra K X) = Cardinal.mk (List X) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/06a655b5fcfbda03502f9158bbf6c0f1400886f9
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
! This file was ported from Lean 3 source module linear_algebra.free_algebra
-! leanprover-community/mathlib commit 59628387770d82eb6f6dd7b7107308aa2509ec95
+! leanprover-community/mathlib commit 039a089d2a4b93c761b234f3e5f5aeb752bac60f
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -35,10 +35,10 @@ noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoid
-- TODO: generalize to `X : Type v`
-theorem dim_eq {K : Type u} {X : Type max u v} [Field K] :
+theorem rank_eq {K : Type u} {X : Type max u v} [Field K] :
Module.rank K (FreeAlgebra K X) = Cardinal.mk (List X) :=
- (Cardinal.lift_inj.mp (basisFreeMonoid K X).mk_eq_dim).symm
-#align free_algebra.dim_eq FreeAlgebra.dim_eq
+ (Cardinal.lift_inj.mp (basisFreeMonoid K X).mk_eq_rank).symm
+#align free_algebra.rank_eq FreeAlgebra.rank_eq
end FreeAlgebra
mathlib commit https://github.com/leanprover-community/mathlib/commit/3cacc945118c8c637d89950af01da78307f59325
@@ -4,12 +4,13 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
! This file was ported from Lean 3 source module linear_algebra.free_algebra
-! leanprover-community/mathlib commit cd3434749bf1f6a8155cb53b2705f08b74371f2a
+! 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.Basis
import Mathbin.Algebra.FreeAlgebra
+import Mathbin.LinearAlgebra.Dimension
import Mathbin.LinearAlgebra.FinsuppVectorSpace
/-!
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
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>
@@ -5,7 +5,6 @@ Authors: Eric Wieser
-/
import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.FreeAlgebra
-import Mathlib.LinearAlgebra.Dimension
import Mathlib.LinearAlgebra.FinsuppVectorSpace
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
@@ -43,7 +43,7 @@ end
theorem rank_eq [CommRing R] [Nontrivial R] :
Module.rank R (FreeAlgebra R X) = Cardinal.lift.{u} (Cardinal.mk (List X)) := by
- rw [←(Basis.mk_eq_rank'.{_,_,_,u} (basisFreeMonoid R X)).trans (Cardinal.lift_id _),
+ rw [← (Basis.mk_eq_rank'.{_,_,_,u} (basisFreeMonoid R X)).trans (Cardinal.lift_id _),
Cardinal.lift_umax'.{v,u}, FreeMonoid]
#align free_algebra.rank_eq FreeAlgebra.rank_eq
The main result here is Basis.tensorAlgebra (b : Basis κ R M) : Basis (FreeMonoid κ) R (TensorAlgebra R M)
from which everything else follows without much work.
@@ -7,6 +7,7 @@ import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.FreeAlgebra
import Mathlib.LinearAlgebra.Dimension
import Mathlib.LinearAlgebra.FinsuppVectorSpace
+import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
#align_import linear_algebra.free_algebra from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
@@ -22,21 +23,28 @@ universe u v
namespace FreeAlgebra
+variable (R : Type u) (X : Type v)
+
+section
+variable [CommSemiring R]
+
/-- The `FreeMonoid X` basis on the `FreeAlgebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
-- @[simps]
-noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
- Basis (FreeMonoid X) R (FreeAlgebra R X) :=
+noncomputable def basisFreeMonoid : Basis (FreeMonoid X) R (FreeAlgebra R X) :=
Finsupp.basisSingleOne.map (equivMonoidAlgebraFreeMonoid (R := R) (X := X)).symm.toLinearEquiv
#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoid
--- TODO: generalize to `X : Type v`
-theorem rank_eq {K : Type u} {X : Type max u v} [Field K] :
- Module.rank K (FreeAlgebra K X) = Cardinal.mk (List X) :=
- -- Porting note: the type class inference was no longer automatic.
- -- was: (Cardinal.lift_inj.mp (basisFreeMonoid K X).mk_eq_rank).symm
- Cardinal.lift_inj.mp (@Basis.mk_eq_rank _ _ _ _ _ _ (inferInstance : Module K (FreeAlgebra K X))
- (basisFreeMonoid K X)).symm
+instance : Module.Free R (FreeAlgebra R X) :=
+ have : Module.Free R (MonoidAlgebra R (FreeMonoid X)) := Module.Free.finsupp _ _ _
+ Module.Free.of_equiv (equivMonoidAlgebraFreeMonoid (R := R) (X := X)).symm.toLinearEquiv
+
+end
+
+theorem rank_eq [CommRing R] [Nontrivial R] :
+ Module.rank R (FreeAlgebra R X) = Cardinal.lift.{u} (Cardinal.mk (List X)) := by
+ rw [←(Basis.mk_eq_rank'.{_,_,_,u} (basisFreeMonoid R X)).trans (Cardinal.lift_id _),
+ Cardinal.lift_umax'.{v,u}, FreeMonoid]
#align free_algebra.rank_eq FreeAlgebra.rank_eq
end FreeAlgebra
@@ -2,17 +2,14 @@
Copyright (c) 2021 Eric Wieser. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module linear_algebra.free_algebra
-! leanprover-community/mathlib commit 039a089d2a4b93c761b234f3e5f5aeb752bac60f
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.LinearAlgebra.Basis
import Mathlib.Algebra.FreeAlgebra
import Mathlib.LinearAlgebra.Dimension
import Mathlib.LinearAlgebra.FinsuppVectorSpace
+#align_import linear_algebra.free_algebra from "leanprover-community/mathlib"@"039a089d2a4b93c761b234f3e5f5aeb752bac60f"
+
/-!
# Linear algebra properties of `FreeAlgebra R X`
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>
@@ -25,7 +25,6 @@ universe u v
namespace FreeAlgebra
-set_option synthInstance.etaExperiment true in
/-- The `FreeMonoid X` basis on the `FreeAlgebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
-- @[simps]
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>
@@ -25,6 +25,7 @@ universe u v
namespace FreeAlgebra
+set_option synthInstance.etaExperiment true in
/-- The `FreeMonoid X` basis on the `FreeAlgebra R X`,
mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * xₙ` -/
-- @[simps]
This PR fixes two things:
align
statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align
). This is often seen in the mathport output after ending calc
blocks.#align
statements. (This was needed for a script I wrote for #3630.)@@ -31,7 +31,6 @@ mapping `[x₁, x₂, ..., xₙ]` to the "monomial" `1 • x₁ * x₂ * ⋯ * x
noncomputable def basisFreeMonoid (R : Type u) (X : Type v) [CommRing R] :
Basis (FreeMonoid X) R (FreeAlgebra R X) :=
Finsupp.basisSingleOne.map (equivMonoidAlgebraFreeMonoid (R := R) (X := X)).symm.toLinearEquiv
-
#align free_algebra.basis_free_monoid FreeAlgebra.basisFreeMonoid
-- TODO: generalize to `X : Type v`
The unported dependencies are