Zulip Chat Archive
Stream: maths
Topic: Polynomials: `Irreducible (p.map f) → Irreducible p`
Snir Broshi (Nov 10 2025 at 10:44):
import Mathlib
open Polynomial
theorem irreducible_of_irreducible_map
{R R' : Type*} [Semiring R] [Semiring R'] (p : R[X]) (f : R →+* R') :
Irreducible (p.map f) → Irreducible p := by
sorry
What are the weakest assumptions needed to make this true?
I expected this to be true just by adding f.Injective and possibly CommRing, but such a statement doesn't exist in Mathlib. Does anyone have a counterexample?
There's docs#Polynomial.Monic.irreducible_of_irreducible_map which adds p.Monic and:
[CommRing R] [IsDomain R] [CommRing R'] [IsDomain R']
There's docs#Polynomial.IsPrimitive.irreducible_of_irreducible_map_of_injective which adds p.IsPrimitive and f.Injective and:
[CommRing R] [CommRing R'] [IsDomain R']
Johan Commelin (Nov 10 2025 at 10:48):
Consider and .
Riccardo Brasca (Nov 10 2025 at 11:49):
This has already been discussed, and the conclusion was that it seems difficult to do better than what we currently have.
Riccardo Brasca (Nov 10 2025 at 11:50):
@Jiang Jiedong you wrote some nice counterexample, didn't you?
Kenny Lau (Nov 10 2025 at 12:04):
The only issue seems to be mapping nonunits to units, which is fixed by IsLocalHom I would suppose. (e.g. it is true for integral extensions)
So the following should be true:
import Mathlib
open Polynomial
example {A B : Type*} [CommRing A] [IsDomain A] [CommRing B] [IsDomain B]
(f : A →+* B) [IsLocalHom f] (hf : Function.Injective f)
{p : A[X]} (hfp : Irreducible (p.map f)) : Irreducible p :=
sorry
Jiang Jiedong (Nov 10 2025 at 12:09):
@Riccardo Brasca had a discussion with me about whether irreducibility is preserved by a surjective local homomorphism. It is related to the opposite direction of your original statement. The example is as follows.
Consider the additive monoids M = ℕ ⊕ ℕ, N = ℕ,
with a surjective local (additive) hom f : M →+ N sending (m, n) to 2m + n.
It is local because the only add unit in N is 0, with preimage {(0, 0)} also an add unit.
Then x = (1, 0) is irreducible in M, but f x = 2 = 1 + 1 is not irreducible in N.
By taking the MonoidAlgebra, this could be upgraded into a counterexample in terms of rings.
Kenny Lau (Nov 10 2025 at 12:17):
proof:
import Mathlib
open Polynomial
theorem Polynomial.isLocalHom_map {A B : Type*} [CommRing A] [IsDomain A] [CommRing B] [IsDomain B]
{f : A →+* B} [IsLocalHom f] (hf : Function.Injective f) :
IsLocalHom (mapRingHom f) := by
refine ⟨fun p (hfp : IsUnit (p.map f)) ↦ ?_⟩
rw [isUnit_iff] at hfp ⊢
obtain ⟨fx, hfx, hfxp⟩ := hfp
have hp0 : p.natDegree = 0 := (natDegree_map_eq_of_injective hf p).symm.trans <| by simp [← hfxp]
obtain ⟨x, rfl⟩ := natDegree_eq_zero.mp hp0
obtain rfl := by simpa using hfxp
exact ⟨x, isUnit_of_map_unit f x hfx, rfl⟩
example {A B : Type*} [CommRing A] [IsDomain A] [CommRing B] [IsDomain B]
(f : A →+* B) [IsLocalHom f] (hf : Function.Injective f)
{p : A[X]} (hfp : Irreducible (p.map f)) : Irreducible p :=
have := isLocalHom_map hf
.of_map (f := mapRingHom f) hfp
Snir Broshi (Nov 10 2025 at 13:05):
Cool! Didn't know IsLocalHom (neither in mathlib nor in math), and now I'm wondering what else is true for local homs, e.g.:
example {A B : Type*} [CommRing A] [IsDomain A] [NormalizedGCDMonoid A]
[CommRing B] [IsDomain B] [NormalizedGCDMonoid B]
(f : A →+* B) [IsLocalHom f] (hf : Function.Injective f)
{p q : A[X]} : gcd (p.map f) (q.map f) = (gcd p q).map f := by
-- or maybe just `Associated`
sorry
example {A B : Type*} [CommRing A] [IsDomain A] [CommRing B] [IsDomain B]
(f : A →+* B) [IsLocalHom f] (hf : Function.Injective f)
{p q : A[X]} (h : IsCoprime (p.map f) (q.map f)) : IsCoprime p q := by
sorry
example {A B : Type*} [CommRing A] [IsDomain A] [CommRing B] [IsDomain B]
(f : A →+* B) [IsLocalHom f] (hf : Function.Injective f)
{p : A[X]} (h : (p.map f).Separable) : p.Separable := by
-- special case of the `IsCoprime` example (using `Polynomial.derivative_map`)
sorry
Johan Commelin (Nov 10 2025 at 13:06):
Snir Broshi said:
Cool! Didn't know
IsLocalHom(neither in mathlib nor in math)
The concept comes from morphisms of local rings. (A local ring has a unique maximal ideal, and hence a unique surjection onto a field. Morphisms of local rings should commute with that structure. Exercise: show that this concept is the same as the mathlib definition.)
Ruben Van de Velde (Nov 10 2025 at 13:33):
What, do you mean the solution isn't in mathlib? :)
Johan Commelin (Nov 10 2025 at 13:36):
I didn't make that claim :wink:
Antoine Chambert-Loir (Nov 11 2025 at 00:04):
(Anybody having the slightest attraction to intuitionistic logic should cry at reading the docstring of docs#IsLocalHom. Maybe that's on purpose.)
Aaron Liu (Nov 11 2025 at 00:09):
Antoine Chambert-Loir said:
(Anybody having the slightest attraction to intuitionistic logic should cry at reading the docstring of docs#IsLocalHom. Maybe that's on purpose.)
I don't get it
Floris van Doorn (Nov 11 2025 at 00:23):
It's probably this part, and the fact that the docstring is the contrapositive of the Lean statement.
Lean statement:
map_nonunit (a : R) : IsUnit (f a) → IsUnit aDocstring: A local homomorphism
f : R ⟶ Swill send nonunits ofRto nonunits ofS.
Aaron Liu (Nov 11 2025 at 00:55):
oh god
Aaron Liu (Nov 11 2025 at 00:55):
did they change the field at some point and forget to change the docstring?
Jiang Jiedong (Nov 11 2025 at 03:59):
Shall we fix the doc string and the name map_nonunit?
Kevin Buzzard (Nov 11 2025 at 07:30):
But they're the same thing! ;-)
More seriously, what are proposals for a sentence which is constructively accurate and isn't a lot more ugly?
Fernando Chu (Nov 11 2025 at 07:47):
Something like "f reflects units"? Pretending this is a statement about one object categories, this is a very standard usage of "reflects" :)
Damiano Testa (Nov 11 2025 at 07:50):
Maybe "only units map to units"?
Kevin Buzzard (Nov 11 2025 at 07:52):
I agree with you that for those people who know what "reflects" means, this is a good docstring. But I would argue that this word is not taught as standard in mathematics.
This sort of question has come up before: are we allowed to write a docstring which is mathematically equivalent to, but not equal to, the Lean code, and my impression is that the answer is "yes". I think that if someone wants to add a sentence about reflecting then this should be added as an extra comment, rather than removing the mathematically accurate (at least if you're not a constructivist, and mathlib is not a constructivist library) and easier-to-understand (because it doesn't mention a technical term which is essentially unheard of outside of category theory) term. But I would have no objections to an additional comment of the form "Note: this is implemented as: f reflects units".
Christian Merten (Nov 11 2025 at 07:53):
Fernando Chu said:
Something like "
freflects units"? Pretending this is a statement about one object categories, this is a very standard usage of "reflects" :)
Would you also like to rename IsLocalHom to ReflectsIsos? I don't think this is great. The current docstring is quite clear and if the formula was not shown in the docs, it would cause no confusion.
Fernando Chu (Nov 11 2025 at 08:40):
The reference to categories was a joke. The serious part was that the concept/name of a function "reflecting" properties is nice, but I agree it is very non-standard.
Junyan Xu (Nov 11 2025 at 09:20):
I'd use comap_isUnit for the name
Kevin Buzzard (Nov 11 2025 at 09:25):
but that would surely mean "an arbitrary preimage of a nonunit is a nonunit"?
Yaël Dillies (Nov 11 2025 at 10:16):
kern_isUnit? :speak_no_evil:
Kenny Lau (Nov 11 2025 at 10:19):
The exported lemma is called sUnit_of_map_unit, which is a bad name; I would just call the field isUnit_of_isUnit_apply' and export it to isUnit_of_isUnit_apply.
Kenny Lau (Nov 11 2025 at 10:21):
if a shorter name is sought for the field then it can be isUnit_of_map
Ruben Van de Velde (Nov 11 2025 at 10:34):
We don't need a separate name for the field though, do we?
Ruben Van de Velde (Nov 11 2025 at 10:35):
At least, I'm not seeing any of the usual reasons
Kenny Lau (Nov 11 2025 at 10:38):
Right, we don't need the ' version above (my apologies); but if we want a shorter name for the field then we can export it to a longer name, in which case we'll need a separate name.
Yaël Dillies (Nov 11 2025 at 11:33):
IsUnit.of_map would be my name
Kenny Lau (Nov 11 2025 at 11:34):
IsUnit.of_map actually exists already! :tada:
Yaël Dillies (Nov 11 2025 at 11:40):
A win for #naming :grinning_face_with_smiling_eyes:
Last updated: Dec 20 2025 at 21:32 UTC