Mathematical logic studies valid reasoning using precise mathematical symbols in place of ordinary language, so that whether an argument is correct can be checked mechanically rather than by intuition -- the same idea that lets a computer verify a program or an electrical circuit designed from 0s and 1s.
Statement (proposition). Definition 12.7: a declarative sentence that is either true or false, but never both, is called a statement or proposition. Imperative ("Give me that book"), exclamatory ("How beautiful!"), and interrogative ("Where are you going?") sentences are never propositions. An open sentence, such as "x×7=35" or "He is a bad person", has a truth value that varies with an unstated condition (the value of x, or opinion) -- it only becomes a genuine proposition once that condition is pinned down (e.g. by a universal quantifier over a fixed domain). The truth value of a statement is T (or 1) if true, F (or 0) if false.
Simple vs compound statements. A statement that cannot be split into smaller statements is a simple (atomic) statement; one built by joining two or more simple statements with a connective is a compound (molecular) statement. Simple statements are named with propositional variables p,q,r,…
Logical connectives join simple statements into compound ones. The five basic connectives, with their truth tables:
- Negation, ¬p ("not p"): flips the truth value -- ¬p is T exactly when p is F.
- Conjunction, p∧q ("p and q"): T only when both p and q are T.
- Disjunction, p∨q ("p or q"): F only when both p and q are F (otherwise T) -- this is the inclusive or.
- Conditional, p→q ("if p then q", p = antecedent/hypothesis, q = consequent/conclusion): F only when p is T and q is F; otherwise T. In particular a conditional with a false hypothesis is automatically T (vacuous truth), and p→q is judged purely by the symbols, never by whether p and q are related in meaning.
- Biconditional, p↔q ("p if and only if q"): T exactly when p and q share the same truth value.
A sixth connective, Exclusive OR (EOR), p⊻q, is T exactly when precisely one of p,q is T (not both) -- the "either...or...but not both" reading.
Derived conditionals. From p→q, three related statements are built:
- Converse: q→p
- Inverse: ¬p→¬q
- Contrapositive: ¬q→¬p
(Note the inverse and converse are each other's contrapositive, and -- as the Logical Equivalence concept shows -- the contrapositive is always logically equivalent to the original conditional, while the converse and inverse are not.)
Statement formulas and row count. An expression built from statements and connectives is a statement formula. A formula in n distinct propositional variables has a truth table with exactly 2n rows -- 2 rows for one variable, 4 for two, 8 for three, and so on -- since each variable independently ranges over T and F.