# ------------
# Derived rule
# ------------
#
# Proving a derived rule.

@prefix string: <http://www.w3.org/2000/10/swap/string#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix : <http://example.org/#>.

:Alice a :Cat.
:Minka a :Cat.
:Charly a :Dog.

_:bng_1 log:implies _:bng_2.

_:bng_1 {
    var:cat a :Cat.
}

_:bng_2 {
    _:bng_3 log:implies _:bng_4.
}

_:bng_3 {
    var:dog a :Dog.
}

_:bng_4 {
    :test :is true.
}

# query
_:bng_5 log:impliesAnswer _:bng_5.

_:bng_5 {
    :test :is var:result.
}
