Metamath Proof Explorer


Theorem logfacrlim

Description: Combine the estimates logfacubnd and logfaclbnd , to get log ( x ! ) = x log x + O ( x ) . Equation 9.2.9 of Shapiro, p. 329. This is a weak form of the even stronger statement, log ( x ! ) = x log x - x + O ( log x ) . (Contributed by Mario Carneiro, 16-Apr-2016) (Revised by Mario Carneiro, 21-May-2016)

Ref Expression
Assertion logfacrlim x + log x log x ! x 1

Proof

Step Hyp Ref Expression
1 1red 1
2 1cnd 1
3 relogcl x + log x
4 3 adantl x + log x
5 4 recnd x + log x
6 1cnd x + 1
7 rpcnne0 x + x x 0
8 7 adantl x + x x 0
9 divdir log x 1 x x 0 log x + 1 x = log x x + 1 x
10 5 6 8 9 syl3anc x + log x + 1 x = log x x + 1 x
11 10 mpteq2dva x + log x + 1 x = x + log x x + 1 x
12 simpr x + x +
13 4 12 rerpdivcld x + log x x
14 rpreccl x + 1 x +
15 14 adantl x + 1 x +
16 15 rpred x + 1 x
17 8 simpld x + x
18 17 cxp1d x + x 1 = x
19 18 oveq2d x + log x x 1 = log x x
20 19 mpteq2dva x + log x x 1 = x + log x x
21 1rp 1 +
22 cxploglim 1 + x + log x x 1 0
23 21 22 mp1i x + log x x 1 0
24 20 23 eqbrtrrd x + log x x 0
25 ax-1cn 1
26 divrcnv 1 x + 1 x 0
27 25 26 mp1i x + 1 x 0
28 13 16 24 27 rlimadd x + log x x + 1 x 0 + 0
29 11 28 eqbrtrd x + log x + 1 x 0 + 0
30 00id 0 + 0 = 0
31 29 30 breqtrdi x + log x + 1 x 0
32 peano2re log x log x + 1
33 4 32 syl x + log x + 1
34 33 12 rerpdivcld x + log x + 1 x
35 34 recnd x + log x + 1 x
36 rprege0 x + x 0 x
37 36 adantl x + x 0 x
38 flge0nn0 x 0 x x 0
39 faccl x 0 x !
40 37 38 39 3syl x + x !
41 40 nnrpd x + x ! +
42 relogcl x ! + log x !
43 41 42 syl x + log x !
44 43 12 rerpdivcld x + log x ! x
45 44 recnd x + log x ! x
46 5 45 subcld x + log x log x ! x
47 logfacbnd3 x + 1 x log x ! x log x 1 log x + 1
48 47 adantl x + 1 x log x ! x log x 1 log x + 1
49 43 recnd x + log x !
50 49 adantrr x + 1 x log x !
51 7 ad2antrl x + 1 x x x 0
52 51 simpld x + 1 x x
53 5 adantrr x + 1 x log x
54 subcl log x 1 log x 1
55 53 25 54 sylancl x + 1 x log x 1
56 52 55 mulcld x + 1 x x log x 1
57 50 56 subcld x + 1 x log x ! x log x 1
58 57 abscld x + 1 x log x ! x log x 1
59 4 adantrr x + 1 x log x
60 59 32 syl x + 1 x log x + 1
61 rpregt0 x + x 0 < x
62 61 ad2antrl x + 1 x x 0 < x
63 lediv1 log x ! x log x 1 log x + 1 x 0 < x log x ! x log x 1 log x + 1 log x ! x log x 1 x log x + 1 x
64 58 60 62 63 syl3anc x + 1 x log x ! x log x 1 log x + 1 log x ! x log x 1 x log x + 1 x
65 48 64 mpbid x + 1 x log x ! x log x 1 x log x + 1 x
66 51 simprd x + 1 x x 0
67 55 52 66 divcan3d x + 1 x x log x 1 x = log x 1
68 67 oveq1d x + 1 x x log x 1 x log x ! x = log x - 1 - log x ! x
69 divsubdir x log x 1 log x ! x x 0 x log x 1 log x ! x = x log x 1 x log x ! x
70 56 50 51 69 syl3anc x + 1 x x log x 1 log x ! x = x log x 1 x log x ! x
71 45 adantrr x + 1 x log x ! x
72 1cnd x + 1 x 1
73 53 71 72 sub32d x + 1 x log x - log x ! x - 1 = log x - 1 - log x ! x
74 68 70 73 3eqtr4rd x + 1 x log x - log x ! x - 1 = x log x 1 log x ! x
75 74 fveq2d x + 1 x log x - log x ! x - 1 = x log x 1 log x ! x
76 56 50 subcld x + 1 x x log x 1 log x !
77 76 52 66 absdivd x + 1 x x log x 1 log x ! x = x log x 1 log x ! x
78 56 50 abssubd x + 1 x x log x 1 log x ! = log x ! x log x 1
79 36 ad2antrl x + 1 x x 0 x
80 absid x 0 x x = x
81 79 80 syl x + 1 x x = x
82 78 81 oveq12d x + 1 x x log x 1 log x ! x = log x ! x log x 1 x
83 75 77 82 3eqtrd x + 1 x log x - log x ! x - 1 = log x ! x log x 1 x
84 35 adantrr x + 1 x log x + 1 x
85 84 subid1d x + 1 x log x + 1 x 0 = log x + 1 x
86 85 fveq2d x + 1 x log x + 1 x 0 = log x + 1 x
87 log1 log 1 = 0
88 simprr x + 1 x 1 x
89 12 adantrr x + 1 x x +
90 logleb 1 + x + 1 x log 1 log x
91 21 89 90 sylancr x + 1 x 1 x log 1 log x
92 88 91 mpbid x + 1 x log 1 log x
93 87 92 eqbrtrrid x + 1 x 0 log x
94 59 93 ge0p1rpd x + 1 x log x + 1 +
95 94 89 rpdivcld x + 1 x log x + 1 x +
96 rprege0 log x + 1 x + log x + 1 x 0 log x + 1 x
97 absid log x + 1 x 0 log x + 1 x log x + 1 x = log x + 1 x
98 95 96 97 3syl x + 1 x log x + 1 x = log x + 1 x
99 86 98 eqtrd x + 1 x log x + 1 x 0 = log x + 1 x
100 65 83 99 3brtr4d x + 1 x log x - log x ! x - 1 log x + 1 x 0
101 1 2 31 35 46 100 rlimsqzlem x + log x log x ! x 1
102 101 mptru x + log x log x ! x 1