mathematical logic computability
Complete and Undecidable
Finite examples can make a rule engine look complete even when no procedure can decide every case it will meet. Logic separates consistency, completeness and decidability; computability supplies the hard boundary.
- You are seeing
-
- A compliance engine is called complete because it passed a test suite
- A model-governance rule has no answer for a new instrument class
- An automated reviewer loops or escalates only on unusual cases
- A terminating rule is rejected because its termination argument lies outside the accepted checker fragment
- The mechanism
- Mathematical logic separates a complete proof system from a decision procedure, and computability shows why successful evaluation of many instances cannot establish a general decider for every future instance.
- The older apparatus
- Logic made the target property and formal language explicit, while computability required sound tools to reject or abstain on cases outside their decidable fragment.
- The false friend
- A slow but decidable procedure can appear to fail on large cases, but it has a known termination guarantee and a complexity bound for the stated fragment.
- The discriminating test
- Define the input language and target property, then seek a reduction or construct a family of cases the rule cannot classify without unbounded search; inability to decide the family is evidence against completeness.
- On your own data
- Declare the accepted rule fragment, required abstention behavior and escalation path; measure coverage and termination separately, and never infer general decidability from regression tests.
Gödel’s 1929 dissertation established an exact fit between two things that had been kept apart: a sentence true in every model of a theory, and a sentence derivable by the theory’s formal rules.
The result goes by the short name completeness, which invites a conclusion it does not carry. If every truth has a proof, a machine can answer any question by searching for one.
The missing half is what the machine does while the proof fails to arrive.
Church and Turing supplied that half in 1936, within weeks of each other. There is no mechanical procedure that decides validity for an arbitrary first-order formula. First-order logic is complete in Gödel’s sense and undecidable in theirs, and the two statements sit together without any strain at all.
Three words doing three different jobs #
Completeness says a valid sentence has a derivation. A search can enumerate derivations and stop when it finds one.
It does not say an invalid sentence comes with a finite certificate that a blind search must eventually hit. Consistency is a third thing again: a theory is consistent when it does not derive both a formula and its negation. Three terms, three jobs, and none of them is evidence for the others.
Presburger showed the contrast in the same year as Gödel’s dissertation. The natural numbers with addition and equality, but without multiplication, have a theory that is both complete and decidable. Fischer and Rabin later proved that every decision procedure for it has a double-exponential worst-case lower bound.
A procedure can be guaranteed to finish and still be a terrible place to wait.
Adding multiplication changes the status outright. First-order arithmetic with both operations is undecidable, as Tarski and Mostowski showed at mid-century and Robinson extended shortly after. The objects are the same natural numbers throughout.
What moved was the language permitted to describe them.
SAT decides the instance it was handed #
Boolean satisfiability asks whether some assignment makes one propositional formula true. Cook’s 1971 theorem made it the first NP-complete problem, and the answer to a fixed encoded formula settles the encoded hardware, scheduling or model-checking question it came from.
Backtracking search from the early 1960s and the conflict-driven clause-learning framework used by modern solvers turned that into an engineering instrument capable of formulas with tens of thousands of variables and millions of constraints.
This is what a properly bounded rule system looks like. The formula is finite. The vocabulary is fixed. The property being decided is satisfiability, and not an unnamed sense of acceptable behaviour.
A solver may be ruinously expensive and it is still deciding the instance it was given. Open problems in combinatorics have been settled this way, by finite encoding, and not by any solver discovering a universal method.
A Prolog-style policy engine sits differently again. It expresses a live rule base and searches for facts that satisfy it, which is genuinely useful and does not make the general validity problem decidable. Codd’s relational model gives the safer version: a table is a predicate, its rows are the satisfying tuples, and a query evaluates a formula against a finite structure. The finiteness is doing the work in both cases.
Rice drew the hard line #
Rice’s 1951 dissertation gives the general form, and it is more sweeping than people expect.
Every non-trivial semantic property of a program is undecidable. If the property depends on the function a program computes, and is true of some computable functions and false of others, then no algorithm settles it for arbitrary programs. Whether a program always returns zero, or computes a target function, or behaves acceptably, does not become decidable by having passed a large number of examples.
Fred Cohen’s work on computer viruses is the operational case. He had published the theory and experiments in 1984, taking the name at Leonard Adleman’s suggestion; the later result is that no algorithm perfectly detects all possible viruses.
Signature and heuristic scanners are not incomplete because their authors ran out of signatures. They are built on the available side of a boundary a general semantic classifier cannot cross, and everyone building them knows it.
A sound refusal is a result #
Termination analysis is where the discipline becomes visible in ordinary working practice.
Proof assistants reject a recursive definition unless each call can be shown to operate on a structurally smaller argument. Structural decrease is sufficient for termination and is not necessary for it, so every sound general termination analyser leaves infinitely many terminating programs uncertified. The tool declines rather than guesses, and the declining is the feature.
Formal verification succeeds by narrowing the object, never by dissolving the result. Verified kernels and verified compilers each concern one fixed program and one fixed specification, proved once and checked. None of them licenses a general procedure over arbitrary programs and arbitrary properties, and none of them claims to.
The ceiling is not every policy failure #
A compliance rule meeting a new instrument class may have no answer for several quite different reasons. Its terms never classified the instrument. An exception authority has not acted. Successive amendments point in opposite directions.
Those are failures of governance and version control. Calling them undecidability gives the policy more grandeur than it has earned, and it makes the fixable ones look permanent.
The computability result only begins after a formal language, a target property and a class of inputs have been fixed. At that point a reduction can show no general decider exists. Before that point, changing a definition or naming an escalation authority may well settle the case by Thursday.
The two situations look identical from the queue. Both produce an unclosed review, sitting there, with nobody able to say why.
They need different records, and the difference is the whole of what a reviewer needs to know.
A passing suite is the visible proof that the rules answered yesterday’s cases.
A declared fragment, an abstention state and a named escalation path are the quieter proof that they can survive tomorrow’s.
Questions
Does a rule engine become complete when it passes every test?
No. A test suite establishes behavior on the cases it contains. Completeness is a formal claim that every instance in a stated language with a stated target property receives the required result. Gödel's 1929 completeness theorem concerns derivability and semantic truth in first-order logic, not a finite collection of examples. A regression suite can support confidence without supplying a decision procedure.
Why does a new instrument class leave a governance rule with no answer?
A governance rule has no answer when the new instrument falls outside the rule language, its definitions, or its delegated exceptions. That is a specification boundary before it is a theorem. The rule can be extended, but the extension changes the system being evaluated. If the expanded language permits arbitrary program behavior, Rice's 1951 theorem can also bar a general decider for a non-trivial semantic property.
Why does an automated reviewer run forever only on unusual cases?
An automated reviewer can confirm some cases without being able to reject every remaining case. The halting set is computably enumerable: simulation reports success when a program stops, but continued running does not distinguish a later stop from no stop. A reviewer that searches for a derivation can therefore loop on an exceptional input unless its accepted fragment or escalation rule imposes a terminating boundary.
Why can a checker reject code that actually terminates?
A sound termination checker accepts only programs for which it can establish a sufficient condition, such as structurally smaller recursive calls. Agda and Rocq use this kind of check. Because termination for arbitrary programs is undecidable, a sound checker must reject or leave unclassified some programs that really do terminate. The rejection records a limit of the checker, not necessarily a defect in the program.
What should a rule system do when it cannot decide a case?
A rule system states its accepted fragment, then gives undecided cases an explicit status and escalation path. SAT solving gives a terminating answer for a fixed finite propositional formula; a general program-property checker does not inherit that guarantee. Separating coverage from termination prevents a passing test suite from being reported as a universal decision procedure and makes abstention an auditable outcome.
Sources
- Stanford Encyclopedia of Philosophy, "Gödel's Incompleteness Theorems" · Stanford University (tertiary, 2026-08-13)
- Wikipedia, "Busy beaver" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Computer virus" (Fred Cohen, 1984 and 1987) · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Cook–Levin theorem" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Curry–Howard correspondence" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Decidability (logic)" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Description logic" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Entscheidungsproblem" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Formal verification" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Gödel's completeness theorem" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Gödel's incompleteness theorems" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Kolmogorov complexity" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Löwenheim–Skolem theorem" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Post correspondence problem" (bounded PCP as NP-complete) · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Presburger arithmetic" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Prolog" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Recursively enumerable set" (computably enumerable set) · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Relational model" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Rice's theorem" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "SAT solver" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Termination analysis" · Wikimedia Foundation (tertiary, 2026-08-13)
- Wikipedia, "Turing completeness" · Wikimedia Foundation (tertiary, 2026-08-13)