Lean software helps verify math proofs in system identification research
From Pen-and-Paper to Machine-Checked Proofs: Lean for System Identification
Artificial Intelligence
Summary
Mathematical proofs in scientific research can be very long and complicated, making them hard to check for mistakes. The authors show how a software tool called Lean can write and check each step of these proofs automatically to ensure they are correct. They use examples from system identification, a control engineering field, to explain how this works. They also find that checking proofs carefully with Lean reveals subtle details that could be missed in traditional papers. Their work shows how using Lean can improve the reliability of math proofs in this area.
What this means in practice
- •For control systems engineers: Use Lean to formally verify proofs in system identification to ensure correctness and reveal subtle assumptions.
- •For mathematical software developers: Incorporate Lean-based formal proof verification into tools for automated checking of scientific papers in applied mathematics fields.
Authors
Manas Mejari, Dario Piga, Marco Forgione
Abstract
Mathematical proofs in scientific papers are often long and intricate, relying on chains of references to earlier results. This makes it difficult for readers and reviewers to verify each and every step. Interactive theorem proving offers a complement: the theorem and its proof are written as code, and every inference is checked by a small, trusted piece of software called the kernel. This paper serves as an introduction to the Lean 4 proof assistant for a system identification and control audience, assuming no prior exposure to formal methods. We first show how a Lean proof is read using two elementary examples: the first on identifiability, the second on set invariance. We then illustrate how Lean can be used to analyse results from the literature, taking as example a classic lemma on the inversion of the noise filter in prediction-error identification (Ljung, 1999, Lemma 3.1). Since in Lean every step must be justified, the formalization brings to light a subtle point: the original claim of that lemma holds almost surely, although not for every realisation, as its statement may suggest. A simple counterexample makes this concrete. Finally, the paper discusses guidelines and perspectives on the use of Lean in system identification research.