Proof of irrationality of infinite continued fractions We have the identity
$$\tan x=\frac{x}{1+\underset{n=1}{\overset{\infty}{\mathrm K}} \frac{-x^2}{2n+1}}.$$
From the Wikipedia article on Proof that π is irrational:

[...] Lambert proved that if x is non-zero and rational then this expression must be irrational.

But how can we prove Lambert's assertion? I couldn't find any resource containing the proof.
 A: I couldn't find any resource containing the proof. 
The Wikipedia page says that Lambert's proof may be found in

Lambert, Johann Heinrich (2004) [1768], "Mémoire sur quelques propriétés remarquables des quantités transcendantes circulaires et logarithmiques", in Berggren, Lennart; Borwein, Jonathan M.; Borwein, Peter B. (eds.), Pi, a source book (3rd ed.), New York: Springer-Verlag, pp. 129–140, ISBN 0-387-20571-3

A: Suppose that $x=\frac{a}{b}$ for $a,b\in\mathbb{N}$. Then
$$\tan\frac{a}{b}=\frac{a}{b+\underset{n=1}{\overset{\infty}{\mathrm K}} \frac{-a^2}{(2n+1)b}}.$$
Let $3b\gt a^2$ (this can be assumed without loss of generality, if $3b\le a^2$ then for large enough $n$ it's true that $(2n+1)b\gt a^2$), which means that
$$0\lt \frac{a^2}{3b+\underset{n=2}{\overset{\infty}{\mathrm K}} \tfrac{-a^2}{(2n+1)b}}\lt 1.$$
Now if
$$\frac{a^2}{3b+\underset{n=2}{\overset{\infty}{\mathrm K}} \tfrac{-a^2}{(2n+1)b}}=\frac{c_2}{c_1}$$
for some $c_1,c_2\in\mathbb{N}$ and $0\lt\frac{c_2}{c_1}\lt 1$, then $c_1\gt c_2$. Furthermore,
$$0\lt\frac{c_{3}}{c_{2}}=\frac{a^2}{5b+\underset{n=3}{\overset{\infty}{\mathrm K}} \tfrac{-a^2}{(2n+1)b}}\lt 1,$$
$c_{3}\in\mathbb{N}$ and $c_2\gt c_3$, and so on:
$$c_1\gt c_2\gt c_3\gt\cdots\gt 0.$$
This is a contradiction since $c_{k\gt 0}$ are natural numbers, so
$$\frac{a^2}{3b+\underset{n=2}{\overset{\infty}{\mathrm K}} \tfrac{-a^2}{(2n+1)b}}\ne\frac{c_2}{c_1}\implies \tan\frac{a}{b}\notin\mathbb{Q}.$$
Thus we arrived at the conclusion that
$$x\in\mathbb{Q}\setminus\{0\}\implies \tan x\notin\mathbb{Q}.$$
