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.ArithmeticGeometry.OrdinaryLocus.Openness.GenericFlatness |
| 2 | import Mathlib.LinearAlgebra.Dimension.Free |
| 3 | import Mathlib.Algebra.Module.FinitePresentation |
| 4 | |
| 5 | /-! # Finite Module Sandwich -/ |
| 6 | |
| 7 | namespace OAI.ArithmeticGeometry.OrdinaryLocus.Openness.FiniteModuleSandwich.Construction |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! A finite flat module over a domain admits injections to and from a free module |
| 12 | of its generic rank. The maps come from clearing denominators in a generic basis. -/ |
| 13 | |
| 14 | open scoped TensorProduct |
| 15 | |
| 16 | theorem exists_injective_maps_of_localized_equiv |
| 17 | {R M N M' N' : Type*} [CommRing R] |
| 18 | [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] |
| 19 | [AddCommGroup M'] [Module R M'] [AddCommGroup N'] [Module R N'] |
| 20 | [Module.FinitePresentation R M] [Module.FinitePresentation R N] |
| 21 | (S : Submonoid R) (f : M →ₗ[R] M') (g : N →ₗ[R] N') |
| 22 | [IsLocalizedModule S f] [IsLocalizedModule S g] |
| 23 | (hf : Function.Injective f) (hg : Function.Injective g) (e : M' ≃ₗ[R] N') : |
| 24 | ∃ (i : M →ₗ[R] N) (j : N →ₗ[R] M), |
| 25 | Function.Injective i ∧ Function.Injective j := by |
| 26 | obtain ⟨i, s, hi⟩ := Module.FinitePresentation.exists_lift_of_isLocalizedModule |
| 27 | S g (e.toLinearMap.comp f) |
| 28 | obtain ⟨j, t, hj⟩ := Module.FinitePresentation.exists_lift_of_isLocalizedModule |
| 29 | S f (e.symm.toLinearMap.comp g) |
| 30 | refine ⟨i, j, ?_, ?_⟩ |
| 31 | · intro x y hxy |
| 32 | apply hf |
| 33 | apply e.injective |
| 34 | apply IsLocalizedModule.smul_injective g s |
| 35 | have hx := LinearMap.congr_fun hi x |
| 36 | have hy := LinearMap.congr_fun hi y |
| 37 | exact hx.symm.trans ((congrArg g hxy).trans hy) |
| 38 | · intro x y hxy |
| 39 | apply hg |
| 40 | apply e.symm.injective |
| 41 | apply IsLocalizedModule.smul_injective f t |
| 42 | have hx := LinearMap.congr_fun hj x |
| 43 | have hy := LinearMap.congr_fun hj y |
| 44 | exact hx.symm.trans ((congrArg f hxy).trans hy) |
| 45 | |
| 46 | theorem finiteFlatModule_genericRank_injections |
| 47 | (R M : Type*) [CommRing R] [IsDomain R] |
| 48 | [AddCommGroup M] [Module R M] [Module.Flat R M] |
| 49 | [Module.FinitePresentation R M] : |
| 50 | ∃ (i : M →ₗ[R] (Fin (Module.finrank (FractionRing R) |
| 51 | (FractionRing R ⊗[R] M)) →₀ R)) |
| 52 | (j : (Fin (Module.finrank (FractionRing R) |
| 53 | (FractionRing R ⊗[R] M)) →₀ R) →ₗ[R] M), |
| 54 | Function.Injective i ∧ Function.Injective j := by |
| 55 | let K := FractionRing R |
| 56 | let V := K ⊗[R] M |
| 57 | let d := Module.finrank K V |
| 58 | let f : M →ₗ[R] V := TensorProduct.mk R K M 1 |
| 59 | let g : (Fin d →₀ R) →ₗ[R] (Fin d →₀ K) := |
| 60 | Finsupp.mapRange.linearMap (Algebra.linearMap R K) |
| 61 | have : IsLocalizedModule (nonZeroDivisors R) f := by |
| 62 | dsimp [f, V, K] |
| 63 | infer_instance |
| 64 | have : IsLocalizedModule (nonZeroDivisors R) g := by |
| 65 | dsimp [g, K] |
| 66 | infer_instance |
| 67 | have hf : Function.Injective f := Module.Flat.tensorProduct_mk_injective R M K |
| 68 | have hg : Function.Injective g := by |
| 69 | intro a b hab |
| 70 | ext k |
| 71 | apply IsFractionRing.injective R K |
| 72 | exact DFunLike.congr_fun hab k |
| 73 | let e : V ≃ₗ[R] (Fin d →₀ K) := (Module.finBasis K V).repr.restrictScalars R |
| 74 | exact exists_injective_maps_of_localized_equiv (nonZeroDivisors R) f g hf hg e |
| 75 | |
| 76 | theorem finiteFlatModule_genericRank_eq_rankAtStalk |
| 77 | (R M : Type*) [CommRing R] [IsDomain R] |
| 78 | [AddCommGroup M] [Module R M] [Module.Flat R M] [Module.Finite R M] : |
| 79 | Module.finrank (FractionRing R) (FractionRing R ⊗[R] M) = |
| 80 | Module.rankAtStalk (R := R) M (⊥ : PrimeSpectrum R) := by |
| 81 | let K := FractionRing R |
| 82 | let q : PrimeSpectrum K := ⟨⊥, inferInstance⟩ |
| 83 | have hq : q.comap (algebraMap R K) = ⊥ := by |
| 84 | apply PrimeSpectrum.ext |
| 85 | exact (RingHom.injective_iff_ker_eq_bot (algebraMap R K)).mp |
| 86 | (IsFractionRing.injective R K) |
| 87 | have h := Module.rankAtStalk_baseChange (R := R) (M := M) q |
| 88 | rw [Module.rankAtStalk_eq_finrank_of_free, hq] at h |
| 89 | exact h |
| 90 | |
| 91 | theorem finiteFlatModule_rankAtStalk_injections |
| 92 | (R M : Type*) [CommRing R] [IsDomain R] |
| 93 | [AddCommGroup M] [Module R M] [Module.Flat R M] |
| 94 | [Module.FinitePresentation R M] : |
| 95 | ∃ (i : M →ₗ[R] (Fin (Module.rankAtStalk (R := R) M (⊥ : PrimeSpectrum R)) →₀ R)) |
| 96 | (j : (Fin (Module.rankAtStalk (R := R) M (⊥ : PrimeSpectrum R)) →₀ R) →ₗ[R] M), |
| 97 | Function.Injective i ∧ Function.Injective j := by |
| 98 | rw [← finiteFlatModule_genericRank_eq_rankAtStalk R M] |
| 99 | exact finiteFlatModule_genericRank_injections R M |
| 100 | |
| 101 | end |
| 102 | |
| 103 | end OAI.ArithmeticGeometry.OrdinaryLocus.Openness.FiniteModuleSandwich.Construction |