Solution (source code)

= Solution

A <nonlinear compact operator> is a continuous map that sends <bounded sets> of its domain to <relatively compact subsets> of the target space; linearity is not part of this general definition.

For the specified <diagonal operator on sequence space> on <l2 sequence space>,
$$
\|Tx\|_2^2=\sum_{i\geq1}\frac{|x_i|^2}{i^2}\leq\sum_{i\geq1}|x_i|^2,
$$
so it is well-defined, <linear> and <bounded>. Let $T_N$ retain only its first $N$ output coordinates. This is a <finite-rank operator>, and
$$
\boxed{\|T-T_N\|=\frac1{N+1}\longrightarrow0.}
$$
The upper bound follows by estimating each tail multiplier by $1/(N+1)$; equality follows on the unit coordinate vector $e_{N+1}$. Finite-rank operators between <Banach spaces> are compact, and a limit of compact linear operators in <operator norm> is compact, the <norm-closedness of compact operators>. Therefore $\boxed{T\text{ is compact}}$.