Mathlib Map

Theorems · Definition · combinatorics

List.Nat.antidiagonalTuple

(k : ℕ) → ℕ → List (Fin k → ℕ)

List.antidiagonalTuple k n is a list of all k-tuples which sum to n. This list contains no duplicates (List.Nat.nodup_antidiagonalTuple), and is sorted lexicographically (List.Nat.antidiagonalTuple_pairwise_pi_lex), starting with ![0, ..., n] and ending with ![n, ..., 0]. `` #eval antidiagonalTuple 3 2 -- [![0, 0, 2], ![0, 1, 1], ![0, 2, 0], ![1, 0, 1], ![1, 1, 0], ![2, 0, 0]] ``

Defined in
Mathlib.Data.Fin.Tuple.NatAntidiagonal
Cited by
9 results in Mathlib
Foundations
Depth 32 from the axioms · uses propext

Around this declaration

Dashed lines are statement dependencies; solid lines are citations in proofs.

Cites0

Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.

Nothing in Mathlib beyond the foundations.

Cited by10

Results whose statement or proof uses this declaration.