Proof Verification for Discrete Math Class Prove that $n^2$ is even iff $n$ is even.
I proved it like this:
Case I: $n$ is even
1) $n = 2a$  $(a\in Z)$
2) $n^2 = 4a^2 = 2(2a^2)$
3) $2a^2 = K$ $(K \in Z)$
4) $n^2 = 2K$
Case II: $n$ is odd
1) $n = 2a + 1$ $(a\in Z)$
2)$n^2 = 4a^2 + 4a +1 = 2(2a^2 + 2a) + 1$
3) $2a^2 + 2a = K$ $K\in Z$
4) $n^2 = 2K+1$
My book does it slightly differently:

Is my proof still correct?
 A: You are attempting to prove $A \iff B$.
Your book proves $A \Rightarrow B$ and $B \Rightarrow A$.
You prove $A \Rightarrow B$ and $\lnot A \Rightarrow \lnot B$. However, $\lnot A \Rightarrow \lnot B$ is logically equivalent to $B \Rightarrow A$.
All of these things can be checked with truth tables.  For example:
$\begin{array} {|cc|cc|}
A & B & B \Rightarrow A & \lnot A \Rightarrow \lnot B \\ \hline
\text{T} & \text{T} & \text{T} & \text{T} \\ \hline
\text{T} & \text{F} & \text{T} & \text{T} \\ \hline
\text{F} & \text{T} & \text{F} & \text{F} \\ \hline
\text{F} & \text{F} & \text{T} & \text{T} \\ \hline
\end{array}$
$\begin{array} {|cc|cc|c|c|}
A & B & A \Rightarrow B & B \Rightarrow \lnot A & (A \Rightarrow B) \text{ and } (B \Rightarrow A) & A \text{ iff } B\\ \hline
\text{T} & \text{T} & \text{T} & \text{T} & \text{T} & \text{T} \\ \hline
\text{T} & \text{F} & \text{F} & \text{T} & \text{F} & \text{F} \\ \hline
\text{F} & \text{T} & \text{T} & \text{F} & \text{F} & \text{F} \\ \hline
\text{F} & \text{F} & \text{T} & \text{T} & \text{T} & \text{T} \\ \hline
\end{array}$
