Hi TinkerPop3 developers,
I am planning on using TinkerPop3 to represent and store categories.
And by categories I mean as defined by category theory
<https://en.wikipedia.org/wiki/Category_theory>.
In general graphnode = catobject and graphdir_edge = catarrow.
I think this application is fairly straightforward but it does not work.
A fundamental construct in category theory is the functor.
A functor includes arrows constructed between other arrows.
Thus every edge (arrow) is also a node (object).
There are two obvious ways this may be handled.
# TinkerPop 3 unchanged : Alternate mapping
Rather than the obvious...
* graphnode = catobject
* graphedge = catarrow
... mentioned above.
An approach similar to that used for hypergraphs can be adopted.
* graphnode[Object] = catobject
* graphnode[Arrow] = catarrow as catobject
* graphnode[Arrow] + graphedge[Tip] + graphedge[Tail] = catarrow
This approach is similar to that in RDF
<https://en.wikipedia.org/wiki/Resource_Description_Framework#Statement_reification_and_context>
.
It can be implemented with TinkerPop 3 in its current form.
It is what I am currently doing.
# Property Graph Database as Categorical Database
What is more interesting is extending ThinkerPop to be a categorical
database API.
The approach combines Node+Edge into a single class with some type of
casting to switch to the other interface.
I am looking into what would be entailed in implementing this in JanusGraph.
If this is the correct forum I can supply diagrams to better illustrate the
point.
If this is not the correct forum please point me in the right direction.
Thank you
Fred Eisele
