euclid-step-keeps-gcd
The Euclidean algorithm replaces the pair by , where and , and repeats until the remainder is 0. It computes only if every step preserves it:
Where I got stuck
Picture as a strip cut into segments of length and a leftover of length . Let , the biggest block that tiles both and . The block tiles the whole strip and tiles each segment, so it tiles the leftover:
So divides both and . I read that as " is the gcd of as well", equality, done. When the write-up said this only proves , I pushed back for three turns. I had started with being the gcd, not some factor, so where could an inequality come from?
What the argument actually used
One property of : it divides and . It never used that is the largest such number. So any block with that property survives the same argument, and the conclusion is only what is true of every such block: is a common divisor of . Being the gcd of is a fact about the pair . It says nothing about how the pair ranks its divisors.
The counterexample is to the inference, not to the number. Take , , so . The block 3 tiles 24 and 18, so by the same argument it tiles . All true, and , not 3. The argument's shape cannot tell 3 from 6, so it cannot conclude "greatest" for either.
What the strip argument proves, exactly: every common divisor of is a common divisor of . Hence , and nothing more.
The other direction
The way it closed: suppose had a common divisor bigger than . Then divides and , so it divides . That makes a common divisor of bigger than the greatest one, which is impossible. So no common divisor of exceeds , and with the first half that is equality.
Written out directly it is the same line. Take any dividing both and , say and . Then
so divides too. Every common divisor of is a common divisor of , which gives .
The two directions use different halves of the same equation. The first subtracts, , and the second adds back, . Each is one line, and neither alone is the lemma. On the counterexample pair the chain runs with gcd 6 at every stage. On a coprime pair, , the gcd is 1 throughout, which is what makes the back-substitution in units-mod-n-coprime-and-totient land on 1.
The general lesson: an argument that uses only a shared property cannot single out the extreme element. To prove " is the greatest" the word greatest has to enter somewhere, and here it enters only through the reverse direction. Same shape as one-to-one-proof-converse-trap: one direction proved, both directions claimed.
Mantra "Tiles both" makes it a factor. "Greatest" needs the other direction.