Metamath Proof Explorer


Theorem stirlinglem2

Description: A maps to positive reals. (Contributed by Glauco Siliprandi, 29-Jun-2017)

Ref Expression
Hypothesis stirlinglem2.1 A = n n ! 2 n n e n
Assertion stirlinglem2 N A N +

Proof

Step Hyp Ref Expression
1 stirlinglem2.1 A = n n ! 2 n n e n
2 nnnn0 N N 0
3 faccl N 0 N !
4 nnrp N ! N ! +
5 2 3 4 3syl N N ! +
6 2rp 2 +
7 6 a1i N 2 +
8 nnrp N N +
9 7 8 rpmulcld N 2 N +
10 9 rpsqrtcld N 2 N +
11 epr e +
12 11 a1i N e +
13 8 12 rpdivcld N N e +
14 nnz N N
15 13 14 rpexpcld N N e N +
16 10 15 rpmulcld N 2 N N e N +
17 5 16 rpdivcld N N ! 2 N N e N +
18 fveq2 n = k n ! = k !
19 oveq2 n = k 2 n = 2 k
20 19 fveq2d n = k 2 n = 2 k
21 oveq1 n = k n e = k e
22 id n = k n = k
23 21 22 oveq12d n = k n e n = k e k
24 20 23 oveq12d n = k 2 n n e n = 2 k k e k
25 18 24 oveq12d n = k n ! 2 n n e n = k ! 2 k k e k
26 25 cbvmptv n n ! 2 n n e n = k k ! 2 k k e k
27 1 26 eqtri A = k k ! 2 k k e k
28 27 a1i N N ! 2 N N e N + A = k k ! 2 k k e k
29 simpr N N ! 2 N N e N + k = N k = N
30 29 fveq2d N N ! 2 N N e N + k = N k ! = N !
31 29 oveq2d N N ! 2 N N e N + k = N 2 k = 2 N
32 31 fveq2d N N ! 2 N N e N + k = N 2 k = 2 N
33 29 oveq1d N N ! 2 N N e N + k = N k e = N e
34 33 29 oveq12d N N ! 2 N N e N + k = N k e k = N e N
35 32 34 oveq12d N N ! 2 N N e N + k = N 2 k k e k = 2 N N e N
36 30 35 oveq12d N N ! 2 N N e N + k = N k ! 2 k k e k = N ! 2 N N e N
37 simpl N N ! 2 N N e N + N
38 simpr N N ! 2 N N e N + N ! 2 N N e N +
39 28 36 37 38 fvmptd N N ! 2 N N e N + A N = N ! 2 N N e N
40 17 39 mpdan N A N = N ! 2 N N e N
41 40 17 eqeltrd N A N +