I am very new to PROLOG so it might be a very trivial question, but I absolutely have no idea how to solve it. There are 4 sentences I need to formulate into PROLOG code:
All hounds howl at night.
Anyone who has any cats will not have any mice.
Light sleepers do not have anything which howls at night.
John has either a cat or a hound.
I convert sentences to well-formed formula in first-order predicate calculus like that
- ∀x (HOUND(x) → HOWL(x)) - ∀x ∀y (HAVE(x,y) ∧ CAT (y) → ¬∃z (HAVE(x,z) ∧ MOUSE (z))) - ∀x (Light_Sleeper(x) → ¬∃y (HAVE (x,y) ∧ HOWL(y))) - ∃x (HAVE (John,x) ∧ (CAT(x) ∨ HOUND(x)))
Now I don't know how to write them in Prolog. Also, how can I make query on them?