The Finsupp
counterpart of Multiset.antidiagonal
. #
The antidiagonal of s : α →₀ ℕ
consists of
all pairs (t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)
such that t₁ + t₂ = s
.
The Finsupp
counterpart of Multiset.antidiagonal
: the antidiagonal of
s : α →₀ ℕ
consists of all pairs (t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)
such that t₁ + t₂ = s
.
The finitely supported function antidiagonal s
is equal to the multiplicities of these pairs.
Equations
- Finsupp.antidiagonal' f = ↑Multiset.toFinsupp (Multiset.map (Prod.map ↑Multiset.toFinsupp ↑Multiset.toFinsupp) (Multiset.antidiagonal (↑Finsupp.toMultiset f)))
Instances For
The antidiagonal of s : α →₀ ℕ
is the finset of all pairs (t₁, t₂) : (α →₀ ℕ) × (α →₀ ℕ)
such that t₁ + t₂ = s
.
Equations
- Finsupp.antidiagonal f = (Finsupp.antidiagonal' f).support
Instances For
theorem
Finsupp.swap_mem_antidiagonal
{α : Type u}
[DecidableEq α]
{n : α →₀ ℕ}
{f : (α →₀ ℕ) × (α →₀ ℕ)}
:
Prod.swap f ∈ Finsupp.antidiagonal n ↔ f ∈ Finsupp.antidiagonal n
@[simp]
theorem
Finsupp.sum_antidiagonal_swap
{α : Type u}
[DecidableEq α]
{M : Type u_1}
[AddCommMonoid M]
(n : α →₀ ℕ)
(f : (α →₀ ℕ) → (α →₀ ℕ) → M)
:
(Finset.sum (Finsupp.antidiagonal n) fun p => f p.fst p.snd) = Finset.sum (Finsupp.antidiagonal n) fun p => f p.snd p.fst
theorem
Finsupp.prod_antidiagonal_swap
{α : Type u}
[DecidableEq α]
{M : Type u_1}
[CommMonoid M]
(n : α →₀ ℕ)
(f : (α →₀ ℕ) → (α →₀ ℕ) → M)
:
(Finset.prod (Finsupp.antidiagonal n) fun p => f p.fst p.snd) = Finset.prod (Finsupp.antidiagonal n) fun p => f p.snd p.fst
@[simp]
theorem
Finsupp.antidiagonal_single
{α : Type u}
[DecidableEq α]
(a : α)
(n : ℕ)
:
(Finsupp.antidiagonal fun₀ | a => n) = Finset.map
(Function.Embedding.prodMap { toFun := Finsupp.single a, inj' := (_ : Function.Injective (Finsupp.single a)) }
{ toFun := Finsupp.single a, inj' := (_ : Function.Injective (Finsupp.single a)) })
(Finset.Nat.antidiagonal n)