Zulip Chat Archive
Stream: Is there code for X?
Topic: roots p <= roots q -> p | q
Tomaz Mascarenhas (Apr 03 2025 at 15:44):
We do have docs#Polynomial.roots.le_of_dvd. Do we have the converse? I.e. if the roots of p
form a subset of the roots of q
then p
divides q
?
Kevin Buzzard (Apr 03 2025 at 15:47):
Trick question: can you formalize the statement of what you want to prove?
Tomaz Mascarenhas (Apr 03 2025 at 15:48):
hm, doesn't
theorem roots.dvd_of_le (h : q ≠ 0) (hp : p ≠ 0) : roots p ≤ roots q -> p ∣ q
work? (in my case I don't care about 0
s)
Aaron Liu (Apr 03 2025 at 15:48):
You should add some typeclasses and the types of p
and q
Kevin Buzzard (Apr 03 2025 at 15:48):
Can you make a #mwe?
Yury G. Kudryashov (Apr 03 2025 at 15:50):
See docs#Polynomial.Splits.dvd_of_roots_le_roots
Tomaz Mascarenhas (Apr 03 2025 at 15:52):
import Mathlib
universe u
variable {R : Type u}
variable [CommRing R] [IsDomain R] {p q : Polynomial R}
open Polynomial
theorem roots.dvd_of_le (h : q ≠ 0) (hp : p ≠ 0) : roots p ≤ roots q -> p ∣ q := sorry
Tomaz Mascarenhas (Apr 03 2025 at 15:53):
Yury G. Kudryashov said:
hm, let me see
Tomaz Mascarenhas (Apr 03 2025 at 15:55):
That works for me! Thanks @Yury G. Kudryashov!
Yury G. Kudryashov (Apr 03 2025 at 15:56):
Found by @loogle Polynomial.roots, _ ≤ _, _ ∣ _
loogle (Apr 03 2025 at 15:56):
:search: Polynomial.roots.le_of_dvd, Multiset.prod_X_sub_C_dvd_iff_le_roots, and 2 more
Kevin Buzzard (Apr 03 2025 at 16:56):
Tomaz Mascarenhas said:
import Mathlib universe u variable {R : Type u} variable [CommRing R] [IsDomain R] {p q : Polynomial R} open Polynomial theorem roots.dvd_of_le (h : q ≠ 0) (hp : p ≠ 0) : roots p ≤ roots q -> p ∣ q := sorry
This isn't true, e.g. roots (X^2+1)
is empty if R is the real numbers (this was why it was a trick question) as is roots (X^2+2) so both inclusions are valid but neither polynomial divides the other.
Kevin Buzzard (Apr 03 2025 at 17:00):
This is why (hp : Polynomial.Splits (RingHom.id K) p)
is essential in Yury's answer (i.e. "all the roots are in the base ring")
Yury G. Kudryashov (Apr 03 2025 at 17:23):
BTW, should we add versions of Polynomial.Splits
lemmas in the Polynomial
namespace assuming that the field is algebraically closed?
Last updated: May 02 2025 at 03:31 UTC