Hodge conjecture: the CM case in Lean, read and discussed
OpenAI's Lean proof of the Hodge conjecture for CM abelian varieties: rerun it, read its statement, and keep the open questions with their sources. The conjecture is open

| 1 | import Mathlib.RingTheory.Adjoin.Tower |
| 2 | import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation |
| 3 | import Mathlib.LinearAlgebra.FreeModule.Finite.Basic |
| 4 | import Mathlib.RingTheory.Flat.Basic |
| 5 | |
| 6 | /-! # Finiteness -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.Finiteness.Construction.FinitenessDescent |
| 9 | |
| 10 | /-! |
| 11 | # Finiteness through finite extensions with a module retraction |
| 12 | |
| 13 | These versions of Artin--Tate do not assume that the base is noetherian. |
| 14 | A surjective linear functional replaces the noetherian-submodule argument. |
| 15 | -/ |
| 16 | |
| 17 | open _root_.Module |
| 18 | |
| 19 | universe u v w |
| 20 | |
| 21 | variable {R B A : Type*} [CommRing R] [CommRing B] [CommRing A] |
| 22 | [Algebra R B] [Algebra B A] [Algebra R A] [IsScalarTower R B A] |
| 23 | |
| 24 | /-- Finite type descends through a finite extension admitting a surjective |
| 25 | linear functional, without a noetherian hypothesis on the base. -/ |
| 26 | theorem finiteType_of_finite_of_linear_surjective |
| 27 | [Algebra.FiniteType R A] [Module.Finite B A] |
| 28 | (p : A →ₗ[B] B) (hp : Function.Surjective p) : Algebra.FiniteType R B := by |
| 29 | obtain ⟨B₀, hfg, hA⟩ := exists_subalgebra_of_fg R B A |
| 30 | (Algebra.FiniteType.out) Module.Finite.fg_top |
| 31 | have : Algebra.FiniteType R B₀ := (Subalgebra.fg_iff_finiteType B₀).mp hfg |
| 32 | have : Module.Finite B₀ A := ⟨hA⟩ |
| 33 | have : Module.Finite B₀ B := Module.Finite.of_surjective (p.restrictScalars B₀) hp |
| 34 | exact Algebra.FiniteType.trans (S := B₀) inferInstance inferInstance |
| 35 | |
| 36 | /-- A module retraction of a finitely presented module is finitely presented. -/ |
| 37 | theorem moduleFinitePresentation_of_retraction |
| 38 | {R M N : Type*} [CommRing R] [AddCommGroup M] [AddCommGroup N] |
| 39 | [Module R M] [Module R N] [Module.FinitePresentation R M] |
| 40 | (p : M →ₗ[R] N) (s : N →ₗ[R] M) (h : p.comp s = LinearMap.id) : |
| 41 | Module.FinitePresentation R N := by |
| 42 | have hp : Function.Surjective p := fun n => ⟨s n, DFunLike.congr_fun h n⟩ |
| 43 | apply Module.finitePresentation_of_surjective p hp |
| 44 | have heq : LinearMap.ker p = LinearMap.range (LinearMap.id - s.comp p) := by |
| 45 | ext m |
| 46 | constructor |
| 47 | · intro hm |
| 48 | refine ⟨m, ?_⟩ |
| 49 | have hm' : p m = 0 := hm |
| 50 | simp [hm'] |
| 51 | · rintro ⟨m, rfl⟩ |
| 52 | change p (m - s (p m)) = 0 |
| 53 | rw [map_sub, show p (s (p m)) = p m from DFunLike.congr_fun h (p m), sub_self] |
| 54 | rw [heq] |
| 55 | exact Submodule.fg_range _ |
| 56 | |
| 57 | /-- Finite presentation descends through the same finite extension. -/ |
| 58 | theorem finitePresentation_of_finite_of_linear_surjective |
| 59 | [Algebra.FinitePresentation R A] [Module.Finite B A] |
| 60 | (p : A →ₗ[B] B) (hp : Function.Surjective p) : Algebra.FinitePresentation R B := by |
| 61 | have : Algebra.FiniteType R B := finiteType_of_finite_of_linear_surjective p hp |
| 62 | obtain ⟨n, f, hf⟩ := Algebra.FiniteType.iff_quotient_mvPolynomial''.mp this |
| 63 | let P := MvPolynomial (Fin n) R |
| 64 | let : Algebra P B := f.toRingHom.toAlgebra |
| 65 | let : Algebra P A := ((IsScalarTower.toAlgHom R B A).comp f).toRingHom.toAlgebra |
| 66 | have : IsScalarTower R P B := IsScalarTower.of_algebraMap_eq fun r => (f.commutes r).symm |
| 67 | have : IsScalarTower R P A := IsScalarTower.of_algebraMap_eq fun r => |
| 68 | (((IsScalarTower.toAlgHom R B A).comp f).commutes r).symm |
| 69 | have : IsScalarTower P B A := IsScalarTower.of_algebraMap_eq fun _ => rfl |
| 70 | have : Module.Finite P B := RingHom.Finite.of_surjective f.toRingHom hf |
| 71 | have : Module.Finite P A := Module.Finite.trans B A |
| 72 | have : Algebra.FinitePresentation P A := |
| 73 | Algebra.FinitePresentation.of_restrict_scalars_finitePresentation R P A |
| 74 | have : Module.FinitePresentation P A := |
| 75 | Module.FinitePresentation.of_finite_of_finitePresentation P A |
| 76 | obtain ⟨s, hs⟩ := Module.projective_lifting_property p LinearMap.id hp |
| 77 | have : Module.FinitePresentation P B := moduleFinitePresentation_of_retraction |
| 78 | (p.restrictScalars P) (s.restrictScalars P) (by |
| 79 | ext b |
| 80 | exact DFunLike.congr_fun hs b) |
| 81 | have : Algebra.FinitePresentation P B := inferInstance |
| 82 | exact Algebra.FinitePresentation.trans R P B |
| 83 | |
| 84 | /-- The zero algebra is finitely presented over every commutative ring. -/ |
| 85 | theorem finitePresentation_of_subsingleton [Subsingleton B] : Algebra.FinitePresentation R B := by |
| 86 | apply Algebra.FinitePresentation.of_surjective |
| 87 | (f := Algebra.ofId R B) (fun b => ⟨0, Subsingleton.elim _ _⟩) |
| 88 | have h : RingHom.ker (Algebra.ofId R B).toRingHom = ⊤ := by |
| 89 | apply top_unique |
| 90 | intro x _ |
| 91 | exact Subsingleton.elim _ _ |
| 92 | rw [h] |
| 93 | exact Ideal.fg_top R |
| 94 | |
| 95 | /-- Finite presentation descends through an injective finite free algebra |
| 96 | extension, including the zero-ring case. -/ |
| 97 | theorem finitePresentation_of_finite_free |
| 98 | [Algebra.FinitePresentation R A] [Module.Finite B A] [Module.Free B A] |
| 99 | (hinj : Function.Injective (algebraMap B A)) : Algebra.FinitePresentation R B := by |
| 100 | classical |
| 101 | cases subsingleton_or_nontrivial A with |
| 102 | | inl h => |
| 103 | let : Subsingleton A := h |
| 104 | let : Subsingleton B := ⟨fun x y => hinj (Subsingleton.elim _ _)⟩ |
| 105 | exact finitePresentation_of_subsingleton |
| 106 | | inr h => |
| 107 | let : Nontrivial A := h |
| 108 | let b := Module.Free.chooseBasis B A |
| 109 | obtain ⟨j⟩ := b.index_nonempty |
| 110 | apply finitePresentation_of_finite_of_linear_surjective (b.coord j) |
| 111 | intro x |
| 112 | exact ⟨x • b j, by simp⟩ |
| 113 | |
| 114 | /-- Flatness over the original base descends through a surjective linear |
| 115 | functional, since it makes the target a module retract of the source. -/ |
| 116 | theorem flat_of_linear_surjective [Module.Flat R A] |
| 117 | (p : A →ₗ[B] B) (hp : Function.Surjective p) : Module.Flat R B := by |
| 118 | obtain ⟨s, hs⟩ := Module.projective_lifting_property p LinearMap.id hp |
| 119 | exact Module.Flat.of_retract (s.restrictScalars R) (p.restrictScalars R) (by |
| 120 | ext b |
| 121 | exact DFunLike.congr_fun hs b) |
| 122 | |
| 123 | /-- Flatness descends through an injective free algebra extension. -/ |
| 124 | theorem flat_of_free [Module.Flat R A] [Module.Free B A] |
| 125 | (hinj : Function.Injective (algebraMap B A)) : Module.Flat R B := by |
| 126 | classical |
| 127 | cases subsingleton_or_nontrivial A with |
| 128 | | inl h => |
| 129 | let : Subsingleton A := h |
| 130 | let : Subsingleton B := ⟨fun x y => hinj (Subsingleton.elim _ _)⟩ |
| 131 | exact flat_of_linear_surjective (0 : A →ₗ[B] B) (fun b => ⟨0, Subsingleton.elim _ _⟩) |
| 132 | | inr h => |
| 133 | let : Nontrivial A := h |
| 134 | let b := Module.Free.chooseBasis B A |
| 135 | obtain ⟨j⟩ := b.index_nonempty |
| 136 | exact flat_of_linear_surjective (b.coord j) (fun x => ⟨x • b j, by simp⟩) |
| 137 | |
| 138 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.Finiteness.Construction.FinitenessDescent |