I'm just starting graph theory and I'm trying to prove the following:
Let $G$ be a simple disconnected graph with vertex set $V(G)$ and edge set $E(G)$. If $x,y\in V(G)$ and $xy \in E(G)$, then $\exists z \in V(G)$ such that $xz,yz \notin E(G)$.
Here's my attempt:
We proceed by contradiction. Suppose instead that $\forall z \in V(G)$, $xz\in E(G)$ or $yz \in E(G)$. Since $G$ is disconnected, we know by definition that $\exists a,b \in V(G)$ such that $a$ and $b$ do not belong to the same path. By letting $z=a$, we know that $ax\in E(G)$ or $ay \in E(G)$. In either case, there must be a path from $a$ to $x$ (the path will either be $ax$ or $ayx$). Similarly, by letting $z=b$, there must be a path from $b$ to $x$ (the path will either be $bx$ or $byx$). Hence, there is a path from $a$ to $b$ that passes through at least one of $\{x,y\}$ (the path will be either $axb$, $axyb$, $ayxb$, or $ayb$), a contradiction. So $\exists z \in V(G)$ such that $xz,yz \notin E(G)$, as desired.
Is my proof correct? I'm fairly sure it is, but it feels overly long. Can parts of my proof be omitted? Is there a shorter, more elegant proof that doesn't rely on case analysis? Maybe a direct proof (not a proof by contradiction) would be faster? Side Note: I haven't covered the definition of a connected component yet.
I’m assuming from the wording of the question that for you a graph is disconnected if there are vertices $a,b\in V(G)$ such that no path contains both $a$ and $b$. If that’s the case, your proof is indeed correct, and you can’t really shorten it much. You could do something like this to organize it a little more clearly: