Subset of a set - back to content

		SUBSET verifies if a set is a subset of another set.

		?- subset([a,b],[a,c,d,b]).

subset([],L). subset([X|T],L):- member(X,L),subset(T,L). We verify if a set is included in all the sets of a list.

?- all_subset([a,b],[[1,a],[c,b]). false. ?- all_subset([a,c,b],[[a,b,c,d],[m,a,b,c]]) true.
subset([],L). subset([H|T],L):- member(H,L),subset(T,L). all_subset(X,[Y]):- subset(X,Y). all_subset(X,[H|T]):- subset(X,H), all_subset(X,T).