Three-Valued Logic
The Problem
Traditional systems use boolean logic: things are either true or false. But real-world data is messy. When you ask "does this employee earn more than $100,000?", the answer might be:
- True — Their salary is $120,000.
- False — Their salary is $80,000.
- Unknown — Their salary field is empty in the data source.
Treating missing data as false ("if we do not know, assume no") hides real problems. Treating it as an error halts evaluation. Neither approach helps you understand the true state of your organisation.
How WRIT Handles It
WRIT uses Kleene's three-valued logic (K3) — a well-established logical system that extends boolean logic with a third value: Unknown.
The Three Values
| Value | Meaning | Generates |
|---|---|---|
| True | The condition is definitely met | Nothing — aligned |
| False | The condition is definitely not met | Actions directed at the expectee |
| Unknown | The data is missing or stale | Questions directed at the attestor |
Logical Operators
K3 operators are designed to produce definite results whenever possible, even with unknown inputs:
AND
| True | False | Unknown | |
|---|---|---|---|
| True | True | False | Unknown |
| False | False | False | False |
| Unknown | Unknown | False | Unknown |
Key insight: False AND Unknown = False. If one side is definitely false, the whole conjunction is false regardless of the unknown side.
OR
| True | False | Unknown | |
|---|---|---|---|
| True | True | True | True |
| False | True | False | Unknown |
| Unknown | True | Unknown | Unknown |
Key insight: True OR Unknown = True. If one side is definitely true, the whole disjunction is true.
NOT
| Input | Result |
|---|---|
| True | False |
| False | True |
| Unknown | Unknown |
Void — The Fourth Value
Beyond Unknown, WRIT tracks a stronger state: Void. Where Unknown means "the data exists but we do not have it", Void means "the data cannot exist — the precondition failed."
| Aspect | Unknown | Void |
|---|---|---|
| Meaning | Value exists but not known | Value cannot exist |
| Example | Missing salary field | Employee references non-existent department |
| Generates | Questions | Nothing — structural impossibility |
| Priority | Lower | Higher (Void beats Unknown) |
Void propagation: In logical operations, Void takes priority over Unknown because impossibility is more definitive than uncertainty:
Void AND Unknown = VoidVoid OR Unknown = Void
Worked Example
Consider evaluating the predicate salary > 100000 for three employees:
| Employee | Salary | Result | Reason |
|---|---|---|---|
| Alice | 120,000 | True | 120,000 > 100,000 |
| Bob | 80,000 | False | 80,000 is not > 100,000 |
| Carol | (missing) | Unknown | Cannot evaluate without salary data |
Now consider a compound predicate: name = "Bob" AND salary > 100000:
| Employee | name = "Bob" | salary > 100000 | Combined | Why |
|---|---|---|---|---|
| Alice | False | True | False | False AND True = False |
| Bob | True | False | False | True AND False = False |
| Carol | False | Unknown | False | False AND Unknown = False |
Carol's result is False, not Unknown, because False AND anything = False. This is the Unknown Discovery Problem: the same missing salary field produces Unknown in one predicate but False in another. You cannot count missing fields to know how many unknowns you have — you must evaluate every predicate.
Common Pitfalls
- Assuming Unknown propagates everywhere — K3 can produce definite results even with unknown inputs.
False AND Unknown = False, not Unknown. - Confusing Unknown and Void — Unknown generates questions; Void does not. Mixing them up means asking questions about structurally impossible situations.
- Ignoring Void priority — When both Void and Unknown are present in a logical expression, Void wins. This matters for partition branch counts.
What to Read Next
- Partitions & Predicates — How three-valued logic is applied to classify entities.
- Glossary: Three-valued logic — Term definitions for K3, Unknown, Void.
WRIT Docs