The problem is
"Show that if we have a derivation $D$ of $\psi$ with no undischarged assumptions, then we can use it to construct, for any statement $\phi$, a derivation of $((\phi\leftrightarrow\psi)\leftrightarrow\phi)$ with no undischarged assumptions."
Here is my solution.
Below is the textbook's solution.
As you can see on the textbook solution, $\phi$ and $\psi$ cross over to another branch to introduce $\rightarrow$. The textbook didn't mention it was possible. Is the textbook solution a correct derivation of the proof?
Update 1 : I want to solve exercises with what the author explicitly allowed in the textbook. The author wrote:





There is no error; an allowed way to use $\to$-intro is to discharge a "non-existent" assumption, i.e.:
as in the two top-right branches.
This corresponds to the fact that $\psi \to (\phi \to \psi)$ is a tautology; thus, assuming $\psi$, by modus ponens $(\phi \to \psi)$ follows, for $\phi$ whatever.
See the textbbok's comment on the rule, page 17: