Suppose $a,b\in\Bbb N$ are odd coprime with $a,b>1$ then is it true that if all four of $$x_1a+x_2b,\mbox{ }x_2ax_1b,\mbox{ }x_1\frac{(a+b)}2+x_2\frac{(ab)}2,\mbox{ }x_2\frac{(a+b)}2x_1\frac{(ab)}2$$ are in $\Bbb Z$ for some $x_1,x_2\in\Bbb R$ then $x_1,x_2\in\Bbb Z$ should hold?
Yes. If we set $\alpha = (a+b)/2$ and $\beta=(ab)/2$, then the lattice generated by the four vectors
$$ \binom{\alpha}{\beta},\binom{\beta}{\alpha},\binom{\alpha+\beta}{\alpha \beta},\binom{\beta \alpha}{\alpha +\beta} $$ is contained in the set of $(y_1,y_2) \in \mathbb{Z}^2$ such that $x_1 y_1 + x_2 y_2 \in \mathbb{Z}$.
We thus have to check that these four vectors generate all of $\mathbb{Z}^2$. This is true whenever $\alpha$ and $\beta$ are coprime integers with $\alpha + \beta$ odd. Indeed, these conditions imply that the three integers $\alpha^2 + \beta^2$, $\alpha^2  2\alpha \beta  \beta^2$, $\alpha^2 + 2\alpha \beta  \beta^2$ are coprime; this ensures the existence of three integers $u,v,w$ such that the quantity $$ \mathrm{det} \left( \binom{\alpha}{\beta},u \binom{\beta}{\alpha}+v\binom{\alpha+\beta}{\alpha \beta}+w\binom{\beta \alpha}{\alpha +\beta} \right) \\= u(\alpha^2 + \beta^2) + v(\alpha^2  2\alpha \beta  \beta^2)+w(\alpha^2 + 2\alpha \beta  \beta^2) $$ is equal to $1$ (Bezout's lemma). This shows that the two vectors $$ \binom{\alpha}{\beta}, \ \ \mathrm{and} \ \ u \binom{\beta}{\alpha}+v\binom{\alpha+\beta}{\alpha \beta}+w\binom{\beta \alpha}{\alpha +\beta} $$ form an integral basis of $\mathbb{Z}^2$.

$\begingroup$ I am not seeing directly since I am not familiar with lattice terminology  why does this show '$x_1,x_2\in\Bbb Z$ has to hold' ? $\endgroup$ – 1.. Apr 17 '17 at 15:57

$\begingroup$ @Turbo, We know that $x_1y_1+x_2y_2$ is an integer whenever $(y_1,y_2)$ is in the group generated by the four vectors. js21 shows that this group includes the vectors $(1,0)$ and $(0,1)$, which implies directly that $x_1=1\cdot x_1+0\cdot x_2$ and $x_2=0\cdot x_1+1\cdot x_2$ are integers. $\endgroup$ – David Cohen Apr 17 '17 at 17:00

$\begingroup$ @js21 Your proof seems to show only $ \binom{\alpha}{\beta}$ and two of $$\binom{\beta}{\alpha},\binom{\alpha+\beta}{\alpha \beta},\binom{\beta \alpha}{\alpha +\beta} $$ suffices to form an integral basis of $\mathbb Z^2$. So perhaps the right problem should perhaps be 'if three of $$x_1a+x_2b,\mbox{ }x_2ax_1b,\mbox{ }x_1\frac{(a+b)}2+x_2\frac{(ab)}2,\mbox{ }x_2\frac{(a+b)}2x_1\frac{(ab)}2$$ are in $\Bbb Z$ for some $x_1,x_2\in\Bbb R$ then $x_1,x_2\in\Bbb Z$ should hold?'? $\endgroup$ – 1.. Jun 21 '19 at 7:37
Yes, it holds. Here is a different proof. The given conditions are equivalent to $$(a+bi)(x_1x_2i)\in {\mathbb Z}[i]$$ and $$\left(\frac{a+b}2+\frac{ab}2i\right)(x_1x_2i)\in {\mathbb Z}[i].$$ To show that $x_1x_2i\in {\mathbb Z}[i],$ it suffices to show that $$\gcd\left(a+bi,\frac{a+b}2+\frac{ab}2i\right)=1~~{\rm in~}{\mathbb Z}[i].$$ Let $\gcd\left(a+bi,\frac{a+b}2+\frac{ab}2i\right)=\alpha\in {\mathbb Z}[i].$ Since $\frac{a+b}2+\frac{ab}2i=\frac{1+i}2(abi),$ we see that $1+i\nmid \alpha$ (and the same for $1i=i(1+i)$), for otherwise $(1i)\left(\frac{a+b}2+\frac{ab}2i\right)$ would be divisible by 2, but it equals $abi$, which is not divible by 2. Now if $\alpha\neq 1$, then there must exist an odd prime $p$ and $u+vi$ such that $u+vi\alpha$ with $u^2+v^2=p.$ This means that $$u+via+bi~{\rm and~}u+viabi.$$ By taking conjugate in the factorization of $a+bi$, $u+via+bi$ implies $uviabi.$ Therefore both $u+vi$ and $uvi$ divide $abi$, so $$p=(u+vi)(uvi)abi.$$ This is a contradiction to the fact that $a$ and $b$ are coprime.
Remark 1. The ring ${\mathbb Z}[i]$ is a Euclidean domain, hence a PID and UFD.
Remark 2. For an odd prime $p$ with $p=u^2+v^2=(u+vi)(uvi)$, the two factors $u+vi$ and $uvi$ are coprime as the ideal generated by them contains $2u$ and $p$ which generate the unit 1.


$\begingroup$ I simplified your proof a bit. See my response. $\endgroup$ – GH from MO Apr 22 '17 at 19:43
Here is a more elementary approach.
Label the $4$ expressions in the question as (1), (2), (3), and (4), in the order they appear. Then subtracting and adding equations (3) and (4) from each other we get new integral expressions; namely, (3'): $x_1ax_2b$ and (4'): $x_2a+x_1b$. Bring back (1): $x_1a+x_2b$ and (2): $x_2ax_1b$.
Next, (3')+(1) becomes $2x_1a\in\mathbb{Z}$ and (4')(2) turns into $2x_1b\in\mathbb{Z}$. Therefore, $2x_1=\frac{a'}a=\frac{b'}b$ for some $a',b'\in\mathbb{Z}$. Since $\gcd(a,b)=1$, the only way $ab'=ba'$ holds is if $a'=\alpha a$ and $b'=\alpha b$. The outcome is $x_1=\frac{\alpha}2$ is a halfinteger. A similar argument leads to $x_2=\frac{\beta}2$ is also a halfinteger.
Since $a, b$ are odd, $x_1a+x_2b\in\mathbb{Z}$ implies $\alpha, \beta$ are of the same parity. If both $\alpha, \beta$ are odd then (3) can not be an integer because $\frac{a+b}2$ and $\frac{ab}2$ are of opposite parity. A contradiction. That means $\alpha, \beta$ must be even and hence $x_1, x_2$ are integers, as desired.
This is a simplification of Cehrngtiao Perng's proof. As observed in that proof, it suffices to show that the Gaussian integers $$ \gamma:=a+bi\qquad\text{and}\qquad \delta:=\frac{1+i}{2}(abi) $$ are coprime. We know that some $\mathbb{Z}$linear combination of $a$ and $b$ equals $1$, while also $$\gamma+(1i)\delta=2a\qquad\text{and}\qquad i\gamma+(1+i)\delta=2b,$$ hence some $\mathbb{Z}[i]$linear combination of $\gamma$ and $\delta$ equals $2$. This shows that $\gcd(\gamma,\delta)$ divides $2$, hence the only possible common prime divisor of $\gamma$ and $\delta$ is $1+i$. However, $$ \frac{\delta}{1+i}=\frac{abi}{2}\not\in\mathbb{Z}[i],$$ because $a$ and $b$ are odd integers. Hence $\delta$ is not divisible by $1+i$, and we are done.