-1

Euclid's lemma says that if p divides ab, then p divides a or p divides b. If this is the case then p is prime.

What about when p=4, a=8 and b=9. p| ab => p|72 then, (p|8 or p|9) is true. This infers that p is prime. But 4 is not a prime number. I am overlooking something, and I am not sure what it is. There is definitely no restriction on a,b, and p, other than they are all integers.

Any help or hint would be greatly appreciated.

tidbits
  • 3
  • 3
  • I'm voting to close this question as off-topic because it is about number theory / [math.se] instead of programming or software development. – Pang Sep 23 '16 at 02:35
  • I am sorry, where did I mention that this is a software question? It might be because I am new to stackOverflow. Please close it then. – tidbits Oct 31 '16 at 00:07

2 Answers2

2

The lemma is that if p is prime and divides ab then p div a or p div b. Not that p must be prime if it divides a product

In your example p is relatively prime to b

EoinS
  • 5,405
  • 1
  • 19
  • 32
  • My notes from class say, "An integer p is prime if and only if for all a,b in **Z** (the set of all integers), if p|ab then p|a or p|b." Since this is an if and only if statement, if (if 4|72 then 4|8 or 4|9) statement is correct, then p must be prime, isn't it? – tidbits Sep 21 '16 at 03:23
  • "In your example p is relatively prime to b" @EoinS I appreciate your prompt input, but I don't understand what that has to do with the definition. 4|8 or 4|9. The "or" is inclusive. So if either of them are true then p is a prime number. – tidbits Sep 21 '16 at 03:32
  • @tidbits The simple answer is that your class notes are wrong. "for all, b in Z, if p|ab then p|a or p|b" does not imply "p is prime". You even provided a counterexample. – Patrick87 Sep 21 '16 at 13:13
-1

Forty minutes later I realized, this implies for all a and b in Z. This means that for all possible a and b such that p| ab.

From my example, when p=4, we need to try 2 and 2, because 4 divides itself as well.

tidbits
  • 3
  • 3