> On 7 Jan 2015, at 15:28, Alan Jeffrey <
ajef...@bell-labs.com> wrote:
>
> Peter Patel-Schneider and I wrote a categorical treatment of RDF in:
>
> Integrity Constraints for Linked Data.
> Proc. Int. Workshop Description Logics. 2011.
>
http://ect.bell-labs.com/who/ajeffrey/papers/dl11.pdf
>
> The summary is that you can build a symmetric monoidal category of graph stores. There's no connection with HOTT, except that there's a formalization in Agda,
Thanks for the link Alan, which brings up some interesting
parallels with HoTT.
As a way of introduction to RDF let me start by noticing that
in the HoTT book the signs f, P, Q, etc... are used to mean many
different things. For example on page 23 f is the function
of addition
f(x) :≡ λy. x + y
but on page 26 it is
f : ∏(a: A)∏(y: B(x)) C(x,y)
and this is all over the book :-) Of course the human reader has
no trouble working out the context. But if one looks carefully
at books on logic, the interpretation of a sign is meant to be
universal! So one could say that this is the problem solved by
RDF: it simply decides to use URIs (Universal Resource Identifiers )
as symbols. These have the advantage of allowing a globally distributed
name creation to be able to take place, without fear of name clashes.
Add to that the Linked Data principle of restricting oneself to URLs
and to place the definition of a term at the location of the URL
and one gets an automatic way of linking information together in
a distributed information space.
Of course URLs are tedious to write, and so would not appeal to a
mathematician, but that is why it is an engineering project: the
machines do that parsing and reasoning for us. There are syntaxes
that make it easier to type out such as Turtle or the more powerful
N3 [1].
So a fun exercise for the HoTT amateurs is: what would HoTT look
like if you were to use URIs as symbols? What consequences would
it have if one were to think of HoTT definitions linked to each
other across the web?
This can lead us back to Alan's paper. There is a parallel with HoTT and
OWL (Ontology Web Language) [2] in so far as OWL tends to makes a
stronger distinction between objects and types than the base RDF
infrastructure necessitates. The TBox statements are statements
about types, and they describe what consequences follow from the
use of a term. Such a definition can only set some constraints on
the use of a term it is true, since many other consequences as Robert
Brandom would point out are part of the meaning of a term: e.g.
one could say that every human has two parents recursively, but one
risks denying evolution in doing so. Still as with HoTT that way of thinking
moves reasoning to the type system - a worthwile parallel to note. How far
can one take this parallel? What are the differences?
One could add to this that relations in RDF are not that far from
paths between objects ( arrows ? ) except that the paths are named,
so that one can have a set of different named paths between two objects.
eg a foaf:knows b .
a o:parent b .
In which case the identity relation owl:sameAs is very much like the
a = b type in HoTT. This is even more clear if one uses the N3 graph
quotation notation to distinguish statements and statements about
statements by using { ... } .
One could then write
{ a owl:sameAs b } <=> { b owl:sameAs a }
as a path between paths.
If one ties OWL to linked data as Alan paper starts to do, then one
should also put the OWL definitions of the term at the URL of the
document describing the term [3]. Factual statement and ontological
statements can thus be discovered using exactly the same linked data
principles.
Once one sees this parallel I have the feeling that the Alan's paper
can be nicely simplified. Could one not redescribe what is going on in
terms simply of graphs, union of graphs (as defined by the RDF specification )
and reasoning over graphs? Ie, in terms of modalities?
The examples in that paper can thus be rewritten as
@prefix foaf: <
http://xmlns.com/foaf/0.1/> .
@prefix bob: <
http://bob.example/#> .
@prefix alice: <
http://alice.example/#> .
G1 = { bob: foaf:primaryTopic bob:me .
bob:me foaf:knows [ foaf:homepage alice: ] . }
G2 = { alice: foaf:primaryTopic alice:me . }
foaf = { ...the set of foaf statements... }
Reasoning can then just be done over the unions over the graphs
( assuming one has first normalised all blank nodes ) with the
following
{ G1 U G2 U foaf } owl:reasoning _:InferentiallyCompletedGraph .
where owl:reasoning is a relation I made up to relate a graph
to a graph which would be the completed reasoning using owl rules
over the initial graph. ( I suppose it would be the empty set {}
in case of a contradiction? )
If that is correct then one could verify if this still does form
a symmetrical monoidal category. If a monoidal category is not related
to monads or to modal thinking then I doubt it. Because there is no
necessity to follow all links and to merge all data. In so far as a
graph uses a term defined in another graph there is the presumption
that one should work with the merged information, but that does not
always hold. For example when dealing with security as we do with
WebID TLS [4], where one must start with a skeptical attitude,
such an full inclusion of linkes would allow an enemy to determine
your access control rules. That is why the modal/methapysical ( let us
say idealised ) logic of David Lewis is helpful. The meaning/(interpretation?)
of a graph are all the set of possible ways the world could be that
are compatible with that statement. Less metaphusically, more computationally
and so more in Brandom's style, its all the other possible ways you can union a graph
with other statements without contradiction. Merging two graphs just tells me what
the world would look like if both were true ( or what I would be committed to if
I committed to both) but it does not tell me that they are true, or that I should
commit myself thusly. That is up to the human agent to determine based
on his intuitions, context, etc...
So OWL it has always seemed to me is a way of doing reasoning without
or with minimal modality ( and that is an both a limitation and a strenght).
That is if one were to translate OWL into logic it would only require purely
material conditionals. If you believe X then owl tells you what else
you should believe. But it is clearly not designed for doxastic
modal statements, which requires the quotation of graphs, and what
is known in philosophy as the opaqueness of belief contexts. The well
know example is
Lois Lane believes superman is great
But she would not agree that Clark Kent is great, even though
both have the same referent. Here belief is a relation to a
propositional attitude, which in the semantic web could reasonably
be modelled as a relation between a person and a graph where the
belief context can be opaque. This would then also allow dissagreement
between beliefs to be expressed, using as basis the rel=nofollow link
pushed by Google in the blogging space [5].
Anyway these are questions that I keep wondering about when programming
in Scala and working with the semantic web. But the Scala mailing list is
not the best place to conduct such a discussion. Hopefully this is not too
far out of scope for this mailing list, and has prooved interesting
to other subscribers.
All the answers I have received until now here have been extreemly
helpful :-)
Henry
[1]
http://www.w3.org/TeamSubmission/n3/
[2]
http://www.w3.org/TR/owl2-overview/
[3] making sure not to confuse the URL of the
document and the URL of the term by having the
term be a #url as explained in say the WebID
document
http://www.w3.org/2005/Incubator/webid/spec/identity/
[4]
http://www.w3.org/2005/Incubator/webid/spec/
[5]
http://en.wikipedia.org/wiki/Nofollow
>
> Alan.
>
> On 01/06/2015 07:05 PM, Henry Story wrote:
>> [snip some of the thread not related to this theme]
>>> [snip discussion about HoTT and physics]