Are you familiar with the concept of unification? What you have to do is: just call a predicate that looks like the one you're trying to find.
So, say in your database is:
father(abraham,isaac).
Now you want to call something like:
verify(father,[abraham,isaac]).
Your predicate body will then have to contain a mechanism of calling father(abraham,isaac).
which should then return true.
Calling father(abraham,adam)
should fail.
You will need two predicates for this: =../2
and call/2
. If you are using SWI-Prolog, call help(=..).
and help(call)
from the interpreter's command line to access the documentation.
I hope I didn't spoil the assignment for you. You still have to find out what to do with partially instantiated predicates (so, say something like verify(father,[abraham,X]).
on your own, but it shouldn't be hard from here.
Good luck.