then the subgraph $G'$ of $G$ induced by $L'$ is compatible with $L'$.

A [*conservative set*]{} (or subalgebra) in a reflexive graph $G$ is an subset $S \subset V(G)$ that is the intersection of sets of the form $\{ x \in V(G) \mid d(x,x_0) \leq d \}$ for some vertex $x_0$ and integer $d$. Components and maximal cliques are examples of conservative sets. It is a basic fact, (see [@BJK]), that a conservative set of a graph is closed under any polymorphism. We use this to prove the following, which allows us to restrict our attention to connected graphs.

\[lem:connected\] A graph is a (distributive) lattice graph if and only if each component is.

If a graph is disconnected, and each of its components has a compatible lattice $L_i$, then let $L$ be the [*simple join*]{} of the component lattices; that is, let $L$ be the lattice on the set $\bigcup_{i = 1}^d L_i$ with the ordering defined by $x \leq y$ if $x \leq y$ in some $L_i$ or if $x \in L_i$ and $y \in L_j$ for $i < j$. It is easy to check that this lattice is compatible with $G$, and that it is distributive if 