{
  "id": "hol4",
  "name": "HOL4",
  "aka": [
    "HOL"
  ],
  "summary": "A proof assistant for higher-order logic in the LCF tradition, written in Standard ML; the prover behind the CakeML verified compiler.",
  "details": "It can call external tools (SMT, SAT, BDD) whose results are tagged as oracles, so a theorem records whether it relied on one.",
  "kind": "proof-assistant",
  "logic": "Higher-order logic (simple type theory with polymorphic types)",
  "open": "open-source",
  "license": "BSD-3-Clause (modified; HOL4 licence)",
  "links": {
    "homepage": "https://hol-theorem-prover.org/",
    "repo": "https://github.com/HOL-Theorem-Prover/HOL",
    "docs": "https://hol-theorem-prover.org/documentation.html"
  },
  "trust_card": {
    "kernel": {
      "summary": "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.",
      "source": "https://github.com/HOL-Theorem-Prover/HOL/tree/develop/src/thm"
    },
    "independent_checkers": [
      {
        "name": "Candle (HOL4 proof traces)",
        "url": "https://github.com/HOL-Theorem-Prover/HOL/pull/2171",
        "note": "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."
      },
      {
        "name": "Verified OpenTheory article checker (CakeML)",
        "url": "https://github.com/CakeML/cakeml/tree/master/examples/opentheory",
        "note": "Checks OpenTheory articles on top of the verified Candle kernel; HOL4 can write such articles."
      }
    ],
    "axioms": {
      "summary": "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.",
      "source": "https://github.com/HOL-Theorem-Prover/HOL/blob/develop/src/bool/boolScript.sml"
    },
    "certificates": {
      "summary": "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.",
      "source": "https://github.com/HOL-Theorem-Prover/HOL/tree/develop/src/opentheory"
    },
    "soundness_issues": [
      {
        "date": "2026-10",
        "title": "prim_type_definition could be exploited under a snapshotted context to prove False",
        "url": "https://github.com/HOL-Theorem-Prover/HOL/issues/2079",
        "fixed": true
      },
      {
        "date": "2026-07",
        "title": "Thm.compute did not check polymorphic type instances, giving a proof of False with no hypotheses, tags or oracles",
        "url": "https://github.com/HOL-Theorem-Prover/HOL/issues/2029",
        "fixed": true,
        "note": "A follow-up variant (issue 2030) was also fixed."
      },
      {
        "date": "2026-07",
        "title": "dest_eq did not check the identity of the equality constant",
        "url": "https://github.com/HOL-Theorem-Prover/HOL/issues/2026",
        "fixed": true,
        "note": "The exploit replaces the signature entry for \"=\" from ML code."
      },
      {
        "date": "2026-03",
        "title": "Soundness bug in Thm.compute's handling of mod",
        "url": "https://github.com/HOL-Theorem-Prover/HOL/issues/1838",
        "fixed": true
      },
      {
        "date": "2026-03",
        "title": "Theorems can be forged with Poly/ML's unsafe cast, without any tag showing it",
        "url": "https://github.com/HOL-Theorem-Prover/HOL/issues/1841",
        "fixed": false,
        "note": "Open. A property of running the kernel inside an ML system with unsafe primitives, not a flaw in an inference rule."
      }
    ],
    "soundness_channel": "https://github.com/HOL-Theorem-Prover/HOL/issues"
  },
  "checker_level": "green",
  "last_release": {
    "version": "trindemossen-2",
    "date": "2025-08-12",
    "source": "https://github.com/HOL-Theorem-Prover/HOL/releases/tag/trindemossen-2"
  },
  "last_commit": {
    "date": "2026-11-26",
    "source": "https://github.com/HOL-Theorem-Prover/HOL/commits/develop"
  },
  "last_checked": "2026-11-26",
  "attestation": "maintainer",
  "claimed_by_authors": false,
  "sources": [
    {
      "url": "https://hol-theorem-prover.org/about.html",
      "title": "About HOL4 (oracle mechanism, licence, issue tracker)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/HOL-Theorem-Prover/HOL/issues?q=label%3AKernel",
      "title": "HOL4 issues labelled Kernel",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/CakeML/cakeml",
      "title": "CakeML sources (developed in HOL4)",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "provers",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/provers/hol4/",
      "json": "/provers/hol4.json",
      "markdown": "/provers/hol4.md"
    },
    "used_by": [],
    "semantics_available": [
      "sail-arm",
      "sail-riscv"
    ]
  }
}