Solution (source code)

= Solution

A <euclidean domain> is an <integral> domain with a <function> $d$ on nonzero elements such that for $a,b\ne0$ there are $q,r$ with $a=bq+r$ and either $r=0$ or $d(r)<d(b)$.