TL;DR
This paper introduces the Lean 4 proof assistant to the system identification and control community, demonstrating how "coding" mathematical proofs can eliminate human error. By formalizing a classic lemma from Lennart Ljung’s seminal textbook, the authors discovered that a long-accepted result actually requires a subtle "almost surely" qualification that was missing from the original pen-and-paper statement.
What Problem Does This Paper Address?
Theoretical results in system identification—the field of building mathematical models of dynamical systems from data—often rely on incredibly dense proofs involving matrix inequalities, stochastic processes, and asymptotic limits. Because these proofs are long and space is limited in journals, authors frequently skip "routine" steps or leave assumptions implicit.
This creates a reliability gap: reviewers may struggle to verify every line, and subtle errors or missing conditions can persist in the literature for decades. The authors propose Interactive Theorem Proving (ITP) as a solution. In ITP, proofs are written in a formal programming language and checked by a "kernel"—a small, highly scrutinized piece of software that ensures every single logical inference follows strictly from established axioms.
Methods
The authors utilize Lean 4, a modern functional programming language and theorem prover, along with Mathlib, Lean’s massive library of formalized mathematics.
The paper follows a pedagogical approach:
- Warm-up: They demonstrate basic Lean syntax using "tactic mode," where a user issues commands to transform a mathematical goal until no goals remain.
- Elementary Examples: They formalize two foundational concepts: identifiability (whether a model's parameters can be uniquely determined) and set invariance (whether a system stays within safe bounds).
- The Deep Dive: They attempt to formalize Lemma 3.1 from Ljung (1999), which concerns the inversion of noise filters.
- Template Creation: They provide a four-step workflow (Parameters $\rightarrow$ Model Structure $\rightarrow$ Claim $\rightarrow$ Proof) to help other researchers begin formalizing their own work.
Datasets
Not discussed in the paper. As a theoretical paper focused on formal logic and verification, it does not use empirical datasets or benchmarks in the traditional machine learning sense.
Key Insights and Ideas
- Lean as a "Strict Teacher": The most significant insight came when Lean "refused" to verify a step in Ljung’s proof involving the interchange of an infinite double sum. While a human reader might gloss over this as "obvious," Lean required a formal justification (like Fubini’s theorem).
- The "Almost Surely" Catch: This refusal led the authors to realize that the original lemma statement was technically incomplete. For the proof to hold for white noise, one must assume a first-moment bound. Without it, the identity only holds "almost surely" (with probability one) rather than for every possible realization of noise. They even provided a specific counterexample where the original claim fails.
- AI-Assisted Formalization: Interestingly, the authors noted that they used Claude Code (an AI assistant) to help write the Lean code. This suggests a future where researchers use LLMs to draft formal proofs, while the Lean kernel provides the absolute guarantee of correctness that LLMs currently lack.
Key Results
- Verification of ARX Identifiability: The authors successfully produced a machine-checked proof that Auto-Regressive with Exogenous variables (ARX) models are strictly globally identifiable.
- Correction of the Record: The paper provides a "precise form" of Ljung’s Lemma 3.1 (labeled Lemma 5 in this paper), explicitly stating the three necessary assumptions ($A1$–$A3$) required for the result to be mathematically sound.
- Code Repository: The authors released a GitHub repository containing the Lean code for all examples, providing a foundation for a "Lean for System Identification" library.
Limitations and Future Work
- Learning Curve: The authors acknowledge that Lean is difficult to master for those without a background in formal methods or functional programming.
- Library Gaps: While Mathlib is vast, many specific tools for control theory (like complex frequency-domain analysis or specific stochastic calculus results) are still being built out.
- Future Directions: The authors envision Lean not as a replacement for human intuition, but as a "companion." Future work involves expanding the formalized library to cover more advanced topics like closed-loop identification and nonlinear system analysis.
Summary updated