Re: (Deep-)Nested negative surfaces do not share blank nodes?

Hi

Thanks for your feedback!

Yes, your example is correct. Your latex formula might require some extra parentheses for the interpretation but I get the gist of it. In the attachment `example.n3’ is how I would have written your example which is very similar to your version.

Running this example in EYE results in:

```
<urn:example.org:Alice> a <urn:example.org:Person>.
_:sk_21 a <urn:example.org:Book>.
_:sk_21 <urn:example.org:borrowedBy> <urn:example.org:Alice>.
<urn:example.org:Alice> <urn:example.org:created> <urn:example.org:RDFHandBook>.
_:sk_23 <urn:example.org:discussed> <urn:example.org:RDFHandBook>.
```

Semantically this output is correct, but incomplete. If says:

\Exists x,y : (x a Book) & (y discussed RDFHandBook)

What is missing is the `x = y`.

With RDFSurfaces we create first-order logic for the web. But, that does not mean that computationally it is possible to create implementation that can : A) support the full first-order expressivity , B) always halt and C) always are complete. Maximum 2 out of  A-B-C are realizable in any implementation (because of the undecidability of finding all inferences).
The EYE reasoner tries it best, and we will certainly invest time to find a solution for all practical use-cases.

About the RDF Primer. Yes, the text is still in flux and could be written better. What we mean is that blank nodes one writes as the subject if a (<blank nodes>) log:onNegativeSurface { ..} triple are graffiti and define existential quantified variables that are defined on that surface. All other blank nodes that appear within such surface are references to these blank nodes.

# _:b1 is written on the negative surface
(_:b1) log:onNegativeSurface {

    _:b1 a :A. # _:b1 is a reference to the graffiti node

    () log:onNegativeSurface {
           _:b1 a :A. # _:b1 is a reference to the graffiti node too
           _:b2 a :B # _:b2 is a reference to the implicit graffiti node on the default surface (that doesn’t need to be declared)
   }
} .

Hope this helps

Patrick

From: Rui Zhao <rui.zhao@cs.ox.ac.uk>
Date: Monday, 28 August 2023 at 17:33
To: public-rdfsurfaces@w3.org <public-rdfsurfaces@w3.org>
Subject: (Deep-)Nested negative surfaces do not share blank nodes?
Hi,

It’s very excited to see a reasoning mechanism with first-order logic capacity, on top of N3. RDF Surfaces got me very interesting, and I started to carefully learn it recently.

I have read through the document, and a couple of examples in the repository. I have managed to encode most of my axioms using RDF Surfaces. However, I’m still having some difficulties on handling predicates with multiple objects.

As an example, I would like to express the following formula:

\forall X. A(X) —> \exists Y. (B(Y, X) /\ \forall Z. C(X, Z) —> D(Y, Z))

The intuitive meaning is: for any A(X), we always have a Y such that B(Y, X); and if we have C(X, Z) for that X, we also have D(Y, Z) for that Y. My ABox originally only contains statements of A(X) and C(X, Z), and I want to use reasoner to derive information about Ys.
Hope I didn’t make anything wrong with the logical formula.

I tried to encode it using RDF Surfaces, and ended up with a series of nested negative surfaces, reflecting the following equivalent formula:
NOT \exists X. (A(X) /\ NOT \exists Y. (B(Y, X) /\ NOT \exists Z. (C(X, Z) /\ NOT D(Y, Z)))

For example, the following code illustrates my test case:

```
@prefix rdfs: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&data=05%7C01%7CPatrick.Hochstenbach%40UGent.be%7Cc34a081581b54027d2f308dba7dc1d68%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638288336059079690%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=c69ois5Afs0rvQu4FE0hSJMc2tW33MTIRUp3qJ0%2Fk10%3D&reserved=0<http://www.w3.org/2000/01/rdf-schema#>>.
@prefix log: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F10%2Fswap%2Flog%23&data=05%7C01%7CPatrick.Hochstenbach%40UGent.be%7Cc34a081581b54027d2f308dba7dc1d68%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638288336059079690%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uuYuRo0tzseI8UUjNQHq2adjabIyiGQkMXk8K7fOavc%3D&reserved=0<http://www.w3.org/2000/10/swap/log#>>.
@prefix : <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.org%2Fns%23&data=05%7C01%7CPatrick.Hochstenbach%40UGent.be%7Cc34a081581b54027d2f308dba7dc1d68%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638288336059079690%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NEd%2B0NhjkOX9E6owr0qlfzC0r7xTG5eFmJZ4aTuki1I%3D&reserved=0<http://example.org/ns#>>.

:a a :Man.
:a :knows :b.

(_:x) log:onNegativeSurface {
        _:x a :Man.
        (_:y) log:onNegativeSurface {
                _:y a :Community;
                        :contains _:x.
                (_:z) log:onNegativeSurface {
                        _:x :knows _:z.
                        () log:onNegativeSurface {
                                _:y :contains _:z.
                        }.
                }.
        }.
}.

(_:s _:p _:o) log:onQuerySurface {
        _:s _:p _:o.
}.
```

I executed it with `eye --quiet --nope --blogic test-nested-neg2.n3s`. Result is:

```
_:sk_21 a :Community.
_:sk_21 :contains :a.
_:sk_23 :contains :b.
_:sk_24 :contains :c.
```

(Other lines removed for clarify.)

However, what I’m expecting is that the same :Community has all :a, :b and :c -- something like this:

```
_:sk_21 a :Community.
_:sk_21 :contains :a.
_:sk_21 :contains :b.
_:sk_21 :contains :c.
```

Did I understand the semantics of RDF Surfaces incorrectly? How should I correctly express my formula?

In particular, I think I may misunderstand something here: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw3c-cg.github.io%2Frdfsurfaces%2F%23Surface&data=05%7C01%7CPatrick.Hochstenbach%40UGent.be%7Cc34a081581b54027d2f308dba7dc1d68%7Cd7811cdeecef496c8f91a1786241b99c%7C1%7C0%7C638288336059079690%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5URdSTyFoQ8veLcA0WCzB5B2ly%2Fsl0DznZ6U%2Bg6JvY4%3D&reserved=0<https://w3c-cg.github.io/rdfsurfaces/#Surface>. It talks about the (co)reference of blank nodes, which says “...as coreferences to the blank node graffiti defined on a parent RDF Surface”. The “a parent” is a bit ambiguous to me. I understand this as “ (surfaces are nested as a tree, and) go up the surface tree branch from the current node/leaf, and find the nearest ancestor surface which contains a blank node with the same name (and use it)“. Is that correct?

Any suggestion is appreciated.

Best,
Rui

Received on Tuesday, 29 August 2023 08:29:41 UTC