-
Notifications
You must be signed in to change notification settings - Fork 82
The Bell numbers #1315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
The Bell numbers #1315
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f28be90
some notes
EgbertRijke 8c43545
Merge branch 'master' into jhu-seminar
EgbertRijke 23263f7
period
EgbertRijke c797698
Merge branch 'master' of github.com:UniMath/agda-unimath into jhu-sem…
EgbertRijke bd20b0f
Merge branch 'jhu-seminar' of github.com:EgbertRijke/agda-unimath int…
EgbertRijke b19e25b
edit
EgbertRijke eaa2548
review + pre-commit
EgbertRijke 33aa738
Merge branch 'master' into jhu-seminar
EgbertRijke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# The Bell numbers | ||
|
||
```agda | ||
module elementary-number-theory.bell-numbers where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import elementary-number-theory.binomial-coefficients | ||
open import elementary-number-theory.multiplication-natural-numbers | ||
open import elementary-number-theory.natural-numbers | ||
open import elementary-number-theory.strict-inequality-natural-numbers | ||
open import elementary-number-theory.strong-induction-natural-numbers | ||
open import elementary-number-theory.sums-of-natural-numbers | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
The {{#concept "Bell numbers" Agda=bell-number-ℕ WDID=Q816063 WD="Bell number"}} | ||
count the number of ways to partition a set of size $n$. The Bell numbers can be | ||
defined recursively by $B_0 := 1$ and | ||
|
||
$$ | ||
B_{n+1} := \sum_{k=0}^{n} \binom{n}{k}B_k. | ||
$$ | ||
|
||
The Bell numbers are listed as sequence A000110 in the | ||
[OEIS](literature.oeis.md) {{#cite OEIS}}. | ||
|
||
## Definitions | ||
|
||
### The Bell numbers | ||
|
||
```agda | ||
bell-number-ℕ : ℕ → ℕ | ||
bell-number-ℕ = | ||
strong-rec-ℕ 1 | ||
( λ n B → | ||
bounded-sum-ℕ | ||
( succ-ℕ n) | ||
( λ k H → | ||
binomial-coefficient-ℕ n k *ℕ B k (leq-le-succ-ℕ k n H))) | ||
``` | ||
|
||
## References | ||
|
||
{{#bibliography}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.