**Edit:** Even though there is an accepted answer, the problem isn't solved. I only accepted the answer, because there was a bounty on the question so I had to accept an incomplete answer. 


I was working on a problem in discrete matematics, and reduced it to a more analytical problem. I was hoping that we could use some analytical tecniques to solve it, but I don't know of any.


A special case of the reduced problem is: Consider the 3-simplex 


$\Delta^3= \{ (x\_1,x\_2,x\_3,x\_4)|0\leq x\_1,x\_2,x\_3,x\_4\leq 1, x\_1+x\_2+x\_3+x\_4=1\}$  

and functions $f:\Delta^3\to [0,1]$. We want to find the greatest such function satisfying


* $f(½,0,½,0)=f(0,½,0,½)=½$
* If we restrict $f$ to any plane that contains both $(1,0,0,0)$ and $(0,1,0,0)$ we get a convex function
* If we restrict $f$ to any plane that contains both $(0,0,1,0)$ and $(0,0,0,1)$ we get a convex function


Here we say that $f$ is greater than $g$ if $f(x)\geq g(x)$ for all $x\in\Delta^3$. It is clear that there exists a greatest function satisfying the above since it is just the supremum of all functions satisfying the above. In particular, I would like to know if $f$ had to be convex on all of $\Delta^3$ and to know the value of $f(1/4,1/4,1/4,1/4)$.


Is there a known theory for solving this kind of problems?


**Edit:** I would also be interested to know a proof or disproof that the algorithm described in David Speyers community wiki-answer give the function we are looking for in a finite number number of steps (in the limit it does).



Greatest function satisfying some convexity requirements
Just writing down for the record why the best answer can't beat $2/3$. 


Look at the plane $z=0$. From $f(0,1,0,0) \leq 1$ and $f(1/2, 0, 1/2, 0) \leq 1/2$, we see that $f(1/3,1/3,1/3,0) \leq 2/3$. Similar arguments show that all cyclic permutations of $(1/3,1/3,1/3,0)$ also have $f \leq 2/3$.


Look at the plane $y=z$. From the known bounds for $f(0,1/3,1/3,1/3)$ and $f(1/3,0,1/3,1/3)$ we deduce that $f(1/6,1/6,1/3,1/3) \leq 2/3$. Similarly $f(1/3,1/3,1/6,1/6) \leq 2/3$.


Now the line segment from $(1/3, 1/3, 1/6, 1/6)$ to $(1/6, 1/6, 1/3, 1/3)$ lies in the plane $y=z$, so $f \leq 2/3$ everywhere on this segment. In particular, $f(1/4, 1/4, 1/4, 1/4) \leq 2/3$.


