log: built-ins such as log:implies.
We give a syntactic characterisation of basic entailment for finite, closed, normalised abstract N3 graphs. The result is an N3 analogue of the RDF simple-entailment interpolation lemma. Because N3 includes explicit universal variables and quoted graph terms, the appropriate object is not the premise graph itself but its canonical expansion: the union of all ground universal instances of the premise, with fresh witnesses for existential variables. Basic N3 entailment is then equivalent to containment of every universal instance of the conclusion, after a suitable existential instantiation, in this canonical expansion.
The N3 semantics defines an abstract graph as a triple:
where:
N3 terms include IRIs, literals, variables, lists, and graph terms. Ground graph terms are compared modulo the N3 graph-term isomorphism relation.
The semantics of variables uses assignments that provide both:
This second component is essential because variables may occur freely inside quoted graph terms. The semantic operation of total application grounds such occurrences recursively, while respecting variable scope inside nested graph terms.
Throughout this section, entailment means basic N3 entailment.
Let
be finite, closed, normalised abstract N3 graphs.
We assume:
These assumptions are standard hygiene conditions and do not affect entailment.
Let
be the set of ground N3 terms over the language, extended with a countably infinite supply of fresh witness names.
These witness names play the same role as labelled nulls in canonical-model constructions.
For a graph
and a map
write
for the ground instance of K obtained by applying μ to FK.
The application is total:
Equivalently, if ⟨L⟩ is a graph term, then its instance is:
where μt denotes total application.
For every assignment
choose fresh witness names
for every
Define
The canonical expansion of G, written C(G), is:
Membership in C(G) is taken modulo graph-term isomorphism.
Intuitively, C(G) contains every ground universal instance of G, with fresh witnesses for the existential variables of each such instance.
Assume that for every assignment
there exists
such that
We prove that
Let I be an arbitrary basic interpretation such that
We must show that
Let A be an arbitrary assignment for the universal variables UH. For each u ∈ UH, write
where A1(u) is the denotation and A2(u) is a ground term representation satisfying
Define
By the syntactic assumption, there exists
such that
Only finitely many triples of C(G) are used in this inclusion. Each such triple belongs to some canonical instance of G, generated by some universal assignment
For every such σ, define an assignment Aσ for the universal variables of G in I by
Since
there exists an assignment Bσ for EG such that
Now replace each canonical witness name
occurring in the selected finite fragment by the corresponding ground term representation
Call this replacement map ρ, and extend ρ recursively to lists and graph terms. The replacement preserves sharing: the same witness name is always replaced by the same witness term.
Because each selected triple came from an instance of G that is true in I, every triple in
is true in I.
Define an existential assignment B for EH by
Then
Since A was arbitrary, we have
Since I was arbitrary among models of G, it follows that
This proves soundness.
Assume that the syntactic condition fails.
Then there exists an assignment
such that, for every assignment
we have
We construct a basic interpretation IG such that
but
Let the domain of IG be
the set of ground N3 terms modulo graph-term isomorphism.
For every IRI or literal a, define
For every ground graph term ⟨K⟩, define
Thus graph terms are interpreted as representatives of their own isomorphism classes, and isomorphic graph terms receive the same value.
Define the extension relation by
We first show that
Let A be any assignment for UG. Put
By construction of C(G), the canonical instance of G corresponding to σ is contained in C(G). For every existential variable e ∈ EG, choose the canonical witness
This gives an existential assignment B such that every triple in
belongs to EXTIG. Hence
Since A was arbitrary,
We now show that
Use the assignment for UH determined by the failing α:
Suppose, for contradiction, that
Then there would exist an existential assignment B for EH. Define
Since truth in IG is exactly membership in C(G), this would imply
contradicting the choice of α.
Therefore
Thus there exists a model of G that is not a model of H, so
This proves completeness.
The RDF interpolation lemma states that, for simple RDF entailment, a graph S entails a graph E exactly when some subgraph of S is an instance of E.
The theorem above is the corresponding statement for basic N3 entailment.
In the RDF fragment:
The condition
then says precisely that an instance of H is contained in G. Thus the N3 theorem conservatively generalises the RDF interpolation lemma.
The essential extra feature in N3 is the presence of explicit universal variables. Because of them, a conclusion may be supported by several different universal instances of the premise.
For example, the graph
entails
However, the two triples in the conclusion may come from two different instances of the premise. This is why a direct “subgraph of G” formulation is insufficient; the correct object is the canonical expansion C(G).
This theorem concerns basic N3 entailment only.
It does not cover the additional semantics of predicates such as log:implies. The N3 draft treats log interpretation separately from basic interpretation, adding special semantic conditions for predicates in the log: namespace.
Thus the theorem should be read as the N3 analogue of simple RDF entailment, not as a completeness theorem for full N3 reasoning with logical built-ins.