Foundations of Machine-Checked Control Theory in Lean
Verification of cyber-physical systems using proof assistants has been limited by the lack of formalized control theory. There is no comprehensive machine-checked library of dynamical systems and control results in Lean.
An open-source Lean library, LeanDynamicalSystems, is built on top of Mathlib to formalize control theory. Lyapunov stability is formalized using neighborhood filters, yielding a theorem covering points and sets across continuous, discrete, and hybrid systems. The small-gain theorem is proved by stating input-output systems as relations without the usual well-posedness assumption. The library is organized into Basic, mathlib, InputOutput, and Stability folders, with Verso-based documentation.
Formalizations of Lyapunov stability theory (including LaSalle's invariance principle for sets and points) and the small-gain theorem are presented, along with definitions of causality, Lp-stability, and passivity. Example verifications include stability of the origin for x'=-rx and finite gain stability of a bounded multiplication operator. Missing topology and ODE lemmas are being upstreamed to Mathlib.
