Predicate logic is an extension of propositional logic that allows for richer structures and quantifications.
Example: Instead of just having propositional variables, we can talk about properties of elements (unary predicates) or relations between objects (binary predicates).
Concrete objects can be represented by constants, and variables allow for quantification over unspecified objects.
Predicate logic combines atomic formulas with connectives (conjunction, disjunction, negation) and quantifiers (universal and existential).
Universal quantification: A formula holds for all elements in a set.
Existential quantification: There exists an element in the set for which the formula holds.
Syntax of Predicate Logic
Predicate logic allows us to express statements about individuals and their properties, which is not possible in propositional logic.
Example: Consider the statement "All human beings are mortal. Socrates is a human being. Therefore, Socrates is mortal."
In propositional logic, we would need three propositional variables (p, q, r) for each statement, losing the structure of the argument.
Predicate logic allows us to express this with predicates like H(x) (x is a human being) and M(x) (x is mortal), and a constant s for Socrates.
The argument can then be expressed as: ∀x(H(x)→M(x))∧H(s)⊢M(s).
This semantic entailment is valid in predicate logic.
Atomic Formulas
Atomic formulas are the basic building blocks of predicate logic, constructed from predicates, constants, and variables.
Examples:
C(j) : Jane is clever (unary predicate C, constant j).
K(a,b) : Anton knows Betty (binary predicate K, constants a and b).
Line(x,y,z) : Points x, y, and z are on the same line (ternary predicate Line).
Connectives and Quantifiers
Atomic formulas are combined using connectives (negation, conjunction, disjunction, implication, bi-implication).
Examples:
C(j)∧K(a,b) : Jane is clever and Anton knows Betty.
¬K(a,a) : Anton does not know himself.
K(a,b)∧¬K(b,a) : Anton knows Betty, but Betty does not know Anton.
Quantifiers are added to express statements about all or some elements.
∃xC(x) : Somebody is clever (existential quantifier).
∀xC(x) : Everybody is clever (universal quantifier).
Semantic Equivalence Example:¬∀xC(x)≡∃x¬C(x). Not everybody is clever is the same as saying someone is not clever.
Another Equivalence Example:∀x¬K(x,x)≡¬∃xK(x,x). Nobody knows himself is the same as saying there does not exist someone that knows himself.
Summary of Syntax
Predicate logic extends propositional logic by:
Enriching propositional variables into structured elements.
Enabling quantification over variables.
Priority Levels and Scope
Quantifiers (∀ and ∃) bind as strongly as negation.
The scope of a quantifier is as small as possible.
Example:∀xC(x)∧K(a,g). The brackets around C(x) can be dropped.
If the scope should extend over the entire formula, brackets are needed:
∀x(C(x)∧K(a,x)).
Redundant Brackets: Negation and universal quantification:
¬∀xC(x). The brackets are redundant.
Terminology: Bound and Free Variables
A variable is bound if it is within the scope of a quantifier.
Otherwise, it is free.
Example:∃x(C(x)∧D(x)). Both occurrences of x are bound if brackets are in place. If there are no brackets, only x in C(x) is bound.
Another Example:(∃xC(x))∧(∃xD(x)). The two quantifiers bind different occurrences of x.
Practice Question
Formula: ∀x∃x(C(x)∧D(x)).
Is the x inside C and D free or bound? If bound, by which quantifier?
The x inside C is bound by the existential quantifier.
The x inside D is bound by the universal quantifier.
Historical Note
Predicate logic was developed by Gottlob Frege in the late 19th century.
Frege's notation was based on flow diagrams.
Bertrand Russell discovered a paradox related to Frege's work which led to the framework being rebuilt by distinguishing sets and classes.
Russell's Paradox: Consider the set R containing elements x that are not in x. Is R in itself or not?
Semantics of Predicate Logic
Meaning is given to predicate logic formulas through models.
Building Models
A model consists of a non-empty set of elements and an interpretation of constants and predicates.
Example: Binary relation L (love), constants r (Robert) and j (Jane).
L(r,j) expresses that Robert loves Jane.
A model M1 can be built where L(r,j) holds (blue arrow from Robert to Jane).
Another model M2 can be built where L(r,j) does not hold (blue arrow from Jane to Robert).
The meaning of a formula varies depending on the model.
Defining Models
In addition to the set of elements A, we need an interpretation of constants and predicates over A.
For all x,ϕ holds in model M if ϕ holds for every interpretation of x in A.
For exists x,ϕ holds in model M if ϕ holds for at least one interpretation of x in A.
Interpreting Formulas
Example: Interpret C(j), L(r,j), and ¬∀xC(x)
Model consists of all human beings on this planet.
Constant j interpreted as Jane.
constant r interpreted as Robert.
C(x) is the cleverness relation - all human beings are clever.
L(x,y) is a relation that holds if x loves y.
Smaller Models
Model M1: Robot loves Jane.
Jane is clever.
(M⊨C(j)). Jane is clever.
(M⊨L(r,j)). Robot loves Jane.
Model M2: Everybody is clever.
All elements are inside the pink circle, indicating they are clever.
(M⊭L(r,j)). Robot does not love Jane.
(M⊨(C(j)∧L(j,r))). Jane is clever and Jane loves robot.
Harder question: ∃x∃y(L(x,y)∧L(y,x)). There is a couple that loves each other.
This holds in the model as there is a pair loving each other.
Interpreting More Formulas
Given model M with elements p<em>1, p</em>2, and p<em>3. Constants a and b are interpreted as p</em>1 and p3, respectively.
Blue arrows represent the knowing relation K, and pink circles represent the clever relation C.
Is (M⊨K(a,b))? Yes, because there is a blue arrow from p<em>1 to p</em>3.
Is (M⊨K(b,a))? No, because there is no blue arrow from p<em>3 to p</em>1. So, (M⊨¬K(b,a)).
Does b know himself? Yes, because the blue arrow exists from p3 to p3.
Is a clever? Yes.
Is b clever? No. (M⊨¬C(b)).
Quantifiers - Formulas
(M⊭∀xC(x)). Not everyone is clever. True because p3 is not clever, so this model holds.
(M⊨∃xC(x)). There exists an x such that c x holds, which is true.
(M⊨∃x¬C(x)). Yes, because p3
(M⊨∀x(C(x)⟹∃yK(x,y))). If you're clever, then you know somebody - False, because p2 doesn't know anybody.
(M⊨∀x(C(x)∨K(x,x))). Everyone is clever or knows himself - True.
(M⊭∃x∀yK(x,y)). There is someone who knows everybody - False, because nobody knows everybody.
(M⊨∀x(∃yK(x,y)⟹∃y(K(x,y)∧C(y)))) - True, Because all three elements satisfy the condition.