![]() |
Metamath Proof Explorer |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > MPE Home > Th. List > bcval | Structured version Visualization version GIF version |
Description: Value of the binomial coefficient, 𝑁 choose 𝐾. Definition of binomial coefficient in [Gleason] p. 295. As suggested by Gleason, we define it to be 0 when 0 ≤ 𝐾 ≤ 𝑁 does not hold. See bcval2 13661 for the value in the standard domain. (Contributed by NM, 10-Jul-2005.) (Revised by Mario Carneiro, 7-Nov-2013.) |
Ref | Expression |
---|---|
bcval | ⊢ ((𝑁 ∈ ℕ0 ∧ 𝐾 ∈ ℤ) → (𝑁C𝐾) = if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0)) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | oveq2 7143 | . . . 4 ⊢ (𝑛 = 𝑁 → (0...𝑛) = (0...𝑁)) | |
2 | 1 | eleq2d 2875 | . . 3 ⊢ (𝑛 = 𝑁 → (𝑘 ∈ (0...𝑛) ↔ 𝑘 ∈ (0...𝑁))) |
3 | fveq2 6645 | . . . 4 ⊢ (𝑛 = 𝑁 → (!‘𝑛) = (!‘𝑁)) | |
4 | fvoveq1 7158 | . . . . 5 ⊢ (𝑛 = 𝑁 → (!‘(𝑛 − 𝑘)) = (!‘(𝑁 − 𝑘))) | |
5 | 4 | oveq1d 7150 | . . . 4 ⊢ (𝑛 = 𝑁 → ((!‘(𝑛 − 𝑘)) · (!‘𝑘)) = ((!‘(𝑁 − 𝑘)) · (!‘𝑘))) |
6 | 3, 5 | oveq12d 7153 | . . 3 ⊢ (𝑛 = 𝑁 → ((!‘𝑛) / ((!‘(𝑛 − 𝑘)) · (!‘𝑘))) = ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘)))) |
7 | 2, 6 | ifbieq1d 4448 | . 2 ⊢ (𝑛 = 𝑁 → if(𝑘 ∈ (0...𝑛), ((!‘𝑛) / ((!‘(𝑛 − 𝑘)) · (!‘𝑘))), 0) = if(𝑘 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘))), 0)) |
8 | eleq1 2877 | . . 3 ⊢ (𝑘 = 𝐾 → (𝑘 ∈ (0...𝑁) ↔ 𝐾 ∈ (0...𝑁))) | |
9 | oveq2 7143 | . . . . . 6 ⊢ (𝑘 = 𝐾 → (𝑁 − 𝑘) = (𝑁 − 𝐾)) | |
10 | 9 | fveq2d 6649 | . . . . 5 ⊢ (𝑘 = 𝐾 → (!‘(𝑁 − 𝑘)) = (!‘(𝑁 − 𝐾))) |
11 | fveq2 6645 | . . . . 5 ⊢ (𝑘 = 𝐾 → (!‘𝑘) = (!‘𝐾)) | |
12 | 10, 11 | oveq12d 7153 | . . . 4 ⊢ (𝑘 = 𝐾 → ((!‘(𝑁 − 𝑘)) · (!‘𝑘)) = ((!‘(𝑁 − 𝐾)) · (!‘𝐾))) |
13 | 12 | oveq2d 7151 | . . 3 ⊢ (𝑘 = 𝐾 → ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘))) = ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾)))) |
14 | 8, 13 | ifbieq1d 4448 | . 2 ⊢ (𝑘 = 𝐾 → if(𝑘 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘))), 0) = if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0)) |
15 | df-bc 13659 | . 2 ⊢ C = (𝑛 ∈ ℕ0, 𝑘 ∈ ℤ ↦ if(𝑘 ∈ (0...𝑛), ((!‘𝑛) / ((!‘(𝑛 − 𝑘)) · (!‘𝑘))), 0)) | |
16 | ovex 7168 | . . 3 ⊢ ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))) ∈ V | |
17 | c0ex 10624 | . . 3 ⊢ 0 ∈ V | |
18 | 16, 17 | ifex 4473 | . 2 ⊢ if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0) ∈ V |
19 | 7, 14, 15, 18 | ovmpo 7289 | 1 ⊢ ((𝑁 ∈ ℕ0 ∧ 𝐾 ∈ ℤ) → (𝑁C𝐾) = if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 399 = wceq 1538 ∈ wcel 2111 ifcif 4425 ‘cfv 6324 (class class class)co 7135 0cc0 10526 · cmul 10531 − cmin 10859 / cdiv 11286 ℕ0cn0 11885 ℤcz 11969 ...cfz 12885 !cfa 13629 Ccbc 13658 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1797 ax-4 1811 ax-5 1911 ax-6 1970 ax-7 2015 ax-8 2113 ax-9 2121 ax-10 2142 ax-11 2158 ax-12 2175 ax-ext 2770 ax-sep 5167 ax-nul 5174 ax-pr 5295 ax-1cn 10584 ax-icn 10585 ax-addcl 10586 ax-mulcl 10588 ax-i2m1 10594 |
This theorem depends on definitions: df-bi 210 df-an 400 df-or 845 df-3an 1086 df-tru 1541 df-ex 1782 df-nf 1786 df-sb 2070 df-mo 2598 df-eu 2629 df-clab 2777 df-cleq 2791 df-clel 2870 df-nfc 2938 df-ral 3111 df-rex 3112 df-rab 3115 df-v 3443 df-sbc 3721 df-dif 3884 df-un 3886 df-in 3888 df-ss 3898 df-nul 4244 df-if 4426 df-sn 4526 df-pr 4528 df-op 4532 df-uni 4801 df-br 5031 df-opab 5093 df-id 5425 df-xp 5525 df-rel 5526 df-cnv 5527 df-co 5528 df-dm 5529 df-iota 6283 df-fun 6326 df-fv 6332 df-ov 7138 df-oprab 7139 df-mpo 7140 df-bc 13659 |
This theorem is referenced by: bcval2 13661 bcval3 13662 bcneg1 33081 bccolsum 33084 fwddifnp1 33739 |
Copyright terms: Public domain | W3C validator |