Solution (source code)

= Solution

For a long <solenoid> at rest, $B=\mu_0nI$, where n is turns per unit axial length and I is the current around a turn. Under a boost along its axis, longitudinal contraction gives $n'=\gamma n$. The circumference of a turn is transverse to the boost and does not contract; <time dilation> reduces its charge-circulation rate, measured relative to the moving material of that turn, to $I'=I/\gamma$. Hence
$$
\boxed{B_\parallel'=\mu_0n'I'=\mu_0(\gamma n)(I/\gamma)=B_\parallel.}
$$
Equivalently, the transverse volume-current <density> of an ideal continuous current sheet is unchanged by an axial boost. The increase in turn <density> must not be included while leaving the per-turn current unchanged. End effects and the microscopic winding geometry are outside this ideal-solenoid argument.