Given a database1 describing what activities entities take part in with facts of the form:

Where Day is one of monday, tuesday, wednesday, thursday, friday, saturday or sunday. An activity occurs on exactly one day.

Below is an excerpt of the database:

took_part(fenchurch,         dining_at_the_end_of_the_universe).
took_part(slartibartfast,    the_42_club).
took_part(zaphod_beeblebrox, painting_the_hart_of_gold).
took_part(marvin,            dining_at_the_end_of_the_universe).
took_part(trillian,          the_42_club).
took_part(tricha_mc_millen,  painting_the_hart_of_gold).
took_part(arthur_dent,       dining_at_the_end_of_the_universe).

day(dining_at_the_end_of_the_universe ,monday).
day(the_42_club                       ,monday).
day(painting_the_hart_of_gold         ,monday).

We are now curious to find out which entities could have met and which could not. Write the following predicates to find out:

to test your predicates you can use this database2. Tip: type LifeTheUniverseAndEverything. ENTER in SWI Prolog.