Commit 2026-01-20 16:34 5af7f7e3
View on Github →chore(Algebra): deprecate CancelMonoidWithZero (#33851)
The ring theory library already unbundles classes like IsDomain, and it's unusual for the monoid library to use bundled cancellative classes, leading to anti-patterns synthesizing bundled from unbundled like IsDomain.toCancelMonoidWithZero.
This PR removes Cancel(Comm)MonoidWithZero in favor of [(Comm)MonoidWithZero] [IsCancelMulZero]. In exchange, UniqueFactorizationMonoid and (Normalized)GCDMonoid now extend IsCancelMul.
Inspired by #33832, where generalizing IsDomain.toCancelMonoidWithZero to IsCancelMulZero led to timeouts.
Zulip: https://leanprover.zulipchat.com/#narrow/channel/144837-PR-reviews/topic/.2333851.20deprecate.20CancelMonoidWithZero/near/567433366
TODO: deprecate (Left/Right)CancelSemigroup/Monoid.