-
Notifications
You must be signed in to change notification settings - Fork 0
/
witch.trig
73 lines (54 loc) · 1.08 KB
/
witch.trig
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# ----------
# Witch Case
# ----------
#
# Original http://www.w3.org/2000/10/swap/test/reason/witch.n3
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix : <http://example.org/#>.
#[1] \forall x, BURNS(x) /\ WOMAN(x) => WITCH(x)
_:bng_1 log:implies _:bng_2.
_:bng_1 {
var:x a :BURNS.
var:x a :WOMAN.
}
_:bng_2 {
var:x a :WITCH.
}
#[2] WOMAN(GIRL)
:GIRL a :WOMAN.
#[3] \forall x, ISMADEOFWOOD(x) => BURNS(x)
_:bng_3 log:implies _:bng_4.
_:bng_3 {
var:x a :ISMADEOFWOOD.
}
_:bng_4 {
var:x a :BURNS.
}
#[4] \forall x, FLOATS(x) => ISMADEOFWOOD(x)
_:bng_5 log:implies _:bng_6.
_:bng_5 {
var:x a :FLOATS.
}
_:bng_6 {
var:x a :ISMADEOFWOOD.
}
#[5] FLOATS(DUCK)
:DUCK a :FLOATS.
#[6] \forall x,y FLOATS(x) /\ SAMEWEIGHT(x,y) => FLOATS(y)
_:bng_7 log:implies _:bng_8.
_:bng_7 {
var:x a :FLOATS.
var:x :SAMEWEIGHT var:y.
}
_:bng_8 {
var:y a :FLOATS.
}
# and, by experiment
# [7] SAMEWEIGHT(DUCK,GIRL)
:DUCK :SAMEWEIGHT :GIRL.
# query
_:bng_9 log:query _:bng_9.
_:bng_9 {
var:S a :WITCH.
}