Metamath Proof Explorer


Theorem pcz

Description: The prime count function can be used as an indicator that a given rational number is an integer. (Contributed by Mario Carneiro, 23-Feb-2014)

Ref Expression
Assertion pcz AAp0ppCntA

Proof

Step Hyp Ref Expression
1 pcge0 pA0ppCntA
2 1 ancoms Ap0ppCntA
3 2 ralrimiva Ap0ppCntA
4 elq AxyA=xy
5 nnz yy
6 dvds0 yy0
7 5 6 syl yy0
8 7 ad2antlr xyx=0y0
9 simpr xyx=0x=0
10 8 9 breqtrrd xyx=0yx
11 10 a1d xyx=0p0ppCntxyyx
12 simpr xyx0pp
13 simplll xyx0px
14 simplr xyx0px0
15 simpllr xyx0py
16 pcdiv pxx0yppCntxy=ppCntxppCnty
17 12 13 14 15 16 syl121anc xyx0pppCntxy=ppCntxppCnty
18 17 breq2d xyx0p0ppCntxy0ppCntxppCnty
19 pczcl pxx0ppCntx0
20 12 13 14 19 syl12anc xyx0pppCntx0
21 20 nn0red xyx0pppCntx
22 12 15 pccld xyx0pppCnty0
23 22 nn0red xyx0pppCnty
24 21 23 subge0d xyx0p0ppCntxppCntyppCntyppCntx
25 18 24 bitrd xyx0p0ppCntxyppCntyppCntx
26 25 ralbidva xyx0p0ppCntxypppCntyppCntx
27 id xx
28 pc2dvds yxyxpppCntyppCntx
29 5 27 28 syl2anr xyyxpppCntyppCntx
30 29 adantr xyx0yxpppCntyppCntx
31 26 30 bitr4d xyx0p0ppCntxyyx
32 31 biimpd xyx0p0ppCntxyyx
33 11 32 pm2.61dane xyp0ppCntxyyx
34 nnne0 yy0
35 simpl xyx
36 dvdsval2 yy0xyxxy
37 5 34 35 36 syl2an23an xyyxxy
38 33 37 sylibd xyp0ppCntxyxy
39 oveq2 A=xyppCntA=ppCntxy
40 39 breq2d A=xy0ppCntA0ppCntxy
41 40 ralbidv A=xyp0ppCntAp0ppCntxy
42 eleq1 A=xyAxy
43 41 42 imbi12d A=xyp0ppCntAAp0ppCntxyxy
44 38 43 syl5ibrcom xyA=xyp0ppCntAA
45 44 rexlimivv xyA=xyp0ppCntAA
46 4 45 sylbi Ap0ppCntAA
47 3 46 impbid2 AAp0ppCntA