# ----------
# 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:impliesAnswer _:bng_9.

_:bng_9 {
    var:S a :WITCH.
}
