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.

Estimated changes

modified theorem eq_zero_of_mul_eq_self_left
modified theorem left_eq_mul₀
modified theorem mul_eq_left₀
modified theorem mul_eq_right₀
modified theorem mul_left_eq_self₀
modified theorem mul_right_eq_self₀
modified theorem right_eq_mul₀