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

Theorem bcval 14295
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 14296 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 7428 . . . 4 (๐‘› = ๐‘ โ†’ (0...๐‘›) = (0...๐‘))
21eleq2d 2815 . . 3 (๐‘› = ๐‘ โ†’ (๐‘˜ โˆˆ (0...๐‘›) โ†” ๐‘˜ โˆˆ (0...๐‘)))
3 fveq2 6897 . . . 4 (๐‘› = ๐‘ โ†’ (!โ€˜๐‘›) = (!โ€˜๐‘))
4 fvoveq1 7443 . . . . 5 (๐‘› = ๐‘ โ†’ (!โ€˜(๐‘› โˆ’ ๐‘˜)) = (!โ€˜(๐‘ โˆ’ ๐‘˜)))
54oveq1d 7435 . . . 4 (๐‘› = ๐‘ โ†’ ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)) = ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)))
63, 5oveq12d 7438 . . 3 (๐‘› = ๐‘ โ†’ ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))) = ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))))
72, 6ifbieq1d 4553 . 2 (๐‘› = ๐‘ โ†’ if(๐‘˜ โˆˆ (0...๐‘›), ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0) = if(๐‘˜ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0))
8 eleq1 2817 . . 3 (๐‘˜ = ๐พ โ†’ (๐‘˜ โˆˆ (0...๐‘) โ†” ๐พ โˆˆ (0...๐‘)))
9 oveq2 7428 . . . . . 6 (๐‘˜ = ๐พ โ†’ (๐‘ โˆ’ ๐‘˜) = (๐‘ โˆ’ ๐พ))
109fveq2d 6901 . . . . 5 (๐‘˜ = ๐พ โ†’ (!โ€˜(๐‘ โˆ’ ๐‘˜)) = (!โ€˜(๐‘ โˆ’ ๐พ)))
11 fveq2 6897 . . . . 5 (๐‘˜ = ๐พ โ†’ (!โ€˜๐‘˜) = (!โ€˜๐พ))
1210, 11oveq12d 7438 . . . 4 (๐‘˜ = ๐พ โ†’ ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)) = ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ)))
1312oveq2d 7436 . . 3 (๐‘˜ = ๐พ โ†’ ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))) = ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))))
148, 13ifbieq1d 4553 . 2 (๐‘˜ = ๐พ โ†’ if(๐‘˜ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))
15 df-bc 14294 . 2 C = (๐‘› โˆˆ โ„•0, ๐‘˜ โˆˆ โ„ค โ†ฆ if(๐‘˜ โˆˆ (0...๐‘›), ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0))
16 ovex 7453 . . 3 ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))) โˆˆ V
17 c0ex 11238 . . 3 0 โˆˆ V
1816, 17ifex 4579 . 2 if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0) โˆˆ V
197, 14, 15, 18ovmpo 7581 1 ((๐‘ โˆˆ โ„•0 โˆง ๐พ โˆˆ โ„ค) โ†’ (๐‘C๐พ) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))
Colors of variables: wff setvar class
Syntax hints:   โ†’ wi 4   โˆง wa 395   = wceq 1534   โˆˆ wcel 2099  ifcif 4529  โ€˜cfv 6548  (class class class)co 7420  0cc0 11138   ยท cmul 11143   โˆ’ cmin 11474   / cdiv 11901  โ„•0cn0 12502  โ„คcz 12588  ...cfz 13516  !cfa 14264  Ccbc 14293
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1790  ax-4 1804  ax-5 1906  ax-6 1964  ax-7 2004  ax-8 2101  ax-9 2109  ax-10 2130  ax-11 2147  ax-12 2167  ax-ext 2699  ax-sep 5299  ax-nul 5306  ax-pr 5429  ax-1cn 11196  ax-icn 11197  ax-addcl 11198  ax-mulcl 11200  ax-i2m1 11206
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 847  df-3an 1087  df-tru 1537  df-fal 1547  df-ex 1775  df-nf 1779  df-sb 2061  df-mo 2530  df-eu 2559  df-clab 2706  df-cleq 2720  df-clel 2806  df-nfc 2881  df-ne 2938  df-ral 3059  df-rex 3068  df-rab 3430  df-v 3473  df-sbc 3777  df-dif 3950  df-un 3952  df-in 3954  df-ss 3964  df-nul 4324  df-if 4530  df-sn 4630  df-pr 4632  df-op 4636  df-uni 4909  df-br 5149  df-opab 5211  df-id 5576  df-xp 5684  df-rel 5685  df-cnv 5686  df-co 5687  df-dm 5688  df-iota 6500  df-fun 6550  df-fv 6556  df-ov 7423  df-oprab 7424  df-mpo 7425  df-bc 14294
This theorem is referenced by:  bcval2  14296  bcval3  14297  bcneg1  35330  bccolsum  35333  fwddifnp1  35761
  Copyright terms: Public domain W3C validator