7 research outputs found
Capturing Hiproofs in HOL Light
Hierarchical proof trees (hiproofs for short) add structure to ordinary proof
trees, by allowing portions of trees to be hierarchically nested. The
additional structure can be used to abstract away from details, or to label
particular portions to explain their purpose. In this paper we present two
complementary methods for capturing hiproofs in HOL Light, along with a tool to
produce web-based visualisations. The first method uses tactic recording, by
modifying tactics to record their arguments and construct a hierarchical tree;
this allows a tactic proof script to be modified. The second method uses proof
recording, which extends the HOL Light kernel to record hierachical proof trees
alongside theorems. This method is less invasive, but requires care to manage
the size of the recorded objects. We have implemented both methods, resulting
in two systems: Tactician and HipCam
Querying Proofs (Work in Progress)
We motivate and introduce the basis for a query language designed for inspecting electronic representations of proofs. We argue that there is much to learn from large proofs beyond their validity, and that a dedicated query language can provide a principled way of implementing a family of useful operations
Recommended from our members
A Tool for Producing Verified, Explainable Proofs
Mathematicians are reluctant to use interactive theorem provers. In this thesis I argue that this is because proof assistants don't emphasise explanations of proofs; and that in order to produce good explanations, the system must create proofs in a manner that mimics how humans would create proofs. My research goals are to determine what constitutes a human-like proof and to represent human-like reasoning within an interactive theorem prover to create formalised, understandable proofs. Another goal is to produce a framework to visualise the goal states of this system.
To demonstrate this, I present HumanProof: a piece of software built for the Lean 3 theorem prover. It is used for interactively creating proofs that resemble how human mathematicians reason. The system provides a visual, hierarchical representation of the goal and a system for suggesting available inference rules. The system produces output in the form of both natural language and formal proof terms which are checked by Lean's kernel. This is made possible with the use of a structured goal state system which interfaces with Lean's tactic system which is detailed in Chapter 3.
In Chapter 4, I present the subtasks automation planning subsystem, which is used to produce equality proofs in a human-like fashion. The basic strategy of the subtasks system is break a given equality problem in to a hierarchy of tasks and then maintain a stack of these tasks in order to determine the order in which to apply equational rewriting moves. This process produces equality chains for simple problems without having to resort to brute force or specialised procedures such as normalisation. This makes proofs more human-like by breaking the problem into a hierarchical set of tasks in the same way that a human would.
To produce the interface for this software, I also created the ProofWidgets system for Lean 3. This system is detailed in Chapter 5. The ProofWidgets system uses Lean's metaprogramming framework to allow users to write their own interactive, web-based user interfaces to display within the VSCode editor and in an online web-editor. The entire tactic state is available to the rendering engine, and hence expression structure and types of subexpressions can be explored interactively. The ProofWidgets system also allows the user interface to interactively edit the proof document, enabling a truly interactive modality for creating proofs; human-like or not.
In Chapter 6, the system is evaluated by asking real mathematicians about the output of the system, and what it means for a proof to be understandable to them. The user group study asks participants to rank and comment on proofs created by HumanProof alongside natural language and pure Lean proofs. The study finds that participants generally prefer the HumanProof format over the Lean format. The verbal responses collected during the study indicate that providing intuition and signposting are the most important properties of a proof that aid understanding.EPSR
Refactoring proofs
Refactoring is an important Software Engineering technique for improving the structure
of a program after it has been written. Refactorings improve the maintainability,
readability, and design of a program without affecting its external behaviour. In analogy,
this thesis introduces proof refactoring to make structured, semantics preserving
changes to the proof documents constructed by interactive theorem provers as part
of a formal proof development.
In order to formally study proof refactoring, the first part of this thesis constructs
a proof language framework, Hiscript. The Hiscript framework consists of a procedural
tactic language, a declarative proof language, and a modular theory language. Each
level of this framework is equipped with a formal semantics based on a hierarchical
notion of proof trees. Furthermore, this framework is generic as it does not prescribe
an underlying logical kernel. This part contributes an investigation of semantics for
formal proof documents, which is proved to construct valid proofs. Moreover, in analogy
with type-checking, static well-formedness checks of proof documents are separated
from evaluation of the proof. Furthermore, a subset of the SSReflect language
for Coq, called eSSence, is also encoded using hierarchical proofs. Both Hiscript and
eSSence are shown to have language elements with a natural hierarchical representation.
In the second part, proof refactoring is put on a formal footing with a definition
using the Hiscript framework. Over thirty refactorings are formally specified and
proved to preserve the semantics in a precise way for the Hiscript language, including
traditional structural refactorings, such as rename item, and proof specific refactorings
such as backwards proof to forwards proof and declarative to procedural. Finally, a concrete,
generic refactoring framework, called Polar, is introduced. Polar is based on graph
rewriting and has been implemented with over ten refactorings and for two proof
languages, including Hiscript.
Finally, the third part concludes with some wishes for the future