Proving: if P then (if p then q) without dependencies (How Logic Works Exercise 3.2.3) I am working through Hans Halvorson's How Logic Works: A User's Guide and I am struggling to solve Exercise 3.2.2 which reads:
Prove the following sequent: ⊢ Q → (P → Q)
My proposed solution using the rules Halvorson has thus far presented(namely: conjunction elimination/introduction, disjunction intro, modus ponens, modus tollens, double negation, and conditional proof) :
1   (1) Q → (P → Q) a
2   (2) Q           a
1,2 (3) P → Q       1,2 MP
1   (4) Q → (P → Q) 2,3 CP
(5) (Q → (P → Q)) → (Q → (P → Q)) 1,4 CP
The use of a conditional proof (CP) on line 5 seems off to me and obviously the statement (Q → (P → Q)) → (Q → (P → Q)) ≠ ⊢ Q → (P → Q).
Any guidance on how to use CP more appropriately would be appreciated.

If $P = T, Q = T$, then $Q \to (P \to Q)=T$. If $P = T, Q = F$, then $Q\to (P\to Q)= F \to F = T$. If $P = F, Q = T$, then $Q\to (P\to Q)=T\to T = T$. Finally, if $P = F, Q = F$, then $Q\to (P\to Q)= F\to T = T$. Thus $Q\to (P\to Q) = T$ for any values of $P, Q$. Hence it is a tautology, proving the claim.
