Proofs in Symbol, SQL and English
Table of Contents
Proofs in Symbol, SQL and English
A personal reference
DIRECT PROOF
Goal
$P \to Q$
SQL
Show:
| |
English
Assume P, show Q follows.
CONTRAPOSITIVE
Goal:
$ P \to Q $
Prove instead:
$ \neg Q \to \neg P $
SQL:
Show:
| |
Reason
Same WHERE clause, different viewpoint. Usually much easier.
CONTRADICTION
Goal
Prove (P).
Assume ¬P and show this leads to impossible conditions.
SQL analogy:
| |
Example impossible condition:
| |
Contradiction = WHERE FALSE.
CASE SPLIT
Goal:
Prove R.
Check both cases:
- when P is true
- when P is false
SQL:
| |
If conclusion R holds in both branches, you’re done.
EQUIVALENCE PROOF
To prove (P \leftrightarrow Q):
Prove two implications:
$ P \to Q \quad \text{and} \quad Q \to P. $
SQL:
| |
EXISTENCE PROOF
Goal:
$ \exists x,\ P(x) $
SQL:
| |
You literally just provide a witness.
In maths: “Let (x = 3). Then (P(x)) is clearly true.”
UNIVERSAL PROOF
To show:
$ \forall x,\ P(x) $
SQL:
| |
This one is absolutely fundamental. Nearly every Lean proof uses this shape.