I am reading the reduction given by Sipser in his textbook "Introduction to the Theory of Computation," on page 303. The reduction is:
\begin{equation} 3SAT \leq_p KCLIQUE \end{equation}
I am really trying to understand everything formally -- putting everything in a strict logical notation helps me learn Math. To clarify, the content of this proof, has not helped me give other reductions because I don't understand one direction of the $\iff$ in the logic of reductions.
In this reduction, $f$ must be s.t: \begin{equation} w\in 3SAT \iff f(w) \in KCLIQUE \end{equation} and $f$ computes within a polynomial number of steps of the input size. The polynomial part is easy for me to understand, so no problem here!
I see that the above logical statement is equivalent to: \begin{equation} w\in 3SAT \implies f(w) \in KCLIQUE \land w\not\in 3SAT \implies f(w) \not\in KCLIQUE\end{equation} The above just says yes-instances map to yes-instances and no-instances map to no-instances.
It appears that Sipser shows us: \begin{equation} w\in 3SAT \implies f(w) \in KCLIQUE \land f(w) \in KCLIQUE \implies w\in 3SAT\end{equation}
Which is also equivalent to the above by taking the contrapositive of the second implication.
Here is my understanding of the $\implies$ direction. Given a yes-instance of $3SAT$, show that the reduction $f$ gives us a yes-instance for $KCLIQUE$. This seems completely natural.
I don't really understand the other direction -- namely, given a yes-instance of KCLIQUE we are supposed to show that we get a yes-instance of $3SAT$. However since the reduction goes from $3SAT$ to $KCLIQUE$ i.e. the domain is the language $3SAT$ and the Codomain is the language $KCLIQUE$, I don't understand how we show this.
It appears that the argument is; Our reduction has provided us this graph, from which we can create a satisfying assignment from?
Please help me understand the other direction, and thanks for your time.