# --------------------
# Universal statements
# --------------------

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix : <http://example.org/#>.

# \Every x: type(x, Resource
_:bng_1 log:isImpliedBy true.

_:bng_1 {
    var:X a rdfs:Resource.
}

# Everybody loves somebody who is lonely
_:bng_2 log:isImpliedBy _:bng_3.

_:bng_2 {
    var:A :loves var:B.
}

_:bng_3 {
    (var:A) log:skolem var:B.
}

_:bng_4 log:isImpliedBy _:bng_5.

_:bng_4 {
    var:B :is :lonely.
}

_:bng_5 {
    (var:A) log:skolem var:B.
}

# queries
_:bng_6 log:impliesAnswer _:bng_6.

_:bng_6 {
    :pat a rdfs:Resource.
}

_:bng_7 log:impliesAnswer _:bng_7.

_:bng_7 {
    :bob :loves var:X.
    var:X :is :lonely.
}
