-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsubsets.pl
More file actions
executable file
·47 lines (35 loc) · 900 Bytes
/
subsets.pl
File metadata and controls
executable file
·47 lines (35 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
:- module('subsets',[]).
en("the target language is: prolog.
the templates are:
*a set* is a subset of *a set*,
*a thing* is a set,
*a thing* belongs to *a set*.
the knowledge base subsets includes:
a set A is a subset of a set B
if set A is a set
and set B is a set
and for all cases in which
a thing belongs to set A
it is the case that
the thing belongs to set B.
scenario one is:
family one is a set.
family two is a set.
Bob belongs to family one.
Alice belongs to family one.
Alice belongs to family two.
query one is:
which first family is a subset of which second family.
scenario two is:
[Alice, Bob] is a set.
[Alice] is a set.
a thing belongs to a set
if the thing is in the set.
query two is:
which set is a subset of which other set.
").
/** <examples>
?- answer one with one.
?- show prolog.
?- answer two with two.
*/