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.Data.Set.Finite.Range |
| 2 | import Mathlib.Data.Set.Finite.Lattice |
| 3 | import Mathlib.Data.Finset.Max |
| 4 | import Mathlib.Data.Fintype.Prod |
| 5 | import Mathlib.Basic.Real.Basic |
| 6 | import Mathlib.Logic.Relation |
| 7 | import Mathlib.Tactic.Linarith |
| 8 | |
| 9 | /-! # Difference Constraints -/ |
| 10 | |
| 11 | namespace OAI.NumberTheory.ArithmeticGroups.Lattices.Finite.DifferenceConstraints.Construction |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | /-! A finite system of bounded directed differences is uniformly |
| 16 | close to the corresponding system of exact order inequalities. -/ |
| 17 | |
| 18 | open scoped Classical |
| 19 | |
| 20 | theorem difference_bound_along_path {ι : Type*} (r : ι → ι → Prop) (t : ℝ) (ht : 0 ≤ t) |
| 21 | {i j : ι} (hij : Relation.ReflTransGen r i j) : |
| 22 | ∃ c : ℝ, 0 ≤ c ∧ ∀ x : ι → ℝ, (∀ a b, r a b → x a - x b ≤ t) → x i - x j ≤ c := by |
| 23 | induction hij with |
| 24 | | refl => exact ⟨0, le_rfl, fun _ _ => by simp⟩ |
| 25 | | @tail j k _ hjk ih => |
| 26 | obtain ⟨c, hc, hbound⟩ := ih |
| 27 | refine ⟨c + t, add_nonneg hc ht, fun x hx => ?_⟩ |
| 28 | have h₁ := hbound x hx |
| 29 | have h₂ := hx j k hjk |
| 30 | linarith |
| 31 | |
| 32 | theorem finite_reachable_difference_bound {ι : Type*} [Finite ι] |
| 33 | (r : ι → ι → Prop) (t : ℝ) (ht : 0 ≤ t) : |
| 34 | ∃ c : ℝ, 0 ≤ c ∧ ∀ x : ι → ℝ, (∀ a b, r a b → x a - x b ≤ t) → |
| 35 | ∀ i j, Relation.ReflTransGen r i j → x i - x j ≤ c := by |
| 36 | let : Fintype ι := Fintype.ofFinite ι |
| 37 | have hp : ∀ i j : ι, ∃ c : ℝ, 0 ≤ c ∧ ∀ x : ι → ℝ, |
| 38 | (∀ a b, r a b → x a - x b ≤ t) → Relation.ReflTransGen r i j → x i - x j ≤ c := by |
| 39 | intro i j |
| 40 | by_cases hij : Relation.ReflTransGen r i j |
| 41 | · obtain ⟨c, hc, hb⟩ := difference_bound_along_path r t ht hij |
| 42 | exact ⟨c, hc, fun x hx _ => hb x hx⟩ |
| 43 | · exact ⟨0, le_rfl, fun _ _ h => (hij h).elim⟩ |
| 44 | choose c hc hb using hp |
| 45 | obtain ⟨C, hC⟩ := (Set.finite_range (fun p : ι × ι => c p.1 p.2)).bddAbove |
| 46 | refine ⟨max C 0, le_max_right _ _, fun x hx i j hij => ?_⟩ |
| 47 | exact (hb i j x hx hij).trans ((hC ⟨(i, j), rfl⟩).trans (le_max_left _ _)) |
| 48 | |
| 49 | theorem finite_difference_constraints_approximation {ι : Type*} [Fintype ι] |
| 50 | (r : ι → ι → Prop) (t : ℝ) (ht : 0 ≤ t) : |
| 51 | ∃ c : ℝ, 0 ≤ c ∧ ∀ x : ι → ℝ, (∀ a b, r a b → x a - x b ≤ t) → |
| 52 | ∃ y : ι → ℝ, (∀ i j, r i j → y i ≤ y j) ∧ |
| 53 | ∀ i, 0 ≤ x i - y i ∧ x i - y i ≤ c := by |
| 54 | obtain ⟨c, hc, hb⟩ := finite_reachable_difference_bound r t ht |
| 55 | refine ⟨c, hc, fun x hx => ?_⟩ |
| 56 | let R := Relation.ReflTransGen r |
| 57 | let S : ι → Finset ℝ := fun i => (Finset.univ.filter (R i)).image x |
| 58 | have hS : ∀ i, (S i).Nonempty := by |
| 59 | intro i |
| 60 | exact ⟨x i, Finset.mem_image.mpr ⟨i, |
| 61 | Finset.mem_filter.mpr ⟨Finset.mem_univ _, Relation.ReflTransGen.refl⟩, rfl⟩⟩ |
| 62 | let y := fun i => (S i).min' (hS i) |
| 63 | have hy : ∀ i, ∃ j, R i j ∧ y i = x j := by |
| 64 | intro i |
| 65 | obtain ⟨j, hj, he⟩ := Finset.mem_image.mp ((S i).min'_mem (hS i)) |
| 66 | exact ⟨j, (Finset.mem_filter.mp hj).2, he.symm⟩ |
| 67 | refine ⟨y, ?_, ?_⟩ |
| 68 | · intro i j hij |
| 69 | obtain ⟨k, hjk, he⟩ := hy j |
| 70 | rw [he] |
| 71 | apply (S i).min'_le |
| 72 | exact Finset.mem_image.mpr ⟨k, Finset.mem_filter.mpr ⟨Finset.mem_univ _, |
| 73 | (Relation.ReflTransGen.single hij).trans hjk⟩, rfl⟩ |
| 74 | · intro i |
| 75 | constructor |
| 76 | · have hle : y i ≤ x i := (S i).min'_le _ (Finset.mem_image.mpr ⟨i, |
| 77 | Finset.mem_filter.mpr ⟨Finset.mem_univ _, Relation.ReflTransGen.refl⟩, rfl⟩) |
| 78 | linarith |
| 79 | · obtain ⟨j, hij, he⟩ := hy i |
| 80 | rw [he] |
| 81 | exact hb x hx i j hij |
| 82 | |
| 83 | end |
| 84 | |
| 85 | end OAI.NumberTheory.ArithmeticGroups.Lattices.Finite.DifferenceConstraints.Construction |