Metamath Proof Explorer


Theorem logfac

Description: The logarithm of a factorial can be expressed as a finite sum of logs. (Contributed by Mario Carneiro, 17-Apr-2015)

Ref Expression
Assertion logfac N 0 log N ! = k = 1 N log k

Proof

Step Hyp Ref Expression
1 elnn0 N 0 N N = 0
2 rpmulcl k + n + k n +
3 2 adantl N k + n + k n +
4 fvi k V I k = k
5 4 elv I k = k
6 elfznn k 1 N k
7 6 adantl N k 1 N k
8 7 nnrpd N k 1 N k +
9 5 8 eqeltrid N k 1 N I k +
10 elnnuz N N 1
11 10 biimpi N N 1
12 relogmul k + n + log k n = log k + log n
13 12 adantl N k + n + log k n = log k + log n
14 5 fveq2i log I k = log k
15 14 a1i N k 1 N log I k = log k
16 3 9 11 13 15 seqhomo N log seq 1 × I N = seq 1 + log N
17 facnn N N ! = seq 1 × I N
18 17 fveq2d N log N ! = log seq 1 × I N
19 eqidd N k 1 N log k = log k
20 relogcl k + log k
21 8 20 syl N k 1 N log k
22 21 recnd N k 1 N log k
23 19 11 22 fsumser N k = 1 N log k = seq 1 + log N
24 16 18 23 3eqtr4d N log N ! = k = 1 N log k
25 log1 log 1 = 0
26 sum0 k log k = 0
27 25 26 eqtr4i log 1 = k log k
28 fveq2 N = 0 N ! = 0 !
29 fac0 0 ! = 1
30 28 29 eqtrdi N = 0 N ! = 1
31 30 fveq2d N = 0 log N ! = log 1
32 oveq2 N = 0 1 N = 1 0
33 fz10 1 0 =
34 32 33 eqtrdi N = 0 1 N =
35 34 sumeq1d N = 0 k = 1 N log k = k log k
36 27 31 35 3eqtr4a N = 0 log N ! = k = 1 N log k
37 24 36 jaoi N N = 0 log N ! = k = 1 N log k
38 1 37 sylbi N 0 log N ! = k = 1 N log k