MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  bcval Structured version   Visualization version   GIF version

Theorem bcval 14260
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 14261 for the value in the standard domain. (Contributed by NM, 10-Jul-2005.) (Revised by Mario Carneiro, 7-Nov-2013.)
Assertion
Ref Expression
bcval ((๐‘ โˆˆ โ„•0 โˆง ๐พ โˆˆ โ„ค) โ†’ (๐‘C๐พ) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))

Proof of Theorem bcval
Dummy variables ๐‘˜ ๐‘› are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 7413 . . . 4 (๐‘› = ๐‘ โ†’ (0...๐‘›) = (0...๐‘))
21eleq2d 2819 . . 3 (๐‘› = ๐‘ โ†’ (๐‘˜ โˆˆ (0...๐‘›) โ†” ๐‘˜ โˆˆ (0...๐‘)))
3 fveq2 6888 . . . 4 (๐‘› = ๐‘ โ†’ (!โ€˜๐‘›) = (!โ€˜๐‘))
4 fvoveq1 7428 . . . . 5 (๐‘› = ๐‘ โ†’ (!โ€˜(๐‘› โˆ’ ๐‘˜)) = (!โ€˜(๐‘ โˆ’ ๐‘˜)))
54oveq1d 7420 . . . 4 (๐‘› = ๐‘ โ†’ ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)) = ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)))
63, 5oveq12d 7423 . . 3 (๐‘› = ๐‘ โ†’ ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))) = ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))))
72, 6ifbieq1d 4551 . 2 (๐‘› = ๐‘ โ†’ if(๐‘˜ โˆˆ (0...๐‘›), ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0) = if(๐‘˜ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0))
8 eleq1 2821 . . 3 (๐‘˜ = ๐พ โ†’ (๐‘˜ โˆˆ (0...๐‘) โ†” ๐พ โˆˆ (0...๐‘)))
9 oveq2 7413 . . . . . 6 (๐‘˜ = ๐พ โ†’ (๐‘ โˆ’ ๐‘˜) = (๐‘ โˆ’ ๐พ))
109fveq2d 6892 . . . . 5 (๐‘˜ = ๐พ โ†’ (!โ€˜(๐‘ โˆ’ ๐‘˜)) = (!โ€˜(๐‘ โˆ’ ๐พ)))
11 fveq2 6888 . . . . 5 (๐‘˜ = ๐พ โ†’ (!โ€˜๐‘˜) = (!โ€˜๐พ))
1210, 11oveq12d 7423 . . . 4 (๐‘˜ = ๐พ โ†’ ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)) = ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ)))
1312oveq2d 7421 . . 3 (๐‘˜ = ๐พ โ†’ ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))) = ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))))
148, 13ifbieq1d 4551 . 2 (๐‘˜ = ๐พ โ†’ if(๐‘˜ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))
15 df-bc 14259 . 2 C = (๐‘› โˆˆ โ„•0, ๐‘˜ โˆˆ โ„ค โ†ฆ if(๐‘˜ โˆˆ (0...๐‘›), ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0))
16 ovex 7438 . . 3 ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))) โˆˆ V
17 c0ex 11204 . . 3 0 โˆˆ V
1816, 17ifex 4577 . 2 if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0) โˆˆ V
197, 14, 15, 18ovmpo 7564 1 ((๐‘ โˆˆ โ„•0 โˆง ๐พ โˆˆ โ„ค) โ†’ (๐‘C๐พ) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))
Colors of variables: wff setvar class
Syntax hints:   โ†’ wi 4   โˆง wa 396   = wceq 1541   โˆˆ wcel 2106  ifcif 4527  โ€˜cfv 6540  (class class class)co 7405  0cc0 11106   ยท cmul 11111   โˆ’ cmin 11440   / cdiv 11867  โ„•0cn0 12468  โ„คcz 12554  ...cfz 13480  !cfa 14229  Ccbc 14258
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 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2703  ax-sep 5298  ax-nul 5305  ax-pr 5426  ax-1cn 11164  ax-icn 11165  ax-addcl 11166  ax-mulcl 11168  ax-i2m1 11174
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2534  df-eu 2563  df-clab 2710  df-cleq 2724  df-clel 2810  df-nfc 2885  df-ne 2941  df-ral 3062  df-rex 3071  df-rab 3433  df-v 3476  df-sbc 3777  df-dif 3950  df-un 3952  df-in 3954  df-ss 3964  df-nul 4322  df-if 4528  df-sn 4628  df-pr 4630  df-op 4634  df-uni 4908  df-br 5148  df-opab 5210  df-id 5573  df-xp 5681  df-rel 5682  df-cnv 5683  df-co 5684  df-dm 5685  df-iota 6492  df-fun 6542  df-fv 6548  df-ov 7408  df-oprab 7409  df-mpo 7410  df-bc 14259
This theorem is referenced by:  bcval2  14261  bcval3  14262  bcneg1  34694  bccolsum  34697  fwddifnp1  35125
  Copyright terms: Public domain W3C validator