Proof:Gcd(a,b) is greater than all other common divisors of a and b
From CS2800 wiki
In fact, we will prove the following claim, which is stronger:
This claim is stronger because if c ❘ g then c ≤ g.
Proof: of stronger claim
We will do this proof by induction. Since the inductive principle used to define uses strong induction on the second argument, we will use the same inductive principle for the proof. Let be the statement "for all , if and then ." We will prove and assuming for all .
To see , assume and . We want to show that divides . Well, we have assumed this, so there's nothing to show!
Now, choose an arbitrary ; we will show assuming for all . Assume that and . Let ; we want to show that .
Note that since we know , so we have assumed . We could apply to show that if we could show that and . And we're already halfway there: we've already assumed . Thus we just need to show that .
Let's take stock of where we are:
- there exists with so
- there exists with so
- Since we know that for some .
- We want to show , i.e. that there exists with .
Putting the things we know together, we have
So choosing gives as required.