# Formalizing inverse problems in the age of AI: possibilities, pitfalls, and an invitation

> Formalizing classical inverse problems in Lean exposed a textbook theorem with overly restrictive hypotheses and junk-value hazards, showing statement review, not proof checking, is the key bottleneck.

- **Source:** [arXiv](https://arxiv.org/abs/2611.06962)
- **Published:** 2026-11-21
- **Permalink:** https://picx.dev/p/ebsG2W
- **Whiteboard:** https://picx.dev/p/ebsG2W/image

## Summary

## Summary (Overview)

- **AutoIP library**: A Lean 4 library formalizing classical linear regularization theory for inverse problems, built via AI-driven autoformalization with human review of statements (not proofs).
- **Review model**: The paper proposes a middle-ground review process where human reviewers attest that formal statements match their informal counterparts, while proofs are checked only by the Lean kernel.
- **Key finding**: A textbook theorem (abstract convergence theorem) from established literature [14, 8] has a hypothesis far more restrictive than asserted — discovered via automated non-vacuity tests rather than human reading.
- **Junk value hazard**: Mathematical statements can be silently weakened by Lean's total functions returning arbitrary "junk values" outside their intended domains, as illustrated by the Dimension Counting lemma.
- **Invitation**: The authors invite the inverse problems community to extend the library, contribute human attestation of statements, and discuss shared conventions for review, credit, and AI use disclosure.

---

## Introduction and Theoretical Foundation

### Background

The paper begins by noting that on 6 October 2026, OpenAI published over seven hundred mathematical manuscripts produced by an unreleased internal model, with a substantial fraction accompanied by Lean-checked formal proofs. While formal proof was historically extremely expensive (Gonthier noted that formalizing the four color theorem's case analysis was "the easy part" while graph-theoretic arguments "took a few years to sort out" [15]), OpenAI's average result took about three hours of computation.

The historical context traces back to Appel and Haken's 1976 proof of the four color theorem, which raised questions about whether computer-checked arguments constitute proofs at all. John McCarthy's 1962 idea — writing proofs in a language precise enough that a single, small, general-purpose program can check every step — led to systems like Automath (1967), LCF (1972), Coq, and Lean.

### Key Insight

> The correctness of a formal proof does not depend on any code written specifically for that proof. All trust rests on the proof checker... What still requires review is the statement: the checker certifies that a proof establishes its formal statement, not that the formal statement expresses the intended mathematics.

The authors argue that inverse problems are a natural field for formalization because:
- Classical theory rests on functional analysis largely available in Mathlib
- Learned and data-driven regularization methods produce new, less scrutinized theory
- Applied problems span multiple papers with assumptions that "do not quite fit together" — a formal library can check consistency across pieces

### Review Spectrum

The paper situates AutoIP between two extremes:
- **Mathlib**: Large library with slow human review judging both correctness and proof quality
- **Tau Ceti**: Rapid AI-agent review against human-written roadmaps and rubrics

AutoIP proposes a middle ground: human reviewers attest statement correspondence, but proofs are not read.

---

## Methodology

### Library Organization

The library is organized around the review task:
- **Blueprint**: An ordinary LaTeX document containing natural-language statements (called *nodes*), each corresponding to exactly one Lean file (its *specification*)
- **Specifications**: Contain only the formal statement of the node, no proofs
- **Navigation**: A VS Code extension allows clicking between blueprint nodes and formal statements

### Key Definitions and Formulas

**Spectral regularization**: Let $K \in \mathcal{L}(X, Y)$ be compact with singular system $\{(\sigma_n, v_n, u_n)\}_{n \in I}$, and $\kappa := \|K\|^2$. A function $\varphi$ bounded on $[0, \kappa]$ defines a bounded operator:

$$
\varphi(K^*K)x := \sum_{n \in I} \varphi(\sigma_n^2)\langle v_n, x\rangle v_n + \varphi(0)P_{\mathcal{N}(K)}x
$$

The spectral regularization is $R_\alpha := \varphi_\alpha(K^*K)K^*$, with the Tikhonov filter $\varphi_\alpha(\lambda) := (\lambda + \alpha)^{-1}$.

**Example node** (Figure 1):

> **Lemma (Tikhonov solves a regularised normal equation).** Let $y \in Y$ and $\alpha > 0$. For $x \in X$ one has $x = R_\alpha y$ if and only if $(K^*K + \alpha \operatorname{Id})x = K^*y$

Formalized as:

```lean
theorem tikhonov_iff_normal (hs : IsSingularSystem K σ v u) {α : Set.Ioi (0 : R)}
    (y : F) (x : E) :
    x = spectralReg hs tikhonovFilter (tikhonovFilter_exists_bound_on_spectrum hs) α y ↔
    (K.adjoint oL K + ((α : R) : 𝕜) • ContinuousLinearMap.id 𝕜 E) x = K.adjoint y
```

### Moore–Penrose Inverse

The paper describes two formalization attempts. The first (failed) approach defined $T^\dagger$ via the minimum-norm characterization without explicitly making it a linear map:

```lean
noncomputable def moorePenrose (T : E →L[𝕜] F) (y : F) : E :=
  if h : ∃ x, IsMinimumNorm T y x then h.choose else 0
```

The corrected definition packages it as a partially defined linear map:

```lean
noncomputable def moorePenroseLinear [CompleteSpace E] (T : E →L[𝕜] F) :
    mpDomain T →l[𝕜] E where ...

noncomputable def moorePenrose [CompleteSpace E] (T : E →L[𝕜] F) : F →ₗ.[𝕜] E :=
  ⟨mpDomain T, moorePenroseLinear T⟩
```

### Non-Vacuity Obligations

For every statement, two obligations are generated deterministically:
1. Exhibit an instance where the hypotheses **hold**
2. Exhibit an instance where the hypotheses **fail**

These must be proved by AI agents, ensuring no vacuous or always-true statements.

---

## Empirical Validation / Results

### Library Statistics (Table 1)

| Metric | Count |
|---|---|
| Definitions | 51 |
| — cited from Mathlib | 14 |
| — predicates | 15 |
| — constructions | 22 |
| — reviewed by an author | 22 |
| Theorems | 73 |
| — cited from Mathlib | 22 |
| — stated in Lean | 51 |
| — reviewed by an author | 25 |
| Lemmas / corollaries / propositions | 83 / 16 / 5 |
| Lean files (library / tests) | 523 / 152 |
| Lines of Lean (library / tests) | 22 312 / 13 250 |
| Non-vacuity obligations | 503 |

### Key Findings

**1. Junk values weaken statements.** The Dimension Counting lemma (informal): *Let $X$ be a Hilbert space and $U, V \subseteq X$ subspaces with $U$ finite-dimensional and $\dim U < \dim V$. Then $V \cap U^\perp \neq \{0\}$.*

The initial formalization used `Module.finrank` (a natural number that is 0 on infinite-dimensional spaces), making the hypothesis fail for infinite-dimensional $V$. The fix uses cardinal-valued `Module.rank`:

```lean
theorem Submodule.exists_ne_zero_mem_inf_orthogonal_of_rank_lt
    {U V : Submodule 𝕜 E} [FiniteDimensional 𝕜 U]
    (h : Module.rank 𝕜 U < Module.rank 𝕜 V) :
    ∃ v : E, v ≠ 0 ∧ v ∈ V ∧ v ∈ Uᗮ
```

**2. The abstract convergence theorem is degenerate.** For source sets

$$
X_{\nu,\rho} := \{x \in X: \exists w \in X, x = (T^*T)^{\nu/2}w, \|w\| \leq \rho\}
$$

and worst-case error

$$
E(y, \delta) := \sup_{\|y^\delta - y\| \leq \delta} \left\|R_{\alpha(\delta, y^\delta)}y^\delta - T^\dagger y\right\|
$$

the order-optimality condition $E(Tx, \delta) \leq c\delta^{\nu/(\nu+1)}\rho^{1/(\nu+1)}$ for **all** $\rho > 0$ with a fixed $c$ forces the method to return 0 on all data with $\|y^\delta\| \leq \delta$. For a priori parameter choices with linear $R_\alpha$, this means $R_{\alpha_\tau(\delta)} = 0$ for all $\delta$, so convergence requires $T = 0$. The theorem was removed from the library.

**3. AI reviewer disagreements.** When reviewing against Tau Ceti code-quality rubrics, GPT-5.6 Sol raised ~300 objections; Claude Opus 5 acted on ~half and rejected the rest, then raised >450 *new* objections in its own review. After restructuring, three rounds of statement-correspondence reviews found only one mismatch total.

---

## Theoretical and Practical Implications

### For Formal Verification

- **Statements, not proofs, are the risk**: The paper's central thesis is that machine-checked proofs certify only formal statements; the human task is confirming correspondence with intended mathematics.
- **Mechanical tests catch what reading misses**: The degenerate abstract convergence theorem was found by non-vacuity tests, not by human or AI review.
- **Formal proof can diverge from informal proof**: Aligned statements guarantee the *theorem* proved is the intended one, but not that the *proof* follows the informal argument — a gap that can hide errors in the informal reasoning.

### For Inverse Problems

- **Classical theory contains subtle errors**: Even settled literature from [14, 8] contains a theorem whose hypothesis is far more restrictive than stated, and which is applied where it fails (e.g., [8, Thms. 5.9 and 5.11] appeal to the theorem for a priori rules and the discrepancy principle, though only the latter satisfies the hypothesis).
- **Large-scale projects become feasible**: A formal library can hold the pieces of an applied problem (uniqueness, stability, regularization, discretization, convergence) in one place and check that assumptions match across stages.

### For AI-Assisted Mathematics

- **Cost collapse**: A single premium Claude Team seat for three months sufficed for the entire development.
- **Human work shifts, not disappears**: Reviewing statements "requires deciding what was meant, and it is not clear that it becomes cheaper as the models improve."

---

## Conclusion

The paper concludes that formalization offers one of the main benefits for inverse problems: exposing subtle issues in even settled theory. The authors expect that formalizing more recent, less scrutinized work will reveal further problems.

Key takeaways:
1. **Formal proof does not validate informal proofs** — only formal statements
2. **Junk values, bad prose, and vacuous statements** are the main hazards, all found by people or human-designed tests
3. **The human bottleneck is statement review**, which requires mathematical familiarity and Lean reading ability, but no proof-writing experience
4. **Future directions**: Nonlinear problems, variational regularization in Banach spaces, statistical/ML approaches; moving general infrastructure (singular systems, Moore–Penrose inverse) into Mathlib or Tau Ceti

The authors invite contributions via the AutoIP repository (https://github.com/l-oksanen/autoip/discussions) and call for community discussion on shared conventions for review, credit, and AI use disclosure.

---

_Markdown view of https://picx.dev/p/ebsG2W, served by PicX — AI-generated visual whiteboard summaries of research papers._
