Formulas of predicate logic

In summary: I have explained it in the previous comment. ...but in the previous cases it wasn't so? In the previous cases it wasn't so, because in the previous cases the scope of quantifiers was maximal. Should it be as follows? $ \left ((\forall y)(\forall z):\text{age}(y) \land \neg \text{age}(z)\right )\rightarrow \neg P(y,z)\rightarrow P(John, y)$I think the scope is maximal, so there should be no parentheses, i.e., it should be $(\forall y)(\forall z):\text{age}(y) \land \neg \text{age}(z)\rightarrow \neg P(y,z
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

I want to formulate the following statements into formulas of predicate logic.
  1. If a bird cannot fly, then not all birds can fly.
  2. What Donald cannot do, can no one do.
  3. John likes everyone, that is older than $22$ years old and that doesn't like those who are younger than $22$ years old.

I have done the following:
  1. $\exists : \neg \text{fly}(x) \rightarrow \neg \forall x : \text{fly} (x)$
  2. $(\exists y) \neg \text{can} (Donald,y) \rightarrow \neg \exists x : \text{can} (x,y)$
  3. $(\forall y)(\forall z): \left ((\text{age}(y) \land (\neg \text{age}(z))\rightarrow \neg P(y,z)\right )\rightarrow P(John, y)$

where fly(x)="x can fly", can(x,y)="x can y", age(x)="x is older than $22$", P(x,y)="x likes y". Is everything correct? (Wondering)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
mathmari said:
If a bird cannot fly, then not all birds can fly.
$\exists : \neg \text{fly}(x) \rightarrow \neg \forall x : \text{fly} (x)$
You left out $x$ after $\exists$. I assume the scope of the quantifiers is minimal, i.e., the scope of $\exists x$ ends before $\to$. Otherwise the formula is incorrect.

mathmari said:
What Donald cannot do, can no one do.
$(\exists y) \neg \text{can} (Donald,y) \rightarrow \neg \exists x : \text{can} (x,y)$
I think it is better to say, "What Donald cannot do, no one can do". The main problem with your formula is that the conclusion must refer to the same action as the premise, i.e., the scope of the quantifier that introduces an action must span the whole formula. If my remark after the first formula about the quantifier scope is correct, then the scope of $\exists y$ ends before $\to$ and $y$ cannot be used in the conclusion. Also, the quantifier must be universal: For any action $x$, if Donald cannot do $x$, then for every person $y$, $y$ cannot do $x$ either.

mathmari said:
John likes everyone, that is older than $22$ years old and that doesn't like those who are younger than $22$ years old.
$(\forall y)(\forall z): \left ((\text{age}(y) \land (\neg \text{age}(z))\rightarrow \neg P(y,z)\right )\rightarrow P(John, y)$
I assume this is supposed to say, "John likes everyone who is older than $22$ and who doesn't like those who are younger than $22$". (Please Google "Restrictive clauses".) Here $\forall y$ spans the whole formula, so either you should use parentheses or, if the scope is maximal by convention, then formula 1 is incorrect. The quantifier $\forall z$ must be in the premise, i.e., its scope should be just $\neg \text{age}(z))\rightarrow \neg P(y,z)$. There is a big difference between $\forall z\,(Q(z)\to R)$ and $(\forall z\,Q(z))\to R$. The first formula is equivalent to $(\exists z\,Q(z))\to R$.
 
  • #3
Evgeny.Makarov said:
You left out $x$ after $\exists$. I assume the scope of the quantifiers is minimal, i.e., the scope of $\exists x$ ends before $\to$. Otherwise the formula is incorrect.

So, we have to use an other variable after $\to$ ?

$\exists x: \neg \text{fly}(x) \rightarrow \neg \forall y : \text{fly} (y)$
Evgeny.Makarov said:
I think it is better to say, "What Donald cannot do, no one can do". The main problem with your formula is that the conclusion must refer to the same action as the premise, i.e., the scope of the quantifier that introduces an action must span the whole formula. If my remark after the first formula about the quantifier scope is correct, then the scope of $\exists y$ ends before $\to$ and $y$ cannot be used in the conclusion. Also, the quantifier must be universal: For any action $x$, if Donald cannot do $x$, then for every person $y$, $y$ cannot do $x$ either.

So, we have to use parentheses, right?

$(\exists x) \left (\neg \text{can} (Donald,x) \rightarrow \forall y : \neg \text{can} (y,x)\right )$

Evgeny.Makarov said:
I assume this is supposed to say, "John likes everyone who is older than $22$ and who doesn't like those who are younger than $22$". (Please Google "Restrictive clauses".) Here $\forall y$ spans the whole formula, so either you should use parentheses or, if the scope is maximal by convention, then formula 1 is incorrect. The quantifier $\forall z$ must be in the premise, i.e., its scope should be just $\neg \text{age}(z))\rightarrow \neg P(y,z)$. There is a big difference between $\forall z\,(Q(z)\to R)$ and $(\forall z\,Q(z))\to R$. The first formula is equivalent to $(\exists z\,Q(z))\to R$.

Why does $\forall y$ span the whole formula, but in the previous cases it wasn't so?

Should it be as follows?

$ \left ((\forall y)(\forall z):\text{age}(y) \land \neg \text{age}(z)\right )\rightarrow \neg P(y,z)\rightarrow P(John, y)$
 
  • #4
First you need to determine the syntactic convention related to quantifiers used in your course or textbook. There are numerous conventions, such as what to write after $\forall x$ (colon, period, comma or nothing) and whether to surround $\forall x$ with parentheses. Here it is important to determine the scope of quantifiers. Two possible conventions are: the scope is maximal (extends to the extra closing parenthesis or the end of the formula) or minimal. I prefer minimal scope, so $\forall x\,A(x)\land B$ is parsed as $(\forall x\,A(x))\land B$. Some people use a trick that when the variable is followed by a period, the scope changes to maximal, so $\forall x.\,A(x)\land B$ is parsed as $\forall x\,(A(x)\land B)$, but this convention is not universal.

mathmari said:
So, we have to use an other variable after $\to$ ?

$\exists x: \neg \text{fly}(x) \rightarrow \neg \forall y : \text{fly} (y)$
It is not necessary to rename bound variables. (Again, there are different conventions, but most often even nested scopes with the same variable name are allowed.) The variable $y$ inside $\forall y : \text{fly} (y)$ is not visible outside of that subformula. It can be renamed to any variable without changing the meaning of the formula. This is regardless of whether the scope of $\exists$ is maximal or minimal, but when the scope is maximal, the meaning of the formula does not match the English statement.

mathmari said:
So, we have to use parentheses, right?

$(\exists x) \left (\neg \text{can} (Donald,x) \rightarrow \forall y : \neg \text{can} (y,x)\right )$
If the scope is minimal (probably), then yes, parentheses are needed. But I said "For any action $x$; why are you writing $\exists x$?

mathmari said:
Why does $\forall y$ span the whole formula, but in the previous cases it wasn't so?
The first two formulas in post #1 don't have $\forall y$, so I am not sure what you mean.

mathmari said:
Should it be as follows?

$ \left ((\forall y)(\forall z):\text{age}(y) \land \neg \text{age}(z)\right )\rightarrow \neg P(y,z)\rightarrow P(John, y)$
No, please reread my remarks about the scopes of $y$ and $z$. If the scope of $y$ ends after $\neg \text{age}(z)$, as in your last formula, then $y$ in $\neg P(y,z)$ is free.
 

1. What is predicate logic?

Predicate logic is a formal system of logic that deals with the relationships between different objects and their properties. It is used to represent and reason about statements involving quantifiers such as "all" and "some".

2. What are the basic components of a formula in predicate logic?

The basic components of a formula in predicate logic are variables, predicates, quantifiers, and logical connectives. Variables represent placeholders for objects, predicates represent relationships between objects, quantifiers specify the scope of variables, and logical connectives connect different parts of a formula.

3. How is a formula evaluated in predicate logic?

In predicate logic, a formula is evaluated by assigning values to the variables and then determining the truth value of the entire formula based on the truth values of its components. This process is known as model checking.

4. What is the difference between a universal and existential quantifier in predicate logic?

A universal quantifier, denoted by the symbol ∀, specifies that a statement is true for all values of a variable. An existential quantifier, denoted by the symbol ∃, specifies that a statement is true for at least one value of a variable.

5. How is predicate logic used in scientific research?

Predicate logic is used in scientific research to represent and reason about complex relationships between different objects and their properties. It allows scientists to make precise statements and draw logical conclusions based on those statements, which can be applied to various fields such as mathematics, computer science, and linguistics.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
947
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
5K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
913
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
872
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
964
Back
Top