Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions LeanPool/HilbertInvariantSubspace.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/-
Copyright (c) 2026 Anthropic, PBC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Claude (Anthropic)
-/


-- Modified for Lean Pool.

module

public import LeanPool.HilbertInvariantSubspace.Solution

/-!
# A counterexample to the invariant subspace problem on ℓ²

Source: url:https://github.com/anthropics/formal-math/blob/6bb031d7ecd6f25331359cd20e5d4333f389da9b/isp-hilbert-spaces/paper.pdf
Authors: Claude (Anthropic)
Status: verified
Main declarations: `HilbertInvariantSubspace.exists_no_invariant_subspace`,
`HilbertInvariantSubspace.not_ISP`, `HilbertInvariantSubspace.exists_on_separable_hilbert_space`
Tags: hilbert-spaces, operator-theory, invariant-subspaces
MSC: 47A15, 46C05
-/

/-!
## Attribution

The imported proof and the paper it quotes are Copyright 2026 Anthropic, PBC, and
released under Apache 2.0. The upstream NOTICE credits proofs from Mathlib tracked in
the block splitting, slot estimates, polynomial multipliers, and Hilbert basis arguments.
Those acknowledgments are retained at the corresponding proofs. The paper credits
the construction discussed in Y. Xie, arXiv:2610.17090, Section 9.4.3, as inspiration.

Upstream notice:
https://github.com/anthropics/formal-math/blob/6bb031d7ecd6f25331359cd20e5d4333f389da9b/isp-hilbert-spaces/NOTICE
-/
497 changes: 497 additions & 0 deletions LeanPool/HilbertInvariantSubspace/Blocks.lean

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions LeanPool/HilbertInvariantSubspace/Construction.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
/-
Copyright (c) 2026 Anthropic, PBC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Claude (Anthropic)
-/

-- SPDX-License-Identifier: Apache-2.0
-- Modified for Lean Pool.

module

public import LeanPool.HilbertInvariantSubspace.Lemma2
public import LeanPool.HilbertInvariantSubspace.Tower

/-!
# Construction (paper, §4 "The construction")

Paper, §4 (condensed): "Let K_0 = ℂ, T_0 = 0, τ_0 = µ_0 = 1. Given the block (K_n, T_n) and µ_0,
…, µ_n, choose
L_n = L(T_n), then 0 < τ_{n+1} ≤ τ_n/2 with γ_{n+1} := 24 L_n τ_{n+1} ≤ 2^{−n−3} min(µ_0, …,
µ_n), then, by
Lemma 3.2, K_{n+1} = K_n^D, T_{n+1} = S, µ_{n+1} = µ. The hypothesis of Lemma 3.2 holds at each
step by induction:
‖T_n‖ + τ_{n+1} ≤ Σ_{1≤m≤n+1} τ_m < 1. For m > n, γ_m ≤ 2^{−m−2} µ_n, so Σ_{m>n} γ_m ≤ µ_n/4. (2)
Embed K_{m−1} ⊂ K_m isometrically by b ↦ ([b]_0 + [b]_{D−1})/√2; then
V±_m b = b (b ∈ K_{m−1}), ½ Σ± ‖V±_m v‖² = ‖v_0‖² + ‖v_{D−1}‖² ≤ ‖v‖² (v ∈ K_m). (3)"

Lean: `baseLevel` is `(ℂ, 0)` with `τ_0 = µ_0 = 1`; `Level.exists_next` performs one step of the
recursion
(choosing `τ_{n+1} = min(τ_n/2, 2^{−n−3} min(µ_0..µ_n) / (24 L_n))` and applying `lemma2`);
`levelSeq`
iterates it with `Classical.choice`; `tower` packages the result as an
`HilbertInvariantSubspace.Tower`, verifying each of
that record's fields from Lemma 3.2 and the identities of `Slots.lean` (`Vminus_Vmap`,
`pyth_V`,
`inner_sepOp_V`, …). The invariant carried through the recursion is `‖T_n‖ + τ_n ≤ 1` together
with the
running minimum `µmin_n = min(µ_0, …, µ_n)`.
-/

@[expose] public section

open Polynomial Module
open scoped InnerProductSpace

noncomputable section

namespace HilbertInvariantSubspace

/-- One level `(K_n, T_n)` of the recursion with its constants `τ_n, µ_n` and the running minimum
`µmin_n = min(µ_0, …, µ_n)`; invariant `‖T_n‖ + τ_n ≤ 1`. -/
structure Level where
/-- The finite-dimensional Hilbert space at the level. -/
K : Type
[nacg : NormedAddCommGroup K]
[ips : InnerProductSpace ℂ K]
[fd : FiniteDimensional ℂ K]
/-- The cyclic nilpotent operator on the level space. -/
T : K →L[ℂ] K
/-- The length of the cyclic nilpotent block. -/
q : ℕ
one_le_q : 1 ≤ q
block : IsBlock T q
/-- The positive tolerance reserved for the next perturbation. -/
τ : ℝ
/-- The positive lower bound in the reach estimate at this level. -/
μ : ℝ
/-- The smallest reach bound through this level. -/
μmin : ℝ
τ_pos : 0 < τ
μ_pos : 0 < μ
μmin_pos : 0 < μmin
μmin_le : μmin ≤ μ
norm_T : ‖T‖ + τ ≤ 1

attribute [instance] Level.nacg Level.ips Level.fd

/-- Paper: "K_0 = ℂ, T_0 = 0, τ_0 = µ_0 = 1". -/
def baseLevel : Level where
K := ℂ
T := 0
q := 1
one_le_q := le_rfl
block := by
refine isBlock_of_cyclic (x0 := (1 : ℂ)) (Module.finrank_self ℂ) (by simp) fun ξ => ⟨C ξ, ?_⟩
rw [aeval_C, Algebra.algebraMap_eq_smul_one]
simp
τ := 1
μ := 1
μmin := 1
τ_pos := one_pos
μ_pos := one_pos
μmin_pos := one_pos
μmin_le := le_rfl
norm_T := by simp

/-- The data joining level `n` to level `n + 1`: the embedding, `V∓`, and the conclusions of
Lemma 3.2
with `τ = τ_{n+1}`, plus the paper's choice of `τ_{n+1}`. -/
structure Link (n : ℕ) (a b : Level) where
/-- The isometric embedding from the current space into the next. -/
V : a.K →ₗᵢ[ℂ] b.K
/-- The first signed coordinate map back to the current space. -/
Vm : b.K →L[ℂ] a.K
/-- The last signed coordinate map back to the current space. -/
Vp : b.K →L[ℂ] a.K
τ_half : b.τ ≤ a.τ / 2
γ_le : 24 * Lconst a.T * b.τ ≤ (1 / 2) ^ (n + 3) * a.μmin
μmin_eq : b.μmin = min a.μmin b.μ
inter : ∀ v : a.K, ‖b.T (V v) - V (a.T v)‖ ≤ b.τ * ‖v‖
aeval_le : ∀ p : ℂ[X], ‖aeval b.T p‖ ≤ ‖aeval a.T p‖ + ell p * b.τ
Vm_V : ∀ v : a.K, Vm (V v) = v
Vp_V : ∀ v : a.K, Vp (V v) = v
pyth : ∀ v : b.K, (‖Vm v‖ ^ 2 + ‖Vp v‖ ^ 2) / 2 ≤ ‖v‖ ^ 2
reach : ∀ v w : b.K, ‖v‖ ≤ 2 → ‖w‖ ≤ 2 → 1 / 2 ≤ ‖Vm v‖ → 1 / 2 ≤ ‖Vp w‖ →
∃ A ∈ I1 b.T, b.μ ≤ (⟪w, A v⟫_ℂ).re
split : ∀ Ap Am : a.K →L[ℂ] a.K, Ap ∈ I1 a.T → Am ∈ I1 a.T →
∃ G ∈ I1 b.T, ∀ v w : b.K,
‖⟪w, G v⟫_ℂ - (⟪Vp w, Ap (Vp v)⟫_ℂ + ⟪Vm w, Am (Vm v)⟫_ℂ) / 2‖
≤ 24 * Lconst a.T * b.τ * ‖v‖ * ‖w‖
rank_lt : finrank ℂ a.K < finrank ℂ b.K

/-- Paper, §4: "Given the block (K_n, T_n) … choose … τ_{n+1} … then, by Lemma 3.2, K_{n+1} =
K_n^D,
T_{n+1} = S, µ_{n+1} = µ. The hypothesis of Lemma 3.2 holds at each step by induction." -/
theorem Level.exists_next (a : Level) (n : ℕ) : Nonempty (Σ b : Level, Link n a b) := by
have hL := one_le_Lconst a.T
have hτ := a.τ_pos
have hμ := a.μmin_pos
-- "choose … 0 < τ_{n+1} ≤ τ_n/2 with 24 L_n τ_{n+1} ≤ 2^{−n−3} min(µ_0..µ_n)"
set τ' : ℝ := min (a.τ / 2) ((1 / 2) ^ (n + 3) * a.μmin / (24 * Lconst a.T)) with hτ'
have hτ'0 : 0 < τ' := lt_min (by positivity) (by positivity)
have hτ'1 : τ' ≤ a.τ / 2 := min_le_left _ _
have hτ'2 : 24 * Lconst a.T * τ' ≤ (1 / 2) ^ (n + 3) * a.μmin := by
have := min_le_right (a.τ / 2) ((1 / 2) ^ (n + 3) * a.μmin / (24 * Lconst a.T))
rw [le_div_iff₀ (by positivity)] at this
linarith
have hn : ‖a.T‖ + τ' ≤ 1 := by linarith [a.norm_T]
-- Lemma 3.2
obtain ⟨d, hd2, S, μ', hμ', hblock, ha, hS1, hreach, hsplit⟩ :=
lemma2 a.T a.q a.block a.one_le_q τ' hτ'0 hn
have hd1 : 1 ≤ d := by omega
have ht1 : ‖a.T‖ ≤ 1 := by linarith
have hx1 : ‖lift d a.T‖ ≤ 1 := (norm_lift_le _).trans ht1
let b : Level :=
{ K := Pw d a.K, T := S, q := a.q * (d + 1), one_le_q := by nlinarith [a.one_le_q]
block := hblock, τ := τ', μ := μ', μmin := min a.μmin μ', τ_pos := hτ'0, μ_pos := hμ'
μmin_pos := lt_min hμ hμ', μmin_le := min_le_right _ _
norm_T := by
have := norm_le_norm_add_norm_sub' S (lift d a.T)
have := norm_lift_le (d := d) a.T
linarith [a.norm_T] }
refine ⟨⟨b, ⟨⟨(Vmap d a.K).toLinearMap, norm_Vmap hd1⟩, Vminus d a.K, Vplus d a.K,
hτ'1, hτ'2, rfl, ?_, ?_, ?_, ?_, ?_, hreach, ?_, ?_⟩⟩⟩
· -- inter: ‖S(Vb) − V(Tb)‖ = ‖(S − T⊗1)(Vb)‖ ≤ τ‖b‖
intro v
change ‖S (Vmap d a.K v) - Vmap d a.K (a.T v)‖ ≤ τ' * ‖v‖
rw [← lift_Vmap, ← sub_apply]
refine ((S - lift d a.T).le_opNorm _).trans ?_
rw [norm_Vmap hd1]
exact mul_le_mul_of_nonneg_right ha (norm_nonneg _)
· -- aeval_le: ‖p(S)‖ ≤ ‖p(T ⊗ 1)‖ + ell p ‖S − T ⊗ 1‖
intro p
have h1 := norm_le_norm_add_norm_sub' (aeval S p) (aeval (lift d a.T) p)
have h2 := norm_aeval_sub_le S (lift d a.T) hS1 hx1 p
have h3 : ‖aeval (lift d a.T) p‖ ≤ ‖aeval a.T p‖ := by
rw [aeval_lift]; exact norm_lift_le _
have h4 := mul_le_mul_of_nonneg_left ha (ell_nonneg p)
change ‖aeval S p‖ ≤ ‖aeval a.T p‖ + ell p * τ'
linarith
· exact fun v => Vminus_Vmap hd1 v
· exact fun v => Vplus_Vmap hd1 v
· exact fun v => pyth_V hd1 v
· -- split, in bilinear form
intro Ap Am hAp hAm
obtain ⟨G, hG, hGn⟩ := hsplit Ap Am hAp hAm
refine ⟨G, hG, fun v w => ?_⟩
change ‖⟪w, G v⟫_ℂ - (⟪Vplus d a.K w, Ap (Vplus d a.K v)⟫_ℂ +
⟪Vminus d a.K w, Am (Vminus d a.K v)⟫_ℂ) / 2‖ ≤ 24 * Lconst a.T * τ' * ‖v‖ * ‖w‖
rw [← inner_sepOp_V hd1, ← inner_sub_right, ← sub_apply]
refine (norm_inner_le_norm _ _).trans ?_
have := (G - sepOp d Ap Am).le_opNorm v
have h2 : ‖G - sepOp d Ap Am‖ * ‖v‖ ≤ 24 * Lconst a.T * τ' * ‖v‖ :=
mul_le_mul_of_nonneg_right hGn (norm_nonneg _)
nlinarith [norm_nonneg w, norm_nonneg v]
· -- rank
change finrank ℂ a.K < finrank ℂ (Pw d a.K)
rw [finrank_Pw, a.block.finrank_eq]
nlinarith [a.one_le_q]

/-- The levels, by recursion with choice. -/
def levelSeq : ℕ → Level
| 0 => baseLevel
| n + 1 => (Classical.choice ((levelSeq n).exists_next n)).1

/-- The links between consecutive levels. -/
def linkSeq (n : ℕ) : Link n (levelSeq n) (levelSeq (n + 1)) :=
(Classical.choice ((levelSeq n).exists_next n)).2

theorem μmin_le_μ (k n : ℕ) (h : k ≤ n) : (levelSeq n).μmin ≤ (levelSeq k).μ := by
induction n with
| zero =>
obtain rfl : k = 0 := Nat.le_zero.mp h
exact (levelSeq 0).μmin_le
| succ n ih =>
rcases Nat.lt_or_eq_of_le h with h1 | rfl
· have : (levelSeq (n + 1)).μmin = min (levelSeq n).μmin (levelSeq (n + 1)).μ :=
(linkSeq n).μmin_eq
rw [this]
exact (min_le_left _ _).trans (ih (Nat.lt_succ_iff.mp h1))
· exact (levelSeq (n + 1)).μmin_le

/-- **The Construction** of the paper, packaged as a `Tower` (see `Minimal/Tower.lean`). -/
def tower : Tower where
K := fun n => (levelSeq n).K
T := fun n => (levelSeq n).T
V := fun n => (linkSeq n).V
Vm := fun n => (linkSeq n).Vm
Vp := fun n => (linkSeq n).Vp
τ := fun n => (levelSeq n).τ
μ := fun n => (levelSeq n).μ
τ_pos := fun n => (levelSeq n).τ_pos
μ_pos := fun n => (levelSeq n).μ_pos
τ_zero := rfl
μ_zero := rfl
τ_half := fun n => (linkSeq n).τ_half
γ_le := fun n k hk => (linkSeq n).γ_le.trans
(mul_le_mul_of_nonneg_left (μmin_le_μ k n hk) (by positivity))
norm_T := fun n => by
have := (levelSeq n).norm_T
have := (linkSeq n).τ_half
have := (levelSeq (n + 1)).τ_pos
linarith
inter := fun n => (linkSeq n).inter
aeval_le := fun n => (linkSeq n).aeval_le
Vm_V := fun n => (linkSeq n).Vm_V
Vp_V := fun n => (linkSeq n).Vp_V
pyth := fun n => (linkSeq n).pyth
reach := fun n => (linkSeq n).reach
split := fun n => (linkSeq n).split
rank_lt := fun n => (linkSeq n).rank_lt

theorem exists_tower : Nonempty Tower := ⟨tower⟩

end HilbertInvariantSubspace
22 changes: 22 additions & 0 deletions LeanPool/HilbertInvariantSubspace/Imports.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/-
Copyright (c) 2026 Lean Pool contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Lean Pool contributors
-/
module -- shake: keep-all --deprecated_module: ignore

-- Generated project imports; run `lake exe mk_all`.
public import LeanPool.HilbertInvariantSubspace
public import LeanPool.HilbertInvariantSubspace.Blocks
public import LeanPool.HilbertInvariantSubspace.Construction
public import LeanPool.HilbertInvariantSubspace.Lemma1
public import LeanPool.HilbertInvariantSubspace.Lemma2
public import LeanPool.HilbertInvariantSubspace.Lemma2Reach
public import LeanPool.HilbertInvariantSubspace.Lemma2Setup
public import LeanPool.HilbertInvariantSubspace.Lemma2Split
public import LeanPool.HilbertInvariantSubspace.Limit
public import LeanPool.HilbertInvariantSubspace.Main
public import LeanPool.HilbertInvariantSubspace.Slots
public import LeanPool.HilbertInvariantSubspace.Solution
public import LeanPool.HilbertInvariantSubspace.Statement
public import LeanPool.HilbertInvariantSubspace.Tower
Loading
Loading