W3C home > Mailing lists > Public > semantic-web@w3.org > April 2014

Re: rdf and category theory

From: <henry.story@bblfish.net>
Date: Thu, 17 Apr 2014 18:42:52 +0200
Cc: Antoine Zimmermann <antoine.zimmermann@emse.fr>, SW-forum Web <semantic-web@w3.org>, public-philoweb@w3.org
Message-Id: <5B702CFC-EFE2-4693-8D84-F1C2DFA8108C@bblfish.net>
To: Gregg Reynolds <dev@mobileink.com>

On 17 Apr 2014, at 00:09, henry.story@bblfish.net wrote:

> On 11 Apr 2014, at 16:32, Gregg Reynolds <dev@mobileink.com> wrote:
>> On Fri, Apr 11, 2014 at 8:30 AM, Antoine Zimmermann <antoine.zimmermann@emse.fr> wrote:
>> There're a lot of resources available online and for free about category theory.
>> Some examples:
>>  - Jirí Adámek, Horst Herrlich, George E. Strecker. Abstract and Concrete Categories: The Joy of Cats (524 pages). http://katmat.math.uni-bremen.de/acc/acc.pdf
>>  - Maarten M. Fokkinga. A Gentle Introduction to Category Theory: the calculational approach. http://wwwhome.ewi.utwente.nl/~fokkinga/mmf92b.pdf (80 pages).
>>  - Jaap van Oosten. Basic Category Theory (88 pages). http://www.staff.science.uu.nl/~ooste110/syllabi/catsmoeder.pdf
>> One of the best is Robert Goldblatt's Topoi : The Categorial Analysis of Logic	.  He pays special attention to linking CT concepts to both classic math and ordinary intuition.
> I looked through Robert Goldblatt's Topoi quickly [1] and indeed it is the book that covers the subject probably most relevant to the semantic web community, since it aims to show how logic can be derived from Category Theory. In this area I found reading through the first part of Ralf Krömer's "Tool and Object: A History and Philosophy of Category Theory" to also be very interesting, as it gives an overview of the foundational debate in Mathematics  started by CT. 
> It's so odd that RDF is entirely about relations just as CT is ( except that RDF is one to many whereas CT arrows are functions). So I really look forward to understanding how these two domains fit together, and perhaps how they complement each other.

It turns out I overgeneralised here to soon.  On page 7 of the book "Category Theory" by Steve Awodey from the Oxford Logic guides,
as example 4 of different types of Categories, where the arrows are not functions.

As a reminder a Category is defined as:

• Objects: A, B, C, ....
• Arrows: f,g,h
• For each arrow f, there are given objects dom(f), cod(f)
  called the domain and codomain of f. We write 
         f: A --> B
  to indicate that A = dom(f) and B=cod(f)
• Given arrows f: A --> B and g: B --> C that is with cod(f) = dom(g)
  there is a given arrow g•f: A --> C
  called the composite of f and g
• For each object A, there is given an arrow 1A: A --> A
  called the identity arrow of A

These data are required to satisfy the following laws:

a) Associativity: 
     h • ( g • f ) = ( h • g ) • f
   for all f: A --> B, g: B --> C, h --> D
b) Unit:
      f • 1A = f  = 1B • f
You can read this here:

Here is a category that where the arrows are not functions, described page 7:

 Let Rel be the following category: take sets as objects and take binary relations
as arrows. That is, an arrow f: A --> B is an arbitrary subset f ⊆ A x B. The identity
on arrow on set A is the identity relation,

  1A = { (a,a) ∈ A x A | A ∈ A } ⊆ A x A

Given R ⊆ A x B and S ⊆ B x C, define composition S • R by 

  (a,c) ∈ S • R iff ∃b. ( a,b) ∈ R & (b,c)∈S

that is, the "relative product" of S and R.

I checked and it seems to work. 
Thinking of RDF relations this way one can it seems compose rdf relations that way,


  foaf:name • foaf:knows : the names known people

It does not even seem that in this category the arrows need to leave all the members of a given domain.

What is a bit odd for RDFers is that the notion of identity is tied to a domain, so they seem to have a lot
of relations such as

foaf:personSameAs a owl:subPropertyOf owl:sameAs;
     rdfs:domain foaf:Person .

I just mention this because it came as a surprise to me.

> Henry
> [1] Having read through half of  "Conceptual Mathematics" by Willima Lawvere and done most of the exercises there, I am starting to be able to read a lot of these books much more easily.
>> -Gregg 
> Social Web Architect
> http://bblfish.net/

Social Web Architect

Received on Thursday, 17 April 2014 16:43:24 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:41:41 UTC