summaryrefslogtreecommitdiff
path: root/prolog/problems/sets/is_superset_2/common.py
blob: 356ca343389f2f2c8e8d40392a8b4ed8f7c3c672 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# coding=utf-8

id = 131
group = 'sets'
number = 38
visible = True
facts = None

solution = '''\
memb131(X, [X|_]).
memb131(X, [_|T]) :-
  memb131(X, T).

is_superset(_, []).
is_superset(S1, [H|T]) :-
  memb131(H, S1),
  is_superset(S1, T).
'''