/- Copyright 2025 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import FormalConjecturesUtil /-! # Köthe conjecture *Reference:* [Wikipedia](https://en.wikipedia.org/wiki/K%C3%B6the_conjecture) -/ @[expose] public section open Ideal TwoSidedIdeal Polynomial open Matrix universe u v w variable {R : Type*} variable [Ring R] namespace Koethe /-- Say a subset `I` of a ring `R` is nilpotent if all its elements are nilpotent. -/ def IsNil {S : Type*} [SetLike S R] (I : S) := ∀ i ∈ I, IsNilpotent i -- TODO(lezeau): add some basic API and already known results for nil ideals variable (R) in /-- The *Kothe Radical* of a ring `R` is the sum of all (two-sided) nil ideals of `R`. Tags: Kothe Radical, upper nilradical-/ def KotheRadical : TwoSidedIdeal R := sSup {I : TwoSidedIdeal R | IsNil I} -- This is often denoted `Nil*(R)` local notation "Nil* " R => KotheRadical R /- ### Basic API for nil ideals -/ /-- A subset of a nil subset is nil. -/ @[category API, AMS 16] theorem IsNil.mono {S : Type*} [SetLike S R] {I J : S} (h : (I : Set R) ⊆ J) (hJ : IsNil J) : IsNil I := fun i hi => hJ i (h hi) /-- The zero two-sided ideal is nil. -/ @[category API, AMS 16] theorem isNil_bot : IsNil (⊥ : TwoSidedIdeal R) := fun x hx => by rw [TwoSidedIdeal.mem_bot] at hx exact hx ▸ IsNilpotent.zero /-- The sum of two nil two-sided ideals is nil. -/ @[category API, AMS 16] theorem IsNil.sup {I J : TwoSidedIdeal R} (hI : IsNil I) (hJ : IsNil J) : IsNil (I ⊔ J) := by intro x hx obtain ⟨a, ha, b, hb, rfl⟩ := TwoSidedIdeal.mem_sup.mp hx obtain ⟨m, hm⟩ := hJ b hb -- Modulo `I`, the element `a + b` is `b`, hence `(a + b) ^ m ∈ I`. have hmem : (a + b) ^ m ∈ I := by have ha' : (a : I.ringCon.Quotient) = 0 := I.ringCon.eq.mpr ha rw [TwoSidedIdeal.mem_iff, ← I.ringCon.eq, RingCon.coe_pow, RingCon.coe_add, ha', zero_add, ← RingCon.coe_pow, hm] obtain ⟨k, hk⟩ := hI _ hmem exact ⟨m * k, by rw [pow_mul, hk]⟩ variable (R) in /-- The Köthe radical is a nil ideal: every element of `Nil* R` is nilpotent. This is a standard fact which does not depend on the Köthe conjecture. -/ @[category API, AMS 16] theorem isNil_kotheRadical : IsNil (Nil* R) := by -- The union of all nil two-sided ideals is itself a nil two-sided ideal. let K : TwoSidedIdeal R := .mk' {x | ∃ I : TwoSidedIdeal R, IsNil I ∧ x ∈ I} ⟨⊥, isNil_bot, TwoSidedIdeal.zero_mem ⊥⟩ (by rintro x y ⟨I, hI, hx⟩ ⟨J, hJ, hy⟩ exact ⟨I ⊔ J, hI.sup hJ, add_mem (TwoSidedIdeal.mem_sup_left hx) (TwoSidedIdeal.mem_sup_right hy)⟩) (by rintro x ⟨I, hI, hx⟩; exact ⟨I, hI, neg_mem hx⟩) (by rintro x y ⟨I, hI, hy⟩; exact ⟨I, hI, I.mul_mem_left _ _ hy⟩) (by rintro x y ⟨I, hI, hx⟩; exact ⟨I, hI, I.mul_mem_right _ _ hx⟩) have hK : IsNil K := fun x hx => by obtain ⟨I, hI, hx⟩ := (TwoSidedIdeal.mem_mk' _ _ _ _ _ _ x).mp hx exact hI x hx refine hK.mono (TwoSidedIdeal.le_iff.mp (sSup_le fun I hI => ?_)) intro x hx exact (TwoSidedIdeal.mem_mk' _ _ _ _ _ _ x).mpr ⟨I, hI, hx⟩ /-- If `L` is a nil left ideal, then so is `L * y` for any `y`. -/ @[category API, AMS 16] theorem IsNil.map_mulRight {L : Ideal R} (hL : IsNil L) (y : R) : IsNil (Submodule.map (LinearMap.mulRight R y) L) := by intro z hz obtain ⟨x, hx, rfl⟩ := Submodule.mem_map.mp hz obtain ⟨k, hk⟩ := hL _ (L.mul_mem_left y hx) refine ⟨k + 1, ?_⟩ rw [LinearMap.mulRight_apply, pow_succ, ← mul_assoc, mul_pow_mul, hk, mul_zero, zero_mul] /-- The **Köthe conjecture**: In any ring, the sum of two nil left ideals is nil. -/ @[category research open, AMS 16] theorem KotheConjecture (I J : Ideal R) (hI : IsNil I) (hJ : IsNil J) : IsNil (I + J) := by sorry /-- The **Köthe conjecture**: every left nil radical is contained in the Köthe radical. -/ @[category research open, AMS 16] theorem KotherConjecture.variants.le_KotherRadical {I : Ideal R} (hI : IsNil I) : (I : Set R) ⊆ KotheRadical R := by sorry open scoped Classical in /-- The **Köthe conjecture**: for any nil ideal `I` of `R`, the matrix ideal `M_n(I)` is a nil ideal of the matrix ring `M_n(R)`. -/ @[category research open, AMS 16] theorem KotherConjecture.variants.general_matrix {I : TwoSidedIdeal R} (hI : IsNil I) (n : Type*) [Fintype n] : IsNil (matrix n I) := by sorry /-- The **Köthe conjecture**: for any nil ideal `I` of `R`, the matrix ideal `M_2(I)` is a nil ideal of the matrix ring `M_2(R)`. -/ @[category research open, AMS 16] theorem KotherConjecture.variants.two_by_two_matrix {I : TwoSidedIdeal R} (hI : IsNil I) : IsNil (matrix (Fin 2) I) := by sorry open scoped Classical in /-- The **Köthe conjecture**: for any finite index type `n`, the Köthe radical of the matrix ring `M_n(R)` is the ideal `M_n(Nil*(R))` of matrices with entries in the Köthe radical of `R`. -/ @[category research open, AMS 16] theorem KotherConjecture.variants.matrixOver_KotherRadical (n : Type*) [Fintype n] : matrix n (Nil* R) = Nil* (Matrix n n R) := by sorry /- ### Relations between the different formulations All the formulations of the Köthe conjecture above are known to be equivalent (Krempa). We record here the implications that have a short formal proof. In particular each of `KotheConjecture`, `KotherConjecture.variants.le_KotherRadical`, `KotherConjecture.variants.two_by_two_matrix` and `KotherConjecture.variants.matrixOver_KotherRadical` implies `KotherConjecture.variants.general_matrix`, so that a counterexample to the latter immediately yields counterexamples to all the others. The implication `KotherConjecture.variants.general_matrix → KotheConjecture` (also due to Krempa) is not formalized here. -/ section ColumnIdeal variable {n : Type*} [Fintype n] [DecidableEq n] /-- The left ideal of `Matrix n n R` consisting of the matrices with entries in `I` which are supported on the `j`-th column. -/ def columnIdeal (I : TwoSidedIdeal R) (j : n) : Ideal (Matrix n n R) where carrier := {M | ∀ i k, M i k ∈ I ∧ (k ≠ j → M i k = 0)} zero_mem' _ _ := ⟨I.zero_mem, fun _ => rfl⟩ add_mem' hM hN i k := ⟨add_mem (hM i k).1 (hN i k).1, fun hk => by simp [(hM i k).2 hk, (hN i k).2 hk]⟩ smul_mem' B _ hM i k := by simp only [smul_eq_mul, Matrix.mul_apply] refine ⟨sum_mem fun l _ => I.mul_mem_left _ _ (hM l k).1, fun hk => ?_⟩ exact Finset.sum_eq_zero fun l _ => by rw [(hM l k).2 hk, mul_zero] /-- Powers of a matrix supported on the `j`-th column are controlled by the `(j, j)` entry. -/ @[category API, AMS 16] theorem pow_succ_apply_of_mem_columnIdeal {I : TwoSidedIdeal R} {j : n} {M : Matrix n n R} (hM : M ∈ columnIdeal I j) (m : ℕ) (i k : n) : (M ^ (m + 1)) i k = M i k * M j j ^ m := by induction m generalizing i k with | zero => simp | succ m ih => rw [pow_succ, Matrix.mul_apply] rcases eq_or_ne k j with hk | hk · rw [hk, Finset.sum_eq_single j (fun l _ hl => by rw [ih, (hM i l).2 hl, zero_mul, zero_mul]) (fun h => absurd (Finset.mem_univ _) h), ih, pow_succ, mul_assoc] · rw [(hM i k).2 hk, zero_mul] exact Finset.sum_eq_zero fun l _ => by rw [(hM l k).2 hk, mul_zero] /-- For a nil ideal `I`, the column ideals `columnIdeal I j` are nil left ideals. -/ @[category API, AMS 16] theorem isNil_columnIdeal {I : TwoSidedIdeal R} (hI : IsNil I) (j : n) : IsNil (columnIdeal I j) := by intro M hM obtain ⟨m, hm⟩ := hI _ (hM j j).1 refine ⟨m + 1, ?_⟩ ext i k rw [pow_succ_apply_of_mem_columnIdeal hM m i k, hm, mul_zero, Matrix.zero_apply] /-- The matrix ideal `M_n(I)` is the sum of the column ideals `columnIdeal I j`. -/ @[category API, AMS 16] theorem mem_iSup_columnIdeal {I : TwoSidedIdeal R} {M : Matrix n n R} (hM : M ∈ TwoSidedIdeal.matrix n I) : M ∈ ⨆ j, columnIdeal I j := by have : M = ∑ j, Matrix.of fun i k => if k = j then M i k else 0 := by ext i k simp [Matrix.sum_apply] rw [this] refine sum_mem fun j _ => Submodule.mem_iSup_of_mem j fun i k => ?_ simp only [Matrix.of_apply] refine ⟨?_, fun hk => if_neg hk⟩ split_ifs · exact hM i k · exact I.zero_mem end ColumnIdeal /-- If the Köthe conjecture holds (for rings in universe `w`), then a finite sum of nil left ideals is nil. -/ @[category API, AMS 16] theorem isNil_iSup_of_kotheConjecture (h : type_of% @KotheConjecture.{w}) {S : Type w} [Ring S] {ι : Type*} [Fintype ι] {L : ι → Ideal S} (hL : ∀ i, IsNil (L i)) : IsNil (⨆ i, L i) := by rw [← Finset.sup_univ_eq_iSup] refine Finset.sup_induction ?_ (fun a ha b hb => h a b ha hb) fun i _ => hL i intro x hx rw [Submodule.mem_bot] at hx exact hx ▸ IsNilpotent.zero /-- The Köthe conjecture (for rings in universe `max u v`) implies the general matrix formulation for rings in universe `u` and index types in universe `v`. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.general_matrix_of_KotheConjecture (h : type_of% @KotheConjecture.{max u v}) : type_of% @KotherConjecture.variants.general_matrix.{u, v} := by classical intro R _ I hI n _ M hM exact isNil_iSup_of_kotheConjecture h (fun j => isNil_columnIdeal hI j) M (mem_iSup_columnIdeal hM) /-- If every nil left ideal is contained in the Köthe radical, then the Köthe conjecture holds. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.KotheConjecture_of_le_KotherRadical (h : type_of% @KotherConjecture.variants.le_KotherRadical.{u}) : type_of% @KotheConjecture.{u} := by intro R _ I J hI hJ x hx rw [Submodule.add_eq_sup, Submodule.mem_sup] at hx obtain ⟨y, hy, z, hz, rfl⟩ := hx exact isNil_kotheRadical R _ (add_mem (h hI hy) (h hJ hz)) /-- The Köthe conjecture implies that every nil left ideal is contained in the Köthe radical. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.le_KotherRadical_of_KotheConjecture (h : type_of% @KotheConjecture.{u}) : type_of% @KotherConjecture.variants.le_KotherRadical.{u} := by intro R _ I hI -- The union of all nil left ideals is a nil two-sided ideal. let K : TwoSidedIdeal R := .mk' {x | ∃ L : Ideal R, IsNil L ∧ x ∈ L} ⟨⊥, fun x hx => by rw [Ideal.mem_bot] at hx; exact hx ▸ IsNilpotent.zero, Submodule.zero_mem _⟩ (by rintro x y ⟨L, hL, hx⟩ ⟨L', hL', hy⟩ exact ⟨L + L', h L L' hL hL', Submodule.add_mem_sup hx hy⟩) (by rintro x ⟨L, hL, hx⟩; exact ⟨L, hL, neg_mem hx⟩) (by rintro x y ⟨L, hL, hy⟩; exact ⟨L, hL, L.mul_mem_left _ hy⟩) (by rintro x y ⟨L, hL, hx⟩ exact ⟨Submodule.map (LinearMap.mulRight R y) L, hL.map_mulRight y, Submodule.mem_map_of_mem hx⟩) have hK : IsNil K := fun x hx => by obtain ⟨L, hL, hx⟩ := (TwoSidedIdeal.mem_mk' _ _ _ _ _ _ x).mp hx exact hL x hx intro x hx have hxK : x ∈ K := (TwoSidedIdeal.mem_mk' _ _ _ _ _ _ x).mpr ⟨I, hI, hx⟩ exact TwoSidedIdeal.le_iff.mp (le_sSup hK) hxK /-- If every nil left ideal is contained in the Köthe radical (for rings in universe `max u v`), then the general matrix formulation holds. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.general_matrix_of_le_KotherRadical (h : type_of% @KotherConjecture.variants.le_KotherRadical.{max u v}) : type_of% @KotherConjecture.variants.general_matrix.{u, v} := general_matrix_of_KotheConjecture (KotheConjecture_of_le_KotherRadical h) /-- The general matrix formulation of the Köthe conjecture trivially implies the `2 × 2` one. -/ @[category test, AMS 16] theorem KotherConjecture.variants.two_by_two_matrix_of_general_matrix (h : type_of% @KotherConjecture.variants.general_matrix.{u, 0}) : type_of% @KotherConjecture.variants.two_by_two_matrix.{u} := by intro R _ I hI convert h hI (Fin 2) section MatrixTransfer variable {m : Type*} [Fintype m] [DecidableEq m] {n : Type*} [Fintype n] [DecidableEq n] /-- Nilness of the matrix ideal `M_n(I)` only depends on the cardinality of `n`. -/ @[category API, AMS 16] theorem isNil_matrix_of_equiv (e : m ≃ n) {I : TwoSidedIdeal R} (h : IsNil (TwoSidedIdeal.matrix m I)) : IsNil (TwoSidedIdeal.matrix n I) := by intro M hM have hM' : (Matrix.reindexRingEquiv R e).symm M ∈ TwoSidedIdeal.matrix m I := fun i j => hM _ _ simpa using (h _ hM').map (Matrix.reindexRingEquiv R e) /-- If `M_{n ⊕ m}(I)` is nil then so is `M_n(I)`, using the block embedding. -/ @[category API, AMS 16] theorem isNil_matrix_of_sum {I : TwoSidedIdeal R} (h : IsNil (TwoSidedIdeal.matrix (n ⊕ m) I)) : IsNil (TwoSidedIdeal.matrix n I) := by intro M hM have hM' : Matrix.fromBlocks M 0 0 0 ∈ TwoSidedIdeal.matrix (n ⊕ m) I := by rw [TwoSidedIdeal.mem_matrix] at hM ⊢ rintro (i | i) (j | j) <;> simp [hM] obtain ⟨k, hk⟩ := h _ hM' have key : ∀ k, (Matrix.fromBlocks M 0 0 0 : Matrix (n ⊕ m) (n ⊕ m) R) ^ (k + 1) = Matrix.fromBlocks (M ^ (k + 1)) 0 0 0 := by intro k induction k with | zero => simp | succ k ih => rw [pow_succ, ih, Matrix.fromBlocks_multiply]; simp [pow_succ] have := key k rw [pow_succ, hk, zero_mul] at this exact ⟨k + 1, (Matrix.fromBlocks_inj.mp (this.symm.trans Matrix.fromBlocks_zero.symm)).1⟩ end MatrixTransfer /-- If `M_2(J)` is nil for every nil ideal `J` of every ring in universe `u`, then nilness of `M_m(I)` implies nilness of `M_{2m}(I)`, using `M_2(M_m(R)) ≃ M_{2m}(R)`. -/ @[category API, AMS 16] theorem isNil_matrix_prod_of_two_by_two_matrix (h : type_of% @KotherConjecture.variants.two_by_two_matrix.{u}) {R : Type u} [Ring R] {m : Type} [Fintype m] [DecidableEq m] {I : TwoSidedIdeal R} (hm : IsNil (TwoSidedIdeal.matrix m I)) : IsNil (TwoSidedIdeal.matrix (Fin 2 × m) I) := by intro M hM have hM' : (Matrix.compRingEquiv (Fin 2) m R).symm M ∈ TwoSidedIdeal.matrix (Fin 2) (TwoSidedIdeal.matrix m I) := fun a b c d => hM _ _ simpa using (h hm _ hM').map (Matrix.compRingEquiv (Fin 2) m R) /-- The `2 × 2` matrix formulation of the Köthe conjecture (for rings in universe `u`) implies the general matrix formulation (Krempa): one first deduces the case of `2 ^ k × 2 ^ k` matrices by induction and then embeds `M_n(R)` in a corner of `M_{2 ^ k}(R)`. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.general_matrix_of_two_by_two_matrix (h : type_of% @KotherConjecture.variants.two_by_two_matrix.{u}) : type_of% @KotherConjecture.variants.general_matrix.{u, v} := by classical intro R _ I hI n _ have key : ∀ k, IsNil (TwoSidedIdeal.matrix (Fin (k + 1) → Fin 2) I) := by intro k induction k with | zero => exact isNil_matrix_of_equiv (Equiv.funUnique (Fin 1) (Fin 2)).symm (h hI) | succ k ih => exact isNil_matrix_of_equiv (Fin.consEquiv fun _ => Fin 2) (isNil_matrix_prod_of_two_by_two_matrix h ih) have hle : Fintype.card n ≤ 2 ^ (Fintype.card n + 1) := Nat.lt_two_pow_self.le.trans (Nat.pow_le_pow_right two_pos (Nat.le_succ _)) have e : n ⊕ Fin (2 ^ (Fintype.card n + 1) - Fintype.card n) ≃ (Fin (Fintype.card n + 1) → Fin 2) := Fintype.equivOfCardEq (by simp; omega) exact isNil_matrix_of_sum (isNil_matrix_of_equiv e.symm (key _)) /-- The formulation of the Köthe conjecture in terms of the Köthe radical of matrix rings implies the general matrix formulation. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.general_matrix_of_matrixOver_KotherRadical (h : type_of% @KotherConjecture.variants.matrixOver_KotherRadical.{u, v}) : type_of% @KotherConjecture.variants.general_matrix.{u, v} := by classical intro R _ I hI n _ refine (isNil_kotheRadical (Matrix n n R)).mono ?_ rw [← h n] exact TwoSidedIdeal.le_iff.mp (TwoSidedIdeal.matrix_monotone n (le_sSup hI)) /-- The general matrix formulation of the Köthe conjecture implies the formulation in terms of the Köthe radical of matrix rings. -/ @[category research solved, AMS 16] theorem KotherConjecture.variants.matrixOver_KotherRadical_of_general_matrix (h : type_of% @KotherConjecture.variants.general_matrix.{u, v}) : type_of% @KotherConjecture.variants.matrixOver_KotherRadical.{u, v} := by classical intro R _ n _ refine le_antisymm (le_sSup (h (isNil_kotheRadical R) n)) ?_ intro N hN i j have : Nonempty n := ⟨i⟩ -- Every two-sided ideal of `Matrix n n R` is of the form `M_n(J)`. obtain ⟨J, hJ⟩ : ∃ J : TwoSidedIdeal R, KotheRadical (Matrix n n R) = TwoSidedIdeal.matrix n J := ⟨TwoSidedIdeal.equivMatrix.symm _, ((TwoSidedIdeal.equivMatrix (n := n)).apply_symm_apply _).symm⟩ have hJnil : IsNil J := by intro r hr have hmem : Matrix.single i i r ∈ Nil* (Matrix n n R) := by rw [hJ, TwoSidedIdeal.mem_matrix] intro a b by_cases hab : i = a ∧ i = b · obtain ⟨rfl, rfl⟩ := hab simpa using hr · rw [Matrix.single_apply_of_ne _ _ _ _ _ hab] exact J.zero_mem obtain ⟨k, hk⟩ := isNil_kotheRadical (Matrix n n R) _ hmem have hpow : ∀ k, Matrix.single i i r ^ (k + 1) = Matrix.single i i (r ^ (k + 1)) := by intro k induction k with | zero => simp | succ k ih => rw [pow_succ, ih, Matrix.single_mul_single_same, ← pow_succ] refine ⟨k + 1, ?_⟩ have := congrFun (congrFun (hpow k) i) i rw [pow_succ, hk, zero_mul] at this simpa using this.symm rw [hJ] at hN exact TwoSidedIdeal.le_iff.mp (le_sSup hJnil) (hN i j) /- TODO(lezeau): The two last statements I want to formalize use the (two-sided) Jacobson ideal. Sanity check that the current mathlib definition is what I want. -/ /-- The **Amitsur Conjecture**: If `J` is a nil ideal in `R`, then `J[x]` is a nil ideal of the polynomial ring `R[x]`. This is known to be false, see Agata Smoktunowicz, _Polynomial rings over nil rings need not be nil_. -/ @[category research solved, AMS 16] theorem amitsur_conjecture : ¬ ∀ (R : Type) [Ring R] (J : TwoSidedIdeal R), IsNil J → IsNil (TwoSidedIdeal.map (Polynomial.C) J) := by sorry end Koethe