Simple Prolog library