Zulip Chat Archive
Stream: Is there code for X?
Topic: Factoring zero roots
Yaël Dillies (Aug 22 2022 at 08:29):
Is there a way to write a polynomial P
as X ^ m * Q
where the smallest coefficient of Q
is nonzero that's well-integrated with coeff
?
Johan Commelin (Aug 22 2022 at 08:31):
cc @Damiano Testa
Yaël Dillies (Aug 22 2022 at 08:35):
To un #xy, I just want to show that if the least nonzero coefficients of P
and Q
are positive, then the least coefficient of P * Q
is as well. If it were the greatest, I could use leading_coeff
and all would be well, but we don't seem to have something like least_coeff
?
Alex J. Best (Aug 22 2022 at 08:36):
docs#polynomial.trailing_coeff
Yaël Dillies (Aug 22 2022 at 08:36):
Aaah trailing! I knew it had to be somewhere :smiley:
Damiano Testa (Aug 22 2022 at 08:37):
Yes, trailing coeff would work. There might be trailing_coeff_mul
as well. I am not sure if there is a version with just the bounds (the analogue of docs#polynomial.nat_degree_mul_le.
Damiano Testa (Aug 22 2022 at 08:38):
Let's try: docs#polynomial.le_trailing_degree_mul.
It works!!! :octopus:
Damiano Testa (Aug 22 2022 at 08:39):
As for your initial question, I know that there is docs#multiplicity, I thought that it would have been useful, but so far I have never used it.
Yaël Dillies (Aug 22 2022 at 08:39):
I actually only need trailing_coeff_mul
! So I now have a complete proof that floors and ceils are not preserved under ordered ring homomorphisms.
Yaël Dillies (Aug 22 2022 at 08:40):
That is, life is proven sad.
Damiano Testa (Aug 22 2022 at 08:40):
Is this a goals accomplished or goals not accomplished kind of thing?
Yaël Dillies (Aug 22 2022 at 08:40):
It's a "I have a new pathology to put in counterexamples
" kind of thing.
Damiano Testa (Aug 22 2022 at 08:41):
I love counterexamples: if you play your cards right, you always either get a theorem or counterexample!
Yaël Dillies (Aug 22 2022 at 08:43):
Okay so intuitively floors and ceils should be preserved by f
an ordered ring homs because:
f
preserves the copy of the naturals/integers because it's a ring hom.f
preserves what's betweenn
andn + 1
because it's monotone.
Yaël Dillies (Aug 22 2022 at 08:45):
At this point, I was quite happy with the proof and PRed #16025. But I couldn't get the Lean proof.
Yaël Dillies (Aug 22 2022 at 08:46):
And this was because that "between" doesn't have to be strict. Potentially something whose floor was n
could get mapped to n + 1
, and this has floor n + 1
, not n
.
Yaël Dillies (Aug 22 2022 at 08:48):
So what would be a counterexample? Not ℚ
, ℝ
or anything like that, because you can use archimedeanness to ensure that nothing < n + 1
gets mapped to n + 1
. So you need infinitesimals.
Yaël Dillies (Aug 22 2022 at 08:51):
Hence I took ℤ[ε]
where ε
is an infinitesimal. I could inherit the ring structure from ℤ[X]
, and the ordered add group structure from ℕ →ₗ ℤ
thanks to docs#pi.lex.ordered_add_comm_group.
Yaël Dillies (Aug 22 2022 at 08:53):
Now the pathological hom is taking the zeroth coefficient. That works because ⌊-ε⌋ = -1
but ⌊coeff (-ε) 0⌋ = ⌊0⌋ = 0
.
Damiano Testa (Aug 22 2022 at 08:57):
This reminds me of another counterexample in the folder of a canonically_ordered something for which multiplication by 2 is not injective (if I remember correctly) and you get two incomparable elements a b
such that 2 * a = 2 * b
.
Last updated: Dec 20 2023 at 11:08 UTC