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.Resolution.Blowups.MonomialTermination |
| 2 | import Mathlib.Algebra.Order.BigOperators.Group.List |
| 3 | |
| 4 | /-! # Monomial Schedule -/ |
| 5 | |
| 6 | namespace OAI.AlgebraicGeometry.Resolution.Blowups.Boundary.MonomialSchedule.Construction |
| 7 | |
| 8 | noncomputable section |
| 9 | |
| 10 | /-! Finite common-center schedules for labelled monomials, independent of local coordinates. -/ |
| 11 | |
| 12 | universe u |
| 13 | |
| 14 | def boundaryFaceWeight {ι : Type u} (a : ι → ℕ) (S : Finset ι) : ℕ := |
| 15 | ∑ j ∈ S, a j |
| 16 | |
| 17 | def boundaryScheduleExponents {ι : Type u} (a : ι → ℕ) (b : ℕ) (C : Finset ι) : |
| 18 | Option ι → ℕ |
| 19 | | none => boundaryFaceWeight a C - b |
| 20 | | some j => a j |
| 21 | |
| 22 | def boundaryExceptionalFace {ι : Type u} [DecidableEq ι] (S : Finset ι) (i : ι) : Finset (Option ι) := |
| 23 | insert none ((S.erase i).map Function.Embedding.some) |
| 24 | |
| 25 | def boundaryFaceBranches {ι : Type u} [DecidableEq ι] (C S : Finset ι) : List (Finset (Option ι)) := |
| 26 | if C ⊆ S then C.toList.map (boundaryExceptionalFace S) |
| 27 | else [S.map Function.Embedding.some] |
| 28 | |
| 29 | def boundaryScheduleFaces {ι : Type u} [DecidableEq ι] (C : Finset ι) (L : List (Finset ι)) : |
| 30 | List (Finset (Option ι)) := L.flatMap (boundaryFaceBranches C) |
| 31 | |
| 32 | def boundarySchedulePotential {ι : Type u} (d : ℕ) (a : ι → ℕ) |
| 33 | (L : List (Finset ι)) : ℕ := (L.map (fun S => (d + 1) ^ boundaryFaceWeight a S)).sum |
| 34 | |
| 35 | theorem boundaryExceptionalFace_card {ι : Type u} [DecidableEq ι] (S : Finset ι) (i : ι) (hi : i ∈ S) : |
| 36 | (boundaryExceptionalFace S i).card = S.card := by |
| 37 | classical |
| 38 | have hn : none ∉ (S.erase i).map Function.Embedding.some := by simp |
| 39 | rw [boundaryExceptionalFace, Finset.card_insert_of_notMem hn, Finset.card_map, |
| 40 | Finset.card_erase_of_mem hi] |
| 41 | have hpos := Finset.card_pos.mpr ⟨i, hi⟩ |
| 42 | omega |
| 43 | |
| 44 | theorem boundaryExceptionalFace_weight_lt {ι : Type u} [DecidableEq ι] |
| 45 | (a : ι → ℕ) (b : ℕ) (C S : Finset ι) (hC : MonomialTermination.Construction.MinimalMonomialCenter a b C) |
| 46 | (hCS : C ⊆ S) (i : ι) (hi : i ∈ C) : |
| 47 | boundaryFaceWeight (boundaryScheduleExponents a b C) (boundaryExceptionalFace S i) < |
| 48 | boundaryFaceWeight a S := by |
| 49 | classical |
| 50 | have he := Finset.sum_erase_add S a (hCS hi) |
| 51 | have hlt := MonomialTermination.Construction.monomial_exceptional_exponent_lt a b C hC i hi |
| 52 | rw [boundaryFaceWeight, boundaryExceptionalFace, Finset.sum_insert (by simp), Finset.sum_map] |
| 53 | simp only [Function.Embedding.some_apply, boundaryScheduleExponents] |
| 54 | change (∑ j ∈ C, a j) - b + ∑ j ∈ S.erase i, a j < ∑ j ∈ S, a j |
| 55 | omega |
| 56 | |
| 57 | theorem boundaryFaceBranches_card_bound {ι : Type u} [DecidableEq ι] (C S : Finset ι) (d : ℕ) |
| 58 | (hS : S.card ≤ d) : ∀ T ∈ boundaryFaceBranches C S, T.card ≤ d := by |
| 59 | classical |
| 60 | intro T hT |
| 61 | by_cases hCS : C ⊆ S |
| 62 | · simp only [boundaryFaceBranches, ite_eq_left hCS, List.mem_map, Finset.mem_toList] at hT |
| 63 | obtain ⟨i, hi, rfl⟩ := hT |
| 64 | rwa [boundaryExceptionalFace_card S i (hCS hi)] |
| 65 | · simp only [boundaryFaceBranches, ite_eq_right hCS, List.mem_singleton] at hT |
| 66 | subst T |
| 67 | simpa only [Finset.card_map] using hS |
| 68 | |
| 69 | theorem boundarySchedule_list_sum_map_le_mul_length {α : Type*} (L : List α) (f : α → ℕ) |
| 70 | (n : ℕ) (h : ∀ x ∈ L, f x ≤ n) : (L.map f).sum ≤ L.length * n := by |
| 71 | induction L with |
| 72 | | nil => simp |
| 73 | | cons x L ih => |
| 74 | simp only [List.map_cons, List.sum_cons, List.length_cons, Nat.add_mul, Nat.one_mul] |
| 75 | have hx := h x List.mem_cons_self |
| 76 | have hL := ih (fun y hy => h y (List.mem_cons_of_mem x hy)) |
| 77 | omega |
| 78 | |
| 79 | theorem boundaryFaceBranches_potential_lt {ι : Type u} [DecidableEq ι] |
| 80 | (a : ι → ℕ) (b d : ℕ) (C S : Finset ι) (hC : MonomialTermination.Construction.MinimalMonomialCenter a b C) |
| 81 | (hCS : C ⊆ S) (hS : S.card ≤ d) : |
| 82 | boundarySchedulePotential d (boundaryScheduleExponents a b C) (boundaryFaceBranches C S) < |
| 83 | (d + 1) ^ boundaryFaceWeight a S := by |
| 84 | let n := boundaryFaceWeight a S |
| 85 | obtain ⟨i, hi⟩ := hC.1 |
| 86 | have hn : 0 < n := lt_of_le_of_lt (Nat.zero_le _) |
| 87 | (boundaryExceptionalFace_weight_lt a b C S hC hCS i hi) |
| 88 | have hCd : C.card < d + 1 := Nat.lt_succ_of_le ((Finset.card_le_card hCS).trans hS) |
| 89 | have hp : ∀ j ∈ C.toList, |
| 90 | (d + 1) ^ boundaryFaceWeight (boundaryScheduleExponents a b C) (boundaryExceptionalFace S j) ≤ |
| 91 | (d + 1) ^ (n - 1) := by |
| 92 | intro j hj |
| 93 | have hj' := boundaryExceptionalFace_weight_lt a b C S hC hCS j (Finset.mem_toList.mp hj) |
| 94 | exact Nat.pow_le_pow_right (by omega) (by omega) |
| 95 | have hsum := boundarySchedule_list_sum_map_le_mul_length C.toList |
| 96 | (fun j => (d + 1) ^ boundaryFaceWeight (boundaryScheduleExponents a b C) |
| 97 | (boundaryExceptionalFace S j)) ((d + 1) ^ (n - 1)) hp |
| 98 | have hstrict : C.card * (d + 1) ^ (n - 1) < (d + 1) ^ n := by |
| 99 | have hpow : 0 < (d + 1) ^ (n - 1) := Nat.pow_pos (by omega) |
| 100 | have hmul := Nat.mul_lt_mul_of_pos_right hCd hpow |
| 101 | have hn' : n = (n - 1) + 1 := by omega |
| 102 | conv_rhs => rw [hn', pow_succ] |
| 103 | simpa only [Nat.mul_comm] using hmul |
| 104 | rw [Finset.length_toList] at hsum |
| 105 | rw [boundarySchedulePotential, boundaryFaceBranches, ite_eq_left hCS, List.map_map] |
| 106 | change (C.toList.map (fun j => (d + 1) ^ boundaryFaceWeight |
| 107 | (boundaryScheduleExponents a b C) (boundaryExceptionalFace S j))).sum < (d + 1) ^ n |
| 108 | exact hsum.trans_lt hstrict |
| 109 | |
| 110 | theorem boundaryFaceBranches_potential_le {ι : Type u} [DecidableEq ι] |
| 111 | (a : ι → ℕ) (b d : ℕ) (C S : Finset ι) (hC : MonomialTermination.Construction.MinimalMonomialCenter a b C) |
| 112 | (hS : S.card ≤ d) : |
| 113 | boundarySchedulePotential d (boundaryScheduleExponents a b C) (boundaryFaceBranches C S) ≤ |
| 114 | (d + 1) ^ boundaryFaceWeight a S := by |
| 115 | classical |
| 116 | by_cases hCS : C ⊆ S |
| 117 | · exact (boundaryFaceBranches_potential_lt a b d C S hC hCS hS).le |
| 118 | · simp only [boundarySchedulePotential, boundaryFaceBranches, ite_eq_right hCS, |
| 119 | List.map_singleton, List.sum_singleton, boundaryFaceWeight, Finset.sum_map, |
| 120 | Function.Embedding.some_apply, boundaryScheduleExponents, le_refl] |
| 121 | |
| 122 | theorem boundaryScheduleFaces_card_bound {ι : Type u} [DecidableEq ι] (C : Finset ι) |
| 123 | (L : List (Finset ι)) (d : ℕ) (hL : ∀ S ∈ L, S.card ≤ d) : |
| 124 | ∀ T ∈ boundaryScheduleFaces C L, T.card ≤ d := by |
| 125 | intro T hT |
| 126 | obtain ⟨S, hS, hT⟩ := List.mem_flatMap.mp hT |
| 127 | exact boundaryFaceBranches_card_bound C S d (hL S hS) T hT |
| 128 | |
| 129 | theorem boundaryScheduleFaces_potential_lt {ι : Type u} [DecidableEq ι] |
| 130 | (a : ι → ℕ) (b d : ℕ) (C : Finset ι) (L : List (Finset ι)) |
| 131 | (hC : MonomialTermination.Construction.MinimalMonomialCenter a b C) (hL : ∀ S ∈ L, S.card ≤ d) |
| 132 | (hex : ∃ S ∈ L, C ⊆ S) : |
| 133 | boundarySchedulePotential d (boundaryScheduleExponents a b C) (boundaryScheduleFaces C L) < |
| 134 | boundarySchedulePotential d a L := by |
| 135 | have hweak (K : List (Finset ι)) (hK : ∀ S ∈ K, S.card ≤ d) : |
| 136 | boundarySchedulePotential d (boundaryScheduleExponents a b C) (boundaryScheduleFaces C K) ≤ |
| 137 | boundarySchedulePotential d a K := by |
| 138 | induction K with |
| 139 | | nil => simp [boundarySchedulePotential, boundaryScheduleFaces] |
| 140 | | cons S K ih => |
| 141 | have hS := boundaryFaceBranches_potential_le a b d C S hC (hK S List.mem_cons_self) |
| 142 | have ht := ih (fun T hT => hK T (List.mem_cons_of_mem S hT)) |
| 143 | simpa only [boundaryScheduleFaces, List.flatMap_cons, boundarySchedulePotential, |
| 144 | List.map_append, List.sum_append, List.map_cons, List.sum_cons] using Nat.add_le_add hS ht |
| 145 | induction L with |
| 146 | | nil => simp at hex |
| 147 | | cons S L ih => |
| 148 | have hS := hL S List.mem_cons_self |
| 149 | have ht : ∀ T ∈ L, T.card ≤ d := fun T hT => hL T (List.mem_cons_of_mem S hT) |
| 150 | by_cases hCS : C ⊆ S |
| 151 | · have hfirst := boundaryFaceBranches_potential_lt a b d C S hC hCS hS |
| 152 | have hrest := hweak L ht |
| 153 | simpa only [boundaryScheduleFaces, List.flatMap_cons, boundarySchedulePotential, |
| 154 | List.map_append, List.sum_append, List.map_cons, List.sum_cons] using Nat.add_lt_add_of_lt_of_le hfirst hrest |
| 155 | · have hfirst := boundaryFaceBranches_potential_le a b d C S hC hS |
| 156 | have hrest := ih ht (by |
| 157 | obtain ⟨T, hT, hCT⟩ := hex |
| 158 | rcases List.mem_cons.mp hT with rfl | hT |
| 159 | · exact False.elim (hCS hCT) |
| 160 | · exact ⟨T, hT, hCT⟩) |
| 161 | simpa only [boundaryScheduleFaces, List.flatMap_cons, boundarySchedulePotential, |
| 162 | List.map_append, List.sum_append, List.map_cons, List.sum_cons] using Nat.add_lt_add_of_le_of_lt hfirst hrest |
| 163 | |
| 164 | /-- One common list of label-intersection centers, used on every coordinate chart. |
| 165 | The faces record possible simultaneous boundary components; they need not all occur. -/ |
| 166 | inductive BoundaryMonomialSchedule (b : ℕ) : |
| 167 | (ι : Type u) → (ι → ℕ) → List (Finset ι) → Type (u + 1) |
| 168 | | terminal {ι : Type u} {a : ι → ℕ} {L : List (Finset ι)} |
| 169 | (h : ∀ S ∈ L, boundaryFaceWeight a S < b) : BoundaryMonomialSchedule b ι a L |
| 170 | | step {ι : Type u} {a : ι → ℕ} {L : List (Finset ι)} [DecidableEq ι] |
| 171 | (C : Finset ι) (hC : MonomialTermination.Construction.MinimalMonomialCenter a b C) (hface : ∃ S ∈ L, C ⊆ S) |
| 172 | (rest : BoundaryMonomialSchedule b (Option ι) (boundaryScheduleExponents a b C) |
| 173 | (boundaryScheduleFaces C L)) : BoundaryMonomialSchedule b ι a L |
| 174 | |
| 175 | theorem exists_boundary_monomial_schedule (b : ℕ) (hb : 0 < b) (d : ℕ) : |
| 176 | ∀ (ι : Type u) (a : ι → ℕ) (L : List (Finset ι)), |
| 177 | (∀ S ∈ L, S.card ≤ d) → Nonempty (Construction.BoundaryMonomialSchedule b ι a L) := by |
| 178 | classical |
| 179 | have go (n : ℕ) : ∀ (ι : Type u) (a : ι → ℕ) (L : List (Finset ι)), |
| 180 | (∀ S ∈ L, S.card ≤ d) → boundarySchedulePotential d a L ≤ n → |
| 181 | Nonempty (Construction.BoundaryMonomialSchedule b ι a L) := by |
| 182 | induction n using Nat.strong_induction_on with |
| 183 | | h n ih => |
| 184 | intro ι a L hL hn |
| 185 | by_cases ht : ∀ S ∈ L, boundaryFaceWeight a S < b |
| 186 | · exact ⟨.terminal ht⟩ |
| 187 | · push Not at ht |
| 188 | obtain ⟨S, hS, hweight⟩ := ht |
| 189 | obtain ⟨C, hCS, hC⟩ := MonomialTermination.Construction.exists_minimal_monomial_center a b hb S hweight |
| 190 | have hface : ∃ S ∈ L, C ⊆ S := ⟨S, hS, hCS⟩ |
| 191 | have hdrop := boundaryScheduleFaces_potential_lt a b d C L hC hL hface |
| 192 | obtain ⟨T⟩ := ih _ (hdrop.trans_le hn) (Option ι) (boundaryScheduleExponents a b C) |
| 193 | (boundaryScheduleFaces C L) (boundaryScheduleFaces_card_bound C L d hL) le_rfl |
| 194 | exact ⟨.step C hC hface T⟩ |
| 195 | intro ι a L hL |
| 196 | exact go (boundarySchedulePotential d a L) ι a L hL le_rfl |
| 197 | |
| 198 | end |
| 199 | |
| 200 | end OAI.AlgebraicGeometry.Resolution.Blowups.Boundary.MonomialSchedule.Construction |