Proof for a theorem about relations beween convergents in continued fractions Upon reading about some properties of numerators and denominators in a textbook called Continued Fractions (here, chapter 2.3), I was unable to understand the following transmutation of the expression (circled in red in the image link), and highlighted red here:

2.3 Relations between convergents In this section, we see some properties of the simple continued fractions in terms of the numerators and denominators appearing in the convergents.
Theorem 2.4. If $ p_{n} $ and $ q_{n} $ are defined by $ \begin{array}{l} p_{0}=a_{0}, p_{1}=a_{1} a_{0}+1, p_{n}=a_{n} p_{n-1}+p_{n-2} \text { for } 2 \leq n \\ q_{0}=1, q_{1}=a_{1}, q_{n}=a_{n} q_{n-1}+q_{n-2} \text { for } 2 \leq n \end{array} $
then $ \left[a_{0}, a_{1}, \ldots, a_{n}\right]=\frac{p_{n}}{q_{n}} $
Proof. The proof proceeds by induction. The base cases are seen to be true by the assumptions given for $ n=0, n=1 $. Let us assume the statement to be true for some $ m $. Then
$ \left[a_{0}, a_{1}, \ldots a_{m-1}, a_{m}\right]=\frac{p_{m}}{q_{m}}=\frac{a_{m} p_{m-1}+p_{m-2}}{a_{m} q_{m-1}+q_{m-2}} $
Hence, we get
$ \left[a_{0}, a_{1}, \ldots a_{m-1}, a_{m},\color{red}{a_{m+1}}\right]=\left[a_{0}, a_{1}, \ldots a_{m-1}, \color{red}{a_{m}+\frac{1}{a_{m+1}}}\right]$

In addition to not seeing how the equality in the last line was achieved, I was also under the impression that convergents of continued fractions (the quotients in square bracket notation) must by definition always be integers. The marked transmutation makes the last quotient a fraction.
 A: This is an interpretation question, rather than a request for a problem to be solved.  Therefore, I personally see no problem answering it, even though the OP has shown no work.  If I get downvoted, okay.
Because of the difficulty displaying long continued fractions, I am going to illustrate the OP's question, under the assumption that
$m = 3$.
$a_0 +\cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{a_3 + \cfrac{1}{a_4}}}}$
can be equivalently interpeted as
$a_0 +\cfrac{1}{a_1+\cfrac{1}{a_2+\cfrac{1}{\{a_3 + \frac{1}{a_4}\}}}}$

I was also under the impression that convergents of continued fractions (the quotients in square bracket notation) must by definition always be integers.

I am assuming that you intend the coefficients of continued fractions, which are normally expressed as integers, rather than the convergents of continued fractions, which normally have form $\frac{p_n}{q_n}.$
While it's true that the coefficients are normally computed to be integers, you specifically asked how a specific line in a proof can be algebraically justified.  As indicated in my continued fraction examples above, the algebra is justified.
In my examples, what this means is that
$$[a_0, a_1, a_2, a_3, a_4]$$
is algebraically equivalent to
$$\left[a_0, a_1, a_2, \left(a_3 + \frac{1}{a_4}\right)\right].$$
A: Something I programmed recently; this is the Gauss-Lagrange method of chains of reduced forms, here I use  the left neighbors. The Pell equation deals with $x^2 - n y^2,$ the continued fraction being for $\sqrt n.$ With little extra effort we get the continued fraction for $\frac{B + \sqrt D}{2A},$  where $D=B^2 -4AC.$
I also have it print some 2 by 2 matrices in proper format for pari-gp; in each case below, the product pari calls rt * h * r  is something specific related to the original Hessian matrix h
The "partial quotients" of the continued fraction are the absolute  values of the "digits" I write at the right hand side of each line.  The output below shows $\frac{5 + \sqrt {597}}{22}$
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ ./indefCycleLeft 11 5 -13

0  form   11 5 -13   epsilon  1
1  form   -7 17 11   Epsilon  -2
2  form   17 11 -7   Epsilon  1
3  form   -1 23 17   Epsilon  -23     ambiguous  
4  form   17 23 -1   Epsilon  1     ambiguous  
5  form   -7 11 17   Epsilon  -2
6  form   11 17 -7   Epsilon  1
7  form   -13 5 11   Epsilon  -1 opposite  
8  form   3 21 -13   Epsilon  7     ambiguous  
9  form   -13 21 3   Epsilon  -1     ambiguous  
10  form   11 5 -13


  form   11 x^2  + 5 x y  -13 y^2 

minimum was   1rep   x = -4   y = 3 disc 597 dSqrt 24
Automorph, written on right of Gram matrix:  
-5872  5187
4389  -3877
  for   Pari/gp: rt =  [ -5872 , 4389 ; 5187 , -3877 ] ;    h =  [ 22 , 5 ; 5 , -26 ] ;    r =  [ -5872 , 5187 ; 4389 , -3877 ] ; 


 opposite Pari/gp: rt =  [ -392 , 293 ; -293 , 219 ] ;    h =  [ 22 , 5 ; 5 , -26 ] ;    r =  [ -392 , -293 ; 293 , 219 ] ; 

=========================================
jagy@phobeusjunior:~/old drive/home/jagy/Cplusplus$ 

