How to Compute Closure on a Small Knowledge Base
Table of contents
You have a small knowledge base: a set of subject-predicate-object triples, each carrying an epistemic state from . 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 | Affirmed | |
| B extends C | Affirmed | |
| A extends C | Unknown (not yet derived) | |
| D extends B | Denied | |
| A extends D | Unknown |
¶The inference rules
For this example, we use one rule: transitivity. If predicate is transitive and we have (value ) and (value ), derive with value (the knowledge-meet of and ).
The knowledge-meet on the bilattice:
takes the minimum information content in each component.
¶Step 1
Apply transitivity to all composable pairs:
- A extends B () and B extends C (): derive A extends C with value .
- D extends B () and B extends C (): derive D extends C with value .
Update the table:
| Triple | Before | After Step 1 | Changed? |
|---|---|---|---|
| A extends B | no | ||
| B extends C | no | ||
| A extends C | yes | ||
| D extends B | no | ||
| A extends D | no | ||
| D extends C | — | new, but |
Something changed (A extends C moved from to ), so we continue.
¶Step 2
Apply transitivity again with the updated values:
- A extends C (, 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 | |
| B extends C | |
| A extends C | |
| D extends B | |
| A extends D | |
| D extends C |
What we learn:
- Derived: A extends C was unknown; transitivity resolved it to affirmed.
- Unresolved: A extends D and D extends C remain . 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 values appeared. The knowledge base is consistent.
¶When ⊤ appears
If we had started with:
- A extends B =
- B extends C =
Then transitivity gives A extends C = . No contradiction. But if a different rule (say, from another predicate) independently derived A extends C = , and transitivity through B gave , combining them would give : contestation. Two inference paths disagree.
¶Why it terminates
The knowledge ordering on has height 2: the longest chain is (or ). Each step pushes at least one value strictly upward. With assertions, closure takes at most steps.
The fixpoint always exists because the inference rules are monotone in (Fitting 1991) and the pointwise ordering on is a complete lattice. The Knaster-Tarski theorem guarantees a least fixpoint.
Last reviewed .