Zulip Chat Archive
Stream: mathlib4
Topic: Ne.mul
Kevin Buzzard (May 27 2025 at 15:03):
import Mathlib
def Ne.mul := @mul_ne_zero
example (a b : ℝ) (ha : a ≠ 0) (hb : b ≠ 0) : a * b ≠ 0 := ha.mul hb
I thought this was kind of cool, is it something mathlib would like? It was the first proof I tried before using exact?.
Kevin Buzzard (May 27 2025 at 15:04):
Assuming it goes in and people want to keep mul_ne_zero does this then automatically end up on Jovan's list of duplicated lemmas?
Eric Wieser (May 27 2025 at 15:07):
You could use alias and then it would be easier to auto-exclude from any automation
Floris van Doorn (May 27 2025 at 15:09):
In general, we are happy to include aliases to support dot notation ("generalized projection notation"). The fact that this one doesn't mention zero irks me a bit, but I think this might be nice to have.
Alex Meiburg (May 27 2025 at 15:38):
You could do this for Ne.add too. (There is docs#add_ne_zero, but it's not what I expected. Something with [AddZeroClass α] [PartialOrder α] [CanonicallyOrderedAdd α] probably.)
Kevin Buzzard (May 27 2025 at 16:04):
yeah I agree that it not mentioning zero is a bit weird. But "a not something" and "b not something" implies "a*b not something" isn't going to have too many applications other than 0 (which is pretty common).
Floris van Doorn (May 27 2025 at 16:15):
docs#ENNReal.mul_ne_top comes to mind, but probably shows up less in (the non-analysis part of) FLT than in Carleson :-)
Kevin Buzzard (May 27 2025 at 17:24):
Oh that's a good find! Is Ne.mul\_0 a better name then?
Jz Pan (May 28 2025 at 07:21):
But isn't Ne.mul a ≠ b -> c ≠ d -> a * c ≠ b * d?
Jz Pan (May 28 2025 at 07:21):
Of course it's not correct in general
Ruben Van de Velde (May 28 2025 at 07:42):
That's why it doesn't need the name :)
Kevin Buzzard (May 28 2025 at 08:37):
I think "not correct in general" is a bit of an understatement" :-)
Jovan Gerbscheid (May 28 2025 at 14:39):
Kevin Buzzard said:
Assuming it goes in and people want to keep
mul_ne_zerodoes this then automatically end up on Jovan's list of duplicated lemmas?
As @Eric Wieser said, If you use alias, on won't appear on the list of duplicate lemmas.
Last updated: Dec 20 2025 at 21:32 UTC