Skip to content

Commit 5823012

Browse files
committed
move lemmas
1 parent 5a4b075 commit 5823012

2 files changed

Lines changed: 57 additions & 41 deletions

File tree

Mathlib/FieldTheory/Minpoly/Basic.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Authors: Chris Hughes, Johan Commelin
66
module
77

88
public import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic
9+
public import Mathlib.LinearAlgebra.Dimension.Finrank
10+
import Mathlib.LinearAlgebra.Matrix.Charpoly.Coeff
11+
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
912

1013
/-!
1114
# Minimal polynomials
@@ -236,6 +239,19 @@ theorem two_le_natDegree_subalgebra {B} [CommRing B] [Algebra A B] [Nontrivial B
236239
rw [two_le_natDegree_iff int, Iff.not]
237240
apply Set.ext_iff.mp Subtype.range_val_subtype
238241

242+
omit [Nontrivial B] in
243+
/-- For finite free modules over a nontrivial ring,
244+
the degree of the minimal polynomials is bounded by the rank of the module -/
245+
theorem natDegree_le' [Module.Finite A B] [Module.Free A B] [Nontrivial A] :
246+
(minpoly A x).natDegree ≤ Module.finrank A B := by
247+
have b := Module.Free.chooseBasis A B
248+
let M := LinearMap.toMatrixAlgEquiv b (Algebra.lmul A B x)
249+
refine (natDegree_le_natDegree (minpoly.min A x M.charpoly_monic ?_)).trans
250+
(M.charpoly_natDegree_eq_dim.trans (Module.finrank_eq_card_chooseBasisIndex A B).symm).le
251+
let h := Matrix.aeval_self_charpoly M
252+
rwa [aeval_algHom_apply, _root_.map_eq_zero_iff _ (LinearMap.toMatrixAlgEquiv b).injective,
253+
aeval_algHom_apply, _root_.map_eq_zero_iff _ Algebra.lmul_injective] at h
254+
239255
end
240256

241257
/-- If `B/A` is an injective ring extension, and `a` is an element of `A`,

Mathlib/RingTheory/IsAdjoinRoot.lean

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -622,24 +622,55 @@ theorem mkOfAdjoinEqTop_root : (IsAdjoinRoot.mkOfAdjoinEqTop hα hα₂).root =
622622

623623
end mkOfAdjoinEqTop
624624

625+
section Equiv
626+
627+
variable {T : Type*} [CommRing T] [Algebra R T] (h' : IsAdjoinRoot T f) {U : Type*} [CommRing U]
628+
629+
@[simp]
630+
theorem lift_algEquiv (i : R →+* U) (x hx z) :
631+
h'.lift i x hx (h.algEquiv h' z) = h.lift i x hx z := by rw [← h.map_repr z]; simp [-map_repr]
632+
633+
@[simp]
634+
theorem liftHom_algEquiv [Algebra R U] (x : U) (hx z) :
635+
h'.liftHom x hx (h.algEquiv h' z) = h.liftHom x hx z := h.lift_algEquiv h' _ _ hx _
636+
637+
end Equiv
638+
639+
end IsAdjoinRoot
640+
641+
namespace IsAdjoinRootMonic
642+
643+
variable (h : IsAdjoinRootMonic S f)
644+
645+
theorem minpoly_eq [IsDomain R] [IsDomain S] [IsTorsionFree R S] [IsIntegrallyClosed R]
646+
(hirr : Irreducible f) : minpoly R h.root = f :=
647+
let ⟨q, hq⟩ := minpoly.isIntegrallyClosed_dvd h.isIntegral_root h.aeval_root_self
648+
symm <|
649+
eq_of_monic_of_associated h.monic (minpoly.monic h.isIntegral_root) <| by
650+
convert
651+
Associated.mul_left (minpoly R h.root) <|
652+
associated_one_iff_isUnit.2 <|
653+
(hirr.isUnit_or_isUnit hq).resolve_left <| minpoly.not_isUnit R h.root
654+
rw [mul_one]
655+
625656
section mkOfAdjoinEqTop'
626657

627658
variable [Module.Finite R S] [Module.Free R S] [Nontrivial R]
628659

629-
/-- For finite free modules over a nontrivial ring,
630-
the degree of the minimal polynomials is bounded by the rank of the module -/
631-
theorem _root_.minpoly.natDegree_le' (α : S) :
632-
(minpoly R α).natDegree ≤ Module.finrank R S := by
633-
have b := Module.Free.chooseBasis R S
634-
let M := LinearMap.toMatrixAlgEquiv b (Algebra.lmul R S α)
635-
refine (natDegree_le_natDegree (minpoly.min R α M.charpoly_monic ?_)).trans
636-
(M.charpoly_natDegree_eq_dim.trans (Module.finrank_eq_card_chooseBasisIndex R S).symm).le
660+
-- theorem could be placed here with 0 imports, but
661+
-- it does not logically make sense.
662+
theorem alternate_natDegree_le' :
663+
(minpoly A x).natDegree ≤ Module.finrank A B := by
664+
have b := Module.Free.chooseBasis A B
665+
let M := LinearMap.toMatrixAlgEquiv b (Algebra.lmul A B x)
666+
refine (natDegree_le_natDegree (minpoly.min A x M.charpoly_monic ?_)).trans
667+
(M.charpoly_natDegree_eq_dim.trans (Module.finrank_eq_card_chooseBasisIndex A B).symm).le
637668
let h := Matrix.aeval_self_charpoly M
638669
rwa [aeval_algHom_apply, _root_.map_eq_zero_iff _ (LinearMap.toMatrixAlgEquiv b).injective,
639670
aeval_algHom_apply, _root_.map_eq_zero_iff _ Algebra.lmul_injective] at h
640671

641672
/-- If `α` generates `S` as an algebra, then `S` is given by adjoining a root of `minpoly R α`. -/
642-
def _root_.IsAdjoinRootMonic.mkOfAdjoinEqTop'
673+
def mkOfAdjoinEqTop'
643674
{α : S} (hα : Algebra.adjoin R {α} = ⊤) :
644675
IsAdjoinRootMonic S (minpoly R α) := by
645676
set f := minpoly R α
@@ -667,45 +698,14 @@ def _root_.IsAdjoinRootMonic.mkOfAdjoinEqTop'
667698
(AlgEquiv.ofBijective φ ⟨hφ_inj, hφ_surj⟩) with monic := hf }
668699

669700
@[simp]
670-
lemma _root_.IsAdjoinRootMonic.mkOfAdjoinEqTop'_map
701+
lemma mkOfAdjoinEqTop'_map
671702
{α : S} {hα : Algebra.adjoin R {α} = ⊤} :
672703
(IsAdjoinRootMonic.mkOfAdjoinEqTop' hα).map = (aeval α) := by
673704
unfold IsAdjoinRootMonic.mkOfAdjoinEqTop'
674705
ext; simp
675706

676707
end mkOfAdjoinEqTop'
677708

678-
section Equiv
679-
680-
variable {T : Type*} [CommRing T] [Algebra R T] (h' : IsAdjoinRoot T f) {U : Type*} [CommRing U]
681-
682-
@[simp]
683-
theorem lift_algEquiv (i : R →+* U) (x hx z) :
684-
h'.lift i x hx (h.algEquiv h' z) = h.lift i x hx z := by rw [← h.map_repr z]; simp [-map_repr]
685-
686-
@[simp]
687-
theorem liftHom_algEquiv [Algebra R U] (x : U) (hx z) :
688-
h'.liftHom x hx (h.algEquiv h' z) = h.liftHom x hx z := h.lift_algEquiv h' _ _ hx _
689-
690-
end Equiv
691-
692-
end IsAdjoinRoot
693-
694-
namespace IsAdjoinRootMonic
695-
696-
variable (h : IsAdjoinRootMonic S f)
697-
698-
theorem minpoly_eq [IsDomain R] [IsDomain S] [IsTorsionFree R S] [IsIntegrallyClosed R]
699-
(hirr : Irreducible f) : minpoly R h.root = f :=
700-
let ⟨q, hq⟩ := minpoly.isIntegrallyClosed_dvd h.isIntegral_root h.aeval_root_self
701-
symm <|
702-
eq_of_monic_of_associated h.monic (minpoly.monic h.isIntegral_root) <| by
703-
convert
704-
Associated.mul_left (minpoly R h.root) <|
705-
associated_one_iff_isUnit.2 <|
706-
(hirr.isUnit_or_isUnit hq).resolve_left <| minpoly.not_isUnit R h.root
707-
rw [mul_one]
708-
709709
end IsAdjoinRootMonic
710710

711711
section Algebra

0 commit comments

Comments
 (0)