Skip to main content

A client to Isabelle proof assistant server

Project description

PyPI versionAnaconda versionCircleCIDocumentation StatuscodecovDOI

Python client for Isabelle server

isabelle-client is a TCP client for Isabelle server. For more information about the server see Chapter 4 of the Isabelle system manual.

How to Install

The best way to install this package is to use pip:

pip install isabelle-client

Another option is to use Anaconda:

conda install -c conda-forge isabelle-client

One can also download and run the client together with Isabelle in a Docker container:

docker build -t isabelle-client https://github.com/inpefess/isabelle-client.git
docker run -d --rm -p 8888:8888 --name isabelle-client isabelle-client

And navigate to example page in your browser.

How to use

from isabelle_client import get_isabelle_client, start_isabelle_server

# start Isabelle server
server_info, _ = start_isabelle_server()
# create a client object
isabelle = get_isabelle_client(server_info)
# start a new session
responses = isabelle.session_start()
session_id = responses[-1].response_body.session_id
# send a theory file from the current directory to the server
responses = isabelle.use_theories(
    theories=["Example"], master_dir=".", session_id=session_id
)
# shut the server down
isabelle.shutdown()

For more details, follow the usage example from documentation or a notebook.

High-level connector

You can also pass a theory file body (something you typically put between begin and end keywords) to a high-level connector that will generate a temporary file for you, send it to the Isabelle server and get the result for you. For example, this snippet:

from isabelle_client.isabelle_connector import IsabelleConnector
from isabelle_client.isabelle_connector import IsabelleTheoryError

isabelle_connector = IsabelleConnector()
try:
    isabelle_connector.build_theory(
        r'lemma "\<forall> x. \<forall> y. x = y"' "\nby auto"
    )
    print("Theory is validated!")
except IsabelleTheoryError as error:
    print(error.args[0])

will produce something like:

: Failed to finish proof\<^here>:
: goal (1 subgoal):
:  1. \<And>x y. x = y

More documentation

More documentation can be found here.

Similar Software

There are Python clients to other interactive theorem provers, for example:

Modules helping to interact with Isabelle server from Python are parts of the Proving for Fun project.

There are also clients to Isabelle server in other programming languages, e.g. this one in Rust.

Projects using the client

isabelle-client helped to build some cool LLM stuff (in reversed chronological order):

How to cite

If you’re writing a research paper, you can cite the Isabelle client using the following DOI. You can also cite Isabelle 2021 (and an earlier version of the client) with this DOI. There also is a somewhat more complete (but unpublished) pre-print.

How to Contribute

Please follow the contribution guide while adhering to the code of conduct.

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

isabelle_client-1.1.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

isabelle_client-1.1.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file isabelle_client-1.1.0.tar.gz.

File metadata

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

File hashes

Hashes for isabelle_client-1.1.0.tar.gz
Algorithm Hash digest
SHA256 8305fe240e0ce60e99aefbc07a85b0061ed03661a50a0785ed6875cac1ef3165
MD5 7765d3eb2c8d7ee87d38f2160ab5f86b
BLAKE2b-256 90bcc5d3e058c641b05f9c121e0d578a5a146627acdd3ef64a049d7b17720ae5

See more details on using hashes here.

File details

Details for the file isabelle_client-1.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for isabelle_client-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 157aa3445e92a2a7affbf96d9d493678b09e4c97dba8630f1c7a90fa39d9b36e
MD5 7e1004556ecd01fb1c5ddb880d02633e
BLAKE2b-256 6c54110dc41ce0431b8a5ae77b1f19cae9f8b8a2f7e5bb9693d8ff79565ef359

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