Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

From Pen-and-Paper to Machine-Checked Proofs: Lean for System Identification

Lean 4 proofs can check a system identification lemma and expose a gap

  • Problem Proofs in system identification often run for pages and skip routine steps about limits and convergence. Reviewers rarely recheck each line, so gaps and errors can reach the published literature.
  • Method Lean 4 is an interactive proof assistant that writes theorems and proofs as code. Its small kernel checks every step, so the reader only needs to trust the kernel and the statement.
  • Results Formalizing Ljung's inverse-filter lemma shows its claim holds almost surely, not for every realisation. A simple counterexample shows the condition cannot be dropped.

Why unchecked steps matter in system identification proofs

Proofs in system identification and control often run for pages, mixing matrix inequalities, probabilistic arguments and asymptotic analyses. Authors condense delicate steps about limits, expectations or modes of convergence for readability, for lack of space, or simply by oversight. Refereeing such proofs in detail is demanding, so implicit assumptions, gaps and imprecisions still reach the published literature.

Occasional outright errors reach the literature too, which is why a second, mechanical check matters.

A small, trusted program, the so-called kernel, checks every step of that formal proof.

The control community has explored these tools as well, with proofs in Coq, KeYmaera X and Lean. In system identification, the authors know of no such effort reported to date.

The paper uses Ljung's lemma on the inversion of the noise filter as a test case. Formalizing it in Lean requires each condensed routine step to be justified, even though Ljung's proof omits them. The formalization shows that the claim holds almost surely, not for every realisation. Lean's kernel doesn't need trust in the author, only in the kernel and in the statement itself.

How a Lean proof is read

Lean 4 treats a statement as a type and a proof as a term of that type, so checking a proof means checking that the term has the claimed type. The kernel performs this check mechanically, so the reader doesn't need to trust whoever or whatever wrote the proof. The user only needs to trust the kernel, and to make sure the formal statement matches the intended claim.

Most proofs are written in tactic mode, where a sequence of commands transforms the current goal. Lean reports No goals once the original statement is proven, which is the signal that the proof is complete.

Lean proofs typically build on established results, such as theorems already proved in Mathlib, instead of re-deriving known facts. The first example proves 0 < 1 − ρ from the hypothesis ρ < 1 in a single call to linarith. The tactic state lists the assumptions, such as ρ : R and h : ρ < 1, above the turnstile symbol ⊢. The same result can be obtained by rewriting the goal with sub_pos and then closing it with exact h.

The rewrite matches the left-hand side of the equivalence against the goal, so a and b need not be written out.

Placing sorry closes any goal, but Lean then warns that the declaration uses sorry. The #print axioms command lists the axioms a theorem depends on, which exposes any sorry. Those three standard axioms mean there are no incomplete steps or custom axioms.

Checking proofs is handled by Lean's kernel, so a reader doesn't need to re-check each line by hand. The kernel only checks proofs, not statements, so a formally valid proof can still prove a different claim. The authors reviewed the statements in this paper against the original results.

Identifiability needs a nonzero regressor

Identifiability from one data point asks whether equal outputs force equal parameters. The paper's pen-and-paper proof has two directions: a zero regressor destroys identifiability, and a nonzero regressor allows cancellation. Without sufficient excitation, the data don't determine the parameters uniquely, so the system is unidentifiable.

Lean defines Identifiable as a proposition, so the statement is a checkable object rather than an informal phrase. The theorem identifiable_iff_PE splits the equivalence into its two implications with the constructor tactic. In the only-if direction, a zero regressor lets θ1 = 0 and θ2 = 1 give the same output, so identifiability yields 0 = 1.

The tactic norm_num then refutes 0 = 1, which closes that branch. In the if direction, the nonzero regressor is cancelled with the Mathlib lemma mul_left_cancel0.

The estimator_exact theorem takes the nonzero hypothesis as an explicit input. Lean defines division for every real number, with y/0 equal to 0. Under zero excitation, the estimate 0/0 equals 0 whatever θ is, so the claim would be false. The proof substitutes the data and then calls field_simp, which may cancel φ1 only because hφ is in context.

Lean therefore forces the persistent excitation condition into the statement, and the only-if part shows it can't be dropped.

Invariance of an interval

The section asks how an induction argument for interval invariance becomes Lean code, using a scalar system with a coefficient a. Lemma 3 states that for x_{k+1} = a x_k with |a| ≤ 1, any interval R := [−r, r] is invariant. The pen-and-paper proof works by induction, bounding |x_{k+1}| by |a||x_k|, then by |x_k|, and finally by r. The base case uses the assumption x_0 ∈ R, so |x_0| ≤ r holds directly.

The Lean version splits the argument into a one-step claim and an induction over k. The one-step claim, interval_invariant, takes a, r and x with the hypotheses |a| ≤ 1 and |x| ≤ r. Its calc chain rewrites |ax| as |a| * |x| with abs_mul, then applies mul_le_mul_of_nonneg_right and one_mul. The last step closes the bound with the hypothesis hx, so the chain ends at r.

The trajectory is defined by recursion: traj a x_0 0 returns x_0, and traj a x_0 (k+1) returns a times traj a x_0 k. So traj a x_0 k gives x_k for every k, and the dynamics x_{k+1} = a x_k is built into the definition. The theorem traj_bounded states that if |a| ≤ 1 and |x_0| ≤ r, then |traj a x_0 k| ≤ r for every k. The proof runs by induction on k, with the base case closed by unfolding traj and using h0.

In the successor case, Lean keeps the induction hypothesis ih and must show the bound at k + 1. After unfolding traj, the goal becomes |a * traj a x_0 k| ≤ r, which matches the one-step claim exactly. The proof reuses interval_invariant on traj a x_0 k with the hypotheses ha and ih, so the step closes.

The gap in Ljung's inverse-filter lemma

Ljung's lemma says that if H is stable and 1/H is analytic on |z| ≥ 1, the filter built from the coefficients of 1/H recovers the white noise. Step A builds the convolution identity from the power series of H and 1/H, collecting powers of z with ℓ = k + s. Step B then rewrites a double sum of the noise and uses that identity to obtain e(t).

The step that stalls in Lean is the second equality in Step B, which swaps the order of an infinite double sum. The original sum adds the terms row by row, over s and then over k, while the rearranged sum runs along antidiagonals k + s = ℓ. Such a swap needs a justification, and the proof takes it for granted.

For e(t) = 2^{-t}, the filtered signal v(t) is identically zero. The terms of this sequence do not decay in k, because the sequence grows into the past as fast as h̃ decays. Lemma 4 does not exclude such a sequence, so the stated identity fails for some realisations. Lean did not find this counterexample by itself, but it refused to verify the interchange until a justification was supplied.

The authors offer two ways to justify the interchange, and both lead to the same identity. For bounded noise, Fubini's theorem for series applies once the double series converges absolutely, as in condition (8). If |e(t)| ≤ M, the bound X_t ≤ M ‖h̃‖₁ ‖h‖₁ is finite, and the identity holds for every realisation. For white noise with finite variance λ, the bounded-noise hypothesis is too restrictive, because the realisations can be unbounded.

Tonelli's theorem gives E X_t ≤ √λ ‖h̃‖₁ ‖h‖₁, so X_t is finite with probability one for all t.

So the condition holds almost surely for white noise, and the lemma holds with probability one rather than for every realisation. The counterexample shows the condition cannot be dropped, since its sequence is not excluded by the lemma's hypotheses.

What holds for bounded and white noise

The interchange of the double sum in Step B is justified by Fubini's theorem for series, once the double series converges absolutely. The authors write this condition as X_t, the sum of |h̃(k)| |h(s)| |e(t-k-s)| over k and s at least 0, required to be finite. Bounded noise is the first case, and there the condition holds for every realisation.

If |e(t)| is at most M, then X_t is at most M times the ℓ1 norms of h̃ and h, which is finite.

White noise with finite variance λ may have unbounded realisations, so the authors need a weaker argument. By Tonelli's theorem, the expectation of X_t is bounded by √λ times the two ℓ1 norms, using E|e(s)| at most √λ. Because that bound is finite, X_t is finite with probability one for every t in Z. On each such realisation Fubini's theorem applies, so the identity holds with probability one, not for every realisation.

Lemma 5 states the precise form for possibly unbounded noise, with three hypotheses named A1, A2 and A3. A1 requires both H and H⁻¹ to be stable, and A2 requires the series (6) to converge for every |z| at least 1. A3 requires sup over t of E|e(t)| to be finite, which is the uniform first-moment bound the interchange needs. Zero-mean white noise with finite variance λ satisfies A3, because E|e(t)| is at most √λ.

A template for system identification results in Lean

The paper lays out a four-step template for writing a system identification result in Lean 4. The first step declares parameters and data as Lean types, such as a scalar parameter with type R. A parameter vector can be a structure or Fin d to R, and a random signal can be Z to Ω to R on a probability space. The second step defines the model, or its predictor, with def as a function of the parameter.

The paper points to traj in Box 2 and to the filter H(q)e(t) in Lemma_3_1_Ljung.lean as examples.

The third step states the property as a theorem whose proof starts as sorry. Every assumption is a named hypothesis, such as hA1, hA2 and hA3 for (A1) to (A3) of Lemma 5. The fourth step replaces sorry one tactic at a time while reading the goal state.

The template file defines a signal as Z to R, and a model structure as a curried function of θ, u and y. IsIdentifiable states global identifiability: equal predictions for two parameters force the parameters to be equal. For the ARX model, the authors define ARXParams with coefficients a for past outputs and b for past inputs. The predictor arx sums the a-terms over y and the b-terms over u, with the lags t minus 1 minus i.

The pulse function returns one at time s and zero elsewhere, and serves as the test signal of the proof.

The ARX proof first assumes that the two parameter sets give the same predictor, and then compares them coefficient by coefficient. A pulse in y with u equal to zero gives the predicted value minus a_i, which isolates each a_i. A pulse in u with y equal to zero gives the predicted value b_i, which isolates each b_i. The listing proves that the ARX structure is strictly globally identifiable, as stated in Ljung (1999, Sec.

4.6). Lean's kernel checks every such step, but it checks proofs and not whether the statement matches the intended claim.

What still needs human checking

Lean's kernel checks every inference, but it does not check whether the statement it accepts is the intended claim. Kernel checks proofs, not statements, so a formally valid proof can still verify a claim that differs from the theory. The authors must confirm that the formal assumptions and conclusion faithfully represent the intended result.

The kernel is the only part the user needs to trust, since it is widely scrutinised and has independent implementations.

Writing Lean code can be tedious, but step-by-step checking is handled entirely by the kernel. LLMs can help read and write the code, and they can translate arguments into Lean and propose intermediate lemmas. Whether a proof comes from a human or an AI system, the kernel checks it in the same way. Human supervision therefore stays essential to judge whether the formal statement matches the intended result.

The paper's own formalized material is limited to two toy examples, the template case, and one textbook lemma. The code was tested with Lean v4.35.0 and the matching Mathlib release.

Paper info

Authors
Mejari, Manas, Piga, Dario, Forgione, Marco
Venue
arXiv · Preprint
First published
2026-11-13
Added
2026-11-16
Updated
2026-11-13
Version
v1
arXiv
2611.18220
Category
eess.SY · cs.AI
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

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.

Quote from the paper

Mejari, Manas, Piga, Dario, Forgione, Marco (2026). From Pen-and-Paper to Machine-Checked Proofs: Lean for System Identification. arXiv:2611.18220v1. https://arxiv.org/abs/2611.18220v1

BibTeX
@misc{manas2026from,
  title = {{From Pen-and-Paper to Machine-Checked Proofs: Lean for System Identification}},
  author = {Mejari, Manas and Piga, Dario and Forgione, Marco},
  year = {2026},
  eprint = {2611.18220},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18220v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up