Propositional logic
Start with statements that can be true or false. That is the smallest useful unit of logic in this course.
What is a proposition?
Definition
A proposition
A proposition is a statement with a definite truth value. It is either true or false.
Examples:
2 + 2 = 4is a proposition.Close the door!is not a proposition, because it is a command.x + 1 = 3is not yet a proposition ifxhas not been specified.
Common mistake
A sentence with a variable is not automatically a proposition
If a statement still depends on an unspecified variable, its truth value is not fixed yet. You need to know what the variable means before you can judge it.
The basic connectives
The course uses five connectives again and again:
| Symbol | Read as | Main idea |
| --- | --- | --- |
| ¬P | not P | flips the truth value |
| P ∧ Q | P and Q | true only when both are true |
| P ∨ Q | P or Q | true when at least one is true |
| P → Q | if P, then Q | false only when P is true and Q is false |
| P ↔ Q | P if and only if Q | true when both sides match |
Read a formula in words
Worked example
Translating an implication
Let P mean "it is raining" and let Q mean "the ground is wet".
Then P → Q is read as:
"If it is raining, then the ground is wet."
The statement does not say that it is raining right now. It only says what must happen whenever the first part is true.
Solution
Why beginners often misread implication
A first quick check
Quick check
Which of these are propositions? `2 + 2 = 4`, `Open the window.`, `x + 1 = 3`
Try it live
Try it here
Truth-table builder
The live builder lets you switch formulas and inspect how each row changes the final truth value.
| P | Q | P → Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |