looking back on propositional logic
I propositional statements are built from atomic propositions, using propositional connectives I propositional formulas are built from boolean variables, using propositional functions (“connectives”) I key notion: valid inference I α1, α2, . . . , αn |= β I equivalently: the formula (α1 ∧ α2 ∧ · · · ∧ αn) −→ β is a tautology I several methods of checking whether an inference is valid (a formula is a tautology, resp. satisfiable, unsatisfiable).
Tibor Beke predicate logic what’s missing:
I Can we formalize the language of the sciences and higher mathematics (e.g. calculus, analysis, abstract algebra, combinatorics, geometry, number theory)? I We’ve been using truth tables, divide-and-conquer, boolean polynomials, Venn diagrams. But can we formalize proofs the way they occur in mathematics?
Tibor Beke predicate logic where we’re going
I Introduce a much richer version of logic, called predicate logic (also “first order predicate logic” or just “first order logic”). I Introduce a formalism of proofs. Think of a symbolic proof as a game with formulas, somewhat similar to “rearranging equations”. Proofs play the same role for first order logic as truth tables or boolean polynomials do for propositional logic.
Tibor Beke predicate logic first order statements: examples
“Every positive number has a square root.”
“There are some people who like people who don’t like them.”
“Every natural number can be written as the sum of four squares.”
Tibor Beke predicate logic first order logic: new features
I Every positive number has a square root. I There are some people who like people who don’t like them. I Every natural number can be written as the sum of four squares of natural numbers. From the viewpoint of propositional logic, the above statements are ‘atomic’. (They don’t contain any propositional connective such as and, or, not, if-then.) From the viewpoint of first order logic, these statements can be broken into smaller parts. quantifier relation symbol (binary predicate) unary predicate function symbol
Tibor Beke predicate logic domain of discourse
I Every positive number has a square root. I There are some people who like people who don’t like them. I Every natural number can be written as the sum of four squares of natural numbers.
Each of these statements refers to a collection of entities: I in the first sentence, ‘number’ must mean ‘real number’ I in the second sentence, some unspecified group of people I in the third sentence, the set N of natural numbers. The collection the sentence refers to is said to be its universe or domain of discourse. A first order sentence cannot be interpreted without knowing it. Logical formulas will have variables ranging over the domain.
Tibor Beke predicate logic predicates and relations
Once the domain of discourse is fixed (say: the real numbers; the set of 2×2 matrices; the set of people living in the US), one can start to talk about properties of objects: • A unary predicate takes as argument a single element of the domain, and returns True or False. Examples: ‘positive’; ‘diagonalizable’; ‘female’. • A binary predicate is a relation: takes an ordered pair of elements, and returns True or False. Examples: ‘x < y’; ‘the matrices A and B commute’; ‘person X likes person Y ’. • There could also be predicates (relation symbols) with more than two arguments.
Tibor Beke predicate logic functions and constants
• There can be functions defined on the domain. Examples: multiplication, addition (of numbers resp. matrices). ‘Mother of’ could be considered as a function from the set of (all) people to the set of (all) people.
• There can be constants (specific, named elements) in the domain. Examples: 0, 1, π, e, Barack Obama.
Tibor Beke predicate logic connectives and quantifiers
Relations between elements of the domain are linked using I propositional connectives ∧ ∨ −→ q O ←→ ↑ ↓ I and quantifiers I ∀ “(for) every” “(for) each” “all” (the universal quantifier) I ∃ “(for) some” “there exists” (the existential quantifier).
Tibor Beke predicate logic “ For every x > 0 there exists a y such that x = y 2.”
“ For every x, if x > 0, then there exists a y such that x = y 2.”
“ ∀x x > 0 −→ ∃y(x = y 2) ”
from language to logic
The domain of discourse is the set of real numbers.
“ Every positive number has a square root. ”
Tibor Beke predicate logic “ For every x, if x > 0, then there exists a y such that x = y 2.”
“ ∀x x > 0 −→ ∃y(x = y 2) ”
from language to logic
The domain of discourse is the set of real numbers.
“ Every positive number has a square root. ”
“ For every x > 0 there exists a y such that x = y 2.”
Tibor Beke predicate logic “ ∀x x > 0 −→ ∃y(x = y 2) ”
from language to logic
The domain of discourse is the set of real numbers.
“ Every positive number has a square root. ”
“ For every x > 0 there exists a y such that x = y 2.”
“ For every x, if x > 0, then there exists a y such that x = y 2.”
Tibor Beke predicate logic from language to logic
The domain of discourse is the set of real numbers.
“ Every positive number has a square root. ”
“ For every x > 0 there exists a y such that x = y 2.”
“ For every x, if x > 0, then there exists a y such that x = y 2.”
“ ∀x x > 0 −→ ∃y(x = y 2) ”
Tibor Beke predicate logic fully formalized in first order predicate logic!
∀x x>0−→∃y(x=y 2)
I universal quantifier I existential quantifier I variables I binary predicates I function symbol I constant symbol I propositional connective.
Tibor Beke predicate logic ∀x(x < 0 ∨ x = 0 ∨ x > 0)
“ Any positive number has two distinct square roots. ”
∀x x > 0 −→ ∃r∃s x = r 2 ∧ x = s2 ∧ r 6= s
r 6= s is just a typographical variant of q(r = s): “ it is not the case that r = s ”.
from language to logic
“ A number is negative, or zero, or positive. ”
Tibor Beke predicate logic “ Any positive number has two distinct square roots. ”
∀x x > 0 −→ ∃r∃s x = r 2 ∧ x = s2 ∧ r 6= s
r 6= s is just a typographical variant of q(r = s): “ it is not the case that r = s ”.
from language to logic
“ A number is negative, or zero, or positive. ”
∀x(x < 0 ∨ x = 0 ∨ x > 0)
Tibor Beke predicate logic ∀x x > 0 −→ ∃r∃s x = r 2 ∧ x = s2 ∧ r 6= s
r 6= s is just a typographical variant of q(r = s): “ it is not the case that r = s ”.
from language to logic
“ A number is negative, or zero, or positive. ”
∀x(x < 0 ∨ x = 0 ∨ x > 0)
“ Any positive number has two distinct square roots. ”
Tibor Beke predicate logic from language to logic
“ A number is negative, or zero, or positive. ”
∀x(x < 0 ∨ x = 0 ∨ x > 0)
“ Any positive number has two distinct square roots. ”
∀x x > 0 −→ ∃r∃s x = r 2 ∧ x = s2 ∧ r 6= s
r 6= s is just a typographical variant of q(r = s): “ it is not the case that r = s ”.
Tibor Beke predicate logic 2 ∀x x < 0 ←→ q ∃r(x = r ) could also be phrased
∀x x < 0 ←→ ∀r(x 6= r 2)
from language to logic
“ A number is negative if and only if it has no square roots. ”
Tibor Beke predicate logic could also be phrased
∀x x < 0 ←→ ∀r(x 6= r 2)
from language to logic
“ A number is negative if and only if it has no square roots. ”