algebra.monoid_algebra.no_zero_divisors
⟷
Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -74,14 +74,14 @@ theorem Left.exists_add_of_mem_support_single_hMul [AddLeftCancelSemigroup A]
{g : AddMonoidAlgebra R A} (a x : A)
(hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
rwa [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _),
- Finset.mem_map] at hx
+ Finset.mem_map] at hx
#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_hMul
theorem Right.exists_add_of_mem_support_single_hMul [AddRightCancelSemigroup A]
{f : AddMonoidAlgebra R A} (b x : A)
(hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
rwa [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _),
- Finset.mem_map] at hx
+ Finset.mem_map] at hx
#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_hMul
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -55,7 +55,17 @@ variable {R A : Type _} [Semiring R]
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem hMul_apply_add_eq_hMul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
(h : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0) :
- (f * g) (a0 + b0) = f a0 * g b0 := by classical
+ (f * g) (a0 + b0) = f a0 * g b0 := by
+ classical
+ rw [mul_apply]
+ refine' (Finset.sum_eq_single a0 _ _).trans _
+ · exact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))
+ · exact fun af0 => by simp [not_mem_support_iff.mp af0]
+ · refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
+ · by_cases af : a0 ∈ f.support
+ · exact if_neg (h af bg (Or.inr b0))
+ · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
+ · exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.hMul_apply_add_eq_hMul_of_forall_ne
section LeftOrRightOrderability
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -55,17 +55,7 @@ variable {R A : Type _} [Semiring R]
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem hMul_apply_add_eq_hMul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
(h : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0) :
- (f * g) (a0 + b0) = f a0 * g b0 := by
- classical
- rw [mul_apply]
- refine' (Finset.sum_eq_single a0 _ _).trans _
- · exact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))
- · exact fun af0 => by simp [not_mem_support_iff.mp af0]
- · refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
- · by_cases af : a0 ∈ f.support
- · exact if_neg (h af bg (Or.inr b0))
- · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
- · exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
+ (f * g) (a0 + b0) = f a0 * g b0 := by classical
#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.hMul_apply_add_eq_hMul_of_forall_ne
section LeftOrRightOrderability
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2022 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
-import Mathbin.Algebra.MonoidAlgebra.Support
+import Algebra.MonoidAlgebra.Support
#align_import algebra.monoid_algebra.no_zero_divisors from "leanprover-community/mathlib"@"932872382355f00112641d305ba0619305dc8642"
mathlib commit https://github.com/leanprover-community/mathlib/commit/001ffdc42920050657fd45bd2b8bfbec8eaaeb29
@@ -51,10 +51,9 @@ open Finsupp
variable {R A : Type _} [Semiring R]
-#print AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne /-
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
-theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
+theorem hMul_apply_add_eq_hMul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
(h : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0) :
(f * g) (a0 + b0) = f a0 * g b0 := by
classical
@@ -67,30 +66,24 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
· exact if_neg (h af bg (Or.inr b0))
· simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
· exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
-#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne
--/
+#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.hMul_apply_add_eq_hMul_of_forall_ne
section LeftOrRightOrderability
-#print AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul /-
-theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
+theorem Left.exists_add_of_mem_support_single_hMul [AddLeftCancelSemigroup A]
{g : AddMonoidAlgebra R A} (a x : A)
(hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
rwa [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _),
Finset.mem_map] at hx
-#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul
--/
+#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_hMul
-#print AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul /-
-theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
+theorem Right.exists_add_of_mem_support_single_hMul [AddRightCancelSemigroup A]
{f : AddMonoidAlgebra R A} (b x : A)
(hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
rwa [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _),
Finset.mem_map] at hx
-#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul
--/
+#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_hMul
-#print AddMonoidAlgebra.NoZeroDivisors.of_left_ordered /-
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigroup A]
@@ -128,9 +121,7 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
· refine' add_lt_add_left _ _
exact Finset.min'_lt_of_mem_erase_min' _ _ (finset.mem_erase.mpr ⟨hc, cg⟩)⟩
#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_ordered
--/
-#print AddMonoidAlgebra.NoZeroDivisors.of_right_ordered /-
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a right-ordered add left
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigroup A]
@@ -170,7 +161,6 @@ theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigro
Add.to_covariantClass_right A
exact add_le_add_right (Finset.min'_le _ _ bf) _⟩
#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_ordered
--/
end LeftOrRightOrderability
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2022 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-
-! This file was ported from Lean 3 source module algebra.monoid_algebra.no_zero_divisors
-! leanprover-community/mathlib commit 932872382355f00112641d305ba0619305dc8642
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Algebra.MonoidAlgebra.Support
+#align_import algebra.monoid_algebra.no_zero_divisors from "leanprover-community/mathlib"@"932872382355f00112641d305ba0619305dc8642"
+
/-!
# Variations on non-zero divisors in `add_monoid_algebra`s
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -54,6 +54,7 @@ open Finsupp
variable {R A : Type _} [Semiring R]
+#print AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne /-
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
@@ -70,23 +71,29 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
· simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
· exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne
+-/
section LeftOrRightOrderability
+#print AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul /-
theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
{g : AddMonoidAlgebra R A} (a x : A)
(hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
rwa [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _),
Finset.mem_map] at hx
#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul
+-/
+#print AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul /-
theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
{f : AddMonoidAlgebra R A} (b x : A)
(hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
rwa [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _),
Finset.mem_map] at hx
#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul
+-/
+#print AddMonoidAlgebra.NoZeroDivisors.of_left_ordered /-
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigroup A]
@@ -124,7 +131,9 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
· refine' add_lt_add_left _ _
exact Finset.min'_lt_of_mem_erase_min' _ _ (finset.mem_erase.mpr ⟨hc, cg⟩)⟩
#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_ordered
+-/
+#print AddMonoidAlgebra.NoZeroDivisors.of_right_ordered /-
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a right-ordered add left
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigroup A]
@@ -164,6 +173,7 @@ theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigro
Add.to_covariantClass_right A
exact add_le_add_right (Finset.min'_le _ _ bf) _⟩
#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_ordered
+-/
end LeftOrRightOrderability
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -60,15 +60,15 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
(h : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0) :
(f * g) (a0 + b0) = f a0 * g b0 := by
classical
- rw [mul_apply]
- refine' (Finset.sum_eq_single a0 _ _).trans _
- · exact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))
- · exact fun af0 => by simp [not_mem_support_iff.mp af0]
- · refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
- · by_cases af : a0 ∈ f.support
- · exact if_neg (h af bg (Or.inr b0))
- · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
- · exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
+ rw [mul_apply]
+ refine' (Finset.sum_eq_single a0 _ _).trans _
+ · exact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))
+ · exact fun af0 => by simp [not_mem_support_iff.mp af0]
+ · refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
+ · by_cases af : a0 ∈ f.support
+ · exact if_neg (h af bg (Or.inr b0))
+ · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
+ · exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne
section LeftOrRightOrderability
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -77,14 +77,14 @@ theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
{g : AddMonoidAlgebra R A} (a x : A)
(hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
rwa [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _),
- Finset.mem_map] at hx
+ Finset.mem_map] at hx
#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul
theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
{f : AddMonoidAlgebra R A} (b x : A)
(hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
rwa [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _),
- Finset.mem_map] at hx
+ Finset.mem_map] at hx
#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
@@ -103,7 +103,7 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
refine' ⟨a + gmin, mem_support_iff.mpr _⟩
rw [mul_apply_add_eq_mul_of_forall_ne _]
· refine' mul_ne_zero _ _
- exacts[mem_support_iff.mp ha, mem_support_iff.mp (Finset.min'_mem _ _)]
+ exacts [mem_support_iff.mp ha, mem_support_iff.mp (Finset.min'_mem _ _)]
· rw [H]
rintro b c bf cg (hb | hc) <;> refine' ne_of_gt _
· refine' lt_of_lt_of_le (_ : _ < b + gmin) _
@@ -142,7 +142,7 @@ theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigro
refine' ⟨fmin + a, mem_support_iff.mpr _⟩
rw [mul_apply_add_eq_mul_of_forall_ne _]
· refine' mul_ne_zero _ _
- exacts[mem_support_iff.mp (Finset.min'_mem _ _), mem_support_iff.mp ha]
+ exacts [mem_support_iff.mp (Finset.min'_mem _ _), mem_support_iff.mp ha]
· rw [H]
rintro b c bf cg (hb | hc) <;> refine' ne_of_gt _
· refine' lt_of_le_of_lt (_ : _ ≤ fmin + c) _
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -54,12 +54,6 @@ open Finsupp
variable {R A : Type _} [Semiring R]
-/- warning: add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne -> AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Add.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} {a0 : A} {b0 : A}, (forall {a : A} {b : A}, (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) a (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) f)) -> (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) b (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) g)) -> (Or (Ne.{succ u2} A a a0) (Ne.{succ u2} A b b0)) -> (Ne.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a b) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0))) -> (Eq.{succ u1} R (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (fun (_x : AddMonoidAlgebra.{u1, u2} R A _inst_1) => A -> R) (AddMonoidAlgebra.coeFun.{u1, u2} R A _inst_1) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 _inst_2)) f g) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0)) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (fun (_x : AddMonoidAlgebra.{u1, u2} R A _inst_1) => A -> R) (AddMonoidAlgebra.coeFun.{u1, u2} R A _inst_1) f a0) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (fun (_x : AddMonoidAlgebra.{u1, u2} R A _inst_1) => A -> R) (AddMonoidAlgebra.coeFun.{u1, u2} R A _inst_1) g b0)))
-but is expected to have type
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Add.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} {a0 : A} {b0 : A}, (forall {a : A} {b : A}, (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) a (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) f)) -> (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) b (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) g)) -> (Or (Ne.{succ u2} A a a0) (Ne.{succ u2} A b b0)) -> (Ne.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a b) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0))) -> (Eq.{succ u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) A (fun (_x : A) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) _x) (Finsupp.funLike.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 _inst_2)) f g) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0)) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) b0) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (instHMul.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (NonUnitalNonAssocSemiring.toMul.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) _inst_1)))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) A (fun (_x : A) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) _x) (Finsupp.funLike.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) f a0) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) A (fun (_x : A) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) _x) (Finsupp.funLike.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) g b0)))
-Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_neₓ'. -/
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
@@ -79,12 +73,6 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
section LeftOrRightOrderability
-/- warning: add_monoid_algebra.left.exists_add_of_mem_support_single_mul -> AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddLeftCancelSemigroup.{u2} A] {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} (a : A) (x : A), (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) x (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) (Finsupp.single.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) a (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (AddMonoidWithOne.toOne.{u1} R (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} R (NonAssocSemiring.toAddCommMonoidWithOne.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))))))) g))) -> (Exists.{succ u2} A (fun (b : A) => Exists.{0} (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) b (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) g)) (fun (H : Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) b (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) g)) => Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
-but is expected to have type
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddLeftCancelSemigroup.{u2} A] {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} (a : A) (x : A), (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) x (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (HMul.hMul.{max u2 u1, max u1 u2, max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) (AddMonoidAlgebra.single.{u1, u2} R A _inst_1 a (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (Semiring.toOne.{u1} R _inst_1)))) g))) -> (Exists.{succ u2} A (fun (b : A) => And (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) b (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) g)) (Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
-Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mulₓ'. -/
theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
{g : AddMonoidAlgebra R A} (a x : A)
(hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
@@ -92,12 +80,6 @@ theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
Finset.mem_map] at hx
#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul
-/- warning: add_monoid_algebra.right.exists_add_of_mem_support_single_mul -> AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddRightCancelSemigroup.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} (b : A) (x : A), (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) x (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) f (Finsupp.single.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) b (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (AddMonoidWithOne.toOne.{u1} R (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} R (NonAssocSemiring.toAddCommMonoidWithOne.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))))))))) -> (Exists.{succ u2} A (fun (a : A) => Exists.{0} (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) a (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) f)) (fun (H : Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) a (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) f)) => Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
-but is expected to have type
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddRightCancelSemigroup.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} (b : A) (x : A), (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) x (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (HMul.hMul.{max u1 u2, max u2 u1, max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) f (AddMonoidAlgebra.single.{u1, u2} R A _inst_1 b (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (Semiring.toOne.{u1} R _inst_1))))))) -> (Exists.{succ u2} A (fun (a : A) => And (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) a (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) f)) (Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
-Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mulₓ'. -/
theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
{f : AddMonoidAlgebra R A} (b x : A)
(hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
@@ -105,12 +87,6 @@ theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
Finset.mem_map] at hx
#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul
-/- warning: add_monoid_algebra.no_zero_divisors.of_left_ordered -> AddMonoidAlgebra.NoZeroDivisors.of_left_ordered is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddRightCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))) (LT.lt.{u2} A (Preorder.toHasLt.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
-but is expected to have type
- forall {R : Type.{u2}} {A : Type.{u1}} [_inst_1 : Semiring.{u2} R] [_inst_2 : NoZeroDivisors.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R _inst_1))) (MonoidWithZero.toZero.{u2} R (Semiring.toMonoidWithZero.{u2} R _inst_1))] [_inst_3 : AddRightCancelSemigroup.{u1} A] [_inst_4 : LinearOrder.{u1} A] [_inst_5 : CovariantClass.{u1, u1} A A (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.587 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.589 : A) => HAdd.hAdd.{u1, u1, u1} A A A (instHAdd.{u1} A (AddSemigroup.toAdd.{u1} A (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.587 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.589) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.602 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.604 : A) => LT.lt.{u1} A (Preorder.toLT.{u1} A (PartialOrder.toPreorder.{u1} A (SemilatticeInf.toPartialOrder.{u1} A (Lattice.toSemilatticeInf.{u1} A (DistribLattice.toLattice.{u1} A (instDistribLattice.{u1} A _inst_4)))))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.602 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.604)], NoZeroDivisors.{max u1 u2} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.hasMul.{u2, u1} R A _inst_1 (AddSemigroup.toAdd.{u1} A (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) (SemigroupWithZero.toZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (NonUnitalSemiring.toSemigroupWithZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.nonUnitalSemiring.{u2, u1} R A _inst_1 (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))))
-Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_orderedₓ'. -/
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigroup A]
@@ -149,12 +125,6 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
exact Finset.min'_lt_of_mem_erase_min' _ _ (finset.mem_erase.mpr ⟨hc, cg⟩)⟩
#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_ordered
-/- warning: add_monoid_algebra.no_zero_divisors.of_right_ordered -> AddMonoidAlgebra.NoZeroDivisors.of_right_ordered is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddLeftCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (Function.swap.{succ u2, succ u2, succ u2} A A (fun (ᾰ : A) (ᾰ : A) => A) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))))) (LT.lt.{u2} A (Preorder.toHasLt.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
-but is expected to have type
- forall {R : Type.{u2}} {A : Type.{u1}} [_inst_1 : Semiring.{u2} R] [_inst_2 : NoZeroDivisors.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R _inst_1))) (MonoidWithZero.toZero.{u2} R (Semiring.toMonoidWithZero.{u2} R _inst_1))] [_inst_3 : AddLeftCancelSemigroup.{u1} A] [_inst_4 : LinearOrder.{u1} A] [_inst_5 : CovariantClass.{u1, u1} A A (Function.swap.{succ u1, succ u1, succ u1} A A (fun (ᾰ : A) (ᾰ : A) => A) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1204 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1206 : A) => HAdd.hAdd.{u1, u1, u1} A A A (instHAdd.{u1} A (AddSemigroup.toAdd.{u1} A (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1204 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1206)) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1219 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1221 : A) => LT.lt.{u1} A (Preorder.toLT.{u1} A (PartialOrder.toPreorder.{u1} A (SemilatticeInf.toPartialOrder.{u1} A (Lattice.toSemilatticeInf.{u1} A (DistribLattice.toLattice.{u1} A (instDistribLattice.{u1} A _inst_4)))))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1219 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1221)], NoZeroDivisors.{max u1 u2} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.hasMul.{u2, u1} R A _inst_1 (AddSemigroup.toAdd.{u1} A (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) (SemigroupWithZero.toZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (NonUnitalSemiring.toSemigroupWithZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.nonUnitalSemiring.{u2, u1} R A _inst_1 (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))))
-Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_orderedₓ'. -/
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a right-ordered add left
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigroup A]
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -107,7 +107,7 @@ theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
/- warning: add_monoid_algebra.no_zero_divisors.of_left_ordered -> AddMonoidAlgebra.NoZeroDivisors.of_left_ordered is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddRightCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))) (LT.lt.{u2} A (Preorder.toLT.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddRightCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))) (LT.lt.{u2} A (Preorder.toHasLt.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
but is expected to have type
forall {R : Type.{u2}} {A : Type.{u1}} [_inst_1 : Semiring.{u2} R] [_inst_2 : NoZeroDivisors.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R _inst_1))) (MonoidWithZero.toZero.{u2} R (Semiring.toMonoidWithZero.{u2} R _inst_1))] [_inst_3 : AddRightCancelSemigroup.{u1} A] [_inst_4 : LinearOrder.{u1} A] [_inst_5 : CovariantClass.{u1, u1} A A (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.587 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.589 : A) => HAdd.hAdd.{u1, u1, u1} A A A (instHAdd.{u1} A (AddSemigroup.toAdd.{u1} A (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.587 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.589) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.602 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.604 : A) => LT.lt.{u1} A (Preorder.toLT.{u1} A (PartialOrder.toPreorder.{u1} A (SemilatticeInf.toPartialOrder.{u1} A (Lattice.toSemilatticeInf.{u1} A (DistribLattice.toLattice.{u1} A (instDistribLattice.{u1} A _inst_4)))))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.602 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.604)], NoZeroDivisors.{max u1 u2} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.hasMul.{u2, u1} R A _inst_1 (AddSemigroup.toAdd.{u1} A (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) (SemigroupWithZero.toZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (NonUnitalSemiring.toSemigroupWithZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.nonUnitalSemiring.{u2, u1} R A _inst_1 (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))))
Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_orderedₓ'. -/
@@ -151,7 +151,7 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
/- warning: add_monoid_algebra.no_zero_divisors.of_right_ordered -> AddMonoidAlgebra.NoZeroDivisors.of_right_ordered is a dubious translation:
lean 3 declaration is
- forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddLeftCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (Function.swap.{succ u2, succ u2, succ u2} A A (fun (ᾰ : A) (ᾰ : A) => A) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))))) (LT.lt.{u2} A (Preorder.toLT.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddLeftCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (Function.swap.{succ u2, succ u2, succ u2} A A (fun (ᾰ : A) (ᾰ : A) => A) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))))) (LT.lt.{u2} A (Preorder.toHasLt.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
but is expected to have type
forall {R : Type.{u2}} {A : Type.{u1}} [_inst_1 : Semiring.{u2} R] [_inst_2 : NoZeroDivisors.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R _inst_1))) (MonoidWithZero.toZero.{u2} R (Semiring.toMonoidWithZero.{u2} R _inst_1))] [_inst_3 : AddLeftCancelSemigroup.{u1} A] [_inst_4 : LinearOrder.{u1} A] [_inst_5 : CovariantClass.{u1, u1} A A (Function.swap.{succ u1, succ u1, succ u1} A A (fun (ᾰ : A) (ᾰ : A) => A) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1204 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1206 : A) => HAdd.hAdd.{u1, u1, u1} A A A (instHAdd.{u1} A (AddSemigroup.toAdd.{u1} A (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1204 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1206)) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1219 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1221 : A) => LT.lt.{u1} A (Preorder.toLT.{u1} A (PartialOrder.toPreorder.{u1} A (SemilatticeInf.toPartialOrder.{u1} A (Lattice.toSemilatticeInf.{u1} A (DistribLattice.toLattice.{u1} A (instDistribLattice.{u1} A _inst_4)))))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1219 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1221)], NoZeroDivisors.{max u1 u2} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.hasMul.{u2, u1} R A _inst_1 (AddSemigroup.toAdd.{u1} A (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) (SemigroupWithZero.toZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (NonUnitalSemiring.toSemigroupWithZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.nonUnitalSemiring.{u2, u1} R A _inst_1 (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))))
Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_orderedₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/1f4705ccdfe1e557fc54a0ce081a05e33d2e6240
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
! This file was ported from Lean 3 source module algebra.monoid_algebra.no_zero_divisors
-! leanprover-community/mathlib commit 3e067975886cf5801e597925328c335609511b1a
+! leanprover-community/mathlib commit 932872382355f00112641d305ba0619305dc8642
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -13,6 +13,9 @@ import Mathbin.Algebra.MonoidAlgebra.Support
/-!
# Variations on non-zero divisors in `add_monoid_algebra`s
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file studies the interaction between typeclass assumptions on two Types `R` and `A` and
whether `add_monoid_algebra R A` has non-zero zero-divisors. For some background on related
questions, see [Kaplansky's Conjectures](https://en.wikipedia.org/wiki/Kaplansky%27s_conjectures),
mathlib commit https://github.com/leanprover-community/mathlib/commit/da3fc4a33ff6bc75f077f691dc94c217b8d41559
@@ -51,6 +51,12 @@ open Finsupp
variable {R A : Type _} [Semiring R]
+/- warning: add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne -> AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Add.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} {a0 : A} {b0 : A}, (forall {a : A} {b : A}, (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) a (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) f)) -> (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) b (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) g)) -> (Or (Ne.{succ u2} A a a0) (Ne.{succ u2} A b b0)) -> (Ne.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a b) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0))) -> (Eq.{succ u1} R (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (fun (_x : AddMonoidAlgebra.{u1, u2} R A _inst_1) => A -> R) (AddMonoidAlgebra.coeFun.{u1, u2} R A _inst_1) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 _inst_2)) f g) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0)) (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (fun (_x : AddMonoidAlgebra.{u1, u2} R A _inst_1) => A -> R) (AddMonoidAlgebra.coeFun.{u1, u2} R A _inst_1) f a0) (coeFn.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (fun (_x : AddMonoidAlgebra.{u1, u2} R A _inst_1) => A -> R) (AddMonoidAlgebra.coeFun.{u1, u2} R A _inst_1) g b0)))
+but is expected to have type
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : Add.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} {a0 : A} {b0 : A}, (forall {a : A} {b : A}, (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) a (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) f)) -> (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) b (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) g)) -> (Or (Ne.{succ u2} A a a0) (Ne.{succ u2} A b b0)) -> (Ne.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a b) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0))) -> (Eq.{succ u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0)) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) A (fun (_x : A) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) _x) (Finsupp.funLike.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) (HMul.hMul.{max u1 u2, max u1 u2, max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 _inst_2)) f g) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A _inst_2) a0 b0)) (HMul.hMul.{u1, u1, u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) b0) ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (instHMul.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (NonUnitalNonAssocSemiring.toMul.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) (Semiring.toNonAssocSemiring.{u1} ((fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) a0) _inst_1)))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) A (fun (_x : A) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) _x) (Finsupp.funLike.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) f a0) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (Finsupp.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) A (fun (_x : A) => (fun (x._@.Mathlib.Data.Finsupp.Defs._hyg.779 : A) => R) _x) (Finsupp.funLike.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1))) g b0)))
+Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_neₓ'. -/
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
@@ -70,6 +76,12 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
section LeftOrRightOrderability
+/- warning: add_monoid_algebra.left.exists_add_of_mem_support_single_mul -> AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddLeftCancelSemigroup.{u2} A] {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} (a : A) (x : A), (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) x (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) (Finsupp.single.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) a (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (AddMonoidWithOne.toOne.{u1} R (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} R (NonAssocSemiring.toAddCommMonoidWithOne.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))))))) g))) -> (Exists.{succ u2} A (fun (b : A) => Exists.{0} (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) b (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) g)) (fun (H : Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) b (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) g)) => Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
+but is expected to have type
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddLeftCancelSemigroup.{u2} A] {g : AddMonoidAlgebra.{u1, u2} R A _inst_1} (a : A) (x : A), (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) x (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (HMul.hMul.{max u2 u1, max u1 u2, max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) (AddMonoidAlgebra.single.{u1, u2} R A _inst_1 a (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (Semiring.toOne.{u1} R _inst_1)))) g))) -> (Exists.{succ u2} A (fun (b : A) => And (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) b (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) g)) (Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
+Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mulₓ'. -/
theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
{g : AddMonoidAlgebra R A} (a x : A)
(hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
@@ -77,6 +89,12 @@ theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
Finset.mem_map] at hx
#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul
+/- warning: add_monoid_algebra.right.exists_add_of_mem_support_single_mul -> AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddRightCancelSemigroup.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} (b : A) (x : A), (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) x (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (HMul.hMul.{max u2 u1, max u2 u1, max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) f (Finsupp.single.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) b (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (AddMonoidWithOne.toOne.{u1} R (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} R (NonAssocSemiring.toAddCommMonoidWithOne.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))))))))) -> (Exists.{succ u2} A (fun (a : A) => Exists.{0} (Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) a (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) f)) (fun (H : Membership.Mem.{u2, u2} A (Finset.{u2} A) (Finset.hasMem.{u2} A) a (Finsupp.support.{u2, u1} A R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) f)) => Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
+but is expected to have type
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : AddRightCancelSemigroup.{u2} A] {f : AddMonoidAlgebra.{u1, u2} R A _inst_1} (b : A) (x : A), (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) x (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) (HMul.hMul.{max u1 u2, max u2 u1, max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.{u1, u2} R A _inst_1) (instHMul.{max u1 u2} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2)))) f (AddMonoidAlgebra.single.{u1, u2} R A _inst_1 b (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (Semiring.toOne.{u1} R _inst_1))))))) -> (Exists.{succ u2} A (fun (a : A) => And (Membership.mem.{u2, u2} A (Finset.{u2} A) (Finset.instMembershipFinset.{u2} A) a (Finsupp.support.{u2, u1} A R (MonoidWithZero.toZero.{u1} R (Semiring.toMonoidWithZero.{u1} R _inst_1)) f)) (Eq.{succ u2} A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_2))) a b) x)))
+Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mulₓ'. -/
theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
{f : AddMonoidAlgebra R A} (b x : A)
(hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
@@ -84,6 +102,12 @@ theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
Finset.mem_map] at hx
#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul
+/- warning: add_monoid_algebra.no_zero_divisors.of_left_ordered -> AddMonoidAlgebra.NoZeroDivisors.of_left_ordered is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddRightCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))) (LT.lt.{u2} A (Preorder.toLT.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddRightCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
+but is expected to have type
+ forall {R : Type.{u2}} {A : Type.{u1}} [_inst_1 : Semiring.{u2} R] [_inst_2 : NoZeroDivisors.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R _inst_1))) (MonoidWithZero.toZero.{u2} R (Semiring.toMonoidWithZero.{u2} R _inst_1))] [_inst_3 : AddRightCancelSemigroup.{u1} A] [_inst_4 : LinearOrder.{u1} A] [_inst_5 : CovariantClass.{u1, u1} A A (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.587 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.589 : A) => HAdd.hAdd.{u1, u1, u1} A A A (instHAdd.{u1} A (AddSemigroup.toAdd.{u1} A (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.587 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.589) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.602 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.604 : A) => LT.lt.{u1} A (Preorder.toLT.{u1} A (PartialOrder.toPreorder.{u1} A (SemilatticeInf.toPartialOrder.{u1} A (Lattice.toSemilatticeInf.{u1} A (DistribLattice.toLattice.{u1} A (instDistribLattice.{u1} A _inst_4)))))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.602 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.604)], NoZeroDivisors.{max u1 u2} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.hasMul.{u2, u1} R A _inst_1 (AddSemigroup.toAdd.{u1} A (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) (SemigroupWithZero.toZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (NonUnitalSemiring.toSemigroupWithZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.nonUnitalSemiring.{u2, u1} R A _inst_1 (AddRightCancelSemigroup.toAddSemigroup.{u1} A _inst_3))))
+Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_orderedₓ'. -/
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigroup A]
@@ -122,6 +146,12 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
exact Finset.min'_lt_of_mem_erase_min' _ _ (finset.mem_erase.mpr ⟨hc, cg⟩)⟩
#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_ordered
+/- warning: add_monoid_algebra.no_zero_divisors.of_right_ordered -> AddMonoidAlgebra.NoZeroDivisors.of_right_ordered is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {A : Type.{u2}} [_inst_1 : Semiring.{u1} R] [_inst_2 : NoZeroDivisors.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1)))) (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R _inst_1))))] [_inst_3 : AddLeftCancelSemigroup.{u2} A] [_inst_4 : LinearOrder.{u2} A] [_inst_5 : CovariantClass.{u2, u2} A A (Function.swap.{succ u2, succ u2, succ u2} A A (fun (ᾰ : A) (ᾰ : A) => A) (HAdd.hAdd.{u2, u2, u2} A A A (instHAdd.{u2} A (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))))) (LT.lt.{u2} A (Preorder.toLT.{u2} A (PartialOrder.toPreorder.{u2} A (SemilatticeInf.toPartialOrder.{u2} A (Lattice.toSemilatticeInf.{u2} A (LinearOrder.toLattice.{u2} A _inst_4))))))], NoZeroDivisors.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.hasMul.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3))) (MulZeroClass.toHasZero.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (NonUnitalNonAssocSemiring.toMulZeroClass.{max u2 u1} (AddMonoidAlgebra.{u1, u2} R A _inst_1) (AddMonoidAlgebra.nonUnitalNonAssocSemiring.{u1, u2} R A _inst_1 (AddSemigroup.toHasAdd.{u2} A (AddLeftCancelSemigroup.toAddSemigroup.{u2} A _inst_3)))))
+but is expected to have type
+ forall {R : Type.{u2}} {A : Type.{u1}} [_inst_1 : Semiring.{u2} R] [_inst_2 : NoZeroDivisors.{u2} R (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R _inst_1))) (MonoidWithZero.toZero.{u2} R (Semiring.toMonoidWithZero.{u2} R _inst_1))] [_inst_3 : AddLeftCancelSemigroup.{u1} A] [_inst_4 : LinearOrder.{u1} A] [_inst_5 : CovariantClass.{u1, u1} A A (Function.swap.{succ u1, succ u1, succ u1} A A (fun (ᾰ : A) (ᾰ : A) => A) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1204 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1206 : A) => HAdd.hAdd.{u1, u1, u1} A A A (instHAdd.{u1} A (AddSemigroup.toAdd.{u1} A (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1204 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1206)) (fun (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1219 : A) (x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1221 : A) => LT.lt.{u1} A (Preorder.toLT.{u1} A (PartialOrder.toPreorder.{u1} A (SemilatticeInf.toPartialOrder.{u1} A (Lattice.toSemilatticeInf.{u1} A (DistribLattice.toLattice.{u1} A (instDistribLattice.{u1} A _inst_4)))))) x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1219 x._@.Mathlib.Algebra.MonoidAlgebra.NoZeroDivisors._hyg.1221)], NoZeroDivisors.{max u1 u2} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.hasMul.{u2, u1} R A _inst_1 (AddSemigroup.toAdd.{u1} A (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))) (SemigroupWithZero.toZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (NonUnitalSemiring.toSemigroupWithZero.{max u2 u1} (AddMonoidAlgebra.{u2, u1} R A _inst_1) (AddMonoidAlgebra.nonUnitalSemiring.{u2, u1} R A _inst_1 (AddLeftCancelSemigroup.toAddSemigroup.{u1} A _inst_3))))
+Case conversion may be inaccurate. Consider using '#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_orderedₓ'. -/
/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a right-ordered add left
cancel semigroup, then `add_monoid_algebra R A` also contains no non-zero zero-divisors. -/
theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigroup A]
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -64,7 +64,7 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
· refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
· by_cases af : a0 ∈ f.support
· exact if_neg (h af bg (Or.inr b0))
- · simp only [not_mem_support_iff.mp af, zero_mul, if_t_t]
+ · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, if_t_t]
· exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -3,7 +3,7 @@ Copyright (c) 2022 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
-import Mathlib.Algebra.MonoidAlgebra.Support
+import Mathlib.Algebra.MonoidAlgebra.Basic
import Mathlib.Algebra.Group.UniqueProds
#align_import algebra.monoid_algebra.no_zero_divisors from "leanprover-community/mathlib"@"3e067975886cf5801e597925328c335609511b1a"
@@ -97,9 +97,9 @@ as a product of monomials in the supports of `f` and `g` is a product. -/
theorem mul_apply_add_eq_mul_of_uniqueAdd [Add A] {f g : R[A]} {a0 b0 : A}
(h : UniqueAdd f.support g.support a0 b0) :
(f * g) (a0 + b0) = f a0 * g b0 :=
-MonoidAlgebra.mul_apply_mul_eq_mul_of_uniqueMul (A := Multiplicative A) h
+ MonoidAlgebra.mul_apply_mul_eq_mul_of_uniqueMul (A := Multiplicative A) h
instance [NoZeroDivisors R] [Add A] [UniqueSums A] : NoZeroDivisors R[A] :=
-MonoidAlgebra.instNoZeroDivisorsOfUniqueProds (A := Multiplicative A)
+ MonoidAlgebra.instNoZeroDivisorsOfUniqueProds (A := Multiplicative A)
end AddMonoidAlgebra
Introduce TwoUniqueProds/Sums
: let R[G]
be a monoid algebra over a semiring R
without zero-divisors. A natural sufficient condition for R[G]
to have no zero-divisors is that G
has UniqueProds
, as is shown by MonoidAlgebra.instNoZeroDivisorsOfUniqueProds. Similarly, a natural sufficient condition for R[G]
to have only trivial units (of the form rg
with r
a unit in R
and g
a unit in G
) is that G
has TwoUniqueProds
, but we don't prove this yet in this PR. TwoUniqueProds G
is also a natural sufficient condition in order for factors of a homogeneous element in an algebra graded by G
without zero-divisors to themselves be homogeneous.
Show TwoUniqueProds
implies UniqueProds
: TwoUniqueProds.toUniqueProds
Strengthen of_Covariant_right/left
to have TwoUniqueProds
as conclusion
Extract of_image_filter
from the proof of the instance UniqueProds (∀ i, G i)
and use it also in the proof of TwoUniqueProds (∀ i, G i)
Use some private defs (starting from private abbrev I
) to transfer (Two)UniqueProds (∀ i, G i)
instances to (Two)UniqueProds (G × H)
Move the [Module ℚ G] : UniqueSums G
instance from NoZeroDivisors.lean to UniqueProds.lean and strengthen to TwoUniqueSums
New lemmas about UniqueMul:
of_card_le_one
, iff_card_le_one
, UniqueMul_of_TwoUniqueMul
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -5,7 +5,6 @@ Authors: Damiano Testa
-/
import Mathlib.Algebra.MonoidAlgebra.Support
import Mathlib.Algebra.Group.UniqueProds
-import Mathlib.LinearAlgebra.Basis.VectorSpace
#align_import algebra.monoid_algebra.no_zero_divisors from "leanprover-community/mathlib"@"3e067975886cf5801e597925328c335609511b1a"
@@ -104,11 +103,3 @@ instance [NoZeroDivisors R] [Add A] [UniqueSums A] : NoZeroDivisors R[A] :=
MonoidAlgebra.instNoZeroDivisorsOfUniqueProds (A := Multiplicative A)
end AddMonoidAlgebra
-
-/-- The proof goes via the equivalence `A ≃ₗ[ℚ] (Basis.ofVectorSpaceIndex ℚ A) →₀ ℚ`,
-i.e. choosing a basis.
-Once we have a basis, we use the embedding into sequences of coordinates and all the instances
-that `ℚ` already has.
--/
-instance [AddCommGroup A] [Module ℚ A] : UniqueSums A :=
- UniqueSums.addHom_image_of_injective _ (Basis.ofVectorSpace ℚ A).repr.injective inferInstance
R[A]
for addMonoidAlgebra R A
(#7203)
Introduce the notation R[A]
for AddMonoidAlgebra R A
. This is to align Mathlib
s notation with the standard notation for group ring.
The notation is scoped in AddMonoidAlgebra
and there is no analogous notation for MonoidAlgebra
.
I only used the notation for single-character R
and A
s and only in the range [a-zA-Z]
.
The extra lines are all in Mathlib/Algebra/MonoidAlgebra/Basic.lean
. They are accounted for by extra text in the doc-module and the actual notation.
Affected files:
Counterexamples/ZeroDivisorsInAddMonoidAlgebras
Algebra/AlgebraicCard
Algebra/MonoidAlgebra/Basic
Algebra/MonoidAlgebra/Degree
Algebra/MonoidAlgebra/Division
Algebra/MonoidAlgebra/Grading
Algebra/MonoidAlgebra/NoZeroDivisors
Algebra/MonoidAlgebra/Support
Data/Polynomial/AlgebraMap
Data/Polynomial/Basic
Data/Polynomial/Eval
Data/Polynomial/Laurent
RingTheory/FiniteType
@@ -13,7 +13,7 @@ import Mathlib.LinearAlgebra.Basis.VectorSpace
# Variations on non-zero divisors in `AddMonoidAlgebra`s
This file studies the interaction between typeclass assumptions on two Types `R` and `A` and
-whether `AddMonoidAlgebra R A` has non-zero zero-divisors. For some background on related
+whether `R[A]` has non-zero zero-divisors. For some background on related
questions, see [Kaplansky's Conjectures](https://en.wikipedia.org/wiki/Kaplansky%27s_conjectures),
especially the *zero divisor conjecture*.
@@ -22,7 +22,7 @@ Let `K` be a field, and `G` a torsion-free group. The group ring `K[G]` does not
nontrivial zero divisors, that is, it is a domain.
In this file we show that if `R` satisfies `NoZeroDivisors` and `A` is a grading type satisfying
-`UniqueProds A` (resp. `UniqueSums A`), then `MonoidAlgebra R A` (resp. `AddMonoidAlgebra R A`)
+`UniqueProds A` (resp. `UniqueSums A`), then `MonoidAlgebra R A` (resp. `R[A]`)
also satisfies `NoZeroDivisors`.
Because of the instances to `UniqueProds/Sums`, we obtain a formalization of the well-known result
@@ -39,15 +39,15 @@ The actual assumptions on `R` are weaker.
* The instance showing that `Semiring R, NoZeroDivisors R, Mul A, UniqueProds A` imply
`NoZeroDivisors (MonoidAlgebra R A)`.
* The instance showing that `Semiring R, NoZeroDivisors R, Add A, UniqueSums A` imply
- `NoZeroDivisors (AddMonoidAlgebra R A)`.
+ `NoZeroDivisors R[A]`.
TODO: move the rest of the docs to UniqueProds?
`NoZeroDivisors.of_left_ordered` shows that if `R` is a semiring with no non-zero
zero-divisors, `A` is a linearly ordered, add right cancel semigroup with strictly monotone
- left addition, then `AddMonoidAlgebra R A` has no non-zero zero-divisors.
+ left addition, then `R[A]` has no non-zero zero-divisors.
* `NoZeroDivisors.of_right_ordered` shows that if `R` is a semiring with no non-zero
zero-divisors, `A` is a linearly ordered, add left cancel semigroup with strictly monotone
- right addition, then `AddMonoidAlgebra R A` has no non-zero zero-divisors.
+ right addition, then `R[A]` has no non-zero zero-divisors.
The conditions on `A` imposed in `NoZeroDivisors.of_left_ordered` are sometimes referred to as
`left-ordered`.
@@ -95,12 +95,12 @@ namespace AddMonoidAlgebra
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
-theorem mul_apply_add_eq_mul_of_uniqueAdd [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
+theorem mul_apply_add_eq_mul_of_uniqueAdd [Add A] {f g : R[A]} {a0 b0 : A}
(h : UniqueAdd f.support g.support a0 b0) :
(f * g) (a0 + b0) = f a0 * g b0 :=
MonoidAlgebra.mul_apply_mul_eq_mul_of_uniqueMul (A := Multiplicative A) h
-instance [NoZeroDivisors R] [Add A] [UniqueSums A] : NoZeroDivisors (AddMonoidAlgebra R A) :=
+instance [NoZeroDivisors R] [Add A] [UniqueSums A] : NoZeroDivisors R[A] :=
MonoidAlgebra.instNoZeroDivisorsOfUniqueProds (A := Multiplicative A)
end AddMonoidAlgebra
Add UniqueProds/Sums
and NoZeroDivisors
instances.
This has recently been prompted by the port of the Lindemann-Weierstrass Theorem, but the results are self-contained. Instances such as the ones in this PR are the reasons why UniqueProds/Sums
were introduced.
Affected files:
Algebra/
Group/UniqueProds.lean
MonoidAlgebra/NoZeroDivisors.lean
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -4,6 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-/
import Mathlib.Algebra.MonoidAlgebra.Support
+import Mathlib.Algebra.Group.UniqueProds
+import Mathlib.LinearAlgebra.Basis.VectorSpace
#align_import algebra.monoid_algebra.no_zero_divisors from "leanprover-community/mathlib"@"3e067975886cf5801e597925328c335609511b1a"
@@ -19,13 +21,28 @@ _Conjecture._
Let `K` be a field, and `G` a torsion-free group. The group ring `K[G]` does not contain
nontrivial zero divisors, that is, it is a domain.
-We formalize in this file the well-known result that if `R` is a field and `A` is a left-ordered
-group, then `R[A]` contains no non-zero zero-divisors. Some of these assumptions can be trivially
-weakened: below we mention what assumptions are sufficient for the proofs in this file.
+In this file we show that if `R` satisfies `NoZeroDivisors` and `A` is a grading type satisfying
+`UniqueProds A` (resp. `UniqueSums A`), then `MonoidAlgebra R A` (resp. `AddMonoidAlgebra R A`)
+also satisfies `NoZeroDivisors`.
+
+Because of the instances to `UniqueProds/Sums`, we obtain a formalization of the well-known result
+that if `R` is a field and `A` is a left-ordered group, then `R[A]` contains no non-zero
+zero-divisors.
+The actual assumptions on `R` are weaker.
## Main results
-* `NoZeroDivisors.of_left_ordered` shows that if `R` is a semiring with no non-zero
+* `MonoidAlgebra.mul_apply_mul_eq_mul_of_uniqueMul` and
+ `AddMonoidAlgebra.mul_apply_add_eq_mul_of_uniqueAdd`
+ general sufficient results stating that certain monomials in a product have as coefficient a
+ product of coefficients of the factors.
+* The instance showing that `Semiring R, NoZeroDivisors R, Mul A, UniqueProds A` imply
+ `NoZeroDivisors (MonoidAlgebra R A)`.
+* The instance showing that `Semiring R, NoZeroDivisors R, Add A, UniqueSums A` imply
+ `NoZeroDivisors (AddMonoidAlgebra R A)`.
+
+TODO: move the rest of the docs to UniqueProds?
+ `NoZeroDivisors.of_left_ordered` shows that if `R` is a semiring with no non-zero
zero-divisors, `A` is a linearly ordered, add right cancel semigroup with strictly monotone
left addition, then `AddMonoidAlgebra R A` has no non-zero zero-divisors.
* `NoZeroDivisors.of_right_ordered` shows that if `R` is a semiring with no non-zero
@@ -41,124 +58,57 @@ These conditions are sufficient, but not necessary. As mentioned above, *Kaplan
asserts that `A` being torsion-free may be enough.
-/
-
-namespace AddMonoidAlgebra
-
open Finsupp
variable {R A : Type*} [Semiring R]
+namespace MonoidAlgebra
+
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
-theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
- (h : ∀ {a b : A}, a ∈ f.support → b ∈ g.support → a ≠ a0 ∨ b ≠ b0 → a + b ≠ a0 + b0) :
- (f * g) (a0 + b0) = f a0 * g b0 := by
+theorem mul_apply_mul_eq_mul_of_uniqueMul [Mul A] {f g : MonoidAlgebra R A} {a0 b0 : A}
+ (h : UniqueMul f.support g.support a0 b0) :
+ (f * g) (a0 * b0) = f a0 * g b0 := by
classical
- rw [mul_apply]
- refine' (Finset.sum_eq_single a0 _ _).trans _
- · exact fun b H hb => Finset.sum_eq_zero fun x H1 => if_neg (h H H1 (Or.inl hb))
- · exact fun af0 => by simp [not_mem_support_iff.mp af0]
- · refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
- · by_cases af : a0 ∈ f.support
- · exact if_neg (h af bg (Or.inr b0))
- · simp only [not_mem_support_iff.mp af, zero_mul, ite_self]
- · exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
-#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne
-
-section LeftOrRightOrderability
-
-theorem Left.exists_add_of_mem_support_single_mul [AddLeftCancelSemigroup A]
- {g : AddMonoidAlgebra R A} (a x : A)
- (hx : x ∈ (single a 1 * g : AddMonoidAlgebra R A).support) : ∃ b ∈ g.support, a + b = x := by
- rwa [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _),
- Finset.mem_map] at hx
-#align add_monoid_algebra.left.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Left.exists_add_of_mem_support_single_mul
-
-theorem Right.exists_add_of_mem_support_single_mul [AddRightCancelSemigroup A]
- {f : AddMonoidAlgebra R A} (b x : A)
- (hx : x ∈ (f * single b 1 : AddMonoidAlgebra R A).support) : ∃ a ∈ f.support, a + b = x := by
- rwa [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _),
- Finset.mem_map] at hx
-#align add_monoid_algebra.right.exists_add_of_mem_support_single_mul AddMonoidAlgebra.Right.exists_add_of_mem_support_single_mul
-
-/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a left-ordered add right
-cancel semigroup, then `AddMonoidAlgebra R A` also contains no non-zero zero-divisors. -/
-theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigroup A]
- [LinearOrder A] [CovariantClass A A (· + ·) (· < ·)] : NoZeroDivisors (AddMonoidAlgebra R A) :=
- ⟨@fun f g fg => by
- contrapose! fg
- let gmin : A := g.support.min' (support_nonempty_iff.mpr fg.2)
- refine' support_nonempty_iff.mp _
- obtain ⟨a, ha, H⟩ :=
- Right.exists_add_of_mem_support_single_mul gmin
- ((f * single gmin 1 : AddMonoidAlgebra R A).support.min'
- (by rw [support_mul_single] <;> simp [support_nonempty_iff.mpr fg.1]))
- (Finset.min'_mem _ _)
- refine' ⟨a + gmin, mem_support_iff.mpr _⟩
- rw [mul_apply_add_eq_mul_of_forall_ne _]
- · refine' mul_ne_zero _ _
- exacts [mem_support_iff.mp ha, mem_support_iff.mp (Finset.min'_mem _ _)]
- · rw [H]
- rintro b c bf cg (hb | hc) <;> refine' ne_of_gt _
- · refine' lt_of_lt_of_le (_ : _ < b + gmin) _
- · apply Finset.min'_lt_of_mem_erase_min'
- rw [← H]
- apply Finset.mem_erase_of_ne_of_mem
- · simpa only [Ne.def, add_left_inj]
- · rw [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _)]
- simpa only [Finset.mem_map, addRightEmbedding_apply, add_left_inj, exists_prop,
- exists_eq_right]
- · haveI : CovariantClass A A (· + ·) (· ≤ ·) := covariantClass_le_of_lt A A _
- exact add_le_add_left (Finset.min'_le _ _ cg) _
- · refine' lt_of_le_of_lt (_ : _ ≤ b + gmin) _
- · apply Finset.min'_le
- rw [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _)]
- simp only [bf, Finset.mem_map, addRightEmbedding_apply, add_left_inj, exists_prop,
- exists_eq_right]
- · refine' add_lt_add_left _ _
- exact Finset.min'_lt_of_mem_erase_min' _ _ (Finset.mem_erase.mpr ⟨hc, cg⟩)⟩
-#align add_monoid_algebra.no_zero_divisors.of_left_ordered AddMonoidAlgebra.NoZeroDivisors.of_left_ordered
-
-/-- If `R` is a semiring with no non-trivial zero-divisors and `A` is a right-ordered add left
-cancel semigroup, then `AddMonoidAlgebra R A` also contains no non-zero zero-divisors. -/
-theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigroup A]
- [LinearOrder A] [CovariantClass A A (Function.swap (· + ·)) (· < ·)] :
- NoZeroDivisors (AddMonoidAlgebra R A) :=
- ⟨@fun f g fg => by
- contrapose! fg
- let fmin : A := f.support.min' (support_nonempty_iff.mpr fg.1)
- refine' support_nonempty_iff.mp _
- obtain ⟨a, ha, H⟩ :=
- Left.exists_add_of_mem_support_single_mul fmin
- ((single fmin 1 * g : AddMonoidAlgebra R A).support.min'
- (by rw [support_single_mul] <;> simp [support_nonempty_iff.mpr fg.2]))
- (Finset.min'_mem _ _)
- refine' ⟨fmin + a, mem_support_iff.mpr _⟩
- rw [mul_apply_add_eq_mul_of_forall_ne _]
- · refine' mul_ne_zero _ _
- exacts [mem_support_iff.mp (Finset.min'_mem _ _), mem_support_iff.mp ha]
- · rw [H]
- rintro b c bf cg (hb | hc) <;> refine' ne_of_gt _
- · refine' lt_of_le_of_lt (_ : _ ≤ fmin + c) _
- · apply Finset.min'_le
- rw [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _)]
- simp only [cg, Finset.mem_map, addLeftEmbedding_apply, add_right_inj, exists_prop,
- exists_eq_right]
- · refine' add_lt_add_right _ _
- exact Finset.min'_lt_of_mem_erase_min' _ _ (Finset.mem_erase.mpr ⟨hb, bf⟩)
- · refine' lt_of_lt_of_le (_ : _ < fmin + c) _
- · apply Finset.min'_lt_of_mem_erase_min'
- rw [← H]
- apply Finset.mem_erase_of_ne_of_mem
- · simpa only [Ne.def, add_right_inj]
- · rw [support_single_mul _ _ (fun y => by rw [one_mul] : ∀ y : R, 1 * y = 0 ↔ _)]
- simpa only [Finset.mem_map, addLeftEmbedding_apply, add_right_inj, exists_prop,
- exists_eq_right]
- · haveI : CovariantClass A A (Function.swap (· + ·)) (· ≤ ·) :=
- covariantClass_le_of_lt A A _
- exact add_le_add_right (Finset.min'_le _ _ bf) _⟩
-#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_ordered
-
-end LeftOrRightOrderability
+ simp_rw [mul_apply, sum, ← Finset.sum_product']
+ refine' (Finset.sum_eq_single (a0, b0) _ _).trans (if_pos rfl) <;> simp_rw [Finset.mem_product]
+ · refine fun ab hab hne => if_neg (fun he => hne <| Prod.ext ?_ ?_)
+ exacts [(h hab.1 hab.2 he).1, (h hab.1 hab.2 he).2]
+ · refine fun hnmem => ite_eq_right_iff.mpr (fun _ => ?_)
+ rcases not_and_or.mp hnmem with af | bg
+ · rw [not_mem_support_iff.mp af, zero_mul]
+ · rw [not_mem_support_iff.mp bg, mul_zero]
+
+instance instNoZeroDivisorsOfUniqueProds [NoZeroDivisors R] [Mul A] [UniqueProds A] :
+ NoZeroDivisors (MonoidAlgebra R A) where
+ eq_zero_or_eq_zero_of_mul_eq_zero {a b} ab := by
+ contrapose! ab
+ obtain ⟨da, a0, db, b0, h⟩ := UniqueProds.uniqueMul_of_nonempty
+ (support_nonempty_iff.mpr ab.1) (support_nonempty_iff.mpr ab.2)
+ refine support_nonempty_iff.mp ⟨da * db, ?_⟩
+ rw [mem_support_iff] at a0 b0 ⊢
+ exact mul_apply_mul_eq_mul_of_uniqueMul h ▸ mul_ne_zero a0 b0
+
+end MonoidAlgebra
+
+namespace AddMonoidAlgebra
+
+/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
+as a product of monomials in the supports of `f` and `g` is a product. -/
+theorem mul_apply_add_eq_mul_of_uniqueAdd [Add A] {f g : AddMonoidAlgebra R A} {a0 b0 : A}
+ (h : UniqueAdd f.support g.support a0 b0) :
+ (f * g) (a0 + b0) = f a0 * g b0 :=
+MonoidAlgebra.mul_apply_mul_eq_mul_of_uniqueMul (A := Multiplicative A) h
+
+instance [NoZeroDivisors R] [Add A] [UniqueSums A] : NoZeroDivisors (AddMonoidAlgebra R A) :=
+MonoidAlgebra.instNoZeroDivisorsOfUniqueProds (A := Multiplicative A)
end AddMonoidAlgebra
+
+/-- The proof goes via the equivalence `A ≃ₗ[ℚ] (Basis.ofVectorSpaceIndex ℚ A) →₀ ℚ`,
+i.e. choosing a basis.
+Once we have a basis, we use the embedding into sequences of coordinates and all the instances
+that `ℚ` already has.
+-/
+instance [AddCommGroup A] [Module ℚ A] : UniqueSums A :=
+ UniqueSums.addHom_image_of_injective _ (Basis.ofVectorSpace ℚ A).repr.injective inferInstance
4 files have major changes:
Algebra/CovariantAndContravariant.lean
contravariant_le_iff_contravariant_lt_and_eq
.covariantClass_le_of_lt
generalizing and replacing Mul.to_covariantClass_left/right
in Algebra/Order/Monoid/Defs.leanCommSemigroup
by IsSymmOp N N mu
and replace CancelSemigroup
by IsMulCancel
, removing superfluous associativity assumption.covariant_lt_of_covariant_le_of_contravariant_eq
and contravariant_le_of_contravariant_eq_and_lt
that could replace eight instances when appropriate refactoring is in place.Algebra/Order/Monoid/Lemmas.lean
mul_eq_mul_iff_eq_and_eq
and remove the less general Left/Right.mul_eq_mul_iff_eq_and_eq
.mul_le_mul_iff_of_ge
.min_le_max_of_mul_le_mul
.min_lt_max_of_mul_lt_mul
here from Algebra/GroupPower/Order.lean.CommSemigroup
by IsSymmOp
.Algebra/Order/Monoid/Basic.lean
eq_and_eq_of_le_of_le_of_mul_le
as it's just one direction of mul_le_mul_iff_of_ge
but with more assumptions.Algebra/Order/Ring/Lemmas.lean
mul_eq_mul_iff_eq_and_eq_of_pos
Changes to Algebra/Group/UniqueProds.lean and Algebra/MonoidAlgebra/NoZeroDivisors.lean are in declarations that will be removed by #6723.
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -108,7 +108,7 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
· rw [support_mul_single _ _ (fun y => by rw [mul_one] : ∀ y : R, y * 1 = 0 ↔ _)]
simpa only [Finset.mem_map, addRightEmbedding_apply, add_left_inj, exists_prop,
exists_eq_right]
- · haveI : CovariantClass A A (· + ·) (· ≤ ·) := Add.to_covariantClass_left A
+ · haveI : CovariantClass A A (· + ·) (· ≤ ·) := covariantClass_le_of_lt A A _
exact add_le_add_left (Finset.min'_le _ _ cg) _
· refine' lt_of_le_of_lt (_ : _ ≤ b + gmin) _
· apply Finset.min'_le
@@ -155,7 +155,7 @@ theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigro
simpa only [Finset.mem_map, addLeftEmbedding_apply, add_right_inj, exists_prop,
exists_eq_right]
· haveI : CovariantClass A A (Function.swap (· + ·)) (· ≤ ·) :=
- Add.to_covariantClass_right A
+ covariantClass_le_of_lt A A _
exact add_le_add_right (Finset.min'_le _ _ bf) _⟩
#align add_monoid_algebra.no_zero_divisors.of_right_ordered AddMonoidAlgebra.NoZeroDivisors.of_right_ordered
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -61,7 +61,7 @@ theorem mul_apply_add_eq_mul_of_forall_ne [Add A] {f g : AddMonoidAlgebra R A} {
· refine' (Finset.sum_eq_single b0 (fun b bg b0 => _) _).trans (if_pos rfl)
· by_cases af : a0 ∈ f.support
· exact if_neg (h af bg (Or.inr b0))
- · simp only [not_mem_support_iff.mp af, MulZeroClass.zero_mul, ite_self]
+ · simp only [not_mem_support_iff.mp af, zero_mul, ite_self]
· exact fun bf0 => by simp [not_mem_support_iff.mp bf0]
#align add_monoid_algebra.mul_apply_add_eq_mul_of_forall_ne AddMonoidAlgebra.mul_apply_add_eq_mul_of_forall_ne
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -46,7 +46,7 @@ namespace AddMonoidAlgebra
open Finsupp
-variable {R A : Type _} [Semiring R]
+variable {R A : Type*} [Semiring R]
/-- The coefficient of a monomial in a product `f * g` that can be reached in at most one way
as a product of monomials in the supports of `f` and `g` is a product. -/
@@ -2,14 +2,11 @@
Copyright (c) 2022 Damiano Testa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Damiano Testa
-
-! This file was ported from Lean 3 source module algebra.monoid_algebra.no_zero_divisors
-! leanprover-community/mathlib commit 3e067975886cf5801e597925328c335609511b1a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Algebra.MonoidAlgebra.Support
+#align_import algebra.monoid_algebra.no_zero_divisors from "leanprover-community/mathlib"@"3e067975886cf5801e597925328c335609511b1a"
+
/-!
# Variations on non-zero divisors in `AddMonoidAlgebra`s
@@ -100,7 +100,7 @@ theorem NoZeroDivisors.of_left_ordered [NoZeroDivisors R] [AddRightCancelSemigro
refine' ⟨a + gmin, mem_support_iff.mpr _⟩
rw [mul_apply_add_eq_mul_of_forall_ne _]
· refine' mul_ne_zero _ _
- exacts[mem_support_iff.mp ha, mem_support_iff.mp (Finset.min'_mem _ _)]
+ exacts [mem_support_iff.mp ha, mem_support_iff.mp (Finset.min'_mem _ _)]
· rw [H]
rintro b c bf cg (hb | hc) <;> refine' ne_of_gt _
· refine' lt_of_lt_of_le (_ : _ < b + gmin) _
@@ -139,7 +139,7 @@ theorem NoZeroDivisors.of_right_ordered [NoZeroDivisors R] [AddLeftCancelSemigro
refine' ⟨fmin + a, mem_support_iff.mpr _⟩
rw [mul_apply_add_eq_mul_of_forall_ne _]
· refine' mul_ne_zero _ _
- exacts[mem_support_iff.mp (Finset.min'_mem _ _), mem_support_iff.mp ha]
+ exacts [mem_support_iff.mp (Finset.min'_mem _ _), mem_support_iff.mp ha]
· rw [H]
rintro b c bf cg (hb | hc) <;> refine' ne_of_gt _
· refine' lt_of_le_of_lt (_ : _ ≤ fmin + c) _
The unported dependencies are