Content
Predicate Logic

Week 2

Quick Questions

True or False?

A¬A \vDash A \lor \lnot A
Solution

True, because either AA or ¬A\lnot A will always be true, we obtain that A¬AA \lor \lnot A is a tautology. We use the notation F\vDash F to express this fact.

If FF is a tautology, then ¬F\lnot F is unsatisfiable.

Solution

True, see Lemma 2.2 in script.

What is a Universe in predicate logic?

  1. The set of all formulas of predicate logic
  2. A function that assigns 0 or 1 to each element of a set.
  3. A formula that is true in every interpretation
  4. The set of objects we want to reason about

Solution

  1. is correct.

True or false?

((AB)B)C((AB)(BC))(AC))C((A \to B) \lor B) \land C \vDash ((A \to B) \lor (B \to C)) \lor (A \to C)) \lor C

Solution

True, one can make the observation that in every case where the left-hand side is true, CC must be 11. Therefore, we obtain that the right-hand side automatically becomes true. Thus, we have indeed a logical consequence.

Correct application of exaclty one rule of Lemma 2.1?

¬(¬AC)A¬C \lnot(\lnot A \land C) \equiv A \lor \lnot C

Solution

No, we used double negation and De-Morgan at once, we should split it up as follows:

¬(¬AC)¬¬A¬CA¬C \lnot(\lnot A \land C) \equiv \lnot \lnot A \lor \lnot C \equiv A \lor \lnot C

Correct application of exaclty one rule of Lemma 2.1?

A(BC)(AB)(AC) A \land (B \lor C) \equiv (A \land B) \lor (A \land C)

Solution

Yes, we have used only the first distributive law.

Which statements are true?

  1. There are infinitely many interpretations in predicate logic, while there are only finitely many in propositional logic.
  2. A formula of predicate logic always has a fixed truth value
  3. Quantifiers only exist in predicate logic
  4. Propositional logic is "stronger" than predicate logic, i.e. we can express more statements.

Solution

  1. True, because there are e.g. infinitely many universes, while there is only a finite amount of propositional symbols in propositional logic, i.e. there are only 2n2^n many interpretations.
  2. False, the truth value may change if we e.g. use another universe.
  3. True
  4. False, predicate logic is "stronger", see 3.

True or False?

xyP(x,y)yxP(x,y)\forall x \forall y P(x,y) \equiv \forall y \forall x P(x,y)

Solution

True. See 2.4.7 in script.

Under which interpretation is the following formula true?

xyz (P(x,y)(P(x,z)P(z,y)))\forall x \forall y \exists z \ \left(P\left(x,y\right) \to \left(P\left(x,z\right) \land P\left(z,y\right)\right)\right)
  1. Universe U=NU = \mathbb{N} and P(x,y)=1    x<yP(x,y) = 1 \iff x < y
  2. Universe U=NU = \mathbb{N} and P(x,y)=1    xyP(x,y) = 1 \iff x \leq y
  3. Universe U=RU = \mathbb{R} and P(x,y)=1    x<yP(x,y) = 1 \iff x < y
  4. Universe U=NU = \mathbb{N} and P(x,y)=1    x is evenP(x,y) = 1 \iff x \text{ is even}

Solution

  1. False, counterexample: x=1,y=2x = 1, y = 2. There exists no number zz "between" x=1x = 1 and y=2y = 2.
  2. True, if we set z=xz = x, then the formula is true (if we fix any x,yx, y and set z=xz = x, then xyx \le y implies xz=xx \le z = x and x=zyx = z \le y)
  3. True, if we set z=x+y2z = \frac{x + y}{2}, then the formula is true (we can always "find" a real number between xx and yy if x<yx < y)
  4. True, the value of yy doesn't matter here and setting z=xz = x trivially satisfies the formula.

Predicate Logic

A short rundown of the main concepts:

💡

Interpretations and Universes Instead of assigning truth values to the propositional symbols to interpret the formula and obtain a mathematical statement, as we did in propositional logic, we now always have to choose a set of mathematical objects (such as N,R\mathbb{N}, \mathbb{R} or similar) we want to reason about. We call this set the Universe denoted by UU.

💡

Predicates take elements from the universe and spit out a truth value (P:Uk{0,1}P : U^k \to \{0,1\}). Example interpretations for predicates: prime(x),less(x,y)\text{prime}(x), \text{less}(x,y).

💡

Functions take elements from the universe and spit out an element from the Universe (f:UkUf : U^k \to U). Example interpretations for functions: x+yx + y, x2x^2 (note that we sometimes use the infix notation and not something like plus(x,y)\text{plus}(x,y)). Note that we also allow k=0k = 0, so we would obtain a function taking 00 arguments, in this way, we can define constants and therefore use expressions like x+0x + 0 inside the interpreted formula.

💡

Variables (often denoted by x,y,zx,y,z), which are free (more about his in chapter 6), can take any value from the universe. A variable is basically free if there is no quantifier, which is at an outer level of the formula where the variable appears, referring to the same variable. Consider for example the expression xQ(x,y)\forall x Q(x,y), here yy is a free variable, while xx is not.

💡

Quantifiers:

  1. x\forall x F is true if for any value xx in UU, formula FF is true.
  2. x\exists x F is true if there exists xx in UU, such that formula FF is true.

By combining these elements, predicate logic allows for the creation of more complex and expressive statements than propositional logic.

Exercises

Translation of predicate logicSource:  Leon Kolmanic (HS23)

Consider the following interpretation. Let U=ZU = \mathbb{Z} be the universe. And

Q(x)=1    x is squareQ(x) = 1 \iff x \text{ is square}P(x,y)=1    x=yP(x,y) = 1 \iff x = ysum(x,y)=x+y\text{sum}(x,y) = x+y

Write down formulas of predicate logic, such that our interpretation is fitting and expresses the following statements (numbers refer to integers):

  1. There is a square number
  2. The sum of two arbitrary numbers is not square
  3. For every number aa, there is a number bb, such that a+ba + b is square
  4. The sum of two squares is a square

Additionally, translate these formulas into statements under the given interpretation:

  1. xy((Q(x)Q(y))P(x,y))\forall x \forall y ((Q(x) \land Q(y)) \to P(x,y))
  2. x(Q(x)(abP(x,sum(a,b))))\forall x (Q(x) \to (\exists a \exists b P(x,\text{sum}(a,b))))