Zulip Chat Archive
Stream: mathlib4
Topic: ring help
Bolton Bailey (Jan 24 2024 at 20:09):
My understanding was that ring
is supposed to solve goals like the following:
import Mathlib
example
(B: Type)
[Ring B]
(f g: B) :
f + 5 * f = 6 * f := by
ring
But ring doesn't solve this. What is going wrong?
David Renshaw (Jan 24 2024 at 20:13):
It works if I change Ring
to CommRing
Bolton Bailey (Jan 24 2024 at 20:14):
Ah yes, I forgot that it had to be commutative. Thanks.
David Renshaw (Jan 24 2024 at 20:14):
or CommSemiring
Bolton Bailey (Jan 24 2024 at 20:16):
There should really be an error message that says you are doing it wrong when your equation is not over a CommSemiring.
Jireh Loreaux (Jan 24 2024 at 23:11):
i'm surprised the AddCommMonoidWithOne
part of of ring
can't handle this. I actually think this is a bug.
David Renshaw (Jan 29 2024 at 19:09):
ah, apparently noncomm_ring
exists. This works:
example
(B: Type)
[Ring B]
(f: B) :
f + 5 * f = 6 * f := by
noncomm_ring
Jireh Loreaux (Jan 29 2024 at 20:48):
It does, but it's very stupid. See the implementation to realize it's just a bunch of simp lemmas (and abel
)
Bolton Bailey (Jan 11 2025 at 06:09):
Thanks to @Jireh Loreaux for resolving this with #19763!
Last updated: May 02 2025 at 03:31 UTC