I am trying to understand how prolog represent first order logic. how can I represent for example, in a list of types of animals:
dog(spot).
cat(nyny).
fly(harry)
that all animals are mammals or insect?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think what you’re referring to is just the following:
That is, a mammal is either something that is a dog or a cat. You have to explicitly specify the categories that fall into that mammal category. Same for insects.
Connecting this with your first-order logic question, the first entries of
mammalwould read: for every X where X is a dog, X is also a mammal (same for cat), and so on.