These are simple statements:
- Marcus was a man
- Marcus was a Roman
- All men are people
- Caesar was a ruler
- All Romans were either loyal to Caesar or hated him
- Everyone is loyal to someone.
- People only try to assassinate rulers they are not loyal to
- Marcus tried to assassinate Caesar.
I have converted them to First Order Logic statements but I'm stuck in converting them to prolog code.
This is my prolog code up to statement number 5, and I don't know whether what I have done so far is correct or not. Also, I cannot find any docs about negation, for all, there exists in prolog code. How to translate them to prolog code?
man(marcus).
pompeian(marcus).
ruler(caesar).
pompeian(X) :- roman(X).
roman(X):-loyalto(X,caesar);hate(X,caesar).