Let $A,B,C$ be three non-collinear points in $\mathbb{R}^2$ of distance at most $d$ from each other. Prove that there are at most $O(d^2)$ points whose distances to A,B,C are all integers.
I think one can come up with a rough upper bound for the maximum number of points $f(d)$ whose distances to $A,B,C$ are all integers. Note that the distance between two points is invariant under rotations, reflections, and translations. Hence we may translate and rotate the plane if necessary to assume that $A = (0,0), C = (c,0), B = (a,b)$ for some real numbers $a,b,c$ with $b\neq 0, |c|\leq d, a^2 + b^2 \leq d^2, (a-c)^2 + b^2\leq d^2$. Let $P=(x,y)$ be an arbitrary point in $\mathbb{R}^2$ so that $AP,BP,CP$ are all integers (here for two points $X,Y\in \mathbb{R}^2, XY$ denotes the length of the line segment from X to Y). Then $x^2 + y^2, (x-c)^2 + y^2, (x-a)^2 + (y-b)^2$ are all integers. For real numbers $j,k,l,l\neq 0$, say $j\equiv k\mod l$ if $j-k = tl$ for some integer t. Not all of the properties of modular arithmetic with integers hold under this new definition (e.g. $a_1\equiv a_2 \mod c, b_1\equiv b_2\mod c$ does not necessarily imply $a_1b_1\equiv a_2b_2\mod c$) but we have that $a_1\equiv a_2 \mod c, b_1\equiv b_2\mod c$ implies $a_1 + a_2\equiv b_1+b_2\mod c\tag{0}$. Then in this notation we have
$\sqrt{x^2 + y^2} \equiv 0\mod 1\tag{1}$ $\sqrt{(x-c)^2+y^2}\equiv 0\mod 1\tag{2}$ $\sqrt{(x-a)^2+(y-b)^2}\equiv 0\mod 1\tag{3}$
We could square each congruence to obtain equations (1'), (2'), (3'). Subtracting (1') from (2') gives $-2cx + c^2\equiv 0\mod 1.$ Note that if $c$ is rational and nonzero, then this implies $x$ is rational. Subtracting (1') from (3') gives $-2ax + a^2 + b^2 + -2by \equiv 0\mod 1.$ If $a,b$ are both rational then since $a\neq 0, x$ is rational, and if $b\neq 0$ then $y$ is rational. It might be possible to get some sort of upper bound on $x$ and/or $y$. First assume $c,a,b$ are all integers. Then $-2cx +c^2\equiv 0\mod 1$ implies $x$ is a fraction whose denominator divides $2c$. Hence $-2ax+a^2+b^2-2by \equiv 0\mod 1$ implies $-2by\equiv 0\mod 1$ and so $y$ is a fraction whose denominator divides $2b$. If $x,y$ are in fact integers, then $x^2 + y^2 = z^2$ for some integer $z$, and it is known that we can assume WLOG that $x=2uvd, y = d(u^2-v^2), z = d(u^2 + v^2)$ for some coprime $u,v$ with opposite parity where $d=\gcd(x,y,z)$. I'm not sure which method to use to make significant progress on this question.