I am reading the proof of the following theorem from Apostol's Introduction to Analytic Number Theory.
Theorem 1.2 Given any two integers a and b, there is a common divisor $d$ of a and b of the form $d=ax+by$, where $x$ and $y$ are integers. Moreover, every common divisor of $a$ and $b$ divides this $d$.
I'm stuck on the first step. The author used induction on $n$, where $n=a+b$ and assumed that the theorem has been proved for $0,1,2, \cdots, n-1$.
I think the induction on $n$ should be an independent process where $n$ should be independent on other variables such as $a$ and $b$ here. For example, when we prove that binomial theorem:
$$(x+y)^n=\sum_{k=0}^n\binom{n}{k}x^{n-k}y^k=\sum_{k=0}^n\binom{n}{k}x^ky^{n-k}$$
We would use the induction on $n$, and assume this equality holds for $0,1,2, \cdots, n-1$. However, $a,b$ are all constants, not relevant to $n$.
What's wrong with my thought?
For reference, the following is the whole proof from the book:
Here is a possible relevant: link.