Logical proof: Difference between revisions
No edit summary |
No edit summary |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Logical proof is the process of applying [[logic]] to prove whether a statement is true or false. | [[Category:Logic]] | ||
Logical proof is the process of applying [[logic]] to prove whether a [[statement]] is true or false.<ref>{{#cite:Q1846}}</ref> | |||
== Direct proof == | == Direct proof == | ||
Direct proof consists of identifying a set of true premises, and derive the conclusion based on logical combination and manipulation of those premises. | Direct proof consists of identifying a set of true premises, and derive the conclusion based on logical combination and manipulation of those premises. It is the formal equivalent of an [[logic#argument|argument]]. | ||
''To prove $Q$, identify true statement(s) $P$ as premises, then prove $P \implies Q$.'' | ''To prove $Q$, identify true statement(s) $P$ as premises, then prove $P \implies Q$.'' | ||
| Line 13: | Line 14: | ||
$$ | $$ | ||
{{Hidden example}} | |||
Prove that for all odd integers $n$, $n^2$ is odd. | |||
Rewrite in formal language: | Rewrite in formal language: | ||
| Line 26: | Line 28: | ||
\text{Let} k_1=2k^2+k \in Z, n^2= 2k_1+1, k_1 \in Z\ \ (Q) | \text{Let} k_1=2k^2+k \in Z, n^2= 2k_1+1, k_1 \in Z\ \ (Q) | ||
$$ | $$ | ||
{{End hidden}} | |||
== Proof by contrapositive == | == Proof by contrapositive == | ||
| Line 34: | Line 37: | ||
$$ | $$ | ||
P \implies Q \iff \neg Q \implies \neg P | (P \implies Q) \iff (\neg Q \implies \neg P) | ||
$$ | $$ | ||
{{Hidden example}} | |||
Prove that for integers $a$ and $b$, if $a+b$ is odd, then either $a$ is odd or $b$ is odd, but not both. | |||
Rewrite in formal language: | Rewrite in formal language: | ||
| Line 75: | Line 79: | ||
We have since proven that $\neg Q \implies \neg P$, hence by logical equivalence $P \implies Q$, i.e., for integers $a$ and $b$, if $a+b$ is odd, then either $a$ is odd or $b$ is odd, but not both. | We have since proven that $\neg Q \implies \neg P$, hence by logical equivalence $P \implies Q$, i.e., for integers $a$ and $b$, if $a+b$ is odd, then either $a$ is odd or $b$ is odd, but not both. | ||
{{End hidden}} | |||
== Proof by contradiction == | == Proof by contradiction == | ||
| Line 83: | Line 88: | ||
$$ | $$ | ||
(\neg P \implies Q) \land \neg Q \implies P | ((\neg P \implies Q) \land \neg Q ) \implies P | ||
$$ | $$ | ||
{{Hidden example}} | |||
Prove the pigeon hole principle - if more than $n$ pigeons fly into $n$ pigeon holes, then there is at least one hole with at least 2 pigeons. | |||
Formalise the statements: | Formalise the statements: | ||
| Line 106: | Line 112: | ||
\therefore P | \therefore P | ||
$$ | $$ | ||
{{End hidden}} | |||
== Disproof by counter-example == | == Disproof by counter-example == | ||
| Line 111: | Line 118: | ||
Any number of examples cannot suffice as logical proof. However, a counter-example is adequate to prove that a general statement is not true. | Any number of examples cannot suffice as logical proof. However, a counter-example is adequate to prove that a general statement is not true. | ||
{{Hidden example}} | |||
Are all life in sea fishes? | |||
Rewrite in formal language: | Rewrite in formal language: | ||
| Line 137: | Line 145: | ||
x = \text{whales}, x \in \text{sea life}, x \notin \text{fish} | x = \text{whales}, x \in \text{sea life}, x \notin \text{fish} | ||
$$ | $$ | ||
{{End hidden}} | |||
== Proof by case == | == Proof by case == | ||
| Line 144: | Line 153: | ||
In formal language: | In formal language: | ||
$$ | $$ | ||
(P_1 \ | (S=P_1 \cup P_2 \cup ... \cup P_n) \land (\forall k \in \{1,2,...,n\}, P_k \implies Q) \implies Q | ||
$$ | $$ | ||
{{Hidden example}} | |||
Prove that for any integer $n$, $(n^3-n)$ is even. | |||
Rewrite in formal language: | Rewrite in formal language: | ||
| Line 179: | Line 189: | ||
Hence $Q$. | Hence $Q$. | ||
{{End hidden}} | |||
== Natural-formal language translation via equivalent statements == | == Natural-formal language translation via equivalent statements == | ||
| Line 186: | Line 197: | ||
Sometimes, this requires first rewriting a statement $P$ with equivalent statement $Q$ where $P \iff Q$. | Sometimes, this requires first rewriting a statement $P$ with equivalent statement $Q$ where $P \iff Q$. | ||
{{Hidden example}} | |||
Prove there are an infinite number of prime numbers. | |||
P (desired conclusion): There are an infinite number of prime numbers | P (desired conclusion): There are an infinite number of prime numbers | ||
| Line 211: | Line 223: | ||
Since $P \iff Q$, therefore $P$: there are an infinite number of prime numbers. | Since $P \iff Q$, therefore $P$: there are an infinite number of prime numbers. | ||
{{End hidden}} | |||
Latest revision as of 13:04, 8 November 2026
Logical proof is the process of applying logic to prove whether a statement is true or false.[1]
Direct proof
Direct proof consists of identifying a set of true premises, and derive the conclusion based on logical combination and manipulation of those premises. It is the formal equivalent of an argument.
To prove $Q$, identify true statement(s) $P$ as premises, then prove $P \implies Q$.
In formal language:
$$ P \land (P \implies Q) \implies Q $$
Proof by contrapositive
To prove $P \implies Q$, prove $\neg Q \implies \neg P$.
In formal language:
$$ (P \implies Q) \iff (\neg Q \implies \neg P) $$
Proof by contradiction
To prove $P$, prove $(\neg P \implies Q) \land \neg Q$
In formal language:
$$ ((\neg P \implies Q) \land \neg Q ) \implies P $$
Disproof by counter-example
Any number of examples cannot suffice as logical proof. However, a counter-example is adequate to prove that a general statement is not true.
Proof by case
To prove $Q$, proves that at least one of $\{P_1,P_2,...,P_n\}$ is true, and $\forall k \in \{1,2,...,n\}, P_k \implies Q$
In formal language: $$ (S=P_1 \cup P_2 \cup ... \cup P_n) \land (\forall k \in \{1,2,...,n\}, P_k \implies Q) \implies Q $$
Natural-formal language translation via equivalent statements
The first and highly essential step of constructing formal logic proofs is the translation of natural language statements into formal language.
Sometimes, this requires first rewriting a statement $P$ with equivalent statement $Q$ where $P \iff Q$.