Functional Programming vs Logic Programming
"Rel is to logic programming, like Set is to functional programming!" Jules Hedges tweeted in a interesting thread on the Category Rel.
Could one also say that Rel is the category of Data equipped with inferencing? (at least when equipped with monoidal products giving us Regular logic and RDF pure))
The relation to Logic is made clear by Evan Patterson's Knowledge Representation in Bicategories of Relations which shows that Bicategories of Relations equipped with monoidal products is equivalent to Regular Logic (& RDF), and equipped in addition with monoidal coproducts is equivalent to Coherent logic, which is as expressive as First Order Logic and which we move into using some features of OWL and a slight extension to N3.
As it happens the communities of Functional Programming (FP) and Logic Programming (LP) have always seemed to ignore each other. One is in one or the other naturally. How much can this categorical difference explain about these communication difficulties?
What is it about the way one thinks about the world when using FP or LP that makes one of these categories more natural? Is it that because FP reduces data it is better for transformations that are mechanical or temporal?
Set is a subcategory of Rel, twice over! Is it that Rel teaches one to think in two directions?
Ideas on the implication of these differences welcome.