arXiv:2608.23309cs.PLAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.23309

Hazel Prover: A Classroom Proof Assistant for Learning Structural Induction

Matthew Keenan, Nishant Kheterpal, Jean-Baptiste Jeannin, Cyrus Omar

MATTHEW KEENAN, University of Michigan, USA

NISHANT KHETERPAL, University of Michigan, USA

JEAN-BAPTISTE JEANNIN, University of Michigan, USA

CYRUS OMAR, University of Michigan, USA

Proof assistants offer instant feedback and incremental proof scaffolding to users. Both of these features have long held promise in improving mathematics education in classroom settings, where manual grading is slow and costly, and students often struggle with knowing how to proceed at various points in their proof. In practice, proof assistants have been difficult to deploy effectively in classroom settings due to two main concerns: (i) students struggle to pick up the intricacies of full-scale proof assistants; and (ii) proof assistants provide ineffective assistance in support of student learning, as measured in terms of knowledge transfer to on-paper assessments without the tool.

We present Hazel Prover, a classroom proof assistant for teaching equational and inductive reasoning about programs with a design informed by a set of criteria encompassing ease-of-use of the tool, student engagement with the underlying mathematical ideas, knowledge transfer to pen-and-paper proof, and classroom logistics. We synthesized these criteria from observations made in prior deployments of proof assistants to the classroom.

We engaged in an iterative design and evaluation process, deploying Hazel Prover in two different classes and conducting distinctively in-depth analyses of fine-grained usage logs, survey data, and student exam responses after each deployment. Our analysis demonstrates that students were able to learn to use the tool effectively after a brief initial exploratory period, and that students became more capable with the mechanics of inductive proof as they progressed through problems. However, the first design iteration did not effectively achieve transfer to pen-and-paper proofs. We hypothesized from our analyses that this was due to the tool offering too much assistance to students in the equational reasoning steps. Based on this negative result, we enforced more manual student engagement with equational steps effective transfer in the second deployments. We believe that our analyses offer generalizable insights relevant to the designers of future classroom proof assistants for a variety of mathematical domains.

1 Introduction

Learning to write detailed proofs is a central goal of many mathematics and computing courses. Traditionally, students write their proofs on paper and submit their attempts to graders for feedback. Paper proofs, however, impose several well-attested barriers to students developing a good mental model of what constitutes a correct proof. Graders are often inconsistent [Miller et al., 2018, Moore, 2016], students rarely look at slow grader feedback unless explicitly asked to [Byrne et al., 2018], and while students can often correctly revise the proof in response to feedback they often fail to correctly explain why they needed to revise the proof [Byrne et al., 2018, Stylianides et al., 2017]. This is all a far cry from the immediate, specific feedback a student receives from a compiler.

These observations have tempted many instructors to consider introducing proof assistants into the classroom. Full-scale proof assistants such as Lean [de Moura and Ullrich, 2021] and Rocq (previously Coq) [Coq Development Team, 2024] offer a much tighter feedback cycle, but in the classroom setting, they create extra barriers to students' writing the proofs, and then learning to prove independent of the tool. In particular, they impose a much higher syntactic and semantic burden, where students must become familiar with the linguistic intricacies of the proof assistant.

∗^{*}In submission to OOPSLA 2026.

Authors' Contact Information: Matthew Keenan, mckeenan@umich.edu, University of Michigan, Ann Arbor, USA; Nishant Kheterpal, nskh@umich.edu, University of Michigan, Ann Arbor, USA; Jean-Baptiste Jeannin, jeannin@umich.edu, University of Michigan, Ann Arbor, USA; Cyrus Omar, comar@umich.edu, University of Michigan, Ann Arbor, USA.

Keenan et al.

hazel / scratch ✓ / scratchpad 1 ✓

let length = fun x -> case x | [] => 0 | x::xs => length(xs) + 1 end in

let echo = fun x -> case x | [] => [] | x::xs => x::x::echo(xs) end in

theorem double_length = forall xs:[Int] -> length(echo(xs)) == 2 * length(xs) in

echo([1,2,3])

= [1, 1, 2, 2, 3, 3]

Proof of theorem double_length incomplete

= <length> (<echo> (xs)) == 2 * <length> (xs) Induction on: xs

Case [] : assume xs == []

= <length> (<echo> []) == 2 * <length> [] apply function

= <length> [] == 2 * <length> [] apply function

= 0 == 2 * <length> [] apply function

= 0 == 2 * 0 arithmetic

= 0 == 0 reflexivity

= true

Case x::xs : assume length(echo(xs)) == 2 * length(xs)

= <length> (<echo> (x::xs)) == 2 * <length> (x::xs) apply function

= <length> (x::x::<echo> (xs)) == 2 * <length> (x::xs) apply function

= <length> (x::<echo> (xs)) + 1 == 2 * <length> (x::xs) apply function

= <length> (<echo> (xs)) + 1 + 1 == 2 * <length> (x::xs) ih

= 2 * <length> (xs) + 1 + 1 == 2 * <length> (x::xs) algebra

= 2 * (<length> (xs) + 1) == 2 * <length> (x::xs)

Take Step ▼ Algebra ▼ Assumptions ▼ Cases/Induction

4

From: length(x::xs) Take a step to: length(xs) + 1

exhaustive

= true

Check

r

EXP / Application : Int equals expected type

1

2

Fig. 1. An overview of the user interface of Hazel Prover showing: (1) an editor to write programs and theorems and see evaluation results, (2) space to prove theorems interactively, (3) a selection in the current goal of the theorem, (4) buttons representing possible next steps of the proof involving the given selection, and (5) the rewrite editor where students can propose rewrites of the current selection.

and its associated tooling [Mahinpei et al., 2025]. This creates a steep learning curve, and would require teachers to devote significant class time to teaching just the proof assistant itself. This would only be acceptable in classes where learning to use a theorem prover itself is a learning goal.

In addition, full-scale proof assistants in classrooms have been observed to leave students unable to transfer their knowledge to pen-and-paper, i.e. to produce the same reasoning steps, which is critical for exam-based assessment [Böhne and Kreitz, 2018, Knobelsdorf et al., 2017]. The automation of certain tasks in full-scale proof assistants could be trivializing the reasoning that students need to spend time practicing.

Given these issues, there has been a long tradition of special-purpose proof assistants designed specifically for the classroom (with recent surveys by Keenan and Omar [2024] and Minh et al. [2025b]). In this paper, we focus on classroom proof assistants specialized for learning step-by-step equational and inductive reasoning about typed functional programs. We review two other tools with similar goals [Lodder et al., 2020, Xu and Drossopoulou, 2019] and the broader space of classroom proof assistants, including for domains that we do not target such as natural deduction style derivations and real analysis, in Section 5. Although prior efforts have reported some success, as far as we are aware, prior work has not thoroughly investigated whether special-purpose classroom proof assistants like these suffer from the same transfer problems as full-scale proof assistants.

In this paper we introduce Hazel Prover, or simply the Prover. It is implemented as an extension to Hazel, a live typed functional programming environment [Omar et al., 2019]. An overview of the Prover interface is given in Figure 1. We explain the design goals in detail in Section 2 and the Prover implementation in detail in Section 3. In brief, students (or instructors) can interleave functional programs and theorem specifications inside Hazel's live functional programming environment (rather than relying on instructor-provided axiomatizations of function definitions in the two closely related tools). Specifications introduced with the theorem keyword appear at the bottom of the screen as proof obligations. Students interact with these proof obligations by highlighting sub-expressions and choosing whether to rewrite the expression or perform an induction. Rewrites can be evaluation steps (in the tradition of single-step evaluators like DrScheme [Clements et al., 2001]), algebraic steps, or applications of equational assumptions or lemmas previously added to the context. As students write the proof, they are syntactically manipulating only the program syntax. There is no syntax specific to the proof assistant itself; all other proof logic is expressed via a graphical user interface. We claim that this design leads to a proof interface that not only requires minimal special training for students to pick up, but also closely follows the format and engagement pattern of proofs students write on paper in programming languages and formal methods courses.

We engaged in an iterative design process by deploying Hazel Prover to two related programming languages courses in consecutive semesters, the first targeting upper-level undergraduates and the second early-stage graduate students (who had minimal experience with the ideas being taught). Both courses were taught by the same instructor, who taught the material relevant to this paper in substantially the same way. After each deployment, we conducted a distinctively thorough analysis of fine-grained usage logs, survey data, and exam data to understand the detailed time course of student learning, both of the tool itself and of the mathematical skills we hope students will master, both in situ and when asked to transfer their knowledge to an on-paper exam (Section 4).

After finding in our first deployment that both students’ self-reported confidence in writing proofs without the tool, and their scores on the on-paper exams, were lower than we had hoped (and had observed in previous semesters where all instruction was on-paper), we iterated on the design. In particular, the biggest change was that in the second iteration, students had to explicitly write out evaluation steps instead of simply clicking possibly reducible sub-expressions. This increase in the required engagement with the tool substantially improved transfer, leaving students able to

Keenan et al.

complete pen-and-paper proofs on exams as effectively as in previous semesters, despite having practiced the ideas exclusively using Hazel Prover without the need for costly manual grading.

This paper makes both specific and generalizable contributions to the field of classroom proof assistants. The specific contributions are the design, implementation, and evaluation of Hazel Prover, the first classroom theorem prover that has been empirically established to enable student learning of step-by-step equational and inductive reasoning about functional programs in a manner that has been demonstrated through classroom deployments to be quick to learn, to support student learning of the underlying formal skills over the span of a few practice problems, and to support student knowledge transfer to on-paper proofs like those that would appear on exams. Hazel Prover itself is likely to be of interest to instructors from the programming languages and formal methods research communities, and it has been designed to support practical deployments today.

The generalizable contributions include a set of learner-centered design goals that can help guide the design of classroom theorem provers in other domains, a demonstration of how fine-grained log analysis, e.g. of backtracking behavior, can help instructors understand the time course of student learning of individual skills relevant to individual milestones within a proof, and non-obvious lessons about the extent to which even small amounts of seemingly tedium-saving automation can lead to dramatic transfer failures. We conclude with a discussion of these and other lessons from our study, and potential directions for future work.

References (20)