![]() |
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 13385 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 6913 | . . . 4 ⊢ (𝑛 = 𝑁 → (0...𝑛) = (0...𝑁)) | |
2 | 1 | eleq2d 2892 | . . 3 ⊢ (𝑛 = 𝑁 → (𝑘 ∈ (0...𝑛) ↔ 𝑘 ∈ (0...𝑁))) |
3 | fveq2 6433 | . . . 4 ⊢ (𝑛 = 𝑁 → (!‘𝑛) = (!‘𝑁)) | |
4 | fvoveq1 6928 | . . . . 5 ⊢ (𝑛 = 𝑁 → (!‘(𝑛 − 𝑘)) = (!‘(𝑁 − 𝑘))) | |
5 | 4 | oveq1d 6920 | . . . 4 ⊢ (𝑛 = 𝑁 → ((!‘(𝑛 − 𝑘)) · (!‘𝑘)) = ((!‘(𝑁 − 𝑘)) · (!‘𝑘))) |
6 | 3, 5 | oveq12d 6923 | . . 3 ⊢ (𝑛 = 𝑁 → ((!‘𝑛) / ((!‘(𝑛 − 𝑘)) · (!‘𝑘))) = ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘)))) |
7 | 2, 6 | ifbieq1d 4329 | . 2 ⊢ (𝑛 = 𝑁 → if(𝑘 ∈ (0...𝑛), ((!‘𝑛) / ((!‘(𝑛 − 𝑘)) · (!‘𝑘))), 0) = if(𝑘 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘))), 0)) |
8 | eleq1 2894 | . . 3 ⊢ (𝑘 = 𝐾 → (𝑘 ∈ (0...𝑁) ↔ 𝐾 ∈ (0...𝑁))) | |
9 | oveq2 6913 | . . . . . 6 ⊢ (𝑘 = 𝐾 → (𝑁 − 𝑘) = (𝑁 − 𝐾)) | |
10 | 9 | fveq2d 6437 | . . . . 5 ⊢ (𝑘 = 𝐾 → (!‘(𝑁 − 𝑘)) = (!‘(𝑁 − 𝐾))) |
11 | fveq2 6433 | . . . . 5 ⊢ (𝑘 = 𝐾 → (!‘𝑘) = (!‘𝐾)) | |
12 | 10, 11 | oveq12d 6923 | . . . 4 ⊢ (𝑘 = 𝐾 → ((!‘(𝑁 − 𝑘)) · (!‘𝑘)) = ((!‘(𝑁 − 𝐾)) · (!‘𝐾))) |
13 | 12 | oveq2d 6921 | . . 3 ⊢ (𝑘 = 𝐾 → ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘))) = ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾)))) |
14 | 8, 13 | ifbieq1d 4329 | . 2 ⊢ (𝑘 = 𝐾 → if(𝑘 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝑘)) · (!‘𝑘))), 0) = if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0)) |
15 | df-bc 13383 | . 2 ⊢ C = (𝑛 ∈ ℕ0, 𝑘 ∈ ℤ ↦ if(𝑘 ∈ (0...𝑛), ((!‘𝑛) / ((!‘(𝑛 − 𝑘)) · (!‘𝑘))), 0)) | |
16 | ovex 6937 | . . 3 ⊢ ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))) ∈ V | |
17 | c0ex 10350 | . . 3 ⊢ 0 ∈ V | |
18 | 16, 17 | ifex 4354 | . 2 ⊢ if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0) ∈ V |
19 | 7, 14, 15, 18 | ovmpt2 7056 | 1 ⊢ ((𝑁 ∈ ℕ0 ∧ 𝐾 ∈ ℤ) → (𝑁C𝐾) = if(𝐾 ∈ (0...𝑁), ((!‘𝑁) / ((!‘(𝑁 − 𝐾)) · (!‘𝐾))), 0)) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 386 = wceq 1658 ∈ wcel 2166 ifcif 4306 ‘cfv 6123 (class class class)co 6905 0cc0 10252 · cmul 10257 − cmin 10585 / cdiv 11009 ℕ0cn0 11618 ℤcz 11704 ...cfz 12619 !cfa 13353 Ccbc 13382 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1896 ax-4 1910 ax-5 2011 ax-6 2077 ax-7 2114 ax-9 2175 ax-10 2194 ax-11 2209 ax-12 2222 ax-13 2391 ax-ext 2803 ax-sep 5005 ax-nul 5013 ax-pr 5127 ax-1cn 10310 ax-icn 10311 ax-addcl 10312 ax-mulcl 10314 ax-i2m1 10320 |
This theorem depends on definitions: df-bi 199 df-an 387 df-or 881 df-3an 1115 df-tru 1662 df-ex 1881 df-nf 1885 df-sb 2070 df-mo 2605 df-eu 2640 df-clab 2812 df-cleq 2818 df-clel 2821 df-nfc 2958 df-ral 3122 df-rex 3123 df-rab 3126 df-v 3416 df-sbc 3663 df-dif 3801 df-un 3803 df-in 3805 df-ss 3812 df-nul 4145 df-if 4307 df-sn 4398 df-pr 4400 df-op 4404 df-uni 4659 df-br 4874 df-opab 4936 df-id 5250 df-xp 5348 df-rel 5349 df-cnv 5350 df-co 5351 df-dm 5352 df-iota 6086 df-fun 6125 df-fv 6131 df-ov 6908 df-oprab 6909 df-mpt2 6910 df-bc 13383 |
This theorem is referenced by: bcval2 13385 bcval3 13386 bcneg1 32164 bccolsum 32167 fwddifnp1 32811 |
Copyright terms: Public domain | W3C validator |