Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(FieldTheory/Minpoly): minpoly K x splits implies minpoly K (algebraMap K L a - x) splits #17369

Open
wants to merge 204 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
d0ed84a
feat: refactor to use `IsLocalRingHom` more widely
ericrbg Jul 21, 2023
41a78df
tidy
ericrbg Jul 21, 2023
3bed6d4
fix
ericrbg Jul 21, 2023
18041da
fix
ericrbg Jul 22, 2023
f0e9e6e
fix
ericrbg Jul 22, 2023
5523b69
bump heartbeats - not super happy about this
ericrbg Jul 22, 2023
0d02fe2
move more stuff back
ericrbg Jul 22, 2023
0f3e600
more technical fixes
ericrbg Jul 22, 2023
836e4c0
add another instance explicitly
ericrbg Jul 22, 2023
7a2eb0b
Merge remote-tracking branch 'origin/master' into ericrbg/local_ring_hom
ericrbg Jul 22, 2023
668ffdb
style
ericrbg Jul 23, 2023
ecca48e
Jireh's renaming
ericrbg Aug 4, 2023
98e9329
Update Mathlib/Algebra/Hom/Units.lean
ericrbg Aug 4, 2023
1cfa845
100char
ericrbg Aug 6, 2023
0fbf224
Merge remote-tracking branch 'origin/master' into ericrbg/local_ring_hom
ericrbg Aug 6, 2023
7367e35
Merge remote-tracking branch 'origin/master' into ericrbg/local_ring_hom
ericrbg Aug 11, 2023
0778212
rename
ericrbg Aug 18, 2023
5d7d0ba
Update Mathlib/Algebra/GroupWithZero/Units/Basic.lean
ericrbg Sep 6, 2023
4f49cb9
Update Mathlib/Algebra/GroupWithZero/Units/Basic.lean
ericrbg Sep 6, 2023
842354b
Merge branch 'master' into ericrbg/local_ring_hom
ericrbg Sep 6, 2023
fb6e9ca
update alias
ericrbg Sep 6, 2023
f5c04bf
remove use of autoImplicit
ericrbg Sep 6, 2023
9642033
more autoImplicit
ericrbg Sep 6, 2023
fdc3d39
more autoImplicit
ericrbg Sep 6, 2023
bc86def
more autoImplicit
ericrbg Sep 6, 2023
2bb6c58
more autoImplicit
ericrbg Sep 6, 2023
99198a1
more autoImplicit
ericrbg Sep 6, 2023
864a8d3
bump heartbeats
ericrbg Sep 6, 2023
3358e8a
tidy associated.lean
ericrbg Sep 6, 2023
780408c
speculative merge
ericrbg Oct 14, 2023
e79f878
Update Mathlib/RingTheory/Ideal/LocalRing.lean
ericrbg Oct 14, 2023
7696960
Apply suggestions from code review
ericrbg Oct 14, 2023
5ca101c
make it break for oleans
ericrbg Oct 14, 2023
7607c22
turns out it was fine
ericrbg Oct 14, 2023
0b7ef8b
Merge remote-tracking branch 'origin/master' into ericrbg/local_ring_hom
ericrbg Nov 28, 2023
a1e2788
two small fixes and a TODO
ericrbg Nov 28, 2023
8dfd2ac
Merge remote-tracking branch 'origin/master' into ericrbg/local_ring_hom
ericrbg Jan 9, 2024
55d0693
remove condition
jjdishere Sep 24, 2024
3304b55
Update Basic.lean
jjdishere Sep 24, 2024
0de5911
Update Splits.lean
jjdishere Sep 24, 2024
1236b66
fix
jjdishere Sep 24, 2024
aa7ccba
fix
jjdishere Sep 24, 2024
c8a5f98
fix
jjdishere Sep 24, 2024
b1d42fd
fix
jjdishere Sep 24, 2024
e90afad
Update Field.lean
jjdishere Sep 24, 2024
b7b85a3
Merge branch 'jiedong_jiang_minpoly_lemma' into jiedong_jiang_minpoly…
jjdishere Sep 24, 2024
4dd7f6f
Update Field.lean
jjdishere Sep 24, 2024
82ee24d
Update Mathlib/Algebra/Associated/Basic.lean
jjdishere Oct 2, 2024
5506205
Update Mathlib/Algebra/Associated/Basic.lean
jjdishere Oct 2, 2024
11bec1f
Update Mathlib/FieldTheory/Minpoly/Field.lean
jjdishere Oct 2, 2024
b0a970c
remove change
jjdishere Oct 2, 2024
27151b0
Merge branch 'jiedong_jiang_minpoly_split' of https://github.com/lean…
jjdishere Oct 2, 2024
0fb14cd
Update Field.lean
jjdishere Oct 2, 2024
8dc6273
Merge branch 'master' into jiedong_jiang_minpoly_split
jjdishere Oct 2, 2024
e5b8d0b
Update Field.lean
jjdishere Oct 2, 2024
1b41103
Merge branch 'master' into jiedong_jiang_irreducible'
jjdishere Oct 2, 2024
1d155a0
Update Basic.lean
jjdishere Oct 2, 2024
4c7ca1e
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 2, 2024
ef443e5
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 2, 2024
4b334fc
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_minpoly…
jjdishere Oct 2, 2024
bc146ca
Update Field.lean
jjdishere Oct 2, 2024
be5a312
Update Field.lean
jjdishere Oct 2, 2024
b5d4a09
Revert "Update Field.lean"
jjdishere Oct 2, 2024
701b866
Merge branch 'jiedong_jiang_minpoly_neg' into jiedong_jiang_neg_split
jjdishere Oct 2, 2024
57b9c47
Merge branch 'master' into ericrbg/local_ring_hom
jjdishere Oct 3, 2024
f784583
delete repeate files
jjdishere Oct 3, 2024
8ff2d2b
recover powerseries
jjdishere Oct 3, 2024
f8edc7f
Update Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
jjdishere Oct 3, 2024
e170f81
fix def
jjdishere Oct 3, 2024
be93423
Merge branch 'ericrbg/local_ring_hom' of https://github.com/leanprove…
jjdishere Oct 3, 2024
9fb3ea5
fix FunLike
jjdishere Oct 3, 2024
04a1b1a
remove RingEquiv.isUnit_iff
jjdishere Oct 3, 2024
ec58248
fix import
jjdishere Oct 3, 2024
761e8dc
Update Basic.lean
jjdishere Oct 3, 2024
62ff556
delete Mathlib.RingTheory.LocalRing.RingHom.Defs
jjdishere Oct 3, 2024
fdb1aca
fix import
jjdishere Oct 3, 2024
d1b5777
Update Hom.lean
jjdishere Oct 3, 2024
75c09e2
Update Basic.lean
jjdishere Oct 3, 2024
c570985
fix LocalRing
jjdishere Oct 3, 2024
ae0b95a
fix
jjdishere Oct 3, 2024
2c3e355
fix
jjdishere Oct 3, 2024
8ce7810
isLocalRingHom_toRingHom
jjdishere Oct 3, 2024
5714d2e
have := inferInstance
jjdishere Oct 3, 2024
90871b9
Update Field.lean
jjdishere Oct 3, 2024
5fbcf89
fix Spec
jjdishere Oct 3, 2024
fc1202a
neg_monic
jjdishere Oct 3, 2024
ad2bf7d
Merge branch 'jiedong_jiang_minpoly_neg' into jiedong_jiang_neg_split
jjdishere Oct 3, 2024
dfa10e0
Update Field.lean
jjdishere Oct 3, 2024
095b1e4
fix OpenImmersion
jjdishere Oct 3, 2024
2d5cfc4
Update Splits.lean
jjdishere Oct 3, 2024
0a11ad0
Update Splits.lean
jjdishere Oct 3, 2024
1fcd038
final fix algebraic geometry
jjdishere Oct 4, 2024
0f04fc2
Update Hom.lean
jjdishere Oct 4, 2024
30c6e23
name change
jjdishere Oct 4, 2024
fca365a
recover isLocalRingHomValStalkMap
jjdishere Oct 4, 2024
7b945dc
Merge branch 'ericrbg/local_ring_hom' into jiedong_jiang_rename_is_lo…
jjdishere Oct 4, 2024
cc02c3f
Update HasColimits.lean
jjdishere Oct 4, 2024
a4b04bb
Merge branch 'ericrbg/local_ring_hom' into jiedong_jiang_rename_is_lo…
jjdishere Oct 4, 2024
c7404a1
Update LocallyRingedSpace.lean
jjdishere Oct 4, 2024
f936545
fix HasColimits
jjdishere Oct 4, 2024
3e1c6ea
Merge branch 'ericrbg/local_ring_hom' into jiedong_jiang_rename_is_lo…
jjdishere Oct 4, 2024
63b013b
shake
jjdishere Oct 4, 2024
9539e9e
Merge branch 'ericrbg/local_ring_hom' into jiedong_jiang_rename_is_lo…
jjdishere Oct 4, 2024
7972465
Merge branch 'jiedong_jiang_rename_is_local_hom' into jiedong_jiang_i…
jjdishere Oct 4, 2024
6ffe1e2
golf
jjdishere Oct 4, 2024
8bd924a
Update Splits.lean
jjdishere Oct 4, 2024
f58eed6
Update Mathlib/AlgebraicGeometry/GammaSpecAdjunction.lean
jjdishere Oct 4, 2024
71512b5
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace/HasColimits.lean
jjdishere Oct 4, 2024
30fcf13
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean
jjdishere Oct 4, 2024
c2efc9d
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean
jjdishere Oct 4, 2024
48edd5d
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean
jjdishere Oct 4, 2024
2ffb4a9
Update Mathlib/Geometry/RingedSpace/OpenImmersion.lean
jjdishere Oct 4, 2024
e3a4868
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace/ResidueField.lean
jjdishere Oct 4, 2024
baae113
Update Mathlib/AlgebraicGeometry/Spec.lean
jjdishere Oct 4, 2024
3d5f2df
finish
jjdishere Oct 4, 2024
cfd0e0b
Update Basic.lean
jjdishere Oct 7, 2024
a012e24
fix parenthesis
jjdishere Oct 7, 2024
7702c28
fix
jjdishere Oct 7, 2024
1bc31fc
Merge branch 'ericrbg/local_ring_hom' into jiedong_jiang_rename_is_lo…
jjdishere Oct 7, 2024
05da8ac
Update Spec.lean
jjdishere Oct 7, 2024
93b1b5c
Merge branch 'jiedong_jiang_rename_is_local_hom' into jiedong_jiang_i…
jjdishere Oct 7, 2024
9259a73
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 7, 2024
c586548
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 7, 2024
6a8f1b1
Merge branch 'master' into jiedong_jiang_neg_split
jjdishere Oct 7, 2024
745e29b
Merge branch 'master' into ericrbg/local_ring_hom
jjdishere Oct 8, 2024
6ef40ff
fix ResidueField
jjdishere Oct 8, 2024
f72a0fe
Merge branch 'ericrbg/local_ring_hom' into jiedong_jiang_rename_is_lo…
jjdishere Oct 8, 2024
73f95ea
fix
jjdishere Oct 8, 2024
fc5d246
rename
jjdishere Oct 8, 2024
d76a894
Merge branch 'jiedong_jiang_rename_is_local_hom' into jiedong_jiang_i…
jjdishere Oct 8, 2024
47950c2
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 8, 2024
95dd466
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 8, 2024
3efc7d2
Merge branch 'master' into jiedong_jiang_neg_split
jjdishere Oct 8, 2024
a31c511
Merge branch 'master' into jiedong_jiang_rename_is_local_hom
jjdishere Oct 8, 2024
f9f16d6
Merge branch 'jiedong_jiang_rename_is_local_hom' into jiedong_jiang_i…
jjdishere Oct 8, 2024
b8e4cab
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 8, 2024
cd0c264
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 8, 2024
738d3f7
Merge branch 'master' into jiedong_jiang_rename_is_local_hom
jjdishere Oct 10, 2024
77ee86d
deprecated alias
jjdishere Oct 10, 2024
ca952ba
Update Equiv.lean
jjdishere Oct 10, 2024
afbe019
Update Expand.lean
jjdishere Oct 10, 2024
22f28f7
Update HasColimits.lean
jjdishere Oct 10, 2024
3aa40e9
Update HasColimits.lean
jjdishere Oct 10, 2024
46c338d
Update Henselian.lean
jjdishere Oct 10, 2024
7afc5f6
Update Basic.lean
jjdishere Oct 10, 2024
f7e9705
Update AtPrime.lean
jjdishere Oct 10, 2024
19324c0
Update Inverse.lean
jjdishere Oct 10, 2024
a212515
Update SurjectiveOnStalks.lean
jjdishere Oct 10, 2024
86c9625
Update ValExtension.lean
jjdishere Oct 10, 2024
138e391
Update Mathlib/Algebra/Category/Ring/Constructions.lean
jjdishere Oct 10, 2024
db22294
Update Mathlib/RingTheory/PowerSeries/Inverse.lean
jjdishere Oct 10, 2024
db987c9
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
9218c6f
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
31f3081
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
c91a635
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
1c2e5e3
Update Mathlib/Algebra/Group/Units/Hom.lean
jjdishere Oct 10, 2024
c8691ec
Update Mathlib/Algebra/Category/Ring/Instances.lean
jjdishere Oct 10, 2024
fdb4bbf
Update Mathlib/Algebra/Category/Ring/Instances.lean
jjdishere Oct 10, 2024
09b6dae
Update Mathlib/Algebra/Category/Ring/Instances.lean
jjdishere Oct 10, 2024
6836c03
Update Mathlib/Algebra/Group/Units/Hom.lean
jjdishere Oct 10, 2024
01b02b3
Update Mathlib/Algebra/Group/Units/Hom.lean
jjdishere Oct 10, 2024
350d9e4
Update Mathlib/Algebra/Group/Units/Hom.lean
jjdishere Oct 10, 2024
858ac88
Update Mathlib/Algebra/GroupWithZero/Units/Lemmas.lean
jjdishere Oct 10, 2024
8dcb1af
Update Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean
jjdishere Oct 10, 2024
19f24f9
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
jjdishere Oct 10, 2024
31b44f5
Update Mathlib/Geometry/RingedSpace/LocallyRingedSpace.lean
jjdishere Oct 10, 2024
e961c33
Update Mathlib/LinearAlgebra/ExteriorAlgebra/Basic.lean
jjdishere Oct 10, 2024
357587c
Merge branch 'jiedong_jiang_rename_is_local_hom' into jiedong_jiang_i…
jjdishere Oct 10, 2024
66fff9d
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 10, 2024
7b37861
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 10, 2024
5303e11
since
jjdishere Oct 10, 2024
b40d246
drop deprecated instance
jjdishere Oct 10, 2024
741889d
fix one instances
jjdishere Oct 10, 2024
9ba135d
Revert "drop deprecated instance"
jjdishere Oct 10, 2024
3316bf0
fix @[instance] theorem
jjdishere Oct 10, 2024
72065b9
Merge branch 'jiedong_jiang_rename_is_local_hom' into jiedong_jiang_i…
jjdishere Oct 10, 2024
0bf8038
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 10, 2024
eb15858
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 10, 2024
a20dbd5
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
0f0321a
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
8a1888f
Update Mathlib/RingTheory/LocalRing/RingHom/Basic.lean
jjdishere Oct 10, 2024
c7a0959
Merge branch 'master' into jiedong_jiang_irreducible'
jjdishere Oct 21, 2024
eb7844c
fix
jjdishere Oct 21, 2024
f38a9b6
Merge branch 'jiedong_jiang_irreducible'' into jiedong_jiang_minpoly_…
jjdishere Oct 21, 2024
969a007
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 21, 2024
74ef1a7
Merge branch 'master' into jiedong_jiang_minpoly_split
jjdishere Oct 23, 2024
158f0ea
Update AlgebraMap.lean
jjdishere Oct 23, 2024
c4bc187
Merge branch 'master' into jiedong_jiang_minpoly_split
jjdishere Oct 23, 2024
a8b0b51
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 23, 2024
20903ba
Merge branch 'jiedong_jiang_minpoly_split' into jiedong_jiang_neg_split
jjdishere Oct 23, 2024
db74127
Update AlgebraMap.lean
jjdishere Oct 23, 2024
47e9ef7
Update Mathlib/Algebra/Polynomial/AlgebraMap.lean
jjdishere Oct 24, 2024
5a3697c
Update Mathlib/Algebra/Polynomial/Splits.lean
jjdishere Oct 24, 2024
81a7c48
Update Mathlib/Algebra/Polynomial/AlgebraMap.lean
jjdishere Oct 24, 2024
864d7cc
Update Mathlib/RingTheory/Adjoin/Field.lean
jjdishere Oct 24, 2024
120c9de
generalize to ax+b
jjdishere Oct 24, 2024
0174355
Update Mathlib/Algebra/Polynomial/AlgebraMap.lean
jjdishere Oct 24, 2024
c2fc55f
mid
jjdishere Oct 25, 2024
8315d6b
lemmas
jjdishere Oct 25, 2024
1b75741
refactor splits_iff_comp_splits
jjdishere Oct 27, 2024
124104e
field
jjdishere Oct 27, 2024
cc619b3
fix
jjdishere Oct 27, 2024
1fc9157
fix implicit
jjdishere Oct 27, 2024
cefeaa1
Merge branch 'master' into jiedong_jiang_neg_split
jjdishere Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions Mathlib/Algebra/Polynomial/AlgebraMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@
refine AlgEquiv.ofAlgHom (aeval p) (aeval q) ?_ ?_ <;>
exact AlgHom.ext fun _ ↦ by simp [← comp_eq_aeval, comp_assoc, hpq, hqp]

/-- The automorphism of the polynomial algebra given by `p(X) ↦ p(a*X+b)`,
with inverse `p(X) ↦ p(a⁻¹*(X-b))`. -/
@[simps!]
def algEquivOfDegreeOne {R} [CommRing R] {p : R[X]} (hd : p.degree = 1)
(hl : IsUnit p.leadingCoeff) : R[X] ≃ₐ[R] R[X] := by
jjdishere marked this conversation as resolved.
Show resolved Hide resolved
let c := hl.unit.inv
refine algEquivOfCompEqX p (C c * (X - C (p.coeff 0))) ?_ ?_ <;>
rw [eq_X_add_C_of_degree_eq_one hd] <;>
simp only [coeff_add, mul_coeff_zero, coeff_C_zero, coeff_X_zero, add_comp, sub_comp, mul_comp,
C_comp, X_comp, C_1, ← C_mul, ← mul_assoc, mul_zero, mul_sub, one_mul, mul_add, c,
Units.inv_eq_val_inv, IsUnit.val_inv_mul, IsUnit.mul_val_inv, zero_add, sub_add_cancel,
add_sub_cancel_right]

/-- The automorphism of the polynomial algebra given by `p(X) ↦ p(X+t)`,
with inverse `p(X) ↦ p(X-t)`. -/
@[simps!]
Expand Down Expand Up @@ -557,11 +570,22 @@

lemma comp_X_add_C_ne_zero_iff : p.comp (X + C t) ≠ 0 ↔ p ≠ 0 := comp_X_add_C_eq_zero_iff.not

lemma dvd_comp_iff_of_degree_one (p q r : R[X]) (hd : r.degree = 1) (hl : IsUnit r.leadingCoeff) :
p ∣ q.comp r ↔ p.comp (C hl.unit.inv * (X - C (r.coeff 0))) ∣ q := by

Check failure on line 574 in Mathlib/Algebra/Polynomial/AlgebraMap.lean

View workflow job for this annotation

GitHub Actions / Lint style

Mathlib/Algebra/Polynomial/AlgebraMap.lean:574 ERR_IND: If the theorem/def statement requires multiple lines, indent it correctly (4 spaces or 2 for `|`)

Check failure on line 574 in Mathlib/Algebra/Polynomial/AlgebraMap.lean

View workflow job for this annotation

GitHub Actions / Lint style

Mathlib/Algebra/Polynomial/AlgebraMap.lean:574 ERR_IND: If the theorem/def statement requires multiple lines, indent it correctly (4 spaces or 2 for `|`)
jjdishere marked this conversation as resolved.
Show resolved Hide resolved
convert map_dvd_iff <| algEquivOfDegreeOne hd hl using 2
simp only [algEquivOfDegreeOne, Units.inv_eq_val_inv, algEquivOfCompEqX_apply, ← comp_eq_aeval,
comp_assoc, mul_comp, C_comp, sub_comp, X_comp]
convert Polynomial.comp_X.symm
nth_rw 2 [eq_X_add_C_of_degree_eq_one hd]
simp only [add_sub_cancel_right, ← mul_assoc, ← C_mul, IsUnit.val_inv_mul, map_one, one_mul]

lemma dvd_comp_X_sub_C_iff (p q : R[X]) (a : R) :
p ∣ q.comp (X - C a) ↔ p.comp (X + C a) ∣ q := by
convert (map_dvd_iff <| algEquivAevalXAddC a).symm using 2
rw [C_eq_algebraMap, algEquivAevalXAddC_apply, ← comp_eq_aeval]
simp [comp_assoc]
by_cases h : Nontrivial R
· simpa using dvd_comp_iff_of_degree_one p q (X - C a) (degree_X_sub_C _) (by simp)
· have : Subsingleton R[X] :=
not_nontrivial_iff_subsingleton.mp (Polynomial.nontrivial_iff.not.mpr h)
exact ⟨fun _ => dvd_of_eq (Subsingleton.allEq _ _), fun _ => dvd_of_eq (Subsingleton.allEq _ _)⟩

lemma dvd_comp_X_add_C_iff (p q : R[X]) (a : R) :
p ∣ q.comp (X + C a) ↔ p.comp (X - C a) ∣ q := by
Expand Down
15 changes: 15 additions & 0 deletions Mathlib/Algebra/Polynomial/Splits.lean
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,21 @@ theorem splits_X_pow (n : ℕ) : (X ^ n).Splits i :=
theorem splits_id_iff_splits {f : K[X]} : (f.map i).Splits (RingHom.id L) ↔ f.Splits i := by
rw [splits_map_iff, RingHom.id_comp]

theorem Splits.comp_of_degree_one {f : K[X]} {p : K[X]} (hd : p.degree = 1)
(hl : IsUnit p.leadingCoeff) (h : f.Splits i) : (f.comp p).Splits i := by
jjdishere marked this conversation as resolved.
Show resolved Hide resolved
cases h with
| inl h0 =>
exact Or.inl <| map_comp i _ _ ▸ h0.symm ▸ zero_comp
| inr h =>
right
intro g irr dvd
rw [map_comp, Polynomial.map_sub, map_X, map_C, dvd_comp_X_sub_C_iff] at dvd
have := h (irr.map (algEquivAevalXAddC _)) dvd
rw [degree_eq_natDegree irr.ne_zero]
rwa [algEquivAevalXAddC_apply, ← comp_eq_aeval,
degree_eq_natDegree (fun h => WithBot.bot_ne_one (h ▸ this)),
natDegree_comp, natDegree_X_add_C, mul_one] at this

theorem Splits.comp_X_sub_C {i : L →+* F} (a : L) {f : L[X]}
(h : f.Splits i) : (f.comp (X - C a)).Splits i := by
cases h with
Expand Down
Loading