A Prolog program to define genaeological relations