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

Theorem bcval 14210
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 14211 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 7366 . . . 4 (๐‘› = ๐‘ โ†’ (0...๐‘›) = (0...๐‘))
21eleq2d 2820 . . 3 (๐‘› = ๐‘ โ†’ (๐‘˜ โˆˆ (0...๐‘›) โ†” ๐‘˜ โˆˆ (0...๐‘)))
3 fveq2 6843 . . . 4 (๐‘› = ๐‘ โ†’ (!โ€˜๐‘›) = (!โ€˜๐‘))
4 fvoveq1 7381 . . . . 5 (๐‘› = ๐‘ โ†’ (!โ€˜(๐‘› โˆ’ ๐‘˜)) = (!โ€˜(๐‘ โˆ’ ๐‘˜)))
54oveq1d 7373 . . . 4 (๐‘› = ๐‘ โ†’ ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)) = ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)))
63, 5oveq12d 7376 . . 3 (๐‘› = ๐‘ โ†’ ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))) = ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))))
72, 6ifbieq1d 4511 . 2 (๐‘› = ๐‘ โ†’ if(๐‘˜ โˆˆ (0...๐‘›), ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0) = if(๐‘˜ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0))
8 eleq1 2822 . . 3 (๐‘˜ = ๐พ โ†’ (๐‘˜ โˆˆ (0...๐‘) โ†” ๐พ โˆˆ (0...๐‘)))
9 oveq2 7366 . . . . . 6 (๐‘˜ = ๐พ โ†’ (๐‘ โˆ’ ๐‘˜) = (๐‘ โˆ’ ๐พ))
109fveq2d 6847 . . . . 5 (๐‘˜ = ๐พ โ†’ (!โ€˜(๐‘ โˆ’ ๐‘˜)) = (!โ€˜(๐‘ โˆ’ ๐พ)))
11 fveq2 6843 . . . . 5 (๐‘˜ = ๐พ โ†’ (!โ€˜๐‘˜) = (!โ€˜๐พ))
1210, 11oveq12d 7376 . . . 4 (๐‘˜ = ๐พ โ†’ ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜)) = ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ)))
1312oveq2d 7374 . . 3 (๐‘˜ = ๐พ โ†’ ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))) = ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))))
148, 13ifbieq1d 4511 . 2 (๐‘˜ = ๐พ โ†’ if(๐‘˜ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))
15 df-bc 14209 . 2 C = (๐‘› โˆˆ โ„•0, ๐‘˜ โˆˆ โ„ค โ†ฆ if(๐‘˜ โˆˆ (0...๐‘›), ((!โ€˜๐‘›) / ((!โ€˜(๐‘› โˆ’ ๐‘˜)) ยท (!โ€˜๐‘˜))), 0))
16 ovex 7391 . . 3 ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))) โˆˆ V
17 c0ex 11154 . . 3 0 โˆˆ V
1816, 17ifex 4537 . 2 if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0) โˆˆ V
197, 14, 15, 18ovmpo 7516 1 ((๐‘ โˆˆ โ„•0 โˆง ๐พ โˆˆ โ„ค) โ†’ (๐‘C๐พ) = if(๐พ โˆˆ (0...๐‘), ((!โ€˜๐‘) / ((!โ€˜(๐‘ โˆ’ ๐พ)) ยท (!โ€˜๐พ))), 0))
Colors of variables: wff setvar class
Syntax hints:   โ†’ wi 4   โˆง wa 397   = wceq 1542   โˆˆ wcel 2107  ifcif 4487  โ€˜cfv 6497  (class class class)co 7358  0cc0 11056   ยท cmul 11061   โˆ’ cmin 11390   / cdiv 11817  โ„•0cn0 12418  โ„คcz 12504  ...cfz 13430  !cfa 14179  Ccbc 14208
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2155  ax-12 2172  ax-ext 2704  ax-sep 5257  ax-nul 5264  ax-pr 5385  ax-1cn 11114  ax-icn 11115  ax-addcl 11116  ax-mulcl 11118  ax-i2m1 11124
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1783  df-nf 1787  df-sb 2069  df-mo 2535  df-eu 2564  df-clab 2711  df-cleq 2725  df-clel 2811  df-nfc 2886  df-ne 2941  df-ral 3062  df-rex 3071  df-rab 3407  df-v 3446  df-sbc 3741  df-dif 3914  df-un 3916  df-in 3918  df-ss 3928  df-nul 4284  df-if 4488  df-sn 4588  df-pr 4590  df-op 4594  df-uni 4867  df-br 5107  df-opab 5169  df-id 5532  df-xp 5640  df-rel 5641  df-cnv 5642  df-co 5643  df-dm 5644  df-iota 6449  df-fun 6499  df-fv 6505  df-ov 7361  df-oprab 7362  df-mpo 7363  df-bc 14209
This theorem is referenced by:  bcval2  14211  bcval3  14212  bcneg1  34365  bccolsum  34368  fwddifnp1  34796
  Copyright terms: Public domain W3C validator