Lecture from: 04.12.2024 | Video: Videos ETHZ

Recall that a proof system consists of statements, proofs, a semantic interpretation function (), and a proof verification function (). A statement might take the form , where is a set of formulas, and is a logical consequence of .

We’re now focusing on predicate logic and formalizing its syntax and semantics. A key difference from propositional logic is the distinction between terms (representing objects) and formulas (representing statements about objects). We’re defining the syntax of formulas, not yet delving into proofs or the verification function.

As discussed previously, we need to define both syntax (what constitutes a well-formed formula) and semantics (how to interpret and assign truth values to formulas). Semantics is defined by the valuation function: or , which requires the concepts of matching interpretations and free variables.

Predicate Logic: Syntax and Semantics

Predicate logic is more expressive than propositional logic, allowing us to reason about objects, properties, and relationships.

Syntax: Defining Terms and Formulas

The alphabet of predicate logic includes:

  • Variable Symbols: for (often represented as ).
  • Function Symbols: (often ), where indicates the arity (number of arguments).
  • Predicate Symbols: (often ), where is the arity. Constants are 0-ary predicate symbols (e.g., ).
  • Logical Connectives: (as in propositional logic).
  • Quantifiers: .
  • Parentheses: .

Terms

Terms represent objects in the universe of discourse. They are defined inductively:

  1. Variable Symbols: Every variable symbol is a term.
  2. Function Applications: If is a function symbol of arity , and are terms, then is a term.
  • Example: is a syntactically valid term, assuming the arities of , , and match.

Formulas

Formulas represent statements about objects. They are defined inductively:

  1. Atomic Formulas: If is a predicate symbol of arity and are terms, then is an atomic formula.

  2. Logical Connectives: If and are formulas, then , , , and are formulas.

  3. Quantifiers: If is a formula and is a variable symbol, then and are formulas.

  • Example: . We represent the structure using a syntax tree:

Semantics: Interpreting Formulas

Free Variables

A variable is free in a formula if it’s not bound by a quantifier. We define a function that returns the set of free variables in a formula .

  • Example: In , the free variables are . While and appear within the scope of quantifiers, these are different instances of the variables and and have no effect on the free variables and . The predicate symbols are considered free variables analogous to the atomic formulas from propositional logic.

Interpretations

An interpretation assigns meaning to the symbols in a formula. Formally, , where:

  • : The universe (domain of discourse).
  • : Assigns concrete functions to function symbols ().
  • : Assigns concrete predicates to predicate symbols ().
  • : Assigns values from the universe to free variables (). We avoid this complicated notation and denote by the meaning of under interpretation . Similar gives us the universe and the meaning of .

An interpretation is matching if it assigns values to all free variables of the formula.

Example: Interpretation and Informal Evaluation

Consider the formula . Let’s define a matching interpretation :

  • :

This interpretation is matching because it provides meanings for all free variables (, , and ). Now, let’s informally evaluate the formula under this interpretation.

The formula states that for all natural numbers , either is true (meaning is even) or is true (meaning is even). For any natural number , either is even, or is odd. If is odd, then is even. If is even, then the formula is already satisfied. Thus the formula is indeed satisfied under the interpretation . This implies that the statement is true thus .

Now let’s consider a different interpretation, :

  • :

Under this interpretation, the formula becomes . Let’s analyze this:

  • If , then the formula is true.
  • If , then , so the formula is false. Since our universe is it is possible for to be negative thus the interpretation does not model the formula . Therefore, . This example shows how the same formula can have different truth values under different interpretations.

Formal Definition of the Valuation Function ()

The valuation function , or simply , formally defines how to determine the truth value of a formula under an interpretation . This definition is recursive, mirroring the inductive definition of formulas.

1. Terms

First, we define how to interpret terms within an interpretation. The interpretation of a term is a value in the universe .

  • Variable: If we have a variable symbol , then (the value assigned to by ). If is a free variable and but has not been assigned a value, then the interpretation is not matching and hence is undefined.

  • Function Application: If is a function application , then:

    This means we first evaluate the arguments recursively under , obtaining values from the universe. Then, we apply the function (the interpretation of the function symbol ) to these values.

2. Atomic Formulas

If is an atomic formula , then:

This means we first evaluate the terms under . Then, we check if the resulting tuple of values belongs to the relation (the interpretation of the predicate symbol ).

3. Logical Connectives

The semantics of logical connectives are defined as in propositional logic:

4. Quantifiers

To define the semantics of quantifiers, we introduce the notion of a modified interpretation: . This is the interpretation with the value of the variable changed to , regardless of whether was free in the original interpretation or not.

  • Universal Quantifier ():

  • Existential Quantifier ():

This recursive definition of (or ) provides a complete and rigorous way to evaluate the truth value of any well-formed predicate logic formula under a given interpretation. It combines the interpretations of terms, predicates, logical connectives, and quantifiers to determine the overall truth value.

Example: Tautology with and without Quantifiers

Let’s analyze the formula .

  • Without a Quantifier: To evaluate , we need a matching interpretation . This interpretation must specify:

    • A universe .
    • An interpretation for the predicate symbol (a unary relation ).
    • A value for the free variable .

    Given such a matching interpretation, the formula is indeed a tautology. It evaluates to true because for any value of , either or . Since is a tautology, denoted as , must also be satisfiable since there must exist at least one model, in fact there exist many, many models.

  • With a Universal Quantifier: Now consider . A matching interpretation for this formula still needs to specify:

    • A universe .
    • An interpretation for the predicate symbol ().

    The variable is no longer free, so does not need to assign a value to . The formula is still a tautology. For any value , the modified interpretation will make true (as explained above). Since this holds for all , the universally quantified formula is also true.

Lemma: Tautology and Universal Quantifier

Lemma

For any formula , if and only if .

Proof

  • () If ( is a tautology), then for every matching interpretation , . This includes all interpretations for any from the universe. Thus . Hence .
  • () If , this means that for every interpretation it holds that . This means that for all from the universe. This also means that every interpretation where is a free variable and is assigned a fixed value must model . Therefore, any interpretation modelling as a free variable can also be described by for some from the universe , and models , and since and were chosen arbitrarily we must have .

Key Distinction: While seemingly similar, the reasoning for why the two formulas are tautologies is subtly different. In the first case (), the tautology arises from considering all possible interpretations of and all possible assignments for . In the second case (), the tautology arises because, within any single interpretation, the formula holds for all possible values of in the universe. The universal quantifier internalizes the consideration of all possible values of within a single interpretation. Thus the interpretations of both are different which is the key.

Example: Enforcing Universe Size with a Formula

Can we construct a formula that forces any satisfying interpretation to have a universe of at least a certain size? Yes, we can.

Let’s consider the case where we want to enforce a universe size of at least three. The following formula achieves this:

  • Explanation:
    • : This part enforces reflexivity of the predicate . In any satisfying interpretation, the predicate must relate every element in the universe to itself.
    • : This part asserts that there exist three distinct elements in the universe such that none of them are related by to any other (except themselves due to the first part of the formula).

Proof of Minimum Universe Size

The claim is that if (i.e., ), then .

Suppose, for contradiction, that .

  1. Case 1: : If the universe has only one element, say , then the second part of the formula cannot be satisfied, as we cannot find three distinct elements.
  2. Case 2: : Let the universe be . Because of the first part of the formula we must have and . The second part requires us to have distinct such that . Since our universe has only two distinct elements, we cannot choose 3 distinct .

In both cases, the formula cannot be satisfied. Therefore, if , we must have .

Enforcing an Infinite Universe

We can also construct a set of formulas that forces the universe to be infinitely large. Consider the following set:

  • Explanation:
    • : Every element is related by to .
    • : is irreflexive (no element is related to itself).
    • : is transitive.

Proof of Infinite Universe

Let’s prove that if for all formulas in M, then must be infinite.

Suppose, for contradiction, that is finite. Pick any . By the first formula . By the second formula, we have . Since the universe is finite we must get after applying a finite number of times the initial again, meaning . Using the transitivity of P, we get that which is a direct contradiction to the irreflexivity property stated by the second formula.

Therefore, must be infinite.

  • Example Interpretation: An example interpretation over the natural numbers that satisfies these formulas is:

This ability to control the universe’s properties through logical formulas is a powerful feature of predicate logic.

Example: Showing Unsatisfiability

Consider the following predicate logic formula:

Let’s demonstrate that this formula is unsatisfiable, meaning there is no interpretation such that .

Proof of Unsatisfiability

We’ll proceed by contradiction. Suppose there exists an interpretation such that . This means all three conjuncts must be true under :

  1. : This means for all , . In simpler terms, the predicate is true for every element in the universe under interpretation .

  2. : This means there exists at least one element such that . So, there’s at least one element for which the predicate is true.

  3. : This means for all , . The biconditional () means and have the same truth value for all elements in the universe. Thus, if is true for some then is false and vice versa.

Now, let’s consider the element from step 2, for which is true. By step 3, since is true, must also be true, meaning is false. However, this contradicts step 1, which states that is true for all elements in the universe, including .

We’ve reached a contradiction. Therefore, our initial assumption that there exists an interpretation such that must be false. Hence, the formula is unsatisfiable.

Lemma: Equivalence of Universal and Existential Quantifiers

Proof of Equivalence

We’ll prove this equivalence by showing that the two formulas have the same truth value under any interpretation .

  1. : This means that for all , . In other words, is true for every element in the universe under the modified interpretation.

  2. : This means that . By the definition of the existential quantifier, this means that there is no such that . Equivalently, there is no such that . This means for every , must hold.

As we see from 1. and 2. both formulas say exactly the same thing under any arbitrary interpretation.

Since the truth values of the two formulas are the same under any interpretation, the formulas are equivalent: .

Continue here: 24 Evaluating and Proving Formulas in Predicate Logic, Equivalences, Transformations, Variable Substitution, Universal Instantiation, Equality, Prenex Normal Form