A nonconstant doubly periodic function cannot be analytic I have been stuck on this problem for a long time: 

A non constant $F(z)$ is such that $F(z+a)=F(z)$ and $F(z+bi)=F(z)$ where $a>0 $ and $b>0$ are given constants. Prove that $F(z)$ cannot be analytic in the rectangle $\{(x,y) : 0<x<a , 0<y<b \}$. 

The problem is  under the section of Liouville's theorem: a bounded entire functions is constant. But how to apply this to a rectangle?
 A: The problem as stated is false. As a counterexample, consider the function
$$
F(z)=\begin{cases}
1, & z=an + bmi\ \text{for}\ n,m\in \mathbb Z\\
0, & else.
\end{cases}
$$
It is analytic in the rectangle $(0,a)\times (0,b)$, because it is identically $0$ there. Also it is periodic as required.
A: The function can be extended on the whole plane as follows:
$$
G(z+na+imb) = F(z) \qquad n,m\in \mathbb Z
$$
to get an analytic bounded function. 
added. The resulting function is bounded because it is periodic, hence its range $G(\mathbb C) = G(R) = F(R)$ where $R=[0,b]\times [0,b]$ is the given rectangle, and being $R$ compact and $F$ continuos, $F(G)$ is compact hence bounded. The resulting function is analytic because an analytic function in a point is uniquely determined by the values on a sequence of approximating points. Hence if $F$ is analytic and $F(z)=F(z+a)$ for some point $z$ in the left side of the rectangle, the extension in $F(z+a)$ coincides with the extension inn $F(z)$.
By Liouville Theorem the extended function is bounded and so must be the original function...
note. I assume that the function is analytic on the closed rectangle, which means that there is an open set containing the rectangle where the function has an analytic extension. 
