Stirling numbers of the second kind
Content created by Fredrik Bakke, Jonathan Prieto-Cubides and Egbert Rijke.
Created on 2022-02-15.
Last modified on 2023-05-13.
module elementary-number-theory.stirling-numbers-of-the-second-kind where
Imports
open import elementary-number-theory.addition-natural-numbers open import elementary-number-theory.multiplication-natural-numbers open import elementary-number-theory.natural-numbers
Idea
The stirling number of the second kind {n m}
is the number of surjective maps
from the standard n
-element set to the standard m
-element set
Definition
stirling-number-second-kind : ℕ → ℕ → ℕ stirling-number-second-kind zero-ℕ zero-ℕ = 1 stirling-number-second-kind zero-ℕ (succ-ℕ n) = 0 stirling-number-second-kind (succ-ℕ m) zero-ℕ = 0 stirling-number-second-kind (succ-ℕ m) (succ-ℕ n) = ( (succ-ℕ n) *ℕ (stirling-number-second-kind m (succ-ℕ n))) +ℕ ( stirling-number-second-kind m n)
Recent changes
- 2023-05-13. Fredrik Bakke. Refactor to use infix binary operators for arithmetic (#620).
- 2023-03-13. Jonathan Prieto-Cubides. More maintenance (#506).
- 2023-03-07. Fredrik Bakke. Add blank lines between
<details>
tags and markdown syntax (#490). - 2023-03-07. Jonathan Prieto-Cubides. Show module declarations (#488).
- 2023-03-06. Fredrik Bakke. Remove redundant whitespace in headers (#486).