Metamath Proof Explorer


Theorem pczpre

Description: Connect the prime count pre-function to the actual prime count function, when restricted to the integers. (Contributed by Mario Carneiro, 23-Feb-2014) (Proof shortened by Mario Carneiro, 24-Dec-2016)

Ref Expression
Hypothesis pczpre.1 S = sup n 0 | P n N <
Assertion pczpre P N N 0 P pCnt N = S

Proof

Step Hyp Ref Expression
1 pczpre.1 S = sup n 0 | P n N <
2 zq N N
3 eqid sup n 0 | P n x < = sup n 0 | P n x <
4 eqid sup n 0 | P n y < = sup n 0 | P n y <
5 3 4 pcval P N N 0 P pCnt N = ι z | x y N = x y z = sup n 0 | P n x < sup n 0 | P n y <
6 2 5 sylanr1 P N N 0 P pCnt N = ι z | x y N = x y z = sup n 0 | P n x < sup n 0 | P n y <
7 simprl P N N 0 N
8 7 zcnd P N N 0 N
9 8 div1d P N N 0 N 1 = N
10 9 eqcomd P N N 0 N = N 1
11 prmuz2 P P 2
12 eqid 1 = 1
13 eqid n 0 | P n 1 = n 0 | P n 1
14 eqid sup n 0 | P n 1 < = sup n 0 | P n 1 <
15 13 14 pcpre1 P 2 1 = 1 sup n 0 | P n 1 < = 0
16 11 12 15 sylancl P sup n 0 | P n 1 < = 0
17 16 adantr P N N 0 sup n 0 | P n 1 < = 0
18 17 oveq2d P N N 0 S sup n 0 | P n 1 < = S 0
19 eqid n 0 | P n N = n 0 | P n N
20 19 1 pcprecl P 2 N N 0 S 0 P S N
21 11 20 sylan P N N 0 S 0 P S N
22 21 simpld P N N 0 S 0
23 22 nn0cnd P N N 0 S
24 23 subid1d P N N 0 S 0 = S
25 18 24 eqtr2d P N N 0 S = S sup n 0 | P n 1 <
26 1nn 1
27 oveq1 x = N x y = N y
28 27 eqeq2d x = N N = x y N = N y
29 breq2 x = N P n x P n N
30 29 rabbidv x = N n 0 | P n x = n 0 | P n N
31 30 supeq1d x = N sup n 0 | P n x < = sup n 0 | P n N <
32 31 1 eqtr4di x = N sup n 0 | P n x < = S
33 32 oveq1d x = N sup n 0 | P n x < sup n 0 | P n y < = S sup n 0 | P n y <
34 33 eqeq2d x = N S = sup n 0 | P n x < sup n 0 | P n y < S = S sup n 0 | P n y <
35 28 34 anbi12d x = N N = x y S = sup n 0 | P n x < sup n 0 | P n y < N = N y S = S sup n 0 | P n y <
36 oveq2 y = 1 N y = N 1
37 36 eqeq2d y = 1 N = N y N = N 1
38 breq2 y = 1 P n y P n 1
39 38 rabbidv y = 1 n 0 | P n y = n 0 | P n 1
40 39 supeq1d y = 1 sup n 0 | P n y < = sup n 0 | P n 1 <
41 40 oveq2d y = 1 S sup n 0 | P n y < = S sup n 0 | P n 1 <
42 41 eqeq2d y = 1 S = S sup n 0 | P n y < S = S sup n 0 | P n 1 <
43 37 42 anbi12d y = 1 N = N y S = S sup n 0 | P n y < N = N 1 S = S sup n 0 | P n 1 <
44 35 43 rspc2ev N 1 N = N 1 S = S sup n 0 | P n 1 < x y N = x y S = sup n 0 | P n x < sup n 0 | P n y <
45 26 44 mp3an2 N N = N 1 S = S sup n 0 | P n 1 < x y N = x y S = sup n 0 | P n x < sup n 0 | P n y <
46 7 10 25 45 syl12anc P N N 0 x y N = x y S = sup n 0 | P n x < sup n 0 | P n y <
47 ltso < Or
48 47 supex sup n 0 | P n N < V
49 1 48 eqeltri S V
50 3 4 pceu P N N 0 ∃! z x y N = x y z = sup n 0 | P n x < sup n 0 | P n y <
51 2 50 sylanr1 P N N 0 ∃! z x y N = x y z = sup n 0 | P n x < sup n 0 | P n y <
52 eqeq1 z = S z = sup n 0 | P n x < sup n 0 | P n y < S = sup n 0 | P n x < sup n 0 | P n y <
53 52 anbi2d z = S N = x y z = sup n 0 | P n x < sup n 0 | P n y < N = x y S = sup n 0 | P n x < sup n 0 | P n y <
54 53 2rexbidv z = S x y N = x y z = sup n 0 | P n x < sup n 0 | P n y < x y N = x y S = sup n 0 | P n x < sup n 0 | P n y <
55 54 iota2 S V ∃! z x y N = x y z = sup n 0 | P n x < sup n 0 | P n y < x y N = x y S = sup n 0 | P n x < sup n 0 | P n y < ι z | x y N = x y z = sup n 0 | P n x < sup n 0 | P n y < = S
56 49 51 55 sylancr P N N 0 x y N = x y S = sup n 0 | P n x < sup n 0 | P n y < ι z | x y N = x y z = sup n 0 | P n x < sup n 0 | P n y < = S
57 46 56 mpbid P N N 0 ι z | x y N = x y z = sup n 0 | P n x < sup n 0 | P n y < = S
58 6 57 eqtrd P N N 0 P pCnt N = S