Skip to content

Commit

Permalink
chore: add a couple of to_additives (#7535)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjbest committed Oct 6, 2023
1 parent 8ec1ec7 commit fb3884a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Mathlib/Algebra/BigOperators/Multiset/Basic.lean
Expand Up @@ -117,6 +117,7 @@ theorem prod_add (s t : Multiset α) : prod (s + t) = prod s * prod t :=
#align multiset.prod_add Multiset.prod_add
#align multiset.sum_add Multiset.sum_add

@[to_additive]
theorem prod_nsmul (m : Multiset α) : ∀ n : ℕ, (n • m).prod = m.prod ^ n
| 0 => by
rw [zero_nsmul, pow_zero]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Finsupp/Multiset.lean
Expand Up @@ -80,7 +80,7 @@ theorem toMultiset_map (f : α →₀ ℕ) (g : α → β) :
rfl
#align finsupp.to_multiset_map Finsupp.toMultiset_map

@[simp]
@[to_additive (attr := simp)]
theorem prod_toMultiset [CommMonoid α] (f : α →₀ ℕ) :
f.toMultiset.prod = f.prod fun a n => a ^ n := by
refine' f.induction _ _
Expand Down

0 comments on commit fb3884a

Please sign in to comment.