A *polyhedron* is the intersection of a finite collection of halfspaces. These halfspaces are not assumed to be *linear*, i.e. their bounding hyperplanes are not assumed to contain the origin. The *support* Supp(M) of a collection M of polyhedra is the union of the polyhedra in M.
I can prove the following theorem:


**Theorem.** Let M be a finite set of n-dimensional polyhedra in Rn. Suppose:  

(i) The interior of Supp(M) is path-connected; and  

(ii) For every x in the boundary of Supp(M), there exists a closed
halfspace H+ bounded by a hyperplane H such that x is in H, and such that H+ contains every P in M such that x is in P.  

Then Supp(M) is convex.  



(Acknowledgment: I proved a characterization of coarsenings of a given polyhedral complex and Ezra Miller remarked that part of my argument amounted to some sort of local criterion for convexity. The theorem above is that criterion.)


The point here is that you only need to check, at each point x of the boundary, that Supp(M) looks sufficiently like a convex set near x, and (ii) says exactly what "sufficiently like a convex set" means in this case.


The question is: 



> 
> Is this a special case of some general theorem that says that convexity is
>  somehow a local condition?
> 
> 
> 


I suspect that I'm asking for a reference to something known. One convexity person that I asked about felt that it is "highly likely..., that this result is a special case
of a result in functional analysis, once properly understood." The same person suggested that there might be a connection to the theory of tight manifolds in topology. For that reason I have added the tags fa.functional-analysis and gt.geometric-topology. My apologies if these tags turn out not to be appropriate.



To what extent is convexity a local property?
This is known as Tietze theorem: if $A$ is an open connected set such that for every boundary point there is a locally supporting hyperplane, then $A$ is convex. I don't know what is the standard reference, internet search gave me the following one:


F.A.Valentine. Convex sets. McGraw-Hill, New York, 1964, pp. 51-53.


There are easier proofs than fedja's (at least to geometer's eye). My favorite one is the following. Take $a,b\in A$, there is a polygonal path from $a$ to $b$ in $A$. Suppose this path has $N$ edges. Then there is a shortest polygonal path of at most $N$ edges in the closure of $A$. If it is not a straight segment, the first edge must touch the boundary of $A$ (otherwise one can shorten the path). The first point where it meets the boundary has obvious problems with local supporting hyperplane.


**Update.** As Zsbán Ambrus pointed out in a comment, vertices on the boundary cause problems, so one should restrict to polygonal paths contained in the interior. But then it is not clear why a minimum exists. Rather that considering a minimum, one can do shorthening by hand: begin with any polygonal path in the interior, choose consecutive serments $[a,b]$ and $[b,c]$ and move $b=b(t)$ to $a$ along the segment. If a segment $[a,b(t)]$ touches the boundary at some moment $t$, observe a contradiction. If not, then the final segment $[a,c]$ is also contained in the interior, so we get a polygonal line with fewer edges. Repeat this procedure until it becomes a single segment.


