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.HilbertScheme.Presentations.GroebnerGenerators |
| 2 | import OAI.AlgebraicGeometry.HilbertScheme.Presentations.Hilbert.MonomialBasis |
| 3 | import Mathlib.Data.Finsupp.MonomialOrder.DegLex |
| 4 | |
| 5 | /-! # Weighted Order -/ |
| 6 | |
| 7 | namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.WeightedOrder.GradedHilbert |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | /-! |
| 12 | Monomial orders with an additive weight compared first. Comparing total |
| 13 | degree and then the total exponent away from one chosen variable gives |
| 14 | an order that detects divisibility by that variable in homogeneous forms. |
| 15 | -/ |
| 16 | |
| 17 | open _root_.MvPolynomial |
| 18 | open scoped MonomialOrder |
| 19 | |
| 20 | variable {n : ℕ} |
| 21 | |
| 22 | def WeightedExponent (_m : MonomialOrder (Fin (n + 1))) |
| 23 | (_w : (Fin (n + 1) →₀ ℕ) →+ ℕ) := Fin (n + 1) →₀ ℕ |
| 24 | |
| 25 | def unweight (m : MonomialOrder (Fin (n + 1))) |
| 26 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : WeightedExponent m w ≃ (Fin (n + 1) →₀ ℕ) := |
| 27 | Equiv.refl _ |
| 28 | |
| 29 | instance weightedAddCommMonoid (m : MonomialOrder (Fin (n + 1))) |
| 30 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : AddCommMonoid (WeightedExponent m w) := |
| 31 | (unweight m w).addCommMonoid |
| 32 | |
| 33 | def weightKey (m : MonomialOrder (Fin (n + 1))) |
| 34 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) (a : WeightedExponent m w) : ℕ ×ₗ m.syn := |
| 35 | toLex (w (unweight m w a), m.toSyn (unweight m w a)) |
| 36 | |
| 37 | theorem weightKey_injective (m : MonomialOrder (Fin (n + 1))) |
| 38 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : Function.Injective (weightKey m w) := by |
| 39 | intro a b h |
| 40 | apply (unweight m w).injective |
| 41 | apply m.toSyn.injective |
| 42 | exact congrArg Prod.snd (toLex.injective h) |
| 43 | |
| 44 | instance weightedLinearOrder (m : MonomialOrder (Fin (n + 1))) |
| 45 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : LinearOrder (WeightedExponent m w) := |
| 46 | LinearOrder.lift' (weightKey m w) (weightKey_injective m w) |
| 47 | |
| 48 | theorem weighted_le_iff (m : MonomialOrder (Fin (n + 1))) |
| 49 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) (a b : WeightedExponent m w) : |
| 50 | a ≤ b ↔ w (unweight m w a) < w (unweight m w b) ∨ |
| 51 | w (unweight m w a) = w (unweight m w b) ∧ |
| 52 | m.toSyn (unweight m w a) ≤ m.toSyn (unweight m w b) := |
| 53 | Prod.Lex.toLex_le_toLex |
| 54 | |
| 55 | instance weightedIsOrderedAddMonoid (m : MonomialOrder (Fin (n + 1))) |
| 56 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : IsOrderedAddMonoid (WeightedExponent m w) where |
| 57 | add_le_add_left a b h c := by |
| 58 | rw [weighted_le_iff] at h ⊢ |
| 59 | change w (unweight m w a + unweight m w c) < w (unweight m w b + unweight m w c) ∨ |
| 60 | w (unweight m w a + unweight m w c) = w (unweight m w b + unweight m w c) ∧ |
| 61 | m.toSyn (unweight m w a + unweight m w c) ≤ |
| 62 | m.toSyn (unweight m w b + unweight m w c) |
| 63 | simpa only [map_add, add_lt_add_iff_right, add_left_inj, add_le_add_iff_right] using h |
| 64 | |
| 65 | instance weightedWellFoundedLT (m : MonomialOrder (Fin (n + 1))) |
| 66 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : WellFoundedLT (WeightedExponent m w) := |
| 67 | InvImage.wf (fun a => (w (unweight m w a), m.toSyn (unweight m w a))) |
| 68 | (WellFounded.prod_lex wellFounded_lt wellFounded_lt) |
| 69 | |
| 70 | theorem exponent_weight_monotone (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : Monotone w := by |
| 71 | intro a b hab |
| 72 | obtain ⟨c, rfl⟩ := le_iff_exists_add.mp hab |
| 73 | rw [map_add] |
| 74 | exact Nat.le_add_right _ _ |
| 75 | |
| 76 | def prependWeight (m : MonomialOrder (Fin (n + 1))) |
| 77 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) : MonomialOrder (Fin (n + 1)) where |
| 78 | syn := WeightedExponent m w |
| 79 | toSyn := { toEquiv := (unweight m w).symm, map_add' := fun _ _ => rfl } |
| 80 | toSyn_monotone a b hab := by |
| 81 | apply Prod.Lex.toLex_le_toLex'.mpr |
| 82 | exact ⟨exponent_weight_monotone w hab, fun _ => m.toSyn_monotone hab⟩ |
| 83 | |
| 84 | theorem prependWeight_le_iff (m : MonomialOrder (Fin (n + 1))) |
| 85 | (w : (Fin (n + 1) →₀ ℕ) →+ ℕ) (a b : Fin (n + 1) →₀ ℕ) : |
| 86 | a ≼[prependWeight m w] b ↔ w a < w b ∨ w a = w b ∧ a ≼[m] b := |
| 87 | weighted_le_iff m w _ _ |
| 88 | |
| 89 | def otherWeight (i : Fin (n + 1)) : (Fin (n + 1) →₀ ℕ) →+ ℕ where |
| 90 | toFun a := ∑ j ∈ Finset.univ.erase i, a j |
| 91 | map_zero' := by simp |
| 92 | map_add' a b := by simp [Finset.sum_add_distrib] |
| 93 | |
| 94 | theorem otherWeight_add (i : Fin (n + 1)) (a : Fin (n + 1) →₀ ℕ) : |
| 95 | otherWeight i a + a i = a.degree := by |
| 96 | change (∑ j ∈ Finset.univ.erase i, a j) + a i = a.degree |
| 97 | rw [Finset.sum_erase_add _ _ (Finset.mem_univ i), Finsupp.degree_eq_sum] |
| 98 | |
| 99 | def variableLastOrder (i : Fin (n + 1)) : MonomialOrder (Fin (n + 1)) := |
| 100 | prependWeight (prependWeight MonomialOrder.lex (otherWeight i)) Finsupp.degree |
| 101 | |
| 102 | theorem variableLastOrder_exponent_antitone (i : Fin (n + 1)) |
| 103 | {a b : Fin (n + 1) →₀ ℕ} (hdeg : a.degree = b.degree) |
| 104 | (hab : a ≼[variableLastOrder i] b) : b i ≤ a i := by |
| 105 | rw [variableLastOrder, prependWeight_le_iff, hdeg] at hab |
| 106 | have hother : otherWeight i a ≤ otherWeight i b := by |
| 107 | have h := hab.resolve_left (lt_irrefl _) |
| 108 | rw [prependWeight_le_iff] at h |
| 109 | exact h.2.elim le_of_lt (fun h => h.1.le) |
| 110 | have ha := otherWeight_add i a |
| 111 | have hb := otherWeight_add i b |
| 112 | omega |
| 113 | |
| 114 | theorem leading_variable_exponent_le {K : Type*} [Field K] |
| 115 | (i : Fin (n + 1)) {f : Hilbert.Polynomial.GradedHilbert.CoordinateRing K n} {d : ℕ} |
| 116 | (hf : f.IsHomogeneous d) (hf0 : f ≠ 0) {a : Fin (n + 1) →₀ ℕ} (ha : a ∈ f.support) : |
| 117 | (variableLastOrder i).degree f i ≤ a i := by |
| 118 | apply variableLastOrder_exponent_antitone i |
| 119 | · have hsupport := (Hilbert.MonomialBasis.GradedHilbert.mem_degreeSpace_iff_support f d).mp hf |
| 120 | exact (hsupport a ha).trans (hsupport _ ((variableLastOrder i).degree_mem_support hf0)).symm |
| 121 | · exact (variableLastOrder i).le_degree ha |
| 122 | |
| 123 | end |
| 124 | |
| 125 | end OAI.AlgebraicGeometry.HilbertScheme.Presentations.WeightedOrder.GradedHilbert |