Structure of a proof by contradiction I know this is a trivial question, but it has been bothering me for a while.
My textbook says "Proof of contradiction exploits the fact that the statement "if A holds, then B holds" is equivalent to the statement "if B does not hold, then A does not hold". So far, okay. But how can we put the proof of $\sqrt2$ being an irrational number into this framework?
Every relevant proof that I've seen derives a contradiction by assuming that $\sqrt2$ is a rational number. In this case, what is the statement B? Is it "$\sqrt2$ is a irrational number"? Then, what is the statement A?
 A: Statement $A$ (the assumption):

*

*$\sqrt2$ is rational.

Statement $P_1$ (see below):

*

*There exists coprime positive integers $m$ and $n$ such that
$\sqrt2=\frac mn.$
Statement $B$:

*

*There does not exist coprime positive integers $m$ and $n$ such that
$\sqrt2=\frac mn.$
The contradiction lies in the fact that statements $P_1$ and $B$ conflict with each other.

Remarks

*

*In this example, the argument goes:

*

*We assume that A is true.

*Consequently, $P_1$ is true.

*Consequently, $P_2$ is true.

*Consequently, $P_3$ is true.

*$\ldots$

*Consequently, $B$ is true.

*But $B$ negates $P_1.$ Thus, both statements being true is a
contradiction.

*Therefore, $A$ must have been a false assumption, that is, $A$ is actually false.



*In a proof by contradiction, it is sufficient to derive any
contradiction.
In the above example, we derived two separate
consequences that conflict with each other;
in another
example, we might derive a statement that the angles
$\alpha,\beta,\gamma$ of a flat-plane triangle add up to greater than
$180^{\circ},$ which conflicts with a well-known theorem.


*Any proof by contrapositive can be recast as a proof by
contradiction; however, the converse is not true.
Your book is actually describing a special case of Proof by
Contradiction (proving a conditional statement using Proof by
Contrapositive but under the guise of Proof by Contradiction), and
is therefore being misleading and confusing.
A: The most common proof proves that if $\sqrt2$ was a rational number $\frac pq$ (with $p,q\in\Bbb N$), then $p$ and $q$ are not coprime. So, in this case, the statement A would be “every rational number can be written as $\frac pq$ with $p\in\Bbb Z$, $q\in\Bbb N$ and $p$ and $q$ coprime”.
A: A:  $\sqrt{2} = \frac{a}{b}$ with $\{ a, b \} \in \mathbb{Z}$ and ${\rm gcd}(a,b) = 1$
B:  $2 b^2 = a^2$
Proof of $\neg B$:  By the fundamental theorem of arithmetic (unique prime factorization of integers), the left side of B has an odd number of prime factors.  The right side of B has an even number of prime factors.  Contradiction.  Therefore $\neg B$.
Therefore $\neg A$.
A: Part of the confusion here is that the terminology is not always used consistently, see for example What is the difference between “reductio ad absurdum” and “proof by contradiction”?

A textbook says "Proof of contradiction exploits the fact that the statement "if A holds, then B holds" is equivalent to the statement "if B does not hold, then A does not hold"".

This alone is not proof by contradiction, but rather proof by contrapositive. However, the way it is used in this context, it is combined with a step of reductio ad absurdum to derive the final result.
Specifically, we can represent the statement "$\sqrt{2}$ is irrational" as the implication $A \rightarrow B$ where:
$$
\begin{align}
A \;\;&\equiv\;\; \text{x is } \sqrt{2} \;\;&&\text{(meaning x }\in \mathbb{R}^+ \text{ and } x^2 = 2 \text{)}
\\ B \;\;&\equiv\;\; \text{x is irrational }&& \text{(meaning x } \not\in \mathbb{Q} \iff \not\exists \,p,q \in \mathbb Z \;\big|\; x = \frac{p}{q}\text{ )}
\end{align}
$$
The proof breaks down into two steps:

*

*$A \rightarrow B\;$ is replaced with the equivalent contrapositive $\;\lnot B \rightarrow \lnot A\;$ so what is being proved is that if $x$ is rational then $x^2$ cannot be $2$.


*the contrapositive $\;\lnot B \rightarrow \lnot A\;$ is proved by reductio ad absurdum $\;\lnot B \land \lnot\lnot A \rightarrow F$(alse) $\;\iff \lnot B \land A \rightarrow F\;$ i.e. assuming $x$ is rational and $x^2=2$ results in a contradiction.
A: Just to add the logical part, the proof by contradiction is a slightly different formula in propositional logic
$$A\rightarrow B \equiv (A\land \bar{B})\rightarrow F$$ instead of
$$A\rightarrow B \equiv \bar{B} \rightarrow \bar{A}$$
(contraposition) which appears in the textbook. If we take $B$ to be $\bar{A}$ (it can be any proposition that you want) in the proof by contradiction formula, we get
$$A\rightarrow \bar{A} \equiv A\rightarrow F \equiv \bar{A}$$
the classic one. The proofs of the irrationality of $\sqrt{2}$ are based in this formula (by contradiction) and you can also use the contraposition formula if you have two different statements $A$ and $B$ (like in the previous answer, by contraposition)
By the contradiction formula,
$$\sqrt{2} \in \mathbb{Q} \rightarrow \sqrt{2} \notin \mathbb{Q} \equiv \sqrt{2} \notin \mathbb{Q}$$
and in plain text would be
"If assuming that $\sqrt{2}$ is rational, we show that $\sqrt{2}$ is not rational, then $\sqrt{2}$ is not rational". Finally, by number set theory, $\sqrt{2}$ should be irrational.
A: A related aside: the "proof that $\sqrt{2}$ is irrational" is perhaps better described as the proof that no rational number $r$ exists such that $r^2 = 2$.
We cannot conclude that $\sqrt{2}$ is irrational at the end of the proof; only that if such a number exists, it is not rational.
The existence of $\sqrt{2}$ comes from other considerations.
A: The proof of the fact that $\sqrt 2$ is irration finally falls back to The Well Ordering Principle (often represented in the form of Fermat's Law Of Infinite Descent). So, what we basically show in this proof is that if there are positive integers (since $\sqrt 2>0$) $p$ and $q$ such that $\sqrt 2=\frac p q$, then positive integers $\frac p 2$ and $\frac q 2$ also does the job, i.e., we get an infinite decreasing sequence of positive integers.
So, you may takeA: There exists $p,q\in \mathbb N$ such that $\sqrt 2=\frac p q$
B: The Well Ordering Principle
Now, we see that $A\implies \neg B$. But, $\neg B$ is absurd because of Peano's Axioms. Hence, $\neg A$.
