The Isabelle Workshop usually happens every second year: this time on 14-Sep-2024 in Tbilisi, Georgia, colocated with the ITP 2024 conference. The workshop website includes all papers (and some slides).
Category Archives: Science
Isabelle as System Platform for the Archive of Formal Proofs (AFP)
At the Dagstuhl-Seminar 23401 Automated mathematics: integrating proofs, algorithms and data (01..06-Oct-2023), I delivered a talk on Isabelle as System Platform for the Archive of Formal Proofs (AFP) .
Abstract:
Isabelle is usually seen as an interactive proof assistant, mostly for Higher-Order Logic (HOL), but that is somehow accidental. In reality, Isabelle is a system platform for functional programming and formal proofs, with sufficient infrastructure to carry its own weight and gravity. The Archive of Formal Proofs (AFP) is the official collection of Isabelle applications that is maintained together with the base system. That poses ever growing demands on the Isabelle platform. This talk gives an overviewof Isabelle software technology, with specific focus on Programming and Scaling, e.g. distributed build clusters for AFP.
See also the slides, which contain further links to relevant materials.
Isabelle Workshop 2022 at FLoC
Following our usual 2-years cycle, we have another Isabelle Workshop on Thu 11-Aug-2022. This will be a truly hybrid event: the organizers of the FLoC multiconference will provide local facilities at the Technion Haifa; this will include a digital projector and network connection. We will use that to provide our own virtual facilities on top, to accommodate remote participants via BigBlueButton hosted at TU Munich.
The remote organizers of the workshop, including myself, are very grateful to the few heroic colleagues who will be there in Haifa, despite these confused times of plague and war – and rather expensive conference registration.
Talk on Export of formal theory content
On 22-Nov-2019 I have delivered the following talk at TUM (Garching bei München):
- Title:
- Export of formal theory content in Isabelle/Scala
- Abstract:
- This is an overview of the state of affairs of systematic export of formal theory content. The general motivation is to provide semantically enriched views on the Isabelle/AFP library, without requiring a running Isabelle process. A typical application could be search over a database of digested theories, e.g. for an AFP web service.
- Materials:
- Slides with sources, which include practically relevant links and examples.
Invited talks at CICM 2019 (Prague)
I will attend the CICM 2019 conference in Prague (08..12-Jul-2019) and deliver two invited talks as follows:
- MKM conference track: Interaction with Formal Mathematical Documents in Isabelle/PIDE (with slides) – Tuesday 09-Jul-2019 9:00–10:00
- LML workshop: Isabelle technology for the Archive of Formal Proofs with application to MMT (with slides) – Wednesday 10-Jul-2019 9:00–10:00
MMT as component for Isabelle2019
MMT is a language, system and library (in Scala) to represent a broad range of languages in the OMDoc format: this supports formal, informal, semi-formal content. The MMT repository includes
general APIs to operate on OMDoc theories, together with various tools and applications. There are several MMT sub-projects to connect to other systems. This includes Isabelle/MMT, which appeared as preliminary version already in Nov-2018.
The release of Isabelle2019 (June 2019) is an opportunity to distribute MMT version 17.0.0 (May 2019) as Isabelle application. An alternative is to incorporate the underlying Isabelle component manually into Isabelle2019 in $ISABELLE_HOME_USER/etc/settings
like this: init_component ".../mmt-20190611"
— where the three dots refer to the directory where the component tar.gz
has been unpacked.
In either case, the mmt.jar
of the MMT distribution is included in the Isabelle/Scala package name space. The component provides Isabelle command-line tools as follows:
isabelle mmt_build
to (re)build the MMT project inside the Isabelle system environment (only required after change of the Scala sources)isabelle mmt_import
to import the content of a headless Isabelle/PIDE session into MMT (OMDoc and RDF/XML triples)isabelle mmt_server
to present imported content using the built-in HTTP server of MMTisabelle mmt
to run the interactive MMT shell inside the Isabelle system environment, e.g. for experimentation within the Isabelle + MMT package namespace, using thescala
sub-shell.
The main functionality is provided by isabelle mmt_import
: that is a medium-sized Scala module (57KB) within the MMT code-base (file src/mmt-isabelle/src/info/kwarc/mmt/isabelle/Importer.scala
). It refers to general export facilities of Isabelle/Scala, which are part of the Isabelle2019 distribution (file src/Pure/Thy/export_theory.scala
). The latter may be studied independently of MMT in the implementation of the isabelle dump
tool (file src/Pure/Tools/dump.scala
); see also the Isabelle System Manual, section 2.6.
The following papers provide further explanations on Isabelle/MMT:
- Relational data across mathematical libraries, notably section 3.1 about exported content (OMDoc and RDF/XML).
- Isabelle technology for the Archive of Formal Proofs, notably section 4 about tool integration.
Isabelle/Naproche for Automatic Proof-Checking of Ordinary Mathematical Texts
Naproche-SAD is a recent tool by Frerix and Koepke, based on the original System for Automated Deduction (SAD) by Paskevich and others. It processes the Formal Theory Language (ForTheL), which is designed to look like mathematical text, but it is restricted to a small subset of natural language.
The tool is implemented in Haskell as a plain function from input text to output messages. A file is like a chapter of mathematical text, with a nested tree-structure of elements and sub-elements (for signatures, axiomatizations, statements, proofs). Output messages inform about the translation of mathematical text to problems of first-order logic, and indicate success or failure of external proof checking; the latter is delegated to the E Prover by Stephan Schulz and can take several seconds for each proof obligation.
To integrate Naproche-SAD into PIDE, Frerix and Wenzel have reworked the Haskell program over 2 months in 2018, to turn the command-line tool into a service for reactive checking of ForTheL texts. Isabelle integration was done via the new Isabelle/Haskell library and some glue code in Isabelle/Scala to register ForTheL as auxiliary file-format (extension .ftl
).
The resulting Isabelle/Naproche application is available as multi-platform download. A running instance is shown in the screenshot: users can directly open ForTheL files (e.g. from Documentation
/ Examples
) and wait briefly to see output messages attached to the text in the usual IDE manner. Further edits produce a new version of the text, which is sent in total to Naproche-SAD again. The back-end is sufficiently smart to avoid redundant checking of unchanged sub-elements: it keeps a global state with results of old versions: this is easy to implement as the program keeps running until shutdown of Isabelle/PIDE.
(Cited from section 1.2 of the paper Interaction with Formal Mathematical Documents in Isabelle/PIDE.)
Isabelle presentations at LSV Paris/Cachan
During the two weeks of 17..28-Jun-2019, I will be visiting Deducteam at LSV, Paris/Cachan. There will be two presentations about Isabelle technology for formal documents and libraries:
- Interaction with Formal Mathematical Documents in Isabelle/PIDE (with slides) – Tuesday 18-Jun-2019, 11:00, Pavillon du Jardin, ENS Cachan.
- Isabelle technology for the Archive of Formal Proofs (with slides) – Thursday 20-Jun-2019, 14:00, LSV library.
See also the official announcement of Deducteam.
Note: These talks will be repeated at the Conference on Intelligent Computer Mathematics (CICM 2019), Prague (CZ), 08..12-Jul-2019.
Interaction with Formal Mathematical Documents in Isabelle/PIDE (at CICM 2019, Prague)
At the Conference for Intelligent Computer Mathematics (CICM 2019) in Prague (08..12-Jul-2019), I will give a keynote presentation on the track Mathematical Knowledge Management (MKM).
- Title:
- Interaction with Formal Mathematical Documents in Isabelle/PIDE
- Abstract:
- Isabelle/PIDE has emerged over more than 10 years as the standard Prover IDE for interactive theorem proving in Isabelle. The well-established Archive of Formal Proofs (AFP) testifies the success of such applications of formalized mathematics in Isabelle/HOL. More recently, the scope of PIDE has widened towards languages that are not connected to logic and proof in Isabelle, but taken from a broader repertoire of mathematics on the computer. The present paper provides a general overview of the PIDE project and its underlying document model, with built-in parallel evaluation and asynchronous interaction. There is also some discussion of original aims and approaches, successes and failures, later changes to the plan, and ideas for the future.
- Paper:
- Preprint from ArXiv
Isabelle/MMT: export of Isabelle theories and import as OMDoc content
MMT (or “Meta Meta Theory”) is a general framework for formal and informal languages, including lambda-calculus and logic, but also text documents. The documentation provides an overview of the MMT language and system (which is implemented in Scala).
I have collaborated over some months with the makers of MMT: Florian Rabe and Michael Kohlhase. The outcome is Isabelle/MMT, a tool in Isabelle/Scala that uses the MMT library to export Isabelle theory content and import it into MMT as OMDoc files. Robustness and scalability have been of primary concern of Isabelle/MMT: We have managed to process recent Isabelle + AFP within 6.5h on high-end hardware, excluding only very big sessions of AFP (notably the “slow” group).
Here are further technical details:
- Intel Xeon CPU E5-2699 @ 2.20GHz with 20 cores
- Poly/ML: 30 GB heap size, approx. 12 active threads
- Java 11: 30 GB heap size, approx. 2 active threads
- 540 sessions
- 5463 theories
- 1404441 logical items:
- 4021 locales (including classes)
- 4057 locale dependencies (sub-locales, sub-classes etc.)
- 1101 type-classes
- 9620 types
- 191336 constants
- 1194306 theorems
- 160 MB OMDoc content with XZ compression, or 26 GB uncompressed
The resulting OMDoc content is available from the MathHub service by Kohlhase and Rabe. It is possible to browse it locally via the HTTP server that is included in MMT, e.g. by the command-line wrapper isabelle mmt_server
. See also the README (towards the bottom) and the following screenshot:
Browsing only works smoothly for small Isabelle theories. The Scala APIs of MMT provide more scalable access to the massive amount of material, e.g. it could be used for “data-mining” of Isabelle/AFP content.
Isabelle export
The Isabelle/MMT export uses new mechanisms from recent repository versions (after the Isabelle2018 release), e.g. see Isabelle_09-Nov-2018. In particular:
- Export of “blobs” into the Isabelle session database, e.g. see the
export_theory
system option and theisabelle dump
tool. In such batch-mode tools, exports are written to an SQLite database and dumped to the file-system. - Use of PIDE (Prover IDE) processing under program control: the database content is maintained within the running Java process and later written to OMDoc files. The PIDE session allows to export many details of formally annotated sources: presently only the source positions of declared types, constants, theorems etc. are reconstructed and associated with the corresponding command-span in the text.
Other applications of theory export may be considered, e.g. OpenTheory or Dedukti, but note that proof objects are presently omitted. Full proof terms would require some orders of magnitude more resources. Instead, it is probably better to use structured Isar proof texts with formal PIDE annotations.
MMT import
Import into MMT uses the existing LF library, which provides a Logical Framework that is similar to Isabelle/Pure. Isabelle types, terms, propositions are translated in a straight-forward manner. Type-classes of Isabelle occur here as classes of types, without any additional structure yet. Further theory structure is provided by locales — classes are locales with special link-up with the type-system. Overall we get the following aspects of Isabelle theory content in MMT:
- Foundational theory content: type-classes, types, terms (constants), theorems (facts).
- Locales (and classes) as “little-theories”: with some information about locale dependencies and locale interpretations.
- Limited mixfix/infix syntax for global constants and locale constants.
- Original source text for Isabelle/Isar commands that introduce formal content.
More details are possible: Isabelle content is very rich, with many extra-logical aspects. The “flexiformal” approach of MMT might eventually help to express a lot of this, beyond the standard Logical Framework approach.