Solution (source code)

= Solution

For the <Gaussian integers>, use the <Gaussian norm>
$$
\boxed{\delta(a+bi)=a^2+b^2\quad(a+bi\neq0).}
$$
To identify the <ideal>, note that $a^2+b^2$ is even if and only if $a,b$ have the same parity. Also
$$
\frac{a+bi}{1+i}=\frac{a+b}{2}+\frac{b-a}{2}i.
$$
This quotient is a <Gaussian integer> precisely when $a,b$ have the same parity. Therefore the prescribed set consists exactly of the multiples of $1+i$, giving
$$
\boxed{I=\mathbb Z[i](1+i),\qquad d=1+i.}
$$
Any associate of $1+i$ would generate the same <principal ideal>.