Skip to content

Commit

Permalink
translating rdfsurfaces predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Apr 30, 2024
1 parent 710c85b commit ef8bc40
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
62 changes: 31 additions & 31 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ First-order logic using *positive* and *negative* surfaces.
**First-order logic in Notation3**

RDF Surfaces provides a way to express the notion of *positive* and *negative surfaces*
in Notation3 with help of the built-in `log:nand`. The `log:nand` built-in is equivalent to the logical NAND function ("not and"). A `log:nand` is true when at least one of the nested triples in the object is false. A *positive* surface can be constructed from double nested `log:nand` built-in. A *negative* surface can be constructed from a single `log:nand` built-in.
in Notation3 with help of the built-in `log:onNegativeSurface`. The `log:onNegativeSurface` built-in is equivalent to the logical NAND function ("not and"). A `log:onNegativeSurface` is true when at least one of the nested triples in the object is false. A *positive* surface can be constructed from double nested `log:onNegativeSurface` built-in. A *negative* surface can be constructed from a single `log:onNegativeSurface` built-in.

The subject of both built-ins are the blank nodes that need to be put on the
surface (so that they become existential or universal quantified variables depending on the nesting level of the surface).
Expand All @@ -217,8 +217,8 @@ surface (so that they become existential or universal quantified variables depen
@prefix : <http://example.org/ns#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .

() log:nand {
(_:X) log:nand {
() log:onNegativeSurface {
(_:X) log:onNegativeSurface {
_:X a :City .
}
} .
Expand Down Expand Up @@ -246,8 +246,8 @@ _:X a :City .
@prefix : <http://example.org/ns#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .

(_:X) log:nand {
() log:nand {
(_:X) log:onNegativeSurface {
() log:onNegativeSurface {
_:X a :City .
}
} .
Expand All @@ -262,7 +262,7 @@ _:X a :City .
@prefix : <http://example.org/ns#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .

(_:X) log:nand {
(_:X) log:onNegativeSurface {
_:X a :Problem .
} .
</pre>
Expand All @@ -277,14 +277,14 @@ mean alive, or dead, or both alive and dead.
@prefix : &lt;http://example.org/ns#&gt; .
@prefix log: &lt;http://www.w3.org/2000/10/swap/log#&gt; .

(_:X) log:nand {
(_:X) log:onNegativeSurface {
_:X a :Cat .

() log:nand {
() log:onNegativeSurface {
_:X :is :Alive .
} .

() log:nand {
() log:onNegativeSurface {
_:X :is :Dead .
} .
} .
Expand All @@ -299,18 +299,18 @@ mean alive, or dead, or both alive and dead.
@prefix : &lt;http://example.org/ns#&gt; .
@prefix log: &lt;http://www.w3.org/2000/10/swap/log#&gt; .

(_:X) log:nand {
(_:X) log:onNegativeSurface {
_:X a :Cat ;
:is :Alive .
() log:nand {
() log:onNegativeSurface {
_:X :says :Meow .
} .
} .
</pre>

</div>

A surface can be queried by providing a query surface with the `log:nans` ("not an answer") built-in. The results of this query will be the final result of the reasoning engine interpreting the surfaces.
A surface can be queried by providing a query surface with the `log:onNegativeAnswerSurface` ("not an answer") built-in. The results of this query will be the final result of the reasoning engine interpreting the surfaces.

<div class=example>

Expand All @@ -325,17 +325,17 @@ that is a `:City`, it implies that `_:S` needs be be also a `:HumanCommunity`.
ex:Ghent a ex:City.

# Every city is a human community
(_:S) log:nand {
(_:S) log:onNegativeSurface {
_:S a ex:City.
() log:nand {
() log:onNegativeSurface {
_:S a ex:HumanCommunity.
}.
}.

# Query
(_:S _:C) log:nand {
(_:S _:C) log:onNegativeSurface {
_:S a _:C.
() log:nans {
() log:onNegativeAnswerSurface {
_:S a _:C.
} .
}.
Expand Down Expand Up @@ -400,7 +400,7 @@ special semantics:
</thead>
<tbody>
<tr>
<td>`log:nand`
<td>`log:onNegativeSurface`
<td>Negative surface claim that any RDF graph in the object position is false.
</tbody>
</table>
Expand Down Expand Up @@ -471,8 +471,8 @@ and
@prefix : &lt;http://example.org/ns#&gt; .
@prefix log: &lt;http://www.w3.org/2000/10/swap/log#&gt; .

() log:nand {
() log:nand {
() log:onNegativeSurface {
() log:onNegativeSurface {
:Alice a :Person .
} .
}
Expand Down Expand Up @@ -509,8 +509,8 @@ As RDF Surface:
:Alice a :Person .
:Alice :knows :Bob .

() log:nand {
() log:nand {
() log:onNegativeSurface {
() log:onNegativeSurface {
:Bob a :Person .
:Bob :knows :Alice .
} .
Expand Down Expand Up @@ -544,8 +544,8 @@ As RDF Surface:
@prefix : &lt;http://example.org/ns#&gt; .
@prefix log: &lt;http://www.w3.org/2000/10/swap/log#&gt; .

() log:nand {
(_:X) log:nand {
() log:onNegativeSurface {
(_:X) log:onNegativeSurface {
_:X a :Person .
_:X :knows :Alice .
} .
Expand Down Expand Up @@ -594,8 +594,8 @@ As RDF Surface:
@prefix : &lt;http://example.org/ns#&gt; .
@prefix log: &lt;http://www.w3.org/2000/10/swap/log#&gt; .

(_:X) log:nand {
() log:nand {
(_:X) log:onNegativeSurface {
() log:onNegativeSurface {
_:X a :Person .
_:X :knows :Alice .
} .
Expand Down Expand Up @@ -638,7 +638,7 @@ As RDF Surface:
:Alice a :Person .
:Alice :knows :Bob .

() log:nand {
() log:onNegativeSurface {
:Bob a :Person .
:Bob :knows :Alice .
} .
Expand Down Expand Up @@ -687,7 +687,7 @@ As RDF Surface:
:Alice a :Person .
:Alice :knows :Bob .

(_:X) log:nand {
(_:X) log:onNegativeSurface {
_:X a :Person .
_:X :knows :Alice .
} .
Expand Down Expand Up @@ -729,16 +729,16 @@ As RDF Surface:
:Alice a :Person .
:Alice :knows :Bob .

() log:nand {
() log:nand {
() log:onNegativeSurface {
() log:onNegativeSurface {
:Alice a :Person .
} .

() log:nand {
() log:onNegativeSurface {
:Bob a :Person .
} .

() log:nand {
() log:onNegativeSurface {
:Charly a :Person .
} .
}.
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2222,7 +2222,7 @@ <h2 class="heading settled" data-level="1" id="Introduction"><span class="secno"
<p><img alt="blank surface" src="images/first_order_logic.svg" width="500"></p>
</div>
<p><strong>First-order logic in Notation3</strong></p>
<p>RDF Surfaces provides a way to express the notion of <em>positive</em> and <em>negative surfaces</em> in Notation3 with help of the built-in <code>log:nand</code>. The <code>log:nand</code> built-in is equivalent to the logical NAND function ("not and"). A <code>log:nand</code> is true when at least one of the nested triples in the object is false. A <em>positive</em> surface can be constructed from double nested <code>log:nand</code> built-in. A <em>negative</em> surface can be constructed from a single <code>log:nand</code> built-in.</p>
<p>RDF Surfaces provides a way to express the notion of <em>positive</em> and <em>negative surfaces</em> in Notation3 with help of the built-in <code>log:onNegativeSurface</code>. The <code>log:onNegativeSurface</code> built-in is equivalent to the logical NAND function ("not and"). A <code>log:onNegativeSurface</code> is true when at least one of the nested triples in the object is false. A <em>positive</em> surface can be constructed from double nested <code>log:onNegativeSurface</code> built-in. A <em>negative</em> surface can be constructed from a single <code>log:onNegativeSurface</code> built-in.</p>
<p>The subject of both built-ins are the blank nodes that need to be put on the
surface (so that they become existential or universal quantified variables depending on the nesting level of the surface).</p>
<div class="example" id="example-f0d0e6c6">
Expand Down Expand Up @@ -2301,7 +2301,7 @@ <h2 class="heading settled" data-level="1" id="Introduction"><span class="secno"
<c- p>}</c-> <c- p>.</c->
</pre>
</div>
<p>A surface can be queried by providing a query surface with the <code>log:nans</code> ("not an answer") built-in. The results of this query will be the final result of the reasoning engine interpreting the surfaces.</p>
<p>A surface can be queried by providing a query surface with the <code>log:onNegativeAnswerSurface</code> ("not an answer") built-in. The results of this query will be the final result of the reasoning engine interpreting the surfaces.</p>
<div class="example" id="example-82c4ace5">
<a class="self-link" href="#example-82c4ace5"></a>
<p><code>:Ghent a :City</code> is a triple on the implicit positive surface. The two nested
Expand Down Expand Up @@ -2373,7 +2373,7 @@ <h2 class="heading settled" data-level="3" id="Surface"><span class="secno">3. <
<td>semantics
<tbody>
<tr>
<td><code>log:nand</code>
<td><code>log:onNegativeSurface</code>
<td>Negative surface claim that any RDF graph in the object position is false.
</table>
<p>A surface can contain zero or more other surfaces. These surfaces are then nested.
Expand Down

0 comments on commit ef8bc40

Please sign in to comment.