Solution (source code)

= Solution

For each place $v$ of $K$ and each $w\mid v$ of $L$, the inclusion $K_v\hookrightarrow L_w$ defines
$$
i_{L/K}:\mathbb I_K\longrightarrow\mathbb I_L,
\qquad
(x_v)_v\longmapsto(x_v)_{w\mid v}.
$$
At all but finitely many finite $v$, the component $x_v$ is a unit, and its image is a unit at every $w\mid v$, so the image is an idele. The map is a homomorphism and is injective because every local inclusion is injective.