Large geodesically convex subsets of tori Let $X=\mathbb T^d=\mathbb R^d/\mathbb Z^d$ and let $E$ be a proper open subset of $X$. We say $E$ is geodesically convex if for any $x,y\in E$ the shortest geodesic connecting $x$ and $y$ lies in $E$. 
Question. How large can the Haar/Lebesgue measure of $E$ can be?
For example, is $d=2$, then it seems that this cannot exceed $1/2$. Say, $[0,1)\times [0,s)$ is geodesically convex if and only if $s\leq1/2$. (If $s>1/2$, then $[x,x+\delta]$ is not the shortest geodesic for any $\delta\in(1/2,s)$ and any $x\in(0,1)$.)  
Is it true for any $d\ge2$ that the measure of such an $E$ cannot exceed $1/2$? 
 A: (This is a new answer; my original answer was completely wrong.)
Assume $\mathop{\rm vol}E>\tfrac12$.
Then it contains two opposite points say $x$ and $x'=x+(\tfrac12,\tfrac12,\dots,\tfrac12)$.
WLOG we can assume that $x=0$.
Taking minimizing geodesics form $(\tfrac12,\tfrac12,\dots,\tfrac12)$ to $y\approx 0$, we get that all main diagonal of unit cube 
$$\square^n=(0,1)\times(0,1)\times\dots\times(0,1)$$ 
lie in $E$. 
Then apply the following lemma:
Trivial Lemma. Let $\square^n$ be open unit cube in $\mathbb R^n$ and $E\subset \square^n$ be a locally convex open set which contains all main diagonals of $\square^n$ then $E=\square^n$.
To prove the lemma, note that local convexity + conectedness in $\mathbb R^n$ implies convexity.
A: Let me write down the steps.


*

*Consider the case d=2, the generalization is straightforward.

*There is an open ball B that doesn't intersect E.

*Consider two families of geodesic circles F_1 and F_2. F_1 has slope 1/p and F_2 has slope 1-1/p. Number p is chosen in such a way that each circle from F_1 nd F_2 intersects B.

*Claim:  $Leb(E\cap F_1(x))\le 1/2 length(F_1(x))$ OR $Leb(E\cap F_2(x))\le 1/2 length(F_1(x))$ for each x.

*Proof: $E\cap F_1(x)$ is a proper union of open intervals that are separated by gaps of length at least $\sqrt{p^2+1}/2p$. So it remains to show that there are at least $p$ gaps. If there are less than $p$ gaps then there is an interval from $E\cap F_1(x)$ of length greater than $\sqrt{p^2+1}/2p$. It follows that one can find a simple closed curve C_1 in E which is C^0 close to a horizontal generator.
Assume that in the same way we also can find C_2 in E which is C^0 close to the vertical generator. Then one can easily see that E is the torus and the claim follows.

*Apply Fubini.

A: A bit long for a comment. You can have a geodesically convex set that is an arbitrarily large proportion of the area of a surface. What I have in mind resembles a bulb_thermometer or turkey_baster  but is at least $C^\infty.$ It is rotationally symmetric. One end is  long, cigar shaped, half of something that approximates a prolate spheroid.  It differs from an actual prolate spheroid in that it is necessary for the Gauss curvature to be 0 along the "equator," the closed geodesic where the half cigar joins the bulb. Therefore the curvature must approach 0 near the equator. Immediately upon entering the bulb section, the curvature is slightly negative, which is the reason geodesics leaving the equator cannot quickly return. 
