Solution (source code)

= Solution

A <contraction mapping> on a <metric space> $(X,d)$ is a map $f:X\to X$ for which there is a single constant $q$ with $0\leq q<1$ such that
$$
\boxed{d(f(x),f(y))\leq q\,d(x,y)\quad\text{for every }x,y\in X.}
$$
The same $q$ must work for every pair. Merely decreasing each nonzero distance strictly does not suffice for this definition.