Explanation
Welcome to The Logic Lighthouse
Every proof in maths is built from small true-or-false sentences joined by and, or, and if–then. At the Logic Lighthouse, you'll build truth tables, negate statements correctly and spot the one rewrite that always means the same thing: the contrapositive.
A statement is true or false, not both · "Close…
In logic, a statement is a sentence that is either true or false. Orders and questions aren't statements.
Neither is x plus two equals five, because it depends on x.
A statement is true or false, not both · "Close the door", "Is it raining?" and "x + 2 = 5" are not statements
Statements, Connectives & Truth Tables
Not flips the truth. And needs both parts true.
Or is happy if at least one part is true, and fails only when both are false.
~p: not p · p ∧ q: true only when both are true · p ∨ q: false only when both are false
Statements, Connectives & Truth Tables
If p then q breaks only one way: p happens and q doesn't. If p is false, the promise isn't broken, so the statement counts as true.
If and only if is true when both sides match.
p → q is false only when p is true and q is false · p ↔ q is true when both match
Converse q
Three rewrites of if p then q. The converse swaps them.
The inverse negates both. The contrapositive swaps and negates, and it's the only one that always means the same as the original.
Converse q → p · Inverse ~p → ~q · Contrapositive ~q → ~p (the only one equal to p → q)
Tautology
A tautology is true in every row of its truth table; a contradiction is false in every row. To negate, use De Morgan: not of and becomes or of the nots.
And not of if p then q is p and not q.
Tautology: always true (p ∨ ~p) · Contradiction: always false (p ∧ ~p) · ~(p ∧ q) = ~p ∨ ~q · ~(p → q) = p ∧ ~q
Worked example
Is (p ∧ q) → p a tautology? An if–then fails only when the first part is true and the second false.
Here that needs p ∧ q true and p false, which is impossible. So it is true in every row: a tautology.