Metamath Proof Explorer


Theorem pcdvdsb

Description: P ^ A divides N if and only if A is at most the count of P . (Contributed by Mario Carneiro, 3-Oct-2014)

Ref Expression
Assertion pcdvdsb P N A 0 A P pCnt N P A N

Proof

Step Hyp Ref Expression
1 oveq2 N = 0 P pCnt N = P pCnt 0
2 1 breq2d N = 0 A P pCnt N A P pCnt 0
3 breq2 N = 0 P A N P A 0
4 2 3 bibi12d N = 0 A P pCnt N P A N A P pCnt 0 P A 0
5 simpl3 P N A 0 N 0 A 0
6 5 nn0zd P N A 0 N 0 A
7 simpl1 P N A 0 N 0 P
8 simpl2 P N A 0 N 0 N
9 simpr P N A 0 N 0 N 0
10 pczcl P N N 0 P pCnt N 0
11 7 8 9 10 syl12anc P N A 0 N 0 P pCnt N 0
12 11 nn0zd P N A 0 N 0 P pCnt N
13 eluz A P pCnt N P pCnt N A A P pCnt N
14 6 12 13 syl2anc P N A 0 N 0 P pCnt N A A P pCnt N
15 prmnn P P
16 7 15 syl P N A 0 N 0 P
17 16 nnzd P N A 0 N 0 P
18 dvdsexp P A 0 P pCnt N A P A P P pCnt N
19 18 3expia P A 0 P pCnt N A P A P P pCnt N
20 17 5 19 syl2anc P N A 0 N 0 P pCnt N A P A P P pCnt N
21 14 20 sylbird P N A 0 N 0 A P pCnt N P A P P pCnt N
22 pczdvds P N N 0 P P pCnt N N
23 7 8 9 22 syl12anc P N A 0 N 0 P P pCnt N N
24 nnexpcl P A 0 P A
25 15 24 sylan P A 0 P A
26 25 3adant2 P N A 0 P A
27 26 nnzd P N A 0 P A
28 27 adantr P N A 0 N 0 P A
29 16 11 nnexpcld P N A 0 N 0 P P pCnt N
30 29 nnzd P N A 0 N 0 P P pCnt N
31 dvdstr P A P P pCnt N N P A P P pCnt N P P pCnt N N P A N
32 28 30 8 31 syl3anc P N A 0 N 0 P A P P pCnt N P P pCnt N N P A N
33 23 32 mpan2d P N A 0 N 0 P A P P pCnt N P A N
34 21 33 syld P N A 0 N 0 A P pCnt N P A N
35 nn0re P pCnt N 0 P pCnt N
36 nn0re A 0 A
37 ltnle P pCnt N A P pCnt N < A ¬ A P pCnt N
38 35 36 37 syl2an P pCnt N 0 A 0 P pCnt N < A ¬ A P pCnt N
39 nn0ltp1le P pCnt N 0 A 0 P pCnt N < A P pCnt N + 1 A
40 38 39 bitr3d P pCnt N 0 A 0 ¬ A P pCnt N P pCnt N + 1 A
41 11 5 40 syl2anc P N A 0 N 0 ¬ A P pCnt N P pCnt N + 1 A
42 peano2nn0 P pCnt N 0 P pCnt N + 1 0
43 11 42 syl P N A 0 N 0 P pCnt N + 1 0
44 43 nn0zd P N A 0 N 0 P pCnt N + 1
45 eluz P pCnt N + 1 A A P pCnt N + 1 P pCnt N + 1 A
46 44 6 45 syl2anc P N A 0 N 0 A P pCnt N + 1 P pCnt N + 1 A
47 dvdsexp P P pCnt N + 1 0 A P pCnt N + 1 P P pCnt N + 1 P A
48 47 3expia P P pCnt N + 1 0 A P pCnt N + 1 P P pCnt N + 1 P A
49 17 43 48 syl2anc P N A 0 N 0 A P pCnt N + 1 P P pCnt N + 1 P A
50 46 49 sylbird P N A 0 N 0 P pCnt N + 1 A P P pCnt N + 1 P A
51 pczndvds P N N 0 ¬ P P pCnt N + 1 N
52 7 8 9 51 syl12anc P N A 0 N 0 ¬ P P pCnt N + 1 N
53 16 43 nnexpcld P N A 0 N 0 P P pCnt N + 1
54 53 nnzd P N A 0 N 0 P P pCnt N + 1
55 dvdstr P P pCnt N + 1 P A N P P pCnt N + 1 P A P A N P P pCnt N + 1 N
56 54 28 8 55 syl3anc P N A 0 N 0 P P pCnt N + 1 P A P A N P P pCnt N + 1 N
57 52 56 mtod P N A 0 N 0 ¬ P P pCnt N + 1 P A P A N
58 imnan P P pCnt N + 1 P A ¬ P A N ¬ P P pCnt N + 1 P A P A N
59 57 58 sylibr P N A 0 N 0 P P pCnt N + 1 P A ¬ P A N
60 50 59 syld P N A 0 N 0 P pCnt N + 1 A ¬ P A N
61 41 60 sylbid P N A 0 N 0 ¬ A P pCnt N ¬ P A N
62 34 61 impcon4bid P N A 0 N 0 A P pCnt N P A N
63 36 3ad2ant3 P N A 0 A
64 63 rexrd P N A 0 A *
65 pnfge A * A +∞
66 64 65 syl P N A 0 A +∞
67 pc0 P P pCnt 0 = +∞
68 67 3ad2ant1 P N A 0 P pCnt 0 = +∞
69 66 68 breqtrrd P N A 0 A P pCnt 0
70 dvds0 P A P A 0
71 27 70 syl P N A 0 P A 0
72 69 71 2thd P N A 0 A P pCnt 0 P A 0
73 4 62 72 pm2.61ne P N A 0 A P pCnt N P A N