Today is my first day working with predicate logic. Here is what is given (I've written it down myself not sure if this is the correct way):
G(w) → w is a genre
L(x, G(w)) → x likes w genre
F(x, y) → x is from country y
S(m,g) → Suggest m mood song from genre g.
P(x,m) → x has m mood.
I want to write predicate logic for the statement:
All people from Jamaica likes Reggae genre.
If a person is from Jamaica and they are in a happy mood suggest a song from Reggae genre.
How can I write the above rule in predicate logic terms? I'm also not sure if L(x, G(w)) is the right way to describe x likes w genre
You need constant "raggae" (say "$r_0$") and "Jamaica" ("$j_0$"), such that $G(r_0)$ holds (Raggae is a genre) and $\exists x: F(x,j_0)$ (somebody comes from Jamaica , so it's an existing country; we are not given a predicate $C(x)$ that says $x$ is a country, or some such, while we do have one for "genre".
I think $L(x,w)$ means $x$ likes (genre) "$w$", you cannot have $G(w)$ as the second argument (as it is a Boolean predicate, not a member of the "universe" (which contains "people", "moods", "genres" and "countries".
All people from Jamaica like the genre of Raggae:
$\forall x: (F(x,j_0) \to L(x, r_0)$: for all things $x$, if $x$ comes from Jamaica (the constant we introduced above) (implicit is that $x$ is then a person?) then $x$ likes $r_0$, the constant for that genre.
"If people are from Jamaica and in a happy mood", can be expressed if we have a constant "happy", which must be a "mood". Say $h_0$ means happy and $P(x, h_0)$ means person $x$ is in a happy mood. So the second then can become:
$\forall x: (F(x,j_0) \land P(x,h_0)) \to S(x,r_0)$