Lecture Notes. Interactive theorem proving [isa-0001]
These notes are the basis of my short course at the ANU Logic Summer School 2025.
LectureBuilding up HOL [isa-0002]
- November 25, 2025
- Liam O'Connor
Isabelle and HOL [isa-0003]
- November 25, 2025
- Liam O'Connor
These lectures introduce theorem proving using the proof assistant Isabelle. Isabelle supports many logics, but by far the most popular is Higher Order Logic, the focus of these notes. Isabelle comes pre-packaged with its HOL libraries, as well as a proof editor (based on jEdit) and various other tools.
The proof developments shown in these notes are all developed with Isabelle 2024, but Isabelle 2025 (the latest version at time of writing) is largely backwards compatible with it. I have not upgraded due to some proof automation regressions in Isabelle 2025 that do not affect the content of these notes.
Installing Isabelle [isa-0013]
- November 30, 2025
- Liam O'Connor
Definining Theories [isa-0016]
- December 2, 2025
- Liam O'Connor
An Isabelle file is called a theory, and they consist of mathematical definitions (of types and terms), lemmas and proofs. Isabelle theories start with a theory name and a declaration of all the theories on which it depends. The theory name must match the file name, so the code from this lecture should be saved into a file called HOLFromScratch.thy.
We imported the theory Pure, which contains only the very basic built-in structures that define Isabelle's logic.
HHFs and Isabelle/Pure [isa-0017]
- December 2, 2025
- Liam O'Connor
Isabelle's logical framework consists of terms (t), types (\tau ) and formulae (\varphi ). Each term t must have a type \tau , written t :: \tau .
In the below code, we define a new type called bool, and we declare that terms of type bool can be used as judgments in our formulae. The details of the judgment command are not important for now.
Formulae in Isabelle are hereditary Harrop formulae, defined as:
\begin {array}{lclll} \varphi & ::= & \bigwedge x.\ \varphi & & \textit {(meta-forall)} \\ & \mid & \varphi \implies \varphi & & \textit {(meta-implication)}\\ & \mid & t & \text {where}\ t\ \text {:: \texttt {bool}} & \textit {(judgments)} \end {array}In Isabelle's syntax, formulae, terms, and types are typically surrounded by quote marks "" or cartouches ‹› — the two are equivalent.
ExampleIsabelle's Syntax for HHFs [isa-0018]
- December 2, 2025
- Liam O'Connor
Consider the following rule: \dfrac {A \quad B}{A \land B}{\text {\small conjI}} This is encoded as an Isabelle formula as follows: \bigwedge A. \left (\bigwedge B. (A \implies (B \implies (A \land B)))\right )
Because \implies is right-associative, we can remove some parentheses:
\bigwedge A. \left (\bigwedge B. (A \implies B \implies A \land B)\right )We can also combine the meta-quantifiers:
\bigwedge A\ B.\;\; A \implies B \implies A \land BIsabelle includes special syntax \llbracket A_0; A_1, \dots , A_n \rrbracket \implies C which is equivalent to A_0 \implies A_1 \implies \dots \implies A_n \implies C.
\bigwedge A\ B.\;\; \llbracket A; B\rrbracket \implies A \land BIsabelle will also automatically add quantifiers to unknown variables, so we can drop the meta-quantifiers from the outermost part of the formula:
\llbracket A; B\rrbracket \implies A \land BDefinitionConjunction [isa-0005]
- November 25, 2025
- Liam O'Connor
Isabelle axiomatizations [isa-0019]
- December 2, 2025
- Liam O'Connor
Isabelle's basic mechanism to define new things is the axiomatization command.
This defines the constants (with their types) in the constants section, and assumes the formulae stated in the axioms section.
Problem.
- December 2, 2025
- Liam O'Connor
Isabelle does nothing to stop you from assuming false theorems as axioms in axiomatization commands, which can easily render the logic unsound. We shall later see safer ways to define new constants, which should be preferred over axiomatization in most cases.
Isabelle Terms [isa-001C]
- December 2, 2025
- Liam O'Connor
Terms in Isabelle are essentially terms of the (polymorphic) typed lambda calculus. When we declare a constant like:
We are introducing a new constant called conj that has type bool ⇒ bool ⇒ bool — that is, a function that takes two values of type bool and produces another bool. The infixr annotation on the right hand side lets us use familiar notation A ∧ B instead of writing conj A B, but the meaning of A ∧ B is identical to conj A B.
AsideCurrying
- December 2, 2025
- Liam O'Connor
Functions of multiple parameters in Isabelle are typically curried, meaning that a function of type bool ⇒ bool ⇒ bool is actually a function of type bool ⇒ (bool ⇒ bool) — a function that, given a bool value, produces a function of type bool ⇒ bool.
Proof Methodrule [isa-000Z]
- November 28, 2025
- Liam O'Connor
Given a goal \llbracket A_1 \dots A_n \rrbracket \implies G and a theorem r: \llbracket P_1 \dots P_n \rrbracket \implies G (commonly an introduction rule),
apply (rule r) replaces the goal with subgoals:
- \llbracket A_1 \dots A_n \rrbracket \implies P_1
- \dots
- \llbracket A_1 \dots A_n \rrbracket \implies P_n
Aside.
- November 28, 2025
- Liam O'Connor
Technically, the conclusion of the rule and the goal do not have to be exactly equal, but they must be unifiable – that is, there must be some substitution to schematic variables that makes the conclusion of the rule and the goal equal.
Proof Methodfrule and drule [isa-0010]
- November 28, 2025
- Liam O'Connor
Given a goal \llbracket X; A_1 \dots A_n \rrbracket \implies G and a theorem r: \llbracket X; P_1 \dots P_n \rrbracket \implies Y,
apply (frule r) replaces the goal with subgoals:
- \llbracket X; A_1 \dots A_n \rrbracket \implies P_1
- \dots
- \llbracket X; A_1 \dots A_n \rrbracket \implies P_n
- \llbracket X; Y; A_1 \dots A_n \rrbracket \implies G
The method drule is the same as frule except that it also deletes the assumption X from the last subgoal.
TheoremConjunction Elimination [isa-000C]
- November 25, 2025
- Liam O'Connor
Solution.
- November 25, 2025
- Liam O'Connor
DefinitionImplication [isa-0006]
- November 25, 2025
- Liam O'Connor
TheoremImplication Elimination [isa-000D]
- November 25, 2025
- Liam O'Connor
Solution.
- November 25, 2025
- Liam O'Connor
Proof Methoderule [isa-0011]
- November 28, 2025
- Liam O'Connor
Given a goal \llbracket X; A_1 \dots A_n \rrbracket \implies G and a theorem r: \llbracket X; P_1 \dots P_n \rrbracket \implies G (typically an elimination rule where the conclusion is just a variable, easily unified with G),
apply (erule r) replaces the goal with subgoals:
- \llbracket A_1 \dots A_n \rrbracket \implies P_1
- \dots
- \llbracket A_1 \dots A_n \rrbracket \implies P_n
Example [isa-0009]
- November 25, 2025
- Liam O'Connor
Solution.
- November 25, 2025
- Liam O'Connor
DefinitionFalse and True [isa-0007]
- November 25, 2025
- Liam O'Connor
DefinitionNegation [isa-0008]
- November 25, 2025
- Liam O'Connor
Example [isa-000A]
- November 25, 2025
- Liam O'Connor
Solution.
- November 25, 2025
- Liam O'Connor
DefinitionDisjunction [isa-0004]
- November 25, 2025
- Liam O'Connor
Example [isa-000M]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000B]
- November 25, 2025
- Liam O'Connor
Solution.
- November 25, 2025
- Liam O'Connor
DefinitionClassical Axiom [isa-000E]
- November 27, 2025
- Liam O'Connor
TheoremProof by Contradiction [isa-000F]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Example [isa-000G]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Example [isa-000H]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000I]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000J]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000K]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000L]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
DefinitionUniversal Quantifiers [isa-000N]
- November 25, 2025
- Liam O'Connor
Proof Methodrule_tac, erule_tac, drule_tac, frule_tac [isa-001A]
- November 28, 2025
- Liam O'Connor
The typical rule, erule, drule, frule methods rely entirely on unification to determine how to instantiate the variables in the provided rule. Sometimes, it is useful to state explicitly how to instantiate some variables in the rule, particularly when dealing with quantifiers, or when there are multiple possible candidates.
TheoremUniversal Quantifier Elimination [isa-000P]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
DefinitionExistential Quantifiers [isa-000O]
- November 25, 2025
- Liam O'Connor
Example [isa-000Q]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Example [isa-000R]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Example [isa-000S]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000T]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000U]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000V]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000W]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000X]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
Exercise [isa-000Y]
- November 27, 2025
- Liam O'Connor
Solution.
- November 27, 2025
- Liam O'Connor
LectureDefinitions, Datatypes, Induction, Functions [isa-001B]
- December 2, 2025
- Liam O'Connor
Unlike in Lecture [isa-0002], we import Main here rather than Pure. Almost all theories developed in Isabelle/HOL import Main, which contains all of the axioms and connectives introduced in Lecture [isa-0002], as well as a host of other theories, including:
- Axioms for defining equality. Try the following:
thm refl thm sym thm trans thm iffI thm ssubst - A theory of sets.
- A theory of natural numbers
- A theory of lists
- And much more!
Isabelle definitions [isa-001G]
- December 2, 2025
- Liam O'Connor
The Isabelle definition command is a safer way to define constants than the axiomatization command. The syntax is similiar:
However, there are several differences:
- Only one constant (
my_constabove) can be defined. - Only one axiom can be defined, and it must be an equation of the format
my_const ... = ..., describing the meaning ofmy_constin terms of other, already-defined constants.
If no name is given to the defining equation, the default name produced by appending _def to the name of the constant is used (e.g. my_const_def)
DefinitionA nand connective [isa-001D]
- December 2, 2025
- Liam O'Connor
Proof Methodunfold [isa-001F]
- December 2, 2025
- Liam O'Connor
Given a theorem r: A = B (typically a defining equation given by the definition command), apply (unfold r) replaces every occurrence of A in the current goal with B.
If the theorem r has premises, then all of those premises must be directly satisfied by assumptions in the current goal for unfold to succeed.
ExampleProving the axioms for nand [isa-001E]
- December 2, 2025
- Liam O'Connor
We use the unfold method with the lemma generated by Definition [isa-001D] to replace nand with its definition in our goal:
Solution.
- December 2, 2025
- Liam O'Connor
Solution.
- December 2, 2025
- Liam O'Connor
Solution.
- December 2, 2025
- Liam O'Connor
Proof Methodsimp [isa-001H]
- December 2, 2025
- Liam O'Connor
The Isabelle simplifier, or simp, is one of the most powerful proof automation features in Isabelle, but it is a very simple idea. Given a set of equations, apply (simp) will (almost) blindly rewrite the goal by all of those equations (as well as any equations that are local assumptions in the goal) left-to-right. Given a sufficiently expressive set of equations, this allows the simplifier to solve many goals (including all of the theorems in Example [isa-001E]) on its own.
The default set of equations that simp uses is called the simpset. We can add theorems to the simpset by attaching the [simp] attribute to them.
ExampleSimplifier rules for nand [isa-001I]
- December 2, 2025
Continuing our nand example, we can prove theorems and attach the [simp] attribute simultaneously:
declare command and the [simp del] attribute:
We can also adjust the simpset locally when we invoke the simp method:
Problem.
- December 2, 2025
- Liam O'Connor
Isabelle does nothing to guarantee that simp will terminate, nor that it will be confluent (i.e. the results can depend on the order in which rewrites are applied). In particular, problems with non-termination can arise if there is a cycle in the equations used for rewriting. In such cases, it can be useful to remove certain lemmas from the simpset locally:
Or explicitly list all the theorems to use:
Or disable the simplification and use of local assumptions:
Or disable the simplification of (but still use) local assumptions:
Or disable the use of (but still simplify) local assumptions:
The datatype command [isa-001K]
- December 2, 2025
- Liam O'Connor
The datatype defines a new type (like typedecl) but also defines some special constants, called constructors, which make values of that type. Constructors may optionally take arguments, and these data types may be recursive.
These datatypes are analogous to the algebraic data types found in many functional programming languages.
The datatype command automatically proves many lemmas about these types for you, chiefly:
- Disjointness: Values made with one constructor are not equal to values made with another constructor.
- Exhaustivity: The only values of this type are those made by the listed constructors.
- Injectivity: Two values of the same constructor are equal iff their arguments are equal.
ExampleThe oot type [isa-001J]
- December 2, 2025
This defines a type called oot with two values, ONE : oot and TWO : oot. The print_theorems command here allows us to see all of the theorems automatically created by the datatype command, chiefly that the constants ONE and TWO are disjoint (i.e. ONE ≠ TWO) and exhaustive (i.e. that there are no other values of type oot apart from ONE and TWO)
Proof Methodcase_tac [isa-001L]
- December 2, 2025
- Liam O'Connor
The case_tac method splits the current goal into multiple cases. Given a term t of type \tau , apply (case_tac t) will produce a new goal for each possible case of t according to the .cases theorem for the type \tau .
This works for all types defined with datatype, as well as for natural numbers (type nat) and bools — often an easier way to do classical reasoning than using rule ccontr.
Example [isa-001M]
- December 2, 2025
- Liam O'Connor
Solution.
- December 2, 2025
- Liam O'Connor
Natural numbers in Isabelle [isa-001N]
- December 3, 2025
- Liam O'Connor
Isabelle/HOL's theory of natural numbers defines natural numbers in a different way, but they behave much as if they were defined with the datatype command.
Defining functions in Isabelle [isa-001O]
- December 3, 2025
- with contributions from Liam O'Connor
The fun command can be used to define functions in Isabelle. Unlike definitions, functions can be defined by multiple pattern-matching equations, they may be recursive, and their equations are automatically added to the simpset.
ExampleFibonacci as a fun
- December 3, 2025
- Liam O'Connor
The print_theorems command allows us to see all of the lemmas generated by this command.
Problem.
- December 3, 2025
Isabelle functions must provably terminate. The problem with non-terminating functions can be illustrated by a definition like:
If such a non-terminating definition were allowed, this would render our logic inconsistent (as bad x is equal to its own negation). Therefore, Isabelle requires that all functions be accompanied by a proof of termination.
The fun command attempts to prove termination automatically. If it does not succeed, it will give an error message and fail to define the function. Manual proofs of termination can be supplied if the function command is used instead, but the function command is beyond the scope of this course.
In cases where the recursion and pattern matching follows exactly the structure of the datatype in one argument, primrec can be used instead of fun, which is a bit more efficient:
ExampleFactorial as a primrec [isa-001R]
- December 3, 2025
- Liam O'Connor
Proof Methodinduct (for structural induction) [isa-001P]
- December 3, 2025
- Liam O'Connor
While it is possible to use rule or erule with the generated .induct theorem from a datatype, it is usually much simpler and more convenient to use the induct proof method. Similar to the case_tac method, apply (induct t) splits the goal into various cases, one for each constructor of the type of t. The difference is that for recursive cases of the datatype, we also get an inductive hypothesis added to our assumptions.
Example [isa-001Q]
- December 3, 2025
- Liam O'Connor
We can prove a theorem about our factorial definition:
Solution.
- December 3, 2025
- Liam O'Connor
ExampleHigher-order functions [isa-001S]
- December 3, 2025
- Liam O'Connor
The above function is given another function as an input.
Exercise [isa-001T]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Using the lemma from Example [isa-001M].
DefinitionThe oots type [isa-001U]
- December 3, 2025
- Liam O'Connor
This type encodes a sequence of oot values. For example, the value ONEs 3 (TWOs 2 (ONEs 1 Empty)) encodes the sequence [ONE, ONE, ONE, TWO, TWO, ONE].
DefinitionThe prepend function [isa-001V]
- December 3, 2025
- Liam O'Connor
Theoremprepend_prepend [isa-001W]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Combining methods with semicolons [isa-001X]
- December 3, 2025
- Liam O'Connor
Methods can be combined using the ; operator:
This applies m2 to every subgoal that results from applying m1 to the current goal. It can be chained together multiple times. For example, the entire proof of Theorem [isa-001W] can be much more succinctly expressed as one line:
DefinitionThe cat function [isa-001Y]
- December 3, 2025
- Liam O'Connor
This function uses the prepend function to concatenate two oots sequences together.
Theoremcat_prepend [isa-001Z]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Lists in Isabelle [isa-0021]
- December 3, 2025
- Liam O'Connor
The Isabelle/HOL theory of Lists defines lists as follows:
This is an example of a polymorphic data type, where the type variable 'a stands for a type. For example, the type nat list is the type of lists of nat, and oot list is the type of a list of oots.
The notation x#xs is syntax sugar for Cons x xs and [] is syntax sugar for Nil. Lists can also be written in square brackets, so:
is equivalent to:
which is equivalent to:
Some provided functions are useful, including replicate :: nat ⇒ 'a ⇒ 'a list, which produces a list of n copies of the given value, and append :: 'a list ⇒ 'a list ⇒ 'a list which joins two lists together into one. The append function also has special notation, so a @ b is equivalent to append a b
DefinitionThe expand function [isa-0022]
- December 3, 2025
- Liam O'Connor
Theoremexpand_prepend [isa-0024]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
DefinitionThe compress function [isa-0023]
- December 3, 2025
- Liam O'Connor
Theoremexpand_compress [isa-0025]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Theoremcompress_append [isa-0026]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Theoremcompress_replicate lemmas [isa-0027]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
LectureRule Induction, Automation, Structured Proofs [isa-002N]
- December 3, 2025
- Liam O'Connor
This lecture continues the theory file begun in Lecture [isa-001B].
inductive predicates [isa-0028]
- December 3, 2025
- Liam O'Connor
With the inductive command, we define a predicate by specifying a collection of inference rules, and the inductive predicate is the smallest predicate closed under those rules.
In other words: An element satisfies the predicate exactly if it can be derived using the given rules.
From the given rules, Isabelle automatically generates an induction principle (.induct) which can be used with the induct method (see Proof Method [isa-0029]) and a cases theorem (.cases) for use with the case_tac method.
ExampleEven numbers as an inductive [isa-002K]
- December 3, 2025
- Liam O'Connor
Proof Methodinduct (for rule induction) [isa-0029]
- December 3, 2025
- Liam O'Connor
You’ve already seen how to use induct for structural induction. Exactly the same induct method can also be used for rule induction, when your induction is over an inductively defined predicate, not over the structure of some datatype.
When you define a predicate p with the inductive command, Isabelle automatically produces an induction rule named p.induct. This rule expresses how to perform induction over derivations of p x, one case for each introduction rule of the predicate.
Although you could apply the raw rule with rule or erule, it is almost always easier to use:
This behaves just like structural induction: The goal is split into one subgoal per introduction rule of the predicate, and recursive premises of the rules give rise to induction hypotheses, added to your assumptions.
ExerciseEven numbers are multiples of two [isa-002L]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
ExampleWellformedness for oots [isa-002A]
- December 3, 2025
- Liam O'Connor
We define well, an inductive wellformedness predicate for oots sequences, that state there are no segments of zero length, and that no two adjacent segments have the same oot value.
Theoremcompress_expand [isa-002B]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
DefinitionList subsequence relation [isa-002C]
- December 3, 2025
- Liam O'Connor
TheoremReflexivity of subsequence [isa-002D]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
TheoremLength of subsequence [isa-002E]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Controlling backtracking, chaining methods with comma [isa-002F]
- December 3, 2025
- Liam O'Connor
Some methods (like erule when there are multiple matching assumptions) are nondeterministic, producing multiple alternative proof states.
The back command interactively explores a different alternative branch produced by the previous step.
This is useful for interactive exploration, but is very brittle and considered poor style.
Instead, we can combine methods with the comma operator ,: The command apply (m1, m2) first runs m1, and then runs m2, accepting only the nondeterministic branches where the second method m2 succeeds. This avoids the need for back:
Repeating methods with + [isa-002G]
- December 3, 2025
- Liam O'Connor
For a method m:
Repeatedly applies the m as many times as possible until it fails. It stops automatically when m can no longer make progress; and does not backtrack.
TheoremAntisymmetry of subsequence [isa-002H]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Generalising the induction hypothesis with arbitrary [isa-002I]
- December 3, 2025
- Liam O'Connor
By default, structural induction induct t produces an induction hypothesis for the variables directly mentioned in t, and rule induction induct rule: p.induct produces a hypothesis for the variables directly mentioned by the eliminated p assumption.
Sometimes you need a stronger hypothesis that generalises across additional variables in the goal. The arbitrary option tells the induct method to generalise certain variables, so the induction hypothesis assumes the property holds for all values of those variables.
ExampleInequality as an inductive [isa-002M]
- December 3, 2025
- Liam O'Connor
Proving that this implies the normal inequality relation requires the use of variable generalising:
TheoremTransitivity of subsequence [isa-002J]
- December 3, 2025
- Liam O'Connor
Solution.
- December 3, 2025
- Liam O'Connor
Proof Methodblast, fast, slow, and best [isa-002P]
- December 5, 2025
- Liam O'Connor
blast is a method for automatic classical first-order reasoning, based on a tableaux prover. apply blast attempts a thorough search using sets of intro and elim rules. Like simp, rules can be annotated with [intro] and [elim] annotations, or they can be passed locally to blast (i.e. apply (blast intro: nandI1 nandI2 elim: nandE))
The methods fast, slow, and best use a different classical proof search engine than blast, each with a different proof search strategy. fast performs a quick, depth-bounded search, and is generally faster. slow is a more exhaustive search and more backtracking, and best performs a best-first search strategy using a heuristic based on the size of the goal. In general, if fast or blast can solve your goal, it will be the most efficient at solving it, whereas slow and best are only used if no other automated technique works.
Safe vs Unsafe Rules [isa-002O]
- December 5, 2025
- Liam O'Connor
Rules such as conjI, impI, or disjE that cannot change a provable goal into unprovable goal(s) are called safe. Isabelle's automation strategies like safe rules because they can apply them without fear, or the need for backtracking. You can mark a rule as safe by marking it [intro!] or [elim!]. This can also be done locally when invoking methods like blast, fast, slow, and best.
Proof Methodsafe and clarify [isa-002Q]
- December 5, 2025
- Liam O'Connor
The method safe applies only safe rules to the current goal. The method clarify is similar, but it only applies safe rules that do not split the goal into multiple subgoals. Like blast etc., rules can be added to these methods with intro!: etc.
Proof Methodclarsimp, slowsimp, bestsimp and fastforce [isa-002R]
- December 5, 2025
- Liam O'Connor
Proof Methodforce and auto [isa-002S]
- December 5, 2025
- Liam O'Connor
force is a very thorough proof search that can often solve goals other methods can't. It can be thought of as a very thorough version of blast combined with simp. The method auto, by contrast, is a more lightweight search that attempts to simulateneously solve all goals, rather than just the first one. Unlike the other automated methods, auto will leave behind goals that it is unable to prove.
Because the behaviour of auto differs greatly between Isabelle versions and is very sensitive to what theories are loaded, it's considered bad style to use auto as anything but the final step in a proof, but it can nonetheless be useful to see what goals auto outputs to see where it's getting stuck.
try and the famous Isabelle sledgehammer. [isa-002T]
- December 5, 2025
- Liam O'Connor
Isabelle includes a feature called the sledgehammer that invokes external proof search procedures (such as SMT solvers) and provides them with lemmas that appear to be relevant. If the tools find a proof, it can often replay them in Isabelle's proof kernel, giving an Isabelle proof that matches what the external proof tool found.
To invoke this procedure on a goal, searching automatically for related lemmas, type the word try in an open subgoal.