Engines, Reasoners, Theorem Provers

So, you have all your information in the form of a knowledge graph.  Now, you want to process all that information.  What is the best way to do that?  This blog post is information that I have collected related to that task.

First, what exactly are you trying to achieve? Or another way of saying this; what are the constraints and what is your definition of "best"?  Here are my constraints:

  • Expressive power: the more you can do the better.
  • Safety: you want the solution you are using to always return an answer as opposed to the system  having a catastrophic failure such as getting into an infinite loop, not returning a discernable answer, or something like that; the safer the better.
  • Speed: you want the information returned quickly; and the quicker the better.
So those are the constraints for my definition of "best".

Second, what exactly do I want expressed?  Well, the answer would be "everything".  But, that one big group is not really that useful.  And so, I break "everything" down into the following groups of what people seem to call "formalisms" or formal ways to process the information in a knowledge graph or the different types of "logic" that you want to process.  And so, the expressive logic formalisms can be broken out as follows:
  • First-Order Logic: This lets you reason about things, objects, categories, relationships, and properties. The classic example is: All humans are mortal. Socrates is human. Therefore; Socrates is mortal. This is about facts and relationships.
  • Modal Logic: This lets you reason about possibility, necessity, authority, capability, knowledge, belief, permissions, etc. In modal logic you can imagine many worlds.  For example: Is it possible that it rains tomorrow. Or, Agent can perform action. This is about possibilities.
  • Temporal Logic: This lets you reason about time. This logic is use in workflow engines, business processing models, planning, finance, accounting, legal contracts.  For example: Will a payment eventually clear. Or, Must approval occur before execution? Or, instead of,  Is Alice authorized? You ask, When is Alice authorized. This is about changes over time.
  • Deontic Logic: This lets you reason about norms, rights, duties, permissions, prohibitions. This is the logic of laws, contracts, policies, governance, ethics. For example, reasoning about something is obligatory; It ought to be the case that Alice is allowed. Or, permitted; Alice is permitted. Or, forbidden; Alice is forbidden. Think of a "Do not enter!" sign. The interesting question is not: Is "Do not enter" true? but rather: Is it in force? Does it apply here? Who issued it? Was it violated? Those are governance questions. This is about permissions, rights, obligations, and limits.
  • Algebra: An algebra specifies the specific operations that can be performed on facts. What structure must be preserved? An invariant is something that remains true while the system changes. Algebra asks: Why does this relationship continue to hold after every valid transaction? For example; in accounting there is an invariant:  Assets = Liabilities + Equity. This is about what must always be preserved.
  • Constraint Logic: A constraint engine then seeks values satisfying the system. What numerical relationships must hold? First-Order Logic asks, Is this statement true? Whereas constraint logic asks, What value makes all statements true? A constraint logic system doesn't just check whether a specific value is correct. Instead it asks: Find values of x and y that satisfy all the constraints. The core idea is this; Ordinary logic typically works like: Facts + Rules = Conclusion.  Constraint logic works like: Facts + Constraints = Allowed States. This is about what states are possible given the constraints.
And so, that is my definition of "everything", a detailed list.  I don't think I am missing anything With that type of expressiveness, I think I can confidently say that I would be very happy in terms of all that  expressive power.

To be crystal clear about something, it does not seem that structural logic is covered.  It is covered by first-order logic.  However, mereology (whole-part composition and decomposition; part-of as a first class concept), mereotopology (see the accounting manifold; manifolds as a first class concept), category theory (how do structures connect and transform; composition as a first order concept), and holons (objects that are simultaneously wholes and parts; holons as first class concept). So, metrology,  mereotopology, category theory, and holons are instantiated as higher level objects using the set of logical formalisms above.

Now, down to brass tacks. HOW do you get all that expressive power? What "engine" or "reasoner" or "theorem prover" can you go buy, point it at a knowledge graph, and then powerfully, safely, and quickly process all that knowledge???

I have been trying to figure out the answer to that question for about 15 years.  Initially, I thought that I could do everything I needed to do using XBRL Formula.  I quickly learned that was not correct.  Then I thought I could do everything with OWL; but that was wrong also.  Then I thought the answer was PROLOG. And then I figured out that DATALOG was safer then PROLOG and concluded that was the right choice for the "ultimate reasoner".

My conclusion: THERE IS NO SILVER BULLET.  What I am looking for does not exist off-the-shelf.  In fact, even it it did; I would not be able to use it because it would (a) be to technical, (b) it would not support the XBRL technical syntax, and (c) I would not be able to express my high level model for that software to read.

And so, what to do? Get it built. Who is with me? This needs to be a global open industry standard. Powerful, safe, and fast.


Additional Information:

Comments

Popular posts from this blog

Internationalized Resource Identifier (IRI)

Example Financial Statement Holon

Inhabiting Babel, A Manifesto for Responsible Meaning Engineering