Zulip Chat Archive
Stream: Is there code for X?
Topic: Polynomial.int
Violeta Hernández (Jan 31 2026 at 12:37):
I was just about to submit an entire PR duplicating this material, until I randomly stumbled upon docs#Polynomial.int. Why is it called that? I don't think I'm at fault for thinking Polynomial.int would have something to do with integers.
What about renaming it to something like Polynomial.toSubring?
Violeta Hernández (Jan 31 2026 at 12:49):
(meant to post this in #mathlib4, sorry)
Violeta Hernández (Jan 31 2026 at 12:52):
...oh, so we actually had this twice already! docs#Polynomial.toSubring
Yaël Dillies (Jan 31 2026 at 12:57):
I guess the name comes from the use case of restricting a polynomial with coefficients in a valued field to have coefficients in the integers of that field? But I agree it is a poor name
Kevin Buzzard (Jan 31 2026 at 12:58):
Or a number field!
Violeta Hernández (Jan 31 2026 at 12:59):
So docs#Polynomial.int has much nicer def-eqs, while docs#Polynomial.toSubring has more API and is more general. I'll make a PR merging both.
Violeta Hernández (Jan 31 2026 at 13:17):
#34650 redefines Polynomial.toSubring to match Polynomial.int (and moves it to a new file so people can hopefully find this easier!)
Last updated: Feb 28 2026 at 14:05 UTC