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 | /- |
| 2 | Copyright (c) 2025 Antoine Chambert-Loir. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | Authors: Antoine Chambert-Loir |
| 5 | This file has been modified. |
| 6 | -/ |
| 7 | import Mathlib.LinearAlgebra.Dual.Defs |
| 8 | import Mathlib.LinearAlgebra.FreeModule.Finite.Basic |
| 9 | import Mathlib.RingTheory.TensorProduct.IsBaseChangeFree |
| 10 | import OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Linear.MapBaseChangeHom |
| 11 | |
| 12 | /-! # Free Dual Base Change -/ |
| 13 | |
| 14 | namespace OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Finite.FreeDualBaseChange |
| 15 | |
| 16 | noncomputable section |
| 17 | |
| 18 | open _root_.IsBaseChange |
| 19 | open _root_.Module |
| 20 | open _root_.Module.Dual |
| 21 | |
| 22 | /- Adapted to HilbertConstruction-local declarations and default elaboration settings. -/ |
| 23 | |
| 24 | namespace Module.Dual |
| 25 | |
| 26 | open TensorProduct LinearEquiv |
| 27 | |
| 28 | variable {R : Type*} [CommSemiring R] |
| 29 | {V : Type*} [AddCommMonoid V] [Module R V] |
| 30 | {W : Type*} [AddCommMonoid W] [Module R W] |
| 31 | (A : Type*) [CommSemiring A] [Algebra R A] |
| 32 | |
| 33 | /-- Equivalent modules have equivalent duals. -/ |
| 34 | @[simps!] def congr (e : V ≃ₗ[R] W) : |
| 35 | Dual R V ≃ₗ[R] Dual R W := congrLeft R R e |
| 36 | |
| 37 | /-- `LinearMap.baseChange` for `Module.Dual`. -/ |
| 38 | def baseChange : Dual R V →ₗ[R] Dual A (A ⊗[R] V) := |
| 39 | (AlgebraTensorModule.rid R A A).compRight R ∘ₗ LinearMap.baseChangeHom R A V R |
| 40 | |
| 41 | @[simp] |
| 42 | theorem baseChange_apply_tmul (f : Dual R V) (a : A) (v : V) : |
| 43 | FreeDualBaseChange.Module.Dual.baseChange A f (a ⊗ₜ v) = (f v) • a := |
| 44 | rfl |
| 45 | |
| 46 | variable {B : Type*} [CommSemiring B] [Algebra R B] [Algebra A B] [IsScalarTower R A B] |
| 47 | |
| 48 | open AlgebraTensorModule in |
| 49 | theorem baseChange_baseChange (f : Dual R V) : |
| 50 | FreeDualBaseChange.Module.Dual.baseChange B (FreeDualBaseChange.Module.Dual.baseChange A f) = |
| 51 | (congr (cancelBaseChange R A B B V)).symm (FreeDualBaseChange.Module.Dual.baseChange B f) := by |
| 52 | ext; simp |
| 53 | |
| 54 | end Module.Dual |
| 55 | |
| 56 | namespace IsBaseChange |
| 57 | |
| 58 | open OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Linear.MapBaseChangeHom.IsBaseChange |
| 59 | |
| 60 | open TensorProduct |
| 61 | |
| 62 | variable {R : Type*} [CommSemiring R] |
| 63 | {V : Type*} [AddCommMonoid V] [Module R V] |
| 64 | {W : Type*} [AddCommMonoid W] [Module R W] |
| 65 | {A : Type*} [CommSemiring A] [Algebra R A] [Module A W] [IsScalarTower R A W] |
| 66 | {j : V →ₗ[R] W} (ibc : IsBaseChange A j) |
| 67 | |
| 68 | /-- The base change of an element of the dual. -/ |
| 69 | noncomputable def toDual : |
| 70 | Dual R V →ₗ[R] Dual A W := |
| 71 | Linear.MapBaseChangeHom.IsBaseChange.linearMapLeftRightHom ibc (Algebra.linearMap R A) |
| 72 | |
| 73 | theorem toDual_comp_apply (f : Dual R V) (v : V) : |
| 74 | toDual ibc f (j v) = algebraMap R A (f v) := by |
| 75 | simp [toDual, Linear.MapBaseChangeHom.IsBaseChange.linearMapLeftRightHom_comp_apply] |
| 76 | |
| 77 | theorem toDual_apply (f : Dual R V) : |
| 78 | toDual ibc f = FreeDualBaseChange.Module.Dual.congr ibc.equiv |
| 79 | (FreeDualBaseChange.Module.Dual.baseChange A f) := by |
| 80 | apply _root_.IsBaseChange.algHom_ext ibc |
| 81 | intro v |
| 82 | simp [toDual_comp_apply, Algebra.algebraMap_eq_smul_one] |
| 83 | |
| 84 | /-- The linear map underlying `IsBaseChange.toDualBaseChangeLinearEquiv`. -/ |
| 85 | private noncomputable def toDualBaseChangeAux : |
| 86 | A ⊗[R] Dual R V →ₗ[A] Dual A W where |
| 87 | toAddHom := (TensorProduct.lift { |
| 88 | toFun a := a • toDual ibc |
| 89 | map_add' a b := by simp [add_smul] |
| 90 | map_smul' r a := by simp }).toAddHom |
| 91 | map_smul' a g := by |
| 92 | induction g using TensorProduct.inductionOn with |
| 93 | | add x y hx hy => aesop |
| 94 | | tmul b f => simp [TensorProduct.smul_tmul', mul_smul] |
| 95 | |
| 96 | private theorem toDualBaseChangeAux_tmul (a : A) (f : Dual R V) (v : V) : |
| 97 | (toDualBaseChangeAux ibc (a ⊗ₜ[R] f)) (j v) = a * algebraMap R A (f v) := by |
| 98 | simp [toDualBaseChangeAux, toDual_comp_apply] |
| 99 | |
| 100 | variable [Free R V] [Module.Finite R V] |
| 101 | |
| 102 | /-- The linear equivalence underlying `IsBaseChange.dual`. -/ |
| 103 | noncomputable def toDualBaseChange : |
| 104 | A ⊗[R] Dual R V ≃ₗ[A] Dual A W := by |
| 105 | apply LinearEquiv.ofBijective (toDualBaseChangeAux ibc) |
| 106 | let b := Free.chooseBasis R V |
| 107 | set ι := Free.ChooseBasisIndex R V |
| 108 | have ibc_pow : IsBaseChange A ((Algebra.linearMap R A).compLeft ι) := (linearMap R A).finitePow ι |
| 109 | suffices toDualBaseChangeAux ibc = |
| 110 | (((b.constr R).symm.baseChange ..).trans ibc_pow.equiv).trans ((ibc.basis b).constr A) from |
| 111 | this ▸ LinearEquiv.bijective _ |
| 112 | ext f w |
| 113 | simp only [AlgebraTensorModule.curry_apply, curry_apply, LinearMap.coe_restrictScalars, |
| 114 | LinearEquiv.coe_coe, LinearEquiv.trans_apply] |
| 115 | induction w using ibc.inductionOn with |
| 116 | | tmul v => |
| 117 | simp only [toDualBaseChangeAux_tmul, one_mul] |
| 118 | conv_lhs => rw [← Basis.sum_equivFun b v, map_sum] |
| 119 | simp [LinearEquiv.baseChange, basis_repr_comp_apply] |
| 120 | | smul a w h => simp [h] |
| 121 | | add x y hx hy => simp [map_add, hx, hy] |
| 122 | |
| 123 | theorem toDualBaseChange_tmul (a : A) (f : Dual R V) (v : V) : |
| 124 | (toDualBaseChange ibc (a ⊗ₜ[R] f)) (j v) = a * algebraMap R A (f v) := |
| 125 | toDualBaseChangeAux_tmul ibc a f v |
| 126 | |
| 127 | theorem dual : IsBaseChange A (toDual ibc) := by |
| 128 | apply of_equiv (toDualBaseChange ibc) |
| 129 | intro f |
| 130 | simp [toDualBaseChange, toDualBaseChangeAux] |
| 131 | |
| 132 | end IsBaseChange |
| 133 | |
| 134 | end |
| 135 | |
| 136 | end OAI.AlgebraicGeometry.AbelianModuli.HilbertConstruction.Finite.FreeDualBaseChange |