Simple predicate logic question, formalizing sentences

1.2k Views Asked by At

"The lecturer is happy, if he has no students."

$\forall l \not \exists s, H(l)$

How can we say "he has no students?"

"The lecturer has some students who love logic."

Would this be expressed as $\exists s, L(s)$? I'm having trouble seeing where "lecturer" should come in.

2

There are 2 best solutions below

3
On BEST ANSWER

You need more predicates to better express what's happening. If you examine a statement carefully and spend the time needed to develop a good translation key, it's well worth the effort: the translation more readily falls out, once you have such a key.

You can denote the lecturer as a named constant, say $t$.

$H(x)\;$ can denote "$x$ is happy."

$T(x,y)\;$ can denote "$x$ lectures y".

$S(x)$ can denote "$x$ is a student."

$L(x)$ can denote "$x$ loves logic."

The first statement, in loglish: "IF there does not exist a person $x$ such $x$ is a student and the lecturer lectures $x$, THEN the lecturer is happy." $$[\lnot \exists x(S(x) \land T(t, x))] \rightarrow H(t)$$


Next, we want to translate ""The lecturer has some students who love logic."

In "loglish" that means "There exist people who are students and such that the lecturer lectures those students and those students love logic."

$$\exists x(S(x) \land T(t, x) \land L(x))$$

0
On

The lecturer is not a variable, so $LH$ taking true or false would do.
The domain should be the set of students, and you should have a predicate $LS(s)$ ("student $s$ is a student of the lecturer"), so "The lecturer is happy, if he has no students." would be written: $$ \lnot((\forall s: \lnot LS(s)) \oplus LH)=((\forall s: \lnot LS(s)) \land LH) \lor ((\exists s: LS(s)) \land \lnot LH)$$

"The lecturer has some students who love logic": $$\exists s: L(s) \land LS(s)$$