HOL4
Also known as HOL
A proof assistant for higher-order logic in the LCF tradition, written in Standard ML; the prover behind the CakeML verified compiler.
It can call external tools (SMT, SAT, BDD) whose results are tagged as oracles, so a theorem records whether it relied on one.
Trust card
What you trust when you accept a proof from HOL4. Logic: Higher-order logic (simple type theory with polymorphic types).
Trusted coreProof kernel. The small trusted core of a proof assistant that checks every proof.
LCF-style kernel in Standard ML (src/thm): theorems are an abstract type built only by primitive inference rules. There is a standard kernel and an OpenTheory-logging variant (otknl). The kernel also includes Thm.compute, a built-in evaluator for fast computation, where several 2026 bugs were found. Theorems that depend on oracles or cheat carry tags. No published line count found.
Independent re-checkers
- Candle (HOL4 proof traces) — Since November 2026, HOL4 can convert a theory's proof dump into portable proof traces that the verified Candle prover replays. New; coverage limits are documented in the converter's README.
- Verified OpenTheory article checker (CakeML) — Checks OpenTheory articles on top of the verified Candle kernel; HOL4 can write such articles.
Axioms
Four axioms in boolScript.sml: BOOL_CASES_AX (excluded middle), ETA_AX (extensionality), SELECT_AX (Hilbert choice) and INFINITY_AX. Users can add axioms; cheat and oracles add tags that stay on every theorem derived from them.
CertificatesProof certificate. A record of a proof that a separate, simpler program can check.
Not by default. Builds with the OpenTheory kernel (--otknl) write OpenTheory articles, and since November 2026 theories can be exported as proof traces for replay in Candle.
sourceSoundness record
5 notable issues in the last five years. An empty list means none were found, not that none exist. Reports go to this channel.
- Oct 2026 prim_type_definition could be exploited under a snapshotted context to prove False Fixed
- Jul 2026 Thm.compute did not check polymorphic type instances, giving a proof of False with no hypotheses, tags or oracles A follow-up variant (issue 2030) was also fixed. Fixed
- Jul 2026 dest_eq did not check the identity of the equality constant The exploit replaces the signature entry for "=" from ML code. Fixed
- Mar 2026 Soundness bug in Thm.compute's handling of mod Fixed
- Mar 2026 Theorems can be forged with Poly/ML's unsafe cast, without any tag showing it Open. A property of running the kernel inside an ML system with unsafe primitives, not a flaw in an inference rule. Not fixed
In this index
Entries that rely on HOL4.
Toolchains
None yet.
Semantics usable here
Automation checked by it
None yet.