Repeating elements in multisets #
Main definitions #
replicate n ais the multiset containing onlyawith multiplicityn
replicate n a is the multiset containing only a with multiplicity n.
Instances For
theorem
Multiset.coe_replicate
{α : Type u_1}
(n : ℕ)
(a : α)
:
↑(List.replicate n a) = replicate n a
@[simp]
@[simp]
Alias of the reverse direction of Multiset.eq_replicate_card.
theorem
Multiset.replicate_right_injective
{α : Type u_1}
{n : ℕ}
(hn : n ≠ 0)
:
Function.Injective (replicate n)
@[simp]
theorem
Multiset.replicate_left_injective
{α : Type u_1}
(a : α)
:
Function.Injective fun (x : ℕ) => replicate x a
Multiplicity of an element #
@[simp]