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.Tactic.LinearCombination |
| 2 | import Mathlib.Tactic.Ring |
| 3 | import Mathlib.RingTheory.LocalRing.RingHom.Basic |
| 4 | import Mathlib.RingTheory.Nilpotent.Basic |
| 5 | |
| 6 | /-! # Square Zero -/ |
| 7 | |
| 8 | namespace OAI.ArithmeticGeometry.OrdinaryLocus.Openness.SquareZero.Construction.SquareZeroLifts |
| 9 | |
| 10 | /-! |
| 11 | # Openness: the module of square-zero lifts of a ring map |
| 12 | |
| 13 | These constructions do not require a Hopf algebra. They apply in particular |
| 14 | to local maps out of scheme stalks, so that infinitesimal linearization can |
| 15 | be used for schemes which are not affine. |
| 16 | -/ |
| 17 | |
| 18 | variable {A A' C : Type*} [CommRing A] [CommRing A'] [CommRing C] |
| 19 | |
| 20 | /-- Products of two elements in a square-zero ideal vanish. -/ |
| 21 | theorem mul_eq_zero_of_square_zero_ideal (J : Ideal C) (hJ : J ^ 2 = ⊥) |
| 22 | {a b : C} (ha : a ∈ J) (hb : b ∈ J) : a * b = 0 := by |
| 23 | have h := Ideal.mul_mem_mul ha hb |
| 24 | rw [← pow_two, hJ] at h |
| 25 | exact Ideal.mem_bot.mp h |
| 26 | |
| 27 | /-- Congruence modulo a square-zero ideal preserves localness. -/ |
| 28 | theorem isLocalHom_of_congruent |
| 29 | (J : Ideal C) (hJ : J ^ 2 = ⊥) (e f : A →+* C) [IsLocalHom e] |
| 30 | (hf : ∀ a, f a - e a ∈ J) : IsLocalHom f where |
| 31 | map_nonunit a ha := by |
| 32 | have hmem : e a - f a ∈ J := by |
| 33 | simpa only [neg_sub] using J.neg_mem (hf a) |
| 34 | have hn : IsNilpotent (e a - f a) := |
| 35 | ⟨2, by simpa only [pow_two] using |
| 36 | mul_eq_zero_of_square_zero_ideal J hJ hmem hmem⟩ |
| 37 | have he : IsUnit (e a) := by |
| 38 | simpa only [sub_add_cancel] using hn.isUnit_add_right_of_commute ha (Commute.all ..) |
| 39 | exact isUnit_of_map_unit e a he |
| 40 | |
| 41 | /-- Affine interpolation, as an actual ring homomorphism. -/ |
| 42 | def interpolate (J : Ideal C) (hJ : J ^ 2 = ⊥) (e f : A →+* C) |
| 43 | (hf : ∀ a, f a - e a ∈ J) (c : C) : A →+* C where |
| 44 | toFun a := e a + c * (f a - e a) |
| 45 | map_zero' := by simp |
| 46 | map_one' := by simp |
| 47 | map_add' a b := by simp only [map_add]; ring |
| 48 | map_mul' a b := by |
| 49 | have hz := mul_eq_zero_of_square_zero_ideal J hJ (hf a) (hf b) |
| 50 | simp only [map_mul] |
| 51 | linear_combination (c - c ^ 2) * hz |
| 52 | |
| 53 | /-- Addition of two infinitesimal deviations from the same base map. -/ |
| 54 | def addMaps (J : Ideal C) (hJ : J ^ 2 = ⊥) (e f g : A →+* C) |
| 55 | (hf : ∀ a, f a - e a ∈ J) (hg : ∀ a, g a - e a ∈ J) : A →+* C where |
| 56 | toFun a := f a + g a - e a |
| 57 | map_zero' := by simp |
| 58 | map_one' := by simp |
| 59 | map_add' a b := by simp only [map_add]; ring |
| 60 | map_mul' a b := by |
| 61 | have h₁ := mul_eq_zero_of_square_zero_ideal J hJ (hf a) (hg b) |
| 62 | have h₂ := mul_eq_zero_of_square_zero_ideal J hJ (hg a) (hf b) |
| 63 | simp only [map_mul] |
| 64 | linear_combination -h₁ - h₂ |
| 65 | |
| 66 | /-- All ring maps reducing to e modulo J. -/ |
| 67 | @[ext] |
| 68 | structure Lift (J : Ideal C) (_hJ : J ^ 2 = ⊥) (e : A →+* C) where |
| 69 | hom : A →+* C |
| 70 | congruent : ∀ a, hom a - e a ∈ J |
| 71 | |
| 72 | namespace Lift |
| 73 | |
| 74 | variable {J : Ideal C} {hJ : J ^ 2 = ⊥} {e : A →+* C} |
| 75 | |
| 76 | instance : Zero (Lift J hJ e) := ⟨⟨e, fun _ => by simp⟩⟩ |
| 77 | |
| 78 | instance : Add (Lift J hJ e) where |
| 79 | add f g := ⟨addMaps J hJ e f.hom g.hom f.congruent g.congruent, fun a => by |
| 80 | change f.hom a + g.hom a - e a - e a ∈ J |
| 81 | convert J.add_mem (f.congruent a) (g.congruent a) using 1 |
| 82 | ring⟩ |
| 83 | |
| 84 | instance : SMul C (Lift J hJ e) where |
| 85 | smul c f := ⟨interpolate J hJ e f.hom f.congruent c, fun a => by |
| 86 | change e a + c * (f.hom a - e a) - e a ∈ J |
| 87 | rw [add_sub_cancel_left] |
| 88 | exact J.mul_mem_left c (f.congruent a)⟩ |
| 89 | |
| 90 | instance : Neg (Lift J hJ e) := ⟨fun f => (-1 : C) • f⟩ |
| 91 | |
| 92 | @[simp] theorem zero_hom (a : A) : (0 : Lift J hJ e).hom a = e a := rfl |
| 93 | @[simp] theorem add_hom (f g : Lift J hJ e) (a : A) : |
| 94 | (f + g).hom a = f.hom a + g.hom a - e a := rfl |
| 95 | @[simp] theorem smul_hom (c : C) (f : Lift J hJ e) (a : A) : |
| 96 | (c • f).hom a = e a + c * (f.hom a - e a) := rfl |
| 97 | @[simp] theorem neg_hom (f : Lift J hJ e) (a : A) : |
| 98 | (-f).hom a = e a + (-1 : C) * (f.hom a - e a) := rfl |
| 99 | |
| 100 | instance : AddCommGroup (Lift J hJ e) where |
| 101 | add := (· + ·) |
| 102 | zero := 0 |
| 103 | neg := Neg.neg |
| 104 | nsmul := nsmulRec |
| 105 | zsmul := zsmulRec |
| 106 | add_assoc f g h := by apply Lift.ext; ext a; simp only [add_hom]; ring |
| 107 | zero_add f := by apply Lift.ext; ext a; simp only [add_hom, zero_hom]; ring |
| 108 | add_zero f := by apply Lift.ext; ext a; simp only [add_hom, zero_hom]; ring |
| 109 | neg_add_cancel f := by apply Lift.ext; ext a; simp only [add_hom, neg_hom, zero_hom]; ring |
| 110 | add_comm f g := by apply Lift.ext; ext a; simp only [add_hom]; ring |
| 111 | |
| 112 | instance : Module C (Lift J hJ e) where |
| 113 | smul := (· • ·) |
| 114 | one_smul f := by apply Lift.ext; ext a; simp only [smul_hom]; ring |
| 115 | mul_smul c d f := by apply Lift.ext; ext a; simp only [smul_hom]; ring |
| 116 | smul_zero c := by apply Lift.ext; ext a; simp only [smul_hom, zero_hom]; ring |
| 117 | smul_add c f g := by apply Lift.ext; ext a; simp only [smul_hom, add_hom]; ring |
| 118 | zero_smul f := by apply Lift.ext; ext a; simp only [smul_hom, zero_hom]; ring |
| 119 | add_smul c d f := by apply Lift.ext; ext a; simp only [smul_hom, add_hom]; ring |
| 120 | |
| 121 | instance (f : Lift J hJ e) [IsLocalHom e] : IsLocalHom f.hom := |
| 122 | isLocalHom_of_congruent J hJ e f.hom f.congruent |
| 123 | |
| 124 | /-- Pulling back functions along a ring homomorphism is linear on lifts. -/ |
| 125 | def comap (p : A' →+* A) : Lift J hJ e →ₗ[C] Lift J hJ (e.comp p) where |
| 126 | toFun f := ⟨f.hom.comp p, fun a => f.congruent (p a)⟩ |
| 127 | map_add' f g := by apply Lift.ext; ext a; rfl |
| 128 | map_smul' c f := by apply Lift.ext; ext a; rfl |
| 129 | |
| 130 | /-- Coordinates of the infinitesimal deviation, without choosing generators. -/ |
| 131 | def deviation : Lift J hJ e →ₗ[C] (A → C) where |
| 132 | toFun f a := f.hom a - e a |
| 133 | map_add' f g := by ext a; simp only [add_hom, Pi.add_apply]; ring |
| 134 | map_smul' c f := by |
| 135 | ext a |
| 136 | simp only [smul_hom, Pi.smul_apply, smul_eq_mul, RingHom.id_apply] |
| 137 | ring |
| 138 | |
| 139 | theorem deviation_injective : Function.Injective (deviation (J := J) (hJ := hJ) (e := e)) := by |
| 140 | intro f g h |
| 141 | apply Lift.ext |
| 142 | ext a |
| 143 | calc |
| 144 | f.hom a = (f.hom a - e a) + e a := (sub_add_cancel _ _).symm |
| 145 | _ = (g.hom a - e a) + e a := congrArg (fun z => z + e a) (congrFun h a) |
| 146 | _ = g.hom a := sub_add_cancel _ _ |
| 147 | |
| 148 | end Lift |
| 149 | |
| 150 | end OAI.ArithmeticGeometry.OrdinaryLocus.Openness.SquareZero.Construction.SquareZeroLifts |