I am trying to learn more about basic logic in order to make my proofs and reasoning more precise or even "mechanical". Just to make sure that my proof really shows what I wanted. (Any literature recommendations about the basics are welcome as well!)
For example, here is my attempt to prove that $\sqrt{2} $ is irrational. The idea is to use proof by contradiction (as usual).
Proof:
Denote $p=$"$\sqrt{2}$ is irrational" and $q=$"$\sqrt{2}=a/b $ s.t. integers $a$ and $b\ne 0$ have no common factors".
Suppose that $\sqrt{2}$ is rational, i.e. $\neg p $. Then $\sqrt{2}=a/b$ for some integers $a $ and $b \ne 0$. We can assume that $a$ and $b$ have no common factors, because if they had, they can be cancelled away. Thus, we have shown that the statement (or what would be the correct term?) $ \neg p \rightarrow q $ has truth value 1 (true).
Using mathematics, from $\sqrt{2}=a/b$ we can derive that both $a$ and $b$ are even. Thus, they have a common factor 2, and we have shown that logical statement $q \rightarrow \neg q $ has truth value 1.
Since both $ \neg p \rightarrow q $ and $q \rightarrow \neg q $ have truth values 1, also $ (\neg p \rightarrow q) \wedge (q \rightarrow \neg q) $ has truth value 1. Using tautology $ (a\rightarrow b )\wedge (b \rightarrow c) \Longrightarrow a \rightarrow c $, we conclude that $ \neg p \rightarrow \neg q $ has truth value 1.
Since $\neg p \rightarrow q $ and $\neg p \rightarrow \neg q $ have truth values 1, statement $(\neg p \rightarrow q)\wedge (\neg p \rightarrow \neg q) $ has value 1. Using tautology $ (a\rightarrow b) \wedge (a\rightarrow c) \Longleftrightarrow a\rightarrow (b \wedge c) $, we conclude that $\neg p \rightarrow (q \wedge \neg q) $ has truth value 1.
Using tautology $ \neg a \rightarrow (b \wedge \neg b) \Longleftrightarrow a $, we conclude that $p$ has truth value 1.
Thus, p is true, i.e., $\sqrt{2}$ is irrational. $ \square $