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 OAI.AlgebraicGeometry.Picard.Homomorphisms.PolynomialRank |
| 2 | import Mathlib.RingTheory.AlgebraTower |
| 3 | import Mathlib.LinearAlgebra.TensorProduct.Basis |
| 4 | import Mathlib.RingTheory.PolynomialAlgebra |
| 5 | |
| 6 | /-! # Finite Free Rank -/ |
| 7 | |
| 8 | namespace OAI.AlgebraicGeometry.Picard.Homomorphisms.FiniteFreeRank |
| 9 | |
| 10 | noncomputable section |
| 11 | |
| 12 | /-! Explicit finite-free ranks for ring maps, including composition and polynomial base change. -/ |
| 13 | |
| 14 | open _root_.Module _root_.Polynomial |
| 15 | |
| 16 | set_option backward.isDefEq.respectTransparency.types false |
| 17 | |
| 18 | namespace Construction |
| 19 | |
| 20 | universe u v w |
| 21 | |
| 22 | variable {R : Type u} {S : Type v} {T : Type w} [CommRing R] [CommRing S] [CommRing T] |
| 23 | |
| 24 | def RingHomHasFiniteBasis (f : R →+* S) (n : ℕ) : Prop := |
| 25 | letI := f.toAlgebra |
| 26 | Nonempty (Basis (Fin n) R S) |
| 27 | |
| 28 | theorem ringHomHasFiniteBasis_algebraMap [Algebra R S] (n : ℕ) : |
| 29 | RingHomHasFiniteBasis (algebraMap R S) n ↔ Nonempty (Basis (Fin n) R S) := by |
| 30 | unfold RingHomHasFiniteBasis |
| 31 | rw [toAlgebra_algebraMap] |
| 32 | |
| 33 | theorem ringHomHasFiniteBasis_of_bijective (f : R →+* S) (hf : Function.Bijective f) : |
| 34 | RingHomHasFiniteBasis f 1 := by |
| 35 | algebraize [f] |
| 36 | apply (ringHomHasFiniteBasis_algebraMap 1).mpr |
| 37 | exact ⟨(Basis.singleton (Fin 1) R).map (LinearEquiv.ofBijective (Algebra.linearMap R S) hf)⟩ |
| 38 | |
| 39 | theorem RingHomHasFiniteBasis.comp {f : R →+* S} {g : S →+* T} {m n : ℕ} |
| 40 | (hf : RingHomHasFiniteBasis f m) (hg : RingHomHasFiniteBasis g n) : |
| 41 | RingHomHasFiniteBasis (g.comp f) (m * n) := by |
| 42 | algebraize [f, g, g.comp f] |
| 43 | obtain ⟨b⟩ := (ringHomHasFiniteBasis_algebraMap m).mp hf |
| 44 | obtain ⟨c⟩ := (ringHomHasFiniteBasis_algebraMap n).mp hg |
| 45 | apply (ringHomHasFiniteBasis_algebraMap (m * n)).mpr |
| 46 | exact ⟨(b.smulTower c).reindex finProdFinEquiv⟩ |
| 47 | |
| 48 | theorem RingHomHasFiniteBasis.polynomial {f : R →+* S} {n : ℕ} |
| 49 | (hf : RingHomHasFiniteBasis f n) : RingHomHasFiniteBasis (Polynomial.mapRingHom f) n := by |
| 50 | algebraize [f] |
| 51 | obtain ⟨b⟩ := (ringHomHasFiniteBasis_algebraMap n).mp hf |
| 52 | let : Algebra R[X] S[X] := Polynomial.algebra R S |
| 53 | change RingHomHasFiniteBasis (algebraMap R[X] S[X]) n |
| 54 | apply (ringHomHasFiniteBasis_algebraMap n).mpr |
| 55 | exact ⟨(b.baseChange R[X]).map (Algebra.IsPushout.equiv R R[X] S S[X]).toLinearEquiv⟩ |
| 56 | |
| 57 | theorem RingHomHasFiniteBasis.finite {f : R →+* S} {n : ℕ} |
| 58 | (hf : RingHomHasFiniteBasis f n) : f.Finite := by |
| 59 | algebraize [f] |
| 60 | obtain ⟨b⟩ := (ringHomHasFiniteBasis_algebraMap n).mp hf |
| 61 | exact RingHom.finite_algebraMap.mpr (Module.Finite.of_basis b) |
| 62 | |
| 63 | theorem RingHomHasFiniteBasis.flat {f : R →+* S} {n : ℕ} |
| 64 | (hf : RingHomHasFiniteBasis f n) : f.Flat := by |
| 65 | algebraize [f] |
| 66 | obtain ⟨b⟩ := (ringHomHasFiniteBasis_algebraMap n).mp hf |
| 67 | have : Module.Free R S := Module.Free.of_basis b |
| 68 | exact RingHom.flat_algebraMap_iff.mpr inferInstance |
| 69 | |
| 70 | theorem RingHomHasFiniteBasis.finrank {f : R →+* S} {n : ℕ} [Nontrivial R] |
| 71 | (hf : RingHomHasFiniteBasis f n) (x : PrimeSpectrum R) : f.finrank x = n := by |
| 72 | algebraize [f] |
| 73 | obtain ⟨b⟩ := (ringHomHasFiniteBasis_algebraMap n).mp hf |
| 74 | have : Module.Free R S := Module.Free.of_basis b |
| 75 | change (algebraMap R S).finrank x = n |
| 76 | rw [RingHom.finrank_algebraMap, Module.rankAtStalk_eq_finrank_of_free] |
| 77 | simpa using Module.finrank_eq_card_basis b |
| 78 | |
| 79 | theorem polynomial_expand_hasFiniteBasis (R : Type u) [CommRing R] [Nontrivial R] |
| 80 | (n : ℕ) (hn : n ≠ 0) : RingHomHasFiniteBasis (expand R n).toRingHom n := by |
| 81 | have ho : RingHomHasFiniteBasis (AdjoinRoot.of (Homomorphisms.Polynomial.Construction.expansionPolynomial R n)) n := |
| 82 | (ringHomHasFiniteBasis_algebraMap n).mpr ⟨PolynomialRank.Construction.polynomialExpansionRootBasis R n hn⟩ |
| 83 | have hl := ringHomHasFiniteBasis_of_bijective (Homomorphisms.Polynomial.Construction.expansionLift R n) (Homomorphisms.Polynomial.Construction.expansionEquiv R n).bijective |
| 84 | have hc := ho.comp hl |
| 85 | simpa only [Homomorphisms.Polynomial.Construction.expansionLift, AdjoinRoot.lift_comp_of, mul_one] using hc |
| 86 | |
| 87 | theorem RingHomHasFiniteBasis.of_comp_bijective_right |
| 88 | {f : R →+* S} {g : S →+* T} {n : ℕ} |
| 89 | (h : RingHomHasFiniteBasis (g.comp f) n) (hf : Function.Bijective f) : |
| 90 | RingHomHasFiniteBasis g n := by |
| 91 | let e := RingEquiv.ofBijective f hf |
| 92 | have he : (g.comp f).comp e.symm.toRingHom = g := by |
| 93 | ext x |
| 94 | exact congrArg g (e.apply_symm_apply x) |
| 95 | have hc := (ringHomHasFiniteBasis_of_bijective e.symm.toRingHom e.symm.bijective).comp h |
| 96 | rw [he, one_mul] at hc |
| 97 | exact hc |
| 98 | |
| 99 | theorem RingHomHasFiniteBasis.of_comp_bijective_left |
| 100 | {f : R →+* S} {g : S →+* T} {n : ℕ} |
| 101 | (h : RingHomHasFiniteBasis (g.comp f) n) (hg : Function.Bijective g) : |
| 102 | RingHomHasFiniteBasis f n := by |
| 103 | let e := RingEquiv.ofBijective g hg |
| 104 | have he : e.symm.toRingHom.comp (g.comp f) = f := by |
| 105 | ext x |
| 106 | exact e.symm_apply_apply (f x) |
| 107 | have hc := h.comp (ringHomHasFiniteBasis_of_bijective e.symm.toRingHom e.symm.bijective) |
| 108 | rw [he, mul_one] at hc |
| 109 | exact hc |
| 110 | |
| 111 | end Construction |
| 112 | |
| 113 | end |
| 114 | |
| 115 | end OAI.AlgebraicGeometry.Picard.Homomorphisms.FiniteFreeRank |