Is the following statement true? If so, can anyone provide a reference?



> 
> Let $X$ be a CAT(0) cubical complex, and let $Y$ be a connected
>  subcomplex of $X$. Then the following are equivalent:
> 
> 
> 1. $Y$ is convex in $X$.
> 2. For every cube $C$ in $X$, the intersection $C\cap Y$ is a face of $C$.
> 
> 
> 


Here the empty set is considered a face of every cube, and each cube is a face of itself.


Clearly (1) implies (2), and in all the examples I can think of (2) also implies (1).



Convex subcomplexes of CAT(0) cubical complexes
Yes, it is true.


You condition (2) implies that $X$ is locally convex;
this can be proved the same way as the flag condition for $\mathrm{CAT}[0]$-ness.


It remains to note that for $\mathrm{CAT}[0]$-spaces local convexity + connectedness implies convexity.


