Implementation of the Most General Unifier (MGU) in Prolog