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 graph-node = cat-object and graph-dir_edge = cat-arrow. 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... * graph-node = cat-object * graph-edge = cat-arrow ... mentioned above. An approach similar to that used for hyper-graphs can be adopted. * graph-node[Object] = cat-object * graph-node[Arrow] = cat-arrow as cat-object * graph-node[Arrow] + graph-edge[Tip] + graph-edge[Tail] = cat-arrow 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
