Metamath Proof Explorer


Theorem ppinprm

Description: The prime-counting function ppi at a non-prime. (Contributed by Mario Carneiro, 19-Sep-2014)

Ref Expression
Assertion ppinprm A ¬ A + 1 π _ A + 1 = π _ A

Proof

Step Hyp Ref Expression
1 simprr A ¬ A + 1 x 2 A + 1 x 2 A + 1
2 1 elin2d A ¬ A + 1 x 2 A + 1 x
3 simprl A ¬ A + 1 x 2 A + 1 ¬ A + 1
4 nelne2 x ¬ A + 1 x A + 1
5 2 3 4 syl2anc A ¬ A + 1 x 2 A + 1 x A + 1
6 velsn x A + 1 x = A + 1
7 6 necon3bbii ¬ x A + 1 x A + 1
8 5 7 sylibr A ¬ A + 1 x 2 A + 1 ¬ x A + 1
9 1 elin1d A ¬ A + 1 x 2 A + 1 x 2 A + 1
10 2z 2
11 zcn A A
12 11 adantr A ¬ A + 1 x 2 A + 1 A
13 ax-1cn 1
14 pncan A 1 A + 1 - 1 = A
15 12 13 14 sylancl A ¬ A + 1 x 2 A + 1 A + 1 - 1 = A
16 elfzuz2 x 2 A + 1 A + 1 2
17 uz2m1nn A + 1 2 A + 1 - 1
18 9 16 17 3syl A ¬ A + 1 x 2 A + 1 A + 1 - 1
19 15 18 eqeltrrd A ¬ A + 1 x 2 A + 1 A
20 nnuz = 1
21 2m1e1 2 1 = 1
22 21 fveq2i 2 1 = 1
23 20 22 eqtr4i = 2 1
24 19 23 eleqtrdi A ¬ A + 1 x 2 A + 1 A 2 1
25 fzsuc2 2 A 2 1 2 A + 1 = 2 A A + 1
26 10 24 25 sylancr A ¬ A + 1 x 2 A + 1 2 A + 1 = 2 A A + 1
27 9 26 eleqtrd A ¬ A + 1 x 2 A + 1 x 2 A A + 1
28 elun x 2 A A + 1 x 2 A x A + 1
29 27 28 sylib A ¬ A + 1 x 2 A + 1 x 2 A x A + 1
30 29 ord A ¬ A + 1 x 2 A + 1 ¬ x 2 A x A + 1
31 8 30 mt3d A ¬ A + 1 x 2 A + 1 x 2 A
32 31 2 elind A ¬ A + 1 x 2 A + 1 x 2 A
33 32 expr A ¬ A + 1 x 2 A + 1 x 2 A
34 33 ssrdv A ¬ A + 1 2 A + 1 2 A
35 uzid A A A
36 35 adantr A ¬ A + 1 A A
37 peano2uz A A A + 1 A
38 fzss2 A + 1 A 2 A 2 A + 1
39 ssrin 2 A 2 A + 1 2 A 2 A + 1
40 36 37 38 39 4syl A ¬ A + 1 2 A 2 A + 1
41 34 40 eqssd A ¬ A + 1 2 A + 1 = 2 A
42 41 fveq2d A ¬ A + 1 2 A + 1 = 2 A
43 peano2z A A + 1
44 43 adantr A ¬ A + 1 A + 1
45 ppival2 A + 1 π _ A + 1 = 2 A + 1
46 44 45 syl A ¬ A + 1 π _ A + 1 = 2 A + 1
47 ppival2 A π _ A = 2 A
48 47 adantr A ¬ A + 1 π _ A = 2 A
49 42 46 48 3eqtr4d A ¬ A + 1 π _ A + 1 = π _ A