Truth tables: a way to represent the meaning of each connective. The meaning (truth value) of more complex formulas can be derived by composing the truth tables.
Tautology: A formula which is True for all the possible truth values of the letters contained in it.
Examples:
Example: x, 1, x+1 are terms. x+1 > 0 is an atomic formula. (1 is a constant, + is a function, and > is a predicate.)
Formulas: Expressions built on atomic formulas, the logical connectives, and the quantifiers exists and forall.
forall x>0 exists y. x*y = 1is True in the domain of rational numbers, but is False in the domain of integer numbers.
Valid formulas: formulas which are True in every domain, and for every possible interpretation of the function, constant, and predicate symbols.
In general the truth tables are not enough to prove that a fourmula is valid. There are various systems for this purpose; but anyway (for the purposes of the course) we will mostly rely on our intuition. All the laws of classical logic are pretty intuitive except maybe for the Law of the excluded middle:
p or not pThis law, which says that either p is True or its negation is True, brings to curious consequences like the following Smoker's Paradox:
There is a person is this room such that, if this person smokes, then everybody in the room smokes.This sentence is true in classical logic (provided that the room is not empty). In fact we can formulate it as:
exists x. (smokes(x) -> forall y. smokes(y))which is equivalent to
(exists x. not smokes(x)) or (forall y. smokes(y))which is (classically) equivalent to
(not (forall x. smokes(x))) or (forall x. smokes(x))Notably, the law of excluded middle is not accepted in other logics, like the Intuitionistic Logic. (We, however, will use it.)
forall x. P(x)where P is an arbritrary formula containing x, and the intended domain is the set of natural numbers.
The principle says that, in order to prove the above formula, it is sufficent to prove the following:
Exercise: prove by induction that
forall x. 1 + 2 + ... + x = x*(x+1)/2
The induction principle can trivially be generalized to start with a base case greater than 0.
Exercise: Find the mistake in the following reasoning, which proves (erroneously) that all people have the same height: