Skip to content

How to Compute Closure on a Small Knowledge Base

A tutorial: take a set of bilattice-valued assertions, apply inference rules step by step, and reach the fixpoint where no new information can be derived.
Table of contents

You have a small knowledge base: a set of subject-predicate-object triples, each carrying an epistemic state from {,t,f,}\{\bot, t, f, \top\}. You want to close it — derive everything that follows from what you have.

The starting state

Suppose you have five assertions:

Triple Value Meaning
A extends B tt Affirmed
B extends C tt Affirmed
A extends C \bot Unknown (not yet derived)
D extends B ff Denied
A extends D \bot Unknown

The inference rules

For this example, we use one rule: transitivity. If predicate pp is transitive and we have X p YX\ p\ Y (value xx) and Y p ZY\ p\ Z (value yy), derive X p ZX\ p\ Z with value xkyx \wedge_k y (the knowledge-meet of xx and yy).

The knowledge-meet k\wedge_k on the bilattice:

k\wedge_k \bot tt ff \top
\bot \bot \bot \bot \bot
tt \bot tt \bot tt
ff \bot \bot ff ff
\top \bot tt ff \top

k\wedge_k takes the minimum information content in each component.

Step 1

Apply transitivity to all composable pairs:

  • A extends B (tt) and B extends C (tt): derive A extends C with value tkt=tt \wedge_k t = t.
  • D extends B (ff) and B extends C (tt): derive D extends C with value fkt=f \wedge_k t = \bot.

Update the table:

Triple Before After Step 1 Changed?
A extends B tt tt no
B extends C tt tt no
A extends C \bot tt yes
D extends B ff ff no
A extends D \bot \bot no
D extends C \bot new, but \bot

Something changed (A extends C moved from \bot to tt), so we continue.

Step 2

Apply transitivity again with the updated values:

  • A extends C (tt, new) — any new composable pairs? A extends C and… no C extends anything in our system.
  • No other composable pairs produce new results.

Nothing changed. We have reached the fixpoint.

The closed knowledge base

Triple Value
A extends B tt
B extends C tt
A extends C tt
D extends B ff
A extends D \bot
D extends C \bot

What we learn:

  • Derived: A extends C was unknown; transitivity resolved it to affirmed.
  • Unresolved: A extends D and D extends C remain \bot. No rule can reach them because there is no chain connecting A to D or D to C through affirmed links. These are gaps — the system has no basis for resolving them.
  • No contradictions: no \top values appeared. The knowledge base is consistent.

When ⊤ appears

If we had started with:

  • A extends B = tt
  • B extends C = ff

Then transitivity gives A extends C = tkf=t \wedge_k f = \bot. No contradiction. But if a different rule (say, from another predicate) independently derived A extends C = tt, and transitivity through B gave ff, combining them would give tkf=t \vee_k f = \top: contestation. Two inference paths disagree.

Why it terminates

The knowledge ordering k\leq_k on {,t,f,}\{\bot, t, f, \top\} has height 2: the longest chain is <kt<k\bot <_k t <_k \top (or <kf<k\bot <_k f <_k \top). Each step pushes at least one value strictly upward. With nn assertions, closure takes at most 2n2n steps.

The fixpoint always exists because the inference rules are monotone in k\leq_k (Fitting 1991) and the pointwise ordering on {,t,f,}n\{\bot, t, f, \top\}^n is a complete lattice. The Knaster-Tarski theorem guarantees a least fixpoint.

Last reviewed .

Relations

Date created
Teaches