Formal logic provides a precise language for reasoning about statements. Logical operators combine simple statements into more complex ones. Conjunction, written \(P \land Q\), is true only when both \(P\) and \(Q\) are true. Disjunction, written \(P \lor Q\), is true when at least one of them is true in inclusive logic. Negation, written \(\neg P\), is true when \(P\) is false. Implication, written \(P \rightarrow Q\), is false only when the antecedent is true and the consequent is false. The biconditional, written \(P \leftrightarrow Q\), is true exactly when both sides have the same truth value. A truth table is a systematic display of all combinations of truth values for the inputs and the resulting truth value of a compound expression. Using truth tables, we can identify tautologies (statements true in all interpretations), contradictions (statements false in all interpretations), and contingencies (statements true in some and false in others).
Propositional logic treats statements as indivisible units, but predicate logic adds quantifiers and predicates over variables to capture more. The universal quantifier, written \(\forall\), asserts that something holds for all; the existential quantifier, written \(\exists\), asserts that it holds for at least one. Several equivalences are central to reasoning in both systems. De Morgan's laws state that \(\neg(P \land Q)\) is equivalent to \(\neg P \lor \neg Q\), and \(\neg(P \lor Q)\) is equivalent to \(\neg P \land \neg Q\). Contraposition tells us that "if \(P\) then \(Q\)" is logically equivalent to "if \(\neg Q\) then \(\neg P\)." The converse ("if \(Q\) then \(P\)") and the inverse ("if \(\neg P\) then \(\neg Q\)") are not logically equivalent to the original conditional—though confusion between them is a common source of error.
A few additional tools and principles deserve attention. Reductio ad absurdum proves a claim by assuming its contrary and deriving an absurd or contradictory consequence. The law of non-contradiction holds that a statement cannot be both true and false at the same time and in the same sense; the law of excluded middle holds that every statement is either true or false. Dialetheism is the controversial view that some contradictions can be true. Identity is the principle that everything is identical to itself. It is also important to distinguish inference—the act of concluding—from implication, which is the logical relationship between statements. Finally, several paradoxes reveal the subtleties of self-reference and infinity: the liar paradox ("This sentence is false"), Russell's paradox (about the set of all sets that do not contain themselves), and Zeno's paradoxes (such as Achilles and the tortoise). These puzzles are not mere curiosities; they show how careful one must be when reasoning about the foundations of language and mathematics.