Antidiagonals in ℕ × ℕ as finsets #
This file defines the antidiagonals of ℕ × ℕ as finsets: the n
-th antidiagonal is the finset of
pairs (i, j)
such that i + j = n
. This is useful for polynomial multiplication and more
generally for sums going from 0
to n
.
Notes #
This refines files Data.List.NatAntidiagonal
and Data.Multiset.NatAntidiagonal
.
The antidiagonal of a natural number n
is
the finset of pairs (i, j)
such that i + j = n
.
Equations
- Finset.Nat.antidiagonal n = { val := Multiset.Nat.antidiagonal n, nodup := (_ : Multiset.Nodup (Multiset.Nat.antidiagonal n)) }
Instances For
The cardinality of the antidiagonal of n
is n + 1
.
The antidiagonal of 0
is the list [(0, 0)]
See also Finset.map.map_prodComm_antidiagonal
.
A point in the antidiagonal is determined by its first co-ordinate (subtype version of
antidiagonal_congr
). This lemma is used by the ext
tactic.
The disjoint union of antidiagonals Σ (n : ℕ), antidiagonal n
is equivalent to the product
ℕ × ℕ
. This is such an equivalence, obtained by mapping (n, (k, l))
to (k, l)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The set antidiagonal n
is equivalent to Fin (n+1)
, via the first projection. -
Equations
- One or more equations did not get rendered due to their size.