Predicate Logic
Quantifiers
∀ [...] = "for all x" (universal quantifier) ∃ [...] = "there exists x such that" (existential quantifier) Quantifiers are for variables
Predicate logic
A richer logic which contains propositional logic but also allows us to reason about members of a (non-empty) domain.
Bound variable
A variable that if its name is changed, the meaning of the formula remains the same, e.g. x in ∀x, [even(x) ∨ odd(x)].
Free variable
A variable that if its name is changed, the meaning of the formula tends to change, e.g. x in ∀y, (x≤y).
Predicates
Evaluates to true/false depending on its arguments. For example: L(x) means "predicate L is true for variable x". L(a) means "predicate L is true for constant a"
How do you disprove a for all proposition?
Find one x where the predicate is false. ¬(∀x [P(x)]) is the same as ∃x [¬P(x)]
What is predicate logic also known as?
First-order logic
∀
For all symbol
Nullary predicates
Have arity 0, are atomic propositions.
Unary predicate
Have arity 1, and represent facts about individuals e.g. L(x) = x is logical.
Binary Predicate
Have arity 2, and represent relationships between individuals, e.g. M(a, b) = a is married to b, M(a, b) = a likes b. Doesn't have to be symmetric Each co-ordinate comes from a different domain
Domain
Non-empty set of objects/entities (individuals) to reason about, e.g the set of people in this room.
What are the key ingredients of predicate logic?
Predicates, quantifiers, variables and constants
What can we assume in predicate logic?
Propositions and (quantified) predicates e.g. ∃x,P(x) ¬ ∃x,P(x) ∀x,Q(x) ∀x,(Q(x)→R(x)) Q(a)
What are the two golden rules for writing proofs in predicate logic?
Rule 1: Write the proofs backwards Rule 2: Anytime you need to introduce a quantifier (backwards), then either use a new variable or use something from the context
How do you disprove a there exists proposition?
Show that a predicate is false for all x. ¬(∃x [P(x)]) is the same as ∀x [¬P(x)]
Constants
Specific objects in the domain. Usually denoted by a, b, c, ...
Variables
Symbols to represent (as yet unknown) objects in the domain. Usually denoted by x, y, z, ...
What does it mean if there is a variable next to a quantifier?
That variable is bound to the quantifier.
Arity of a predicate
The number of arguments/variables the predicate takes
What is a domain also called?
Universe