Why do proof assistants use a small trusted kernel rather than trusting the entire tool, and what is the practical implication of this design?
Think about your answer, then reveal below.
Model answer: The kernel is the only code that needs to be correct for the proofs to be valid. A small kernel (typically a few thousand lines) can be audited, tested, and formally analyzed. The rest of the proof assistant — tactics, automation, user interface, libraries — can be arbitrarily complex because anything they produce is re-checked by the kernel. If a tactic generates a wrong proof step, the kernel rejects it. This design, called the 'de Bruijn criterion,' minimizes the trusted computing base.
This is analogous to the principle of least privilege in security. By concentrating trust in a small, well-understood component, the overall system achieves high assurance despite its complexity. Coq's kernel is about 10,000 lines of OCaml. All of Coq's sophisticated tactic language, automation, and standard library depend on this kernel for soundness. If the kernel has no bugs (and it has been very thoroughly tested), then every proof Coq accepts is valid.