Metamath Proof Explorer


Theorem rplogsum

Description: The sum of log p / p over the primes p == A (mod N ) is asymptotic to log x / phi ( x ) + O(1) . Equation 9.4.3 of Shapiro, p. 375. (Contributed by Mario Carneiro, 16-Apr-2016)

Ref Expression
Hypotheses rpvmasum.z Z = /N
rpvmasum.l L = ℤRHom Z
rpvmasum.a φ N
rpvmasum.u U = Unit Z
rpvmasum.b φ A U
rpvmasum.t T = L -1 A
Assertion rplogsum φ x + ϕ N p 1 x T log p p log x 𝑂1

Proof

Step Hyp Ref Expression
1 rpvmasum.z Z = /N
2 rpvmasum.l L = ℤRHom Z
3 rpvmasum.a φ N
4 rpvmasum.u U = Unit Z
5 rpvmasum.b φ A U
6 rpvmasum.t T = L -1 A
7 1 2 3 4 5 6 rpvmasum φ x + ϕ N p 1 x T Λ p p log x 𝑂1
8 3 phicld φ ϕ N
9 8 adantr φ x + ϕ N
10 9 nncnd φ x + ϕ N
11 fzfid φ x + 1 x Fin
12 inss1 1 x T 1 x
13 ssfi 1 x Fin 1 x T 1 x 1 x T Fin
14 11 12 13 sylancl φ x + 1 x T Fin
15 simpr φ x + p 1 x T p 1 x T
16 15 elin1d φ x + p 1 x T p 1 x
17 elfznn p 1 x p
18 16 17 syl φ x + p 1 x T p
19 vmacl p Λ p
20 nndivre Λ p p Λ p p
21 19 20 mpancom p Λ p p
22 18 21 syl φ x + p 1 x T Λ p p
23 14 22 fsumrecl φ x + p 1 x T Λ p p
24 23 recnd φ x + p 1 x T Λ p p
25 10 24 mulcld φ x + ϕ N p 1 x T Λ p p
26 relogcl x + log x
27 26 adantl φ x + log x
28 27 recnd φ x + log x
29 25 28 subcld φ x + ϕ N p 1 x T Λ p p log x
30 inss1 1 x T 1 x
31 ssfi 1 x Fin 1 x T 1 x 1 x T Fin
32 11 30 31 sylancl φ x + 1 x T Fin
33 simpr φ x + p 1 x T p 1 x T
34 33 elin1d φ x + p 1 x T p 1 x
35 34 17 syl φ x + p 1 x T p
36 nnrp p p +
37 36 relogcld p log p
38 37 36 rerpdivcld p log p p
39 35 38 syl φ x + p 1 x T log p p
40 32 39 fsumrecl φ x + p 1 x T log p p
41 40 recnd φ x + p 1 x T log p p
42 10 41 mulcld φ x + ϕ N p 1 x T log p p
43 42 28 subcld φ x + ϕ N p 1 x T log p p log x
44 10 24 41 subdid φ x + ϕ N p 1 x T Λ p p p 1 x T log p p = ϕ N p 1 x T Λ p p ϕ N p 1 x T log p p
45 19 recnd p Λ p
46 0re 0
47 ifcl log p 0 if p log p 0
48 37 46 47 sylancl p if p log p 0
49 48 recnd p if p log p 0
50 36 rpcnne0d p p p 0
51 divsubdir Λ p if p log p 0 p p 0 Λ p if p log p 0 p = Λ p p if p log p 0 p
52 45 49 50 51 syl3anc p Λ p if p log p 0 p = Λ p p if p log p 0 p
53 18 52 syl φ x + p 1 x T Λ p if p log p 0 p = Λ p p if p log p 0 p
54 53 sumeq2dv φ x + p 1 x T Λ p if p log p 0 p = p 1 x T Λ p p if p log p 0 p
55 21 recnd p Λ p p
56 18 55 syl φ x + p 1 x T Λ p p
57 48 36 rerpdivcld p if p log p 0 p
58 57 recnd p if p log p 0 p
59 18 58 syl φ x + p 1 x T if p log p 0 p
60 14 56 59 fsumsub φ x + p 1 x T Λ p p if p log p 0 p = p 1 x T Λ p p p 1 x T if p log p 0 p
61 inss2 T T
62 sslin T T 1 x T 1 x T
63 61 62 mp1i φ x + 1 x T 1 x T
64 35 58 syl φ x + p 1 x T if p log p 0 p
65 eldif p 1 x T 1 x T p 1 x T ¬ p 1 x T
66 incom T = T
67 66 ineq2i 1 x T = 1 x T
68 inass 1 x T = 1 x T
69 67 68 eqtr4i 1 x T = 1 x T
70 69 elin2 p 1 x T p 1 x T p
71 70 simplbi2 p 1 x T p p 1 x T
72 71 con3dimp p 1 x T ¬ p 1 x T ¬ p
73 65 72 sylbi p 1 x T 1 x T ¬ p
74 73 adantl φ x + p 1 x T 1 x T ¬ p
75 74 iffalsed φ x + p 1 x T 1 x T if p log p 0 = 0
76 75 oveq1d φ x + p 1 x T 1 x T if p log p 0 p = 0 p
77 eldifi p 1 x T 1 x T p 1 x T
78 77 18 sylan2 φ x + p 1 x T 1 x T p
79 div0 p p 0 0 p = 0
80 50 79 syl p 0 p = 0
81 78 80 syl φ x + p 1 x T 1 x T 0 p = 0
82 76 81 eqtrd φ x + p 1 x T 1 x T if p log p 0 p = 0
83 63 64 82 14 fsumss φ x + p 1 x T if p log p 0 p = p 1 x T if p log p 0 p
84 inss2 1 x T T
85 inss1 T
86 84 85 sstri 1 x T
87 86 33 sselid φ x + p 1 x T p
88 87 iftrued φ x + p 1 x T if p log p 0 = log p
89 88 oveq1d φ x + p 1 x T if p log p 0 p = log p p
90 89 sumeq2dv φ x + p 1 x T if p log p 0 p = p 1 x T log p p
91 83 90 eqtr3d φ x + p 1 x T if p log p 0 p = p 1 x T log p p
92 91 oveq2d φ x + p 1 x T Λ p p p 1 x T if p log p 0 p = p 1 x T Λ p p p 1 x T log p p
93 54 60 92 3eqtrd φ x + p 1 x T Λ p if p log p 0 p = p 1 x T Λ p p p 1 x T log p p
94 93 oveq2d φ x + ϕ N p 1 x T Λ p if p log p 0 p = ϕ N p 1 x T Λ p p p 1 x T log p p
95 25 42 28 nnncan2d φ x + ϕ N p 1 x T Λ p p - log x - ϕ N p 1 x T log p p log x = ϕ N p 1 x T Λ p p ϕ N p 1 x T log p p
96 44 94 95 3eqtr4d φ x + ϕ N p 1 x T Λ p if p log p 0 p = ϕ N p 1 x T Λ p p - log x - ϕ N p 1 x T log p p log x
97 96 mpteq2dva φ x + ϕ N p 1 x T Λ p if p log p 0 p = x + ϕ N p 1 x T Λ p p - log x - ϕ N p 1 x T log p p log x
98 19 48 resubcld p Λ p if p log p 0
99 98 36 rerpdivcld p Λ p if p log p 0 p
100 18 99 syl φ x + p 1 x T Λ p if p log p 0 p
101 14 100 fsumrecl φ x + p 1 x T Λ p if p log p 0 p
102 101 recnd φ x + p 1 x T Λ p if p log p 0 p
103 rpssre +
104 8 nncnd φ ϕ N
105 o1const + ϕ N x + ϕ N 𝑂1
106 103 104 105 sylancr φ x + ϕ N 𝑂1
107 103 a1i φ +
108 1red φ 1
109 2re 2
110 109 a1i φ 2
111 breq1 log p = if p log p 0 log p Λ p if p log p 0 Λ p
112 breq1 0 = if p log p 0 0 Λ p if p log p 0 Λ p
113 37 adantr p p log p
114 vmaprm p Λ p = log p
115 114 adantl p p Λ p = log p
116 115 eqcomd p p log p = Λ p
117 113 116 eqled p p log p Λ p
118 vmage0 p 0 Λ p
119 118 adantr p ¬ p 0 Λ p
120 111 112 117 119 ifbothda p if p log p 0 Λ p
121 19 48 subge0d p 0 Λ p if p log p 0 if p log p 0 Λ p
122 120 121 mpbird p 0 Λ p if p log p 0
123 98 36 122 divge0d p 0 Λ p if p log p 0 p
124 18 123 syl φ x + p 1 x T 0 Λ p if p log p 0 p
125 14 100 124 fsumge0 φ x + 0 p 1 x T Λ p if p log p 0 p
126 101 125 absidd φ x + p 1 x T Λ p if p log p 0 p = p 1 x T Λ p if p log p 0 p
127 17 adantl φ x + p 1 x p
128 127 99 syl φ x + p 1 x Λ p if p log p 0 p
129 11 128 fsumrecl φ x + p = 1 x Λ p if p log p 0 p
130 109 a1i φ x + 2
131 127 123 syl φ x + p 1 x 0 Λ p if p log p 0 p
132 12 a1i φ x + 1 x T 1 x
133 11 128 131 132 fsumless φ x + p 1 x T Λ p if p log p 0 p p = 1 x Λ p if p log p 0 p
134 107 sselda φ x + x
135 134 flcld φ x + x
136 rplogsumlem2 x p = 1 x Λ p if p log p 0 p 2
137 135 136 syl φ x + p = 1 x Λ p if p log p 0 p 2
138 101 129 130 133 137 letrd φ x + p 1 x T Λ p if p log p 0 p 2
139 126 138 eqbrtrd φ x + p 1 x T Λ p if p log p 0 p 2
140 139 adantrr φ x + 1 x p 1 x T Λ p if p log p 0 p 2
141 107 102 108 110 140 elo1d φ x + p 1 x T Λ p if p log p 0 p 𝑂1
142 10 102 106 141 o1mul2 φ x + ϕ N p 1 x T Λ p if p log p 0 p 𝑂1
143 97 142 eqeltrrd φ x + ϕ N p 1 x T Λ p p - log x - ϕ N p 1 x T log p p log x 𝑂1
144 29 43 143 o1dif φ x + ϕ N p 1 x T Λ p p log x 𝑂1 x + ϕ N p 1 x T log p p log x 𝑂1
145 7 144 mpbid φ x + ϕ N p 1 x T log p p log x 𝑂1