Jaysen Tsao
Discrete Mathematics for Computer Science

First-Order Logic

Propositional logic works with propositions, which are statements that, as a whole, are assigned either true or false.

In contrast, first-order logic (also known as predicate logic) works with predicates, which are statements that contain variables and can be true or false depending on the values of those variables. That is, first-order logic extends propositional logic by allowing formulae to depend on variables.

In turn, first-order logic allows us to express statements about objects and their properties, as well as relationships between objects.

Predicates and Quantifiers

A predicate is a function that takes one or more variables as input and returns a propositional formula:

Definition 27: Predicate

A predicate is a function 𝑃(𝑥1,𝑥2,,𝑥𝑛) that takes 𝑛 variables as input and returns a propositional formula. The variables 𝑥1,𝑥2,,𝑥𝑛 are called the arguments of the predicate.

Example.
Let 𝑃(𝑥) be the predicate “𝑥 satisfies my special property.” A truth assignment 𝜎 over a predicate must now specify, for each possible value of 𝑥, whether 𝑃(𝑥) is true or false. For example, if the domain of 𝑥 is the set of natural numbers, then 𝜎 must specify whether 𝑃(0) is true or false, whether 𝑃(1) is true or false, and so on.

Definition 28: Universal Quantifier

The universal quantifier is a logical operator that takes a variable and a proposition as input and produces a new proposition. The proposition 𝑥𝑃(𝑥) is true if and only if 𝑃(𝑥) is true for every possible value of 𝑥.

Definition 29: Existential Quantifier

The existential quantifier is a logical operator that takes a variable and a proposition as input and produces a new proposition. The proposition 𝑥𝑃(𝑥) is true if and only if there exists at least one value of 𝑥 such that 𝑃(𝑥) is true.

Resource 3: Properties Involving Quantifiers

Property Equivalence
Negation Laws Negation of ¬𝑥𝜑𝑥¬𝜑
Negation of ¬𝑥𝜑𝑥¬𝜑
Distributivity Laws Distributivity of over 𝑥(𝜑𝜓)𝑥𝜑𝑥𝜓
Distributivity of over 𝑥(𝜑𝜓)𝑥𝜑𝑥𝜓
Non-distributivity of over 𝑥(𝜑𝜓)𝑥𝜑𝑥𝜓
Non-distributivity of over 𝑥(𝜑𝜓)𝑥𝜑𝑥𝜓
Commutativity Laws Commutativity of 𝑥𝑦𝜑𝑦𝑥𝜑
Commutativity of 𝑥𝑦𝜑𝑦𝑥𝜑

Well-Formed 𝐿-Formulae

Normal Forms of 𝐿-Formulae

Compactness

Higher-Order Logic