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

id = 134
group = 'sets'
number = 41
visible = True
facts = None

solution = '''\
subset134([], []).
subset134([H|T], [H|T1]) :-
  subset134(T, T1).
subset134([_|T], T1) :-
  subset134(T, T1).

powerset(Set, PowerSet) :-
  findall(S, subset134(Set, S), PowerSet).
'''