# Thread: Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

1. ## Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

Here is the problem:
"Lest you think logic is only about mathematics here are some sentences from some, at least once, popular songs.

B(x) : x is a body
O(x): x is out.
D(x): x is down
L(x,y): x loves y.
x = y: x equals y.
u = you
b = my baby
m = me

Translate the following using logical connectives:

a. "Nobody loves you when you are down and out."
b. "Everybody loves somebody"
c. "Everybody loves my baby."
d. "But my baby don't love nobody but me."

This is a relatively frustrating problem considering we have barely been introduced to the fundamentals of logic. I took a stab at it, and quickly realized that I was just guessing and as a result probably teaching myself an incorrect way of doing it. Here is my attempt at problem a. $\displaystyle D(u)\wedge O(u)\rightarrow \neg L(B(x),u)$

2. ## Re: Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

Originally Posted by fogownz
Here is the problem:
"Lest you think logic is only about mathematics here are some sentences from some, at least once, popular songs.
B(x) : x is a body
O(x): x is out.
D(x): x is down
L(x,y): x loves y.
x = y: x equals y.
u = you
b = my baby
m = me

Translate the following using logical connectives:
a. "Nobody loves you when you are down and out."
b. "Everybody loves somebody"
c. "Everybody loves my baby."
d. "But my baby don't love nobody but me."Here is my attempt at problem a. $\displaystyle D(u)\wedge O(u)\rightarrow \neg L(B(x),u)$

Frankly, I would prefer that the domain be specified as the set of humans. That would eliminate the need for $\displaystyle B(x)$. But that said, you made a start.

Try $\displaystyle (\forall x)[B(x) \wedge D(u) \wedge O(u) \Rightarrow \neg L(x,u)]$

I really find the predicate $\displaystyle B(x)$ problematic here.
If we knew that the domain be specified as the set of humans we could shorten that to:
$\displaystyle (\forall x)[D(u) \wedge O(u) \Rightarrow \neg L(x,u)]$

3. ## Re: Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

Originally Posted by Plato
Frankly, I would prefer that the domain be specified as the set of humans. That would eliminate the need for $\displaystyle B(x)$. But that said, you made a start.

Try $\displaystyle (\forall x)[B(x) \wedge D(u) \wedge O(u) \Rightarrow \neg L(x,u)]$

I really find the predicate $\displaystyle B(x)$ problematic here.
If we knew that the domain be specified as the set of humans we could shorten that to:
$\displaystyle (\forall x)[D(u) \wedge O(u) \Rightarrow \neg L(x,u)]$
just think of body as an undefined term. less sordid that way :P

4. ## Re: Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

Thanks for your help Plato. Is it wrong to put an element (right term?) inside an element such as I had in my original answer with L(B(x),u), or was it just not right in that instance?

5. ## Re: Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

you can nest predicates.

6. ## Re: Low level, "fun", logic problem (Could this be moved to discrete math, sorry)

Originally Posted by Deveno
you can nest predicates.
No, in first-order logic you cannot nest predicates. You can nest function symbols. Your example has constants but no function symbols, but if we add, say, a two-argument function symbol f, then f(u, f(f(b, u), m)) is a legal term. Terms, however, have to appear as arguments to predicate (or, relation symbols) to form formulas.