linear_algebra.free_module.norm
⟷
Mathlib.LinearAlgebra.FreeModule.Norm
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)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -37,6 +37,21 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
have hI := span_singleton_eq_bot.not.2 hf
let b' := ring_basis b (span {f}) hI
classical
+ rw [← Matrix.det_diagonal, ← LinearMap.det_toLin b']
+ let e :=
+ (b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans
+ ((LinearEquiv.coord S S f hf).restrictScalars R)
+ refine' (LinearMap.associated_det_of_eq_comp e _ _ _).symm
+ dsimp only [e, LinearEquiv.trans_apply]
+ simp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]
+ refine' b'.ext fun i => _
+ simp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,
+ Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
+ zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
+ change _ = f * _
+ rw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
+ Ideal.selfBasis_def]
+ rfl
#align associated_norm_prod_smith associated_norm_prod_smith
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -37,21 +37,6 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
have hI := span_singleton_eq_bot.not.2 hf
let b' := ring_basis b (span {f}) hI
classical
- rw [← Matrix.det_diagonal, ← LinearMap.det_toLin b']
- let e :=
- (b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans
- ((LinearEquiv.coord S S f hf).restrictScalars R)
- refine' (LinearMap.associated_det_of_eq_comp e _ _ _).symm
- dsimp only [e, LinearEquiv.trans_apply]
- simp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]
- refine' b'.ext fun i => _
- simp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,
- Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
- zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
- change _ = f * _
- rw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
- Ideal.selfBasis_def]
- rfl
#align associated_norm_prod_smith associated_norm_prod_smith
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2023 Junyan Xu. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Junyan Xu
-/
-import Mathbin.LinearAlgebra.FreeModule.IdealQuotient
-import Mathbin.RingTheory.Norm
+import LinearAlgebra.FreeModule.IdealQuotient
+import RingTheory.Norm
#align_import linear_algebra.free_module.norm from "leanprover-community/mathlib"@"fdc286cc6967a012f41b87f76dcd2797b53152af"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2023 Junyan Xu. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Junyan Xu
-
-! This file was ported from Lean 3 source module linear_algebra.free_module.norm
-! leanprover-community/mathlib commit fdc286cc6967a012f41b87f76dcd2797b53152af
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.FreeModule.IdealQuotient
import Mathbin.RingTheory.Norm
+#align_import linear_algebra.free_module.norm from "leanprover-community/mathlib"@"fdc286cc6967a012f41b87f76dcd2797b53152af"
+
/-!
# Norms on free modules over principal ideal domains
mathlib commit https://github.com/leanprover-community/mathlib/commit/fdc286cc6967a012f41b87f76dcd2797b53152af
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Junyan Xu
! This file was ported from Lean 3 source module linear_algebra.free_module.norm
-! leanprover-community/mathlib commit 90b0d53ee6ffa910e5c2a977ce7e2fc704647974
+! leanprover-community/mathlib commit fdc286cc6967a012f41b87f76dcd2797b53152af
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.RingTheory.Norm
/-!
# Norms on free modules over principal ideal domains
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/d30d31261cdb4d2f5e612eabc3c4bf45556350d5
@@ -27,6 +27,7 @@ section CommRing
variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
+#print associated_norm_prod_smith /-
/-- For a nonzero element `f` in an algebra `S` over a principal ideal domain `R` that is finite and
free as an `R`-module, the norm of `f` relative to `R` is associated to the product of the Smith
coefficients of the ideal generated by `f`. -/
@@ -52,6 +53,7 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
Ideal.selfBasis_def]
rfl
#align associated_norm_prod_smith associated_norm_prod_smith
+-/
end CommRing
@@ -63,6 +65,7 @@ instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
FiniteDimensional F (F[X] ⧸ span ({I.smithCoeffs b hI i} : Set F[X])) :=
(AdjoinRoot.powerBasis <| I.smithCoeffs_ne_zero b hI i).FiniteDimensional
+#print finrank_quotient_span_eq_natDegree_norm /-
/-- For a nonzero element `f` in a `F[X]`-module `S`, the dimension of $S/\langle f \rangle$ as an
`F`-vector space is the degree of the norm of `f` relative to `F[X]`. -/
theorem finrank_quotient_span_eq_natDegree_norm [Algebra F S] [IsScalarTower F F[X] S]
@@ -78,6 +81,7 @@ theorem finrank_quotient_span_eq_natDegree_norm [Algebra F S] [IsScalarTower F F
congr with i
exact (AdjoinRoot.powerBasis <| smith_coeffs_ne_zero b _ h i).finrank
#align finrank_quotient_span_eq_nat_degree_norm finrank_quotient_span_eq_natDegree_norm
+-/
end Field
mathlib commit https://github.com/leanprover-community/mathlib/commit/c471da714c044131b90c133701e51b877c246677
This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0
branch as we update to intermediate nightlies.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>
@@ -37,7 +37,7 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
(b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans
((LinearEquiv.coord S S f hf).restrictScalars R)
refine (LinearMap.associated_det_of_eq_comp e _ _ ?_).symm
- dsimp only [LinearEquiv.trans_apply]
+ dsimp only [e, LinearEquiv.trans_apply]
simp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]
refine b'.ext fun i => ?_
simp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,
Prove isSemisimple_of_mem_adjoin
: if two commuting endomorphisms of a finite-dimensional vector space over a perfect field are both semisimple, then every endomorphism in the algebra generated by them (in particular their product and sum) is semisimple.
In the same file LinearAlgebra/Semisimple.lean, eq_zero_of_isNilpotent_isSemisimple
and isSemisimple_of_squarefree_aeval_eq_zero
are golfed, and IsSemisimple.minpoly_squarefree
is proved
RingTheory/SimpleModule.lean:
Define IsSemisimpleRing R
to mean that R is a semisimple R-module.
add properties of simple modules and a characterization (they are exactly the quotients of the ring by maximal left ideals).
The annihilator of a semisimple module is a radical ideal.
Any module over a semisimple ring is semisimple.
A finite product of semisimple rings is semisimple.
Any quotient of a semisimple ring is semisimple.
Add Artin--Wedderburn as a TODO (proof_wanted).
Order/Atoms.lean: add the instance from IsSimpleOrder
to ComplementedLattice
, so that IsSimpleModule → IsSemisimpleModule
is automatically inferred.
Prerequisites for showing a product of semisimple rings is semisimple:
Algebra/Module/Submodule/Map.lean: generalize orderIsoMapComap
so that it only requires RingHomSurjective
rather than RingHomInvPair
Algebra/Ring/CompTypeclasses.lean, Mathlib/Algebra/Ring/Pi.lean, Algebra/Ring/Prod.lean: add RingHomSurjective instances
RingTheory/Artinian.lean:
quotNilradicalEquivPi
: the quotient of a commutative Artinian ring R by its nilradical is isomorphic to the (finite) product of its quotients by maximal ideals (therefore a product of fields).
equivPi
: if the ring is moreover reduced, then the ring itself is a product of fields. Deduce that R is a semisimple ring and both R and R[X] are decomposition monoids. Requires RingEquiv.quotientBot
in RingTheory/Ideal/QuotientOperations.lean.
Data/Polynomial/Eval.lean: the polynomial ring over a finite product of rings is isomorphic to the product of polynomial rings over individual rings. (Used to show R[X] is a decomposition monoid.)
Other necessary results:
FieldTheory/Minpoly/Field.lean: the minimal polynomial of an element in a reduced algebra over a field is radical.
RingTheory/PowerBasis.lean: generalize PowerBasis.finiteDimensional
and rename it to .finite
.
Annihilator stuff, some of which do not end up being used:
RingTheory/Ideal/Operations.lean: define Module.annihilator
and redefine Submodule.annihilator
in terms of it; add lemmas, including one that says an arbitrary intersection of radical ideals is radical. The new lemma Ideal.isRadical_iff_pow_one_lt
depends on pow_imp_self_of_one_lt
in Mathlib/Data/Nat/Interval.lean, which is also used to golf the proof of isRadical_iff_pow_one_lt
.
Algebra/Module/Torsion.lean: add a lemma and an instance (unused)
Data/Polynomial/Module/Basic.lean: add a def (unused) and a lemma
LinearAlgebra/AnnihilatingPolynomial.lean: add lemma span_minpoly_eq_annihilator
Some results about idempotent linear maps (projections) and idempotent elements, used to show that any (left) ideal in a semisimple ring is spanned by an idempotent element (unused):
LinearAlgebra/Projection.lean: add def isIdempotentElemEquiv
LinearAlgebra/Span.lean: add two lemmas
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -65,7 +65,7 @@ instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
-- operations to the `Quotient.lift` level and then end up comparing huge
-- terms. We should probably make most of the quotient operations
-- irreducible so that they don't expose `Quotient.lift` accidentally.
- refine PowerBasis.finiteDimensional ?_
+ refine PowerBasis.finite ?_
refine AdjoinRoot.powerBasis ?_
exact I.smithCoeffs_ne_zero b hI i
@@ -67,7 +67,7 @@ instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
-- irreducible so that they don't expose `Quotient.lift` accidentally.
refine PowerBasis.finiteDimensional ?_
refine AdjoinRoot.powerBasis ?_
- refine I.smithCoeffs_ne_zero b hI i
+ exact I.smithCoeffs_ne_zero b hI i
/-- For a nonzero element `f` in a `F[X]`-module `S`, the dimension of $S/\langle f \rangle$ as an
`F`-vector space is the degree of the norm of `f` relative to `F[X]`. -/
Due to recent changes in core we can reduce or remove many set_option maxHeartbeats
statements.
I have tried to be careful to not leave anything too close to the line, so don't be surprised if some of these can still be reduced further.
This reduces us from 96 maxHeartbeats
statements to 44
. (There are 10 false positives in meta or testing code.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -69,9 +69,6 @@ instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
refine AdjoinRoot.powerBasis ?_
refine I.smithCoeffs_ne_zero b hI i
--- Porting note: this proof was already slow in mathlib3 and it is even slower now
--- See: https://github.com/leanprover-community/mathlib4/issues/5028
-set_option maxHeartbeats 1000000 in
/-- For a nonzero element `f` in a `F[X]`-module `S`, the dimension of $S/\langle f \rangle$ as an
`F`-vector space is the degree of the norm of `f` relative to `F[X]`. -/
theorem finrank_quotient_span_eq_natDegree_norm [Algebra F S] [IsScalarTower F F[X] S]
@@ -44,7 +44,8 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
change _ = f * _
- rw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
+ -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+ erw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
Ideal.selfBasis_def]
rfl
#align associated_norm_prod_smith associated_norm_prod_smith
@@ -44,8 +44,7 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
change _ = f * _
- -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
- erw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
+ rw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
Ideal.selfBasis_def]
rfl
#align associated_norm_prod_smith associated_norm_prod_smith
@@ -44,7 +44,8 @@ theorem associated_norm_prod_smith [Fintype ι] (b : Basis ι R S) {f : S} (hf :
Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
change _ = f * _
- rw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
+ -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+ erw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
Ideal.selfBasis_def]
rfl
#align associated_norm_prod_smith associated_norm_prod_smith
@@ -55,7 +55,6 @@ section Field
variable {F : Type*} [Field F] [Algebra F[X] S] [Finite ι]
-set_option maxHeartbeats 210000 in
instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
FiniteDimensional F (F[X] ⧸ span ({I.smithCoeffs b hI i} : Set F[X])) := by
-- Porting note: we need to do this proof in two stages otherwise it times out
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -17,12 +17,12 @@ open Ideal Polynomial
open scoped BigOperators Polynomial
-variable {R S ι : Type _} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] [CommRing S]
+variable {R S ι : Type*} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] [CommRing S]
[IsDomain S] [Algebra R S]
section CommRing
-variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
+variable (F : Type*) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
/-- For a nonzero element `f` in an algebra `S` over a principal ideal domain `R` that is finite and
free as an `R`-module, the norm of `f` relative to `R` is associated to the product of the Smith
@@ -53,7 +53,7 @@ end CommRing
section Field
-variable {F : Type _} [Field F] [Algebra F[X] S] [Finite ι]
+variable {F : Type*} [Field F] [Algebra F[X] S] [Finite ι]
set_option maxHeartbeats 210000 in
instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
@@ -2,15 +2,12 @@
Copyright (c) 2023 Junyan Xu. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Junyan Xu
-
-! This file was ported from Lean 3 source module linear_algebra.free_module.norm
-! leanprover-community/mathlib commit 90b0d53ee6ffa910e5c2a977ce7e2fc704647974
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.LinearAlgebra.FreeModule.IdealQuotient
import Mathlib.RingTheory.Norm
+#align_import linear_algebra.free_module.norm from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974"
+
/-!
# Norms on free modules over principal ideal domains
-/
Adds new CompletelyDistribLattice
/CompleteAtomicBooleanAlgebra
classes for complete lattices / complete atomic Boolean algebras that are also completely distributive, and removes the misleading claim that CompleteDistribLattice
/CompleteBooleanAlgebra
are completely distributive.
CompleteDistribLattice
instances are upgraded to CompletelyDistribLattice
.CompleteBooleanAlgebra
instances are upgraded to CompleteAtomicBooleanAlgebra
.@@ -63,8 +63,14 @@ instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
FiniteDimensional F (F[X] ⧸ span ({I.smithCoeffs b hI i} : Set F[X])) := by
-- Porting note: we need to do this proof in two stages otherwise it times out
-- original proof: (AdjoinRoot.powerBasis <| I.smithCoeffs_ne_zero b hI i).FiniteDimensional
+ -- The first tactic takes over 10 seconds, spending a lot of time in checking
+ -- that instances on the quotient commute. My guess is that we unfold
+ -- operations to the `Quotient.lift` level and then end up comparing huge
+ -- terms. We should probably make most of the quotient operations
+ -- irreducible so that they don't expose `Quotient.lift` accidentally.
refine PowerBasis.finiteDimensional ?_
- exact AdjoinRoot.powerBasis (I.smithCoeffs_ne_zero b hI i)
+ refine AdjoinRoot.powerBasis ?_
+ refine I.smithCoeffs_ne_zero b hI i
-- Porting note: this proof was already slow in mathlib3 and it is even slower now
-- See: https://github.com/leanprover-community/mathlib4/issues/5028
Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -58,6 +58,7 @@ section Field
variable {F : Type _} [Field F] [Algebra F[X] S] [Finite ι]
+set_option maxHeartbeats 210000 in
instance (b : Basis ι F[X] S) {I : Ideal S} (hI : I ≠ ⊥) (i : ι) :
FiniteDimensional F (F[X] ⧸ span ({I.smithCoeffs b hI i} : Set F[X])) := by
-- Porting note: we need to do this proof in two stages otherwise it times out
The unported dependencies are