Metamath Proof Explorer


Theorem logsqvma

Description: A formula for log ^ 2 ( N ) in terms of the primes. Equation 10.4.6 of Shapiro, p. 418. (Contributed by Mario Carneiro, 13-May-2016)

Ref Expression
Assertion logsqvma N d x | x N u x | x d Λ u Λ d u + Λ d log d = log N 2

Proof

Step Hyp Ref Expression
1 fzfid N 1 N Fin
2 dvdsssfz1 N x | x N 1 N
3 1 2 ssfid N x | x N Fin
4 fzfid N d x | x N 1 d Fin
5 elrabi d x | x N d
6 5 adantl N d x | x N d
7 dvdsssfz1 d x | x d 1 d
8 6 7 syl N d x | x N x | x d 1 d
9 4 8 ssfid N d x | x N x | x d Fin
10 elrabi u x | x d u
11 10 ad2antll N d x | x N u x | x d u
12 vmacl u Λ u
13 11 12 syl N d x | x N u x | x d Λ u
14 breq1 x = u x d u d
15 14 elrab u x | x d u u d
16 15 simprbi u x | x d u d
17 16 ad2antll N d x | x N u x | x d u d
18 5 ad2antrl N d x | x N u x | x d d
19 nndivdvds d u u d d u
20 18 11 19 syl2anc N d x | x N u x | x d u d d u
21 17 20 mpbid N d x | x N u x | x d d u
22 vmacl d u Λ d u
23 21 22 syl N d x | x N u x | x d Λ d u
24 13 23 remulcld N d x | x N u x | x d Λ u Λ d u
25 24 recnd N d x | x N u x | x d Λ u Λ d u
26 25 anassrs N d x | x N u x | x d Λ u Λ d u
27 9 26 fsumcl N d x | x N u x | x d Λ u Λ d u
28 vmacl d Λ d
29 6 28 syl N d x | x N Λ d
30 6 nnrpd N d x | x N d +
31 30 relogcld N d x | x N log d
32 29 31 remulcld N d x | x N Λ d log d
33 32 recnd N d x | x N Λ d log d
34 3 27 33 fsumadd N d x | x N u x | x d Λ u Λ d u + Λ d log d = d x | x N u x | x d Λ u Λ d u + d x | x N Λ d log d
35 id N N
36 fvoveq1 d = u k Λ d u = Λ u k u
37 36 oveq2d d = u k Λ u Λ d u = Λ u Λ u k u
38 35 37 25 fsumdvdscom N d x | x N u x | x d Λ u Λ d u = u x | x N k x | x N u Λ u Λ u k u
39 ssrab2 x | x N u
40 simpr N u x | x N k x | x N u k x | x N u
41 39 40 sselid N u x | x N k x | x N u k
42 41 nncnd N u x | x N k x | x N u k
43 ssrab2 x | x N
44 simpr N u x | x N u x | x N
45 43 44 sselid N u x | x N u
46 45 nncnd N u x | x N u
47 46 adantr N u x | x N k x | x N u u
48 45 nnne0d N u x | x N u 0
49 48 adantr N u x | x N k x | x N u u 0
50 42 47 49 divcan3d N u x | x N k x | x N u u k u = k
51 50 fveq2d N u x | x N k x | x N u Λ u k u = Λ k
52 51 sumeq2dv N u x | x N k x | x N u Λ u k u = k x | x N u Λ k
53 dvdsdivcl N u x | x N N u x | x N
54 43 53 sselid N u x | x N N u
55 vmasum N u k x | x N u Λ k = log N u
56 54 55 syl N u x | x N k x | x N u Λ k = log N u
57 nnrp N N +
58 57 adantr N u x | x N N +
59 45 nnrpd N u x | x N u +
60 58 59 relogdivd N u x | x N log N u = log N log u
61 52 56 60 3eqtrd N u x | x N k x | x N u Λ u k u = log N log u
62 61 oveq2d N u x | x N Λ u k x | x N u Λ u k u = Λ u log N log u
63 fzfid N u x | x N 1 N u Fin
64 dvdsssfz1 N u x | x N u 1 N u
65 54 64 syl N u x | x N x | x N u 1 N u
66 63 65 ssfid N u x | x N x | x N u Fin
67 45 12 syl N u x | x N Λ u
68 67 recnd N u x | x N Λ u
69 vmacl k Λ k
70 41 69 syl N u x | x N k x | x N u Λ k
71 70 recnd N u x | x N k x | x N u Λ k
72 51 71 eqeltrd N u x | x N k x | x N u Λ u k u
73 66 68 72 fsummulc2 N u x | x N Λ u k x | x N u Λ u k u = k x | x N u Λ u Λ u k u
74 relogcl N + log N
75 74 recnd N + log N
76 58 75 syl N u x | x N log N
77 59 relogcld N u x | x N log u
78 77 recnd N u x | x N log u
79 68 76 78 subdid N u x | x N Λ u log N log u = Λ u log N Λ u log u
80 62 73 79 3eqtr3d N u x | x N k x | x N u Λ u Λ u k u = Λ u log N Λ u log u
81 80 sumeq2dv N u x | x N k x | x N u Λ u Λ u k u = u x | x N Λ u log N Λ u log u
82 68 76 mulcld N u x | x N Λ u log N
83 68 78 mulcld N u x | x N Λ u log u
84 3 82 83 fsumsub N u x | x N Λ u log N Λ u log u = u x | x N Λ u log N u x | x N Λ u log u
85 57 75 syl N log N
86 85 sqvald N log N 2 = log N log N
87 vmasum N u x | x N Λ u = log N
88 87 oveq1d N u x | x N Λ u log N = log N log N
89 3 85 68 fsummulc1 N u x | x N Λ u log N = u x | x N Λ u log N
90 86 88 89 3eqtr2rd N u x | x N Λ u log N = log N 2
91 fveq2 u = d Λ u = Λ d
92 fveq2 u = d log u = log d
93 91 92 oveq12d u = d Λ u log u = Λ d log d
94 93 cbvsumv u x | x N Λ u log u = d x | x N Λ d log d
95 94 a1i N u x | x N Λ u log u = d x | x N Λ d log d
96 90 95 oveq12d N u x | x N Λ u log N u x | x N Λ u log u = log N 2 d x | x N Λ d log d
97 84 96 eqtrd N u x | x N Λ u log N Λ u log u = log N 2 d x | x N Λ d log d
98 38 81 97 3eqtrd N d x | x N u x | x d Λ u Λ d u = log N 2 d x | x N Λ d log d
99 98 oveq1d N d x | x N u x | x d Λ u Λ d u + d x | x N Λ d log d = log N 2 - d x | x N Λ d log d + d x | x N Λ d log d
100 85 sqcld N log N 2
101 3 33 fsumcl N d x | x N Λ d log d
102 100 101 npcand N log N 2 - d x | x N Λ d log d + d x | x N Λ d log d = log N 2
103 34 99 102 3eqtrd N d x | x N u x | x d Λ u Λ d u + Λ d log d = log N 2