Prolog Generalisation of