arXiv · 2611.36474
A Verified Implementation of the L*-Algorithm in Lean
Abstract
Angluin's L*-algorithm learns the minimal deterministic finite automaton (DFA) of an unknown regular language from membership and equivalence queries to a teacher. It underpins active automata learning, yet its correctness guarantees have so far rested on pen-and-paper proofs, separate from the implementations in use. We close this gap for L* using Lean 4, which is both a functional programming language and an interactive theorem prover: we implement L* in the Minimally Adequate Teacher framework and prove its properties directly about the executable code. We establish two results: (1) Termination: for every teacher that answers consistently with a regular language and returns only genuine counterexamples, learning terminates. (2) Minimality and correctness: the learned DFA is never larger than the minimal DFA of that language, and if the teacher answers equivalence queries truthfully, it is isomorphic to that minimal DFA. The result is a single artifact that is both a mechanically checked proof and an executable learner. To the best of our knowledge, this is the first mechanized correctness proof of the classical L*-algorithm.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Dominik Mascherbauer, Bernhard K. Aichernig. 2026-11-26. A Verified Implementation of the L*-Algorithm in Lean. https://arxiv.science/abs/2611.36474
Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite arXiv Science by Indiciae: BibTeX · RIS.