My half an hour search in library was not successful.

So tell me how to best implement sets (especially

subset relation) in Prolog. Efficiency is not important

in this case.

To be more specific, I have an enumerated, very finite

base set (say { a,b,c,d,e,f }) and I'd like to get all

the subsets, which have at least members c and d. The

standard way of representing sets as ordered lists

without duplicates does not give a trivial solution.

I'd like so much to ask something like

:- base(B),subset([d,c|X],B). instead of

:- base(B),subset(X,B),member(c,X),member(d,X).

(X is not the same in these two versions, but for my

current needs it does not make that kind of difference)

This has to be a standard problem in Prolog-world,

but I'm novice (as you have noticed).

Any help is welcome. Books, articles, code, whatever.

Tomi Silander