Documentation

Mathlib.Data.Multiset.NatAntidiagonal

Antidiagonals in ℕ × ℕ as multisets #

This file defines the antidiagonals of ℕ × ℕ as multisets: the n-th antidiagonal is the multiset 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 file Data.List.NatAntidiagonal and is further refined by file Data.Finset.NatAntidiagonal.

The antidiagonal of a natural number n is the multiset of pairs (i, j) such that i + j = n.

Equations
Instances For
    @[simp]

    A pair (i, j) is contained in the antidiagonal of n if and only if i + j = n.

    @[simp]
    theorem Multiset.Nat.card_antidiagonal (n : ) :
    Multiset.card (Multiset.Nat.antidiagonal n) = n + 1

    The cardinality of the antidiagonal of n is n+1.

    @[simp]

    The antidiagonal of 0 is the list [(0, 0)]

    @[simp]

    The antidiagonal of n does not contain duplicate entries.