Metamath Proof Explorer


Definition df-bc

Description: Define the binomial coefficient operation. For example, ( 5C 3 ) = 1 0 ( ex-bc ).

In the literature, this function is often written as a column vector of the two arguments, or with the arguments as subscripts before and after the letter "C". The expression ( N C K ) is read " N choose K ". Definition of binomial coefficient in Gleason p. 295. As suggested by Gleason, we define it to be 0 when 0 <_ k <_ n does not hold. (Contributed by NM, 10-Jul-2005)

Ref Expression
Assertion df-bc ( . .) = n 0 , k if k 0 n n ! n k ! k ! 0

Detailed syntax breakdown

Step Hyp Ref Expression
0 cbc class ( . .)
1 vn setvar n
2 cn0 class 0
3 vk setvar k
4 cz class
5 3 cv setvar k
6 cc0 class 0
7 cfz class
8 1 cv setvar n
9 6 8 7 co class 0 n
10 5 9 wcel wff k 0 n
11 cfa class !
12 8 11 cfv class n !
13 cdiv class ÷
14 cmin class
15 8 5 14 co class n k
16 15 11 cfv class n k !
17 cmul class ×
18 5 11 cfv class k !
19 16 18 17 co class n k ! k !
20 12 19 13 co class n ! n k ! k !
21 10 20 6 cif class if k 0 n n ! n k ! k ! 0
22 1 3 2 4 21 cmpo class n 0 , k if k 0 n n ! n k ! k ! 0
23 0 22 wceq wff ( . .) = n 0 , k if k 0 n n ! n k ! k ! 0