Let denote Alice's unknown input qubit and her GHZ qubit. Expanding the four-qubit state in the Bell basis of gives
where a global sign in the last term is immaterial.
For outcomes and , Bob and Charlie already have
For either outcome, both apply the Pauli X gate. Since exchanges and , the branch becomes and the branch becomes , up to a global phase. This proves the Bell measurement on one qubit and one leg of a GHZ state result.
Finally, tracing out Charlie gives
for either sign. This reduced state has rank two exactly when and . By the entanglement criterion for a two-term correlated state,