[step:Use the witness maps to prove equivalence of yes-instances]Let $\Sigma$ be the fixed finite alphabet used to encode instances. Let $V_A: \Sigma^* \times \Sigma^* \to \{0,1\}$ and $V_B: \Sigma^* \times \Sigma^* \to \{0,1\}$ be the verifiers for $A$ and $B$ appearing in the completeness and soundness hypotheses. The theorem statement asserts witness conversion and decoding existentially; for notation, whenever $V_A(x,w)=1$, write $C(x,w) \in \Sigma^*$ for one converted certificate whose existence is supplied by completeness, and whenever $V_B(f(x),z)=1$, write $D(x,z) \in \Sigma^*$ for one decoded certificate whose existence is supplied by soundness. These certificate choices are used only to prove equivalence of yes-instances; no polynomial-time bound on them is needed for the many-one reduction.
Let $x \in \Sigma^*$ be an arbitrary encoded string. We prove $x \in A \iff f(x) \in B$.
Assume first that $x \in A$. Since $V_A$ is a verifier for $A$, there exists a certificate $w \in \Sigma^*$ such that $V_A(x,w)=1$. By the completeness hypothesis for the gadget construction, the certificate $C(x,w) \in \Sigma^*$ satisfies $V_B(f(x),C(x,w))=1$. Since $V_B$ verifies $B$, this implies $f(x) \in B$.
Conversely, assume that $f(x) \in B$. Since $V_B$ is a verifier for $B$, there exists a certificate $z \in \Sigma^*$ such that $V_B(f(x),z)=1$. By the soundness hypothesis for the gadget construction, the decoded certificate $D(x,z) \in \Sigma^*$ satisfies $V_A(x,D(x,z))=1$. Since $V_A$ verifies $A$, this implies $x \in A$.[/step]