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.FiberFlatCriterion |
| 2 | import Mathlib.RingTheory.TensorProduct.Basic |
| 3 | import Mathlib.RingTheory.TensorProduct.Maps |
| 4 | import Mathlib.LinearAlgebra.TensorProduct.Basis |
| 5 | import Mathlib.LinearAlgebra.DirectSum.Finsupp |
| 6 | |
| 7 | /-! # Local Flatness -/ |
| 8 | |
| 9 | namespace OAI.ArithmeticGeometry.OrdinaryLocus.Openness.LocalFlatness.Construction |
| 10 | |
| 11 | noncomputable section |
| 12 | |
| 13 | /-! The finite-module fiberwise flatness criterion for the Openness proof. -/ |
| 14 | |
| 15 | open IsLocalRing TensorProduct _root_.Module |
| 16 | open scoped TensorProduct |
| 17 | |
| 18 | variable (R A : Type*) [CommRing R] [CommRing A] [Algebra R A] |
| 19 | [IsLocalRing R] |
| 20 | |
| 21 | /-- The algebraic fiber can be computed either by tensoring the base ring |
| 22 | and then the module, or by tensoring the module directly. -/ |
| 23 | def residueFiberEquiv |
| 24 | (M : Type*) [AddCommGroup M] [Module R M] [Module A M] [IsScalarTower R A M] : |
| 25 | (A ⊗[R] ResidueField R) ⊗[A] M ≃ₗ[R] ResidueField R ⊗[R] M := |
| 26 | (TensorProduct.comm A (A ⊗[R] ResidueField R) M).restrictScalars R ≪≫ₗ |
| 27 | (AlgebraTensorModule.cancelBaseChange R A A M (ResidueField R)).restrictScalars R ≪≫ₗ |
| 28 | TensorProduct.comm R M (ResidueField R) |
| 29 | |
| 30 | theorem residueFiberEquiv_tmul |
| 31 | {M : Type*} [AddCommGroup M] [Module R M] [Module A M] [IsScalarTower R A M] |
| 32 | (a : A) (k : ResidueField R) (m : M) : |
| 33 | residueFiberEquiv R A M ((a ⊗ₜ[R] k) ⊗ₜ[A] m) = k ⊗ₜ[R] (a • m) := by |
| 34 | simp [residueFiberEquiv] |
| 35 | |
| 36 | theorem residueFiberEquiv_natural |
| 37 | {M N : Type*} [AddCommGroup M] [AddCommGroup N] |
| 38 | [Module R M] [Module A M] [IsScalarTower R A M] |
| 39 | [Module R N] [Module A N] [IsScalarTower R A N] |
| 40 | (f : M →ₗ[A] N) : |
| 41 | (f.restrictScalars R).lTensor (ResidueField R) ∘ₗ |
| 42 | (residueFiberEquiv R A M).toLinearMap = |
| 43 | (residueFiberEquiv R A N).toLinearMap ∘ₗ |
| 44 | ((f.baseChange (A ⊗[R] ResidueField R)).restrictScalars R) := by |
| 45 | ext z |
| 46 | induction z using TensorProduct.inductionOn with |
| 47 | | add z w hz hw => simpa only [map_add] using congrArg₂ (· + ·) hz hw |
| 48 | | tmul c m => |
| 49 | induction c using TensorProduct.inductionOn with |
| 50 | | add c d hc hd => |
| 51 | simpa only [add_tmul, map_add] using congrArg₂ (· + ·) hc hd |
| 52 | | tmul a k => simp [residueFiberEquiv_tmul] |
| 53 | |
| 54 | /-- The finite-module fiberwise flatness criterion for a local algebra: |
| 55 | base-flatness and flatness of the closed fiber imply flatness over the algebra. -/ |
| 56 | theorem flat_of_flat_residueField_fiber |
| 57 | [IsLocalRing A] [IsLocalHom (algebraMap R A)] |
| 58 | (N : Type*) [AddCommGroup N] [Module R N] [Module A N] [IsScalarTower R A N] |
| 59 | [Module.FinitePresentation A N] [Module.Flat R N] |
| 60 | [Module.Flat (A ⊗[R] ResidueField R) ((A ⊗[R] ResidueField R) ⊗[A] N)] : |
| 61 | Module.Flat A N := by |
| 62 | let C := A ⊗[R] ResidueField R |
| 63 | let φ : C →ₐ[R] ResidueField A := |
| 64 | Algebra.TensorProduct.lift |
| 65 | (IsScalarTower.toAlgHom R A (ResidueField A)) |
| 66 | (IsScalarTower.toAlgHom R (ResidueField R) (ResidueField A)) |
| 67 | (fun _ _ => Commute.all _ _) |
| 68 | have : Nontrivial C := φ.toRingHom.domain_nontrivial |
| 69 | have hC : Function.Surjective (algebraMap A C) := |
| 70 | Algebra.TensorProduct.includeLeft_surjective A A (residue_surjective (R := R)) |
| 71 | have : IsLocalRing C := IsLocalRing.of_surjective' (algebraMap A C) hC |
| 72 | have : Module.Finite C (C ⊗[A] N) := inferInstance |
| 73 | have : Module.Flat C (C ⊗[A] N) := inferInstance |
| 74 | have : Module.Free C (C ⊗[A] N) := Module.free_of_flat_of_isLocalRing |
| 75 | let ι := Module.Free.ChooseBasisIndex C (C ⊗[A] N) |
| 76 | let b : Basis ι C (C ⊗[A] N) := Module.Free.chooseBasis C (C ⊗[A] N) |
| 77 | have : Finite ι := Module.Finite.finite_basis b |
| 78 | have hmk := TensorProduct.mk_surjective A N C hC |
| 79 | choose v hv using fun i : ι => hmk (b i) |
| 80 | let f : (ι →₀ A) →ₗ[A] N := Finsupp.linearCombination A v |
| 81 | let bsrc : Basis ι C (C ⊗[A] (ι →₀ A)) := |
| 82 | (Finsupp.basisSingleOne (R := A) (ι := ι)).baseChange C |
| 83 | let eC : (C ⊗[A] (ι →₀ A)) ≃ₗ[C] (C ⊗[A] N) := |
| 84 | bsrc.repr ≪≫ₗ b.repr.symm |
| 85 | have heC : f.baseChange C = eC.toLinearMap := by |
| 86 | apply bsrc.ext |
| 87 | intro i |
| 88 | change (f.baseChange C) (bsrc i) = eC (bsrc i) |
| 89 | calc |
| 90 | (f.baseChange C) (bsrc i) = b i := by |
| 91 | simpa only [bsrc, Basis.baseChange_apply, Finsupp.coe_basisSingleOne, |
| 92 | LinearMap.baseChange_tmul, f, Finsupp.linearCombination_single, |
| 93 | one_smul, TensorProduct.mk_apply] using hv i |
| 94 | _ = eC (bsrc i) := by simp [eC] |
| 95 | let eR : (ResidueField R ⊗[R] (ι →₀ A)) ≃ₗ[R] (ResidueField R ⊗[R] N) := |
| 96 | (residueFiberEquiv R A (ι →₀ A)).symm ≪≫ₗ |
| 97 | eC.restrictScalars R ≪≫ₗ residueFiberEquiv R A N |
| 98 | have heR : (f.restrictScalars R).lTensor (ResidueField R) = eR.toLinearMap := by |
| 99 | apply LinearMap.ext |
| 100 | intro x |
| 101 | obtain ⟨z, rfl⟩ := (residueFiberEquiv R A (ι →₀ A)).surjective x |
| 102 | have hn := LinearMap.congr_fun (residueFiberEquiv_natural R A f) z |
| 103 | have heC' : f.baseChange (A ⊗[R] ResidueField R) = eC.toLinearMap := heC |
| 104 | simp only [LinearMap.comp_apply, LinearMap.restrictScalars_apply] at hn |
| 105 | rw [heC'] at hn |
| 106 | simpa [eR] using hn |
| 107 | apply FiberFlatCriterion.Construction.flat_of_flat_source_of_residueField_tensor_iso (R := R) f |
| 108 | rw [heR] |
| 109 | exact eR.bijective |
| 110 | |
| 111 | end |
| 112 | |
| 113 | end OAI.ArithmeticGeometry.OrdinaryLocus.Openness.LocalFlatness.Construction |