Solution (source code)

= Solution

Define the <Möbius transformation>
$$
T(z)=\frac{(z-z_1)(z_2-z_3)}{(z-z_3)(z_2-z_1)}.
$$
The three prescribed distinct points go to $0,1,\infty$, respectively, and the specified <cross-ratio> is exactly $T(z_4)$.

To identify the preimage of the extended real line directly, write $T(z)=(az+b)/(cz+d)$. The condition $T(z)=\overline{T(z)}$ becomes
$$
(az+b)(\overline c\,\overline z+\overline d)
-(\overline a\,\overline z+\overline b)(cz+d)=0.
$$
After division by $2i$, this has the real form $A|z|^2+Bz+\overline B\,\overline z+C=0$, with $A,C$ real. If $A=0$ it is a line; otherwise completing the square gives a circle. It contains $z_1,z_2,z_3$, including the pole as a point mapped to infinity, so it is nondegenerate. Three distinct noncollinear points determine one circle; if the three are collinear, their unique <generalized circle> is their line.

Consequently $T(z_4)$ is real exactly when the fourth point is on the same <generalized circle> as the first three. This proves the <real cross-ratio criterion for a generalized circle>:
$$
\boxed{\text{The cross-ratio is real if and only if the four points are concyclic or collinear}.}
$$