MathCase

If 4 divides n², must it divide n?

Try n = 2

Four goes into 2 × 2 exactly once. Can you split two objects into groups of four with none left over?

Check your answer

No. Four divides the square, but it leaves a remainder when you divide 2 by 4. One example is enough to disprove a rule that claims to work every time. That’s a counterexample.

Open this example in your notebook
See the statement in Lean(4 : Nat) ∣ 2 ^ 2 ∧ ¬ (4 : Nat) ∣ 2

What if the divisor is prime?

If a prime divides a whole number’s square, it divides the number too. For example, 3 divides 36 and also divides 6. The proof in the notebook uses a known theorem about primes to cover every case.

Read the prime proof
See the statement in Lean∀ (p n : Nat), p.Prime → p ∣ n ^ 2 → p ∣ n

Your turn with two factors

Suppose a prime divides (a × b)². Can you show that it divides at least one of the two factors?

Show a hint

First apply the square rule to a × b. Then use the fact that a prime dividing a product divides at least one factor.

Write your proof
See the statement in Lean∀ (p a b : Nat), p.Prime → p ∣ (a * b) ^ 2 → p ∣ a ∨ p ∣ b