Skip to main content

Patch manager for Isabelle installations

Project description

my-better-isabelle-prover

A patch manager for Isabelle installations.

GitHub: https://github.com/xqyww123/my_better_isabelle_prover

It exists primarily to support Isabelle-MCP (Isa-LSP), an MCP server that drives Isabelle over its LSP interface for AI agents. That server needs PIDE/LSP requests the stock vscode_server does not expose, and the Isa-REPL it builds on needs an ML loader function that Isabelle2025-2 removed. Neither can be added without editing vendored Isabelle source — the Pure ML loader and the vscode_server Scala. This tool keeps those edits as version-keyed unified diffs and applies, reverses, and checks them idempotently, then rebuilds the affected Scala when needed.

[!IMPORTANT] Before using this tool, make sure the isabelle command is available — on your PATH, or passed explicitly via --isabelle-bin PATH. Every command needs it (to detect the version and locate ISABELLE_HOME) and aborts with an error if it cannot be found. The system patch command must likewise be installed.

pip install -e .
my-better-isabelle patch          # apply all patches for the detected version
my-better-isabelle status         # show what is applied
my-better-isabelle unpatch        # reverse them

The Python version constraint is declared in pyproject.toml. See reference.md for the full list of prerequisites and CLI options.

Features

A feature is one self-consistent bundle of patches, stored per Isabelle version. Run my-better-isabelle status to see which are applied.

Feature Isabelle2024 Isabelle2025-2 What it adds
pide_control PIDE LSP control requests the stock vscode_server does not expose
register_thy native Restores Thy_Info.register_thy, removed in 2025-2

pide_control — PIDE LSP control extensions

Edits five ML/Scala files to add these LSP requests (full request/response protocol in pide_control.md):

  • PIDE/theory_status — per-theory processing status for all loaded theories, including auto-loaded dependencies.
  • PIDE/cancel_execution — immediately cancel all running processing, globally.
  • PIDE/command_at_position — source text and range of the Isar command enclosing a position, with no caret move.
  • PIDE/output_at_position — source, range, and rendered prover output of the command enclosing a position, in one request, with no caret move.
  • PIDE/symbols — dump the etc/symbols translation table(s) so a client can decode/encode Isabelle symbol notation (\<forall> ↔ ∀).

register_thy — restore removed theory registration (Isabelle2025-2)

Thy_Info.register_thy existed in 2024 but was removed by the 2025-2 theory-loader refactoring. Isa-REPL needs it to inject an already-built, in-memory theory value into Isabelle's global loader database. The patch re-adds it, restored from the 2024 source with one node-type adaptation. Pure ML change — no scala_build. Details in register_thy.md.

Supported versions & verification status

Patch targets are keyed by the exact output of isabelle version (e.g. Isabelle2024, Isabelle2025-2).

  • Isabelle2024pide_control authored, compiled (scala_build clean), and runtime-tested. register_thy ships natively, so no patch is needed.
  • Isabelle2025-2pide_control authored and round-trip-verified against pristine source, but not yet compiled. register_thy applies and reverse-detects cleanly, but the Pure/HOL heap has not yet been rebuilt with it. Verify before relying on either; see each feature doc for the exact scope tested.

Documentation

  • reference.md — CLI reference: subcommands, flags, examples, exit codes, and runtime prerequisites.
  • develop.md — how the manager works, the patch-repository layout, and how to add a new patch.
  • Feature docs (full protocol / rationale): pide_control.md, register_thy.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

my_better_isabelle_prover-0.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

my_better_isabelle_prover-0.1.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file my_better_isabelle_prover-0.1.0.tar.gz.

File metadata

  • Download URL: my_better_isabelle_prover-0.1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for my_better_isabelle_prover-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec4817d0093c4499a75fdd7eeb7539cb055704600f214c4dfccc5e77db7e3a1c
MD5 3b8e18547f40a12e7ad4a5f77b89d3c8
BLAKE2b-256 a10ef90bfeba3d259d4709b6e8b1bd71e12bcd1c1ded322efbf2d01dd5afa5f2

See more details on using hashes here.

File details

Details for the file my_better_isabelle_prover-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: my_better_isabelle_prover-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for my_better_isabelle_prover-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb392f085ca543741804d03803e52ef4b2c6dd17583646dce617c506a00778ac
MD5 61404639c12028cb2e2b1509fc9bca7e
BLAKE2b-256 db9dfffd6b139499648763f9cbd4bbe0b0ceebac04d8092f9e9c8b84ce84a526

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page