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.LinearAlgebra.Basis.Basic |
| 2 | import Mathlib.LinearAlgebra.TensorProduct.Basis |
| 3 | import Mathlib.Algebra.Algebra.Subalgebra.Basic |
| 4 | import Mathlib.RingTheory.TensorProduct.Basic |
| 5 | import Mathlib.LinearAlgebra.FreeModule.Finite.Basic |
| 6 | |
| 7 | /-! # Invariant Basis Of -/ |
| 8 | |
| 9 | namespace OAI.AlgebraicGeometry.Quotients.FiniteDescent.InvariantBasisOf.Construction.InvariantBasis |
| 10 | |
| 11 | /-! |
| 12 | # Invariant coefficients for an affine quotient |
| 13 | |
| 14 | This is the coefficient argument in the affine finite-flat quotient construction |
| 15 | (Stacks, Tag 03BL). The hypotheses are identities between the source, target, |
| 16 | composition, and pullback ring maps, together with a basis and its base-changed |
| 17 | linear independence. No quotient existence or freeness over invariants is assumed. |
| 18 | -/ |
| 19 | |
| 20 | open scoped BigOperators TensorProduct |
| 21 | open _root_.Module |
| 22 | |
| 23 | universe u v w z |
| 24 | |
| 25 | variable {A : Type u} {B : Type v} {D : Type w} {ι : Type z} |
| 26 | variable [CommRing A] [CommRing B] [CommRing D] |
| 27 | variable [Algebra A B] [Algebra B D] [Fintype ι] |
| 28 | |
| 29 | /-- Coefficients of a target-valued element in a target-valued source basis |
| 30 | are invariant under the two structural ring maps. -/ |
| 31 | theorem coefficients_invariant |
| 32 | (t : A →+* B) (p c : B →+* D) |
| 33 | (hp : ∀ a, p (algebraMap A B a) = algebraMap B D (t a)) |
| 34 | (hc : ∀ a, c (algebraMap A B a) = algebraMap B D (algebraMap A B a)) |
| 35 | (hct : ∀ a, c (t a) = p (t a)) |
| 36 | (x : ι → A) (b : Basis ι A B) (hb : ∀ i, b i = t (x i)) |
| 37 | (hind : LinearIndependent B (fun i => p (b i))) |
| 38 | (a : A) (j : ι) : |
| 39 | algebraMap A B (b.repr (t a) j) = t (b.repr (t a) j) := by |
| 40 | classical |
| 41 | have hp_sum : |
| 42 | (∑ i, t (b.repr (t a) i) • p (b i)) = p (t a) := by |
| 43 | calc |
| 44 | _ = p (∑ i, b.repr (t a) i • b i) := by |
| 45 | simp only [map_sum, Algebra.smul_def, map_mul, hp] |
| 46 | _ = p (t a) := congrArg p (b.sum_repr (t a)) |
| 47 | have hc_sum : |
| 48 | (∑ i, algebraMap A B (b.repr (t a) i) • p (b i)) = c (t a) := by |
| 49 | calc |
| 50 | _ = c (∑ i, b.repr (t a) i • b i) := by |
| 51 | simp only [map_sum, Algebra.smul_def, map_mul, hc, hb, hct] |
| 52 | _ = c (t a) := congrArg c (b.sum_repr (t a)) |
| 53 | exact hind.eq_coords_of_eq (hc_sum.trans ((hct a).trans hp_sum.symm)) j |
| 54 | |
| 55 | /-- A basis supplied by target-valued elements descends to a basis over the |
| 56 | actual invariant subring. This proves the freeness conclusion, rather than |
| 57 | assuming it as part of a quotient interface. -/ |
| 58 | theorem exists_basis_over_invariants |
| 59 | (t : A →+* B) (ht : Function.Injective t) (p c : B →+* D) |
| 60 | (hp : ∀ a, p (algebraMap A B a) = algebraMap B D (t a)) |
| 61 | (hc : ∀ a, c (algebraMap A B a) = algebraMap B D (algebraMap A B a)) |
| 62 | (hct : ∀ a, c (t a) = p (t a)) |
| 63 | (x : ι → A) (b : Basis ι A B) (hb : ∀ i, b i = t (x i)) |
| 64 | (hind : LinearIndependent B (fun i => p (b i))) : |
| 65 | let C := (algebraMap A B).eqLocus t |
| 66 | letI : Algebra C A := C.subtype.toAlgebra |
| 67 | ∃ bC : Basis ι C A, ∀ i, bC i = x i := by |
| 68 | classical |
| 69 | let C := (algebraMap A B).eqLocus t |
| 70 | let : Algebra C A := C.subtype.toAlgebra |
| 71 | change ∃ bC : Basis ι C A, ∀ i, bC i = x i |
| 72 | have hmap (d : ι → C) : |
| 73 | t (∑ i, d i • x i) = ∑ i, (d i : A) • b i := by |
| 74 | change t (∑ i, (d i : A) * x i) = ∑ i, (d i : A) • b i |
| 75 | rw [map_sum] |
| 76 | apply Finset.sum_congr rfl |
| 77 | intro i _ |
| 78 | rw [map_mul, ← (d i).property, ← hb i, Algebra.smul_def] |
| 79 | let d (a : A) (i : ι) : C := |
| 80 | ⟨b.repr (t a) i, coefficients_invariant t p c hp hc hct x b hb hind a i⟩ |
| 81 | have hsum (a : A) : ∑ i, d a i • x i = a := by |
| 82 | apply ht |
| 83 | rw [hmap] |
| 84 | exact b.sum_repr (t a) |
| 85 | have hli : LinearIndependent C x := by |
| 86 | apply Fintype.linearIndependent_iff.mpr |
| 87 | intro e he i |
| 88 | have he' : ∑ j, (e j : A) • b j = 0 := by |
| 89 | rw [← hmap, he, map_zero] |
| 90 | apply Subtype.ext |
| 91 | exact Fintype.linearIndependent_iff.mp b.linearIndependent _ he' i |
| 92 | have hspan : ⊤ ≤ Submodule.span C (Set.range x) := by |
| 93 | intro a _ |
| 94 | rw [← hsum a] |
| 95 | apply Submodule.sum_mem |
| 96 | intro i _ |
| 97 | exact Submodule.smul_mem _ _ (Submodule.subset_span ⟨i, rfl⟩) |
| 98 | exact ⟨Basis.mk hli hspan, Basis.mk_apply hli hspan⟩ |
| 99 | |
| 100 | omit [Fintype ι] in |
| 101 | /-- If the images of a basis form a basis after base change, the canonical |
| 102 | tensor-product map is bijective. -/ |
| 103 | theorem tensor_lift_bijective_of_bases |
| 104 | {R : Type*} [CommRing R] [Algebra R A] [Algebra R B] [IsScalarTower R A B] |
| 105 | (t : A →ₐ[R] B) (bA : Basis ι R A) (bB : Basis ι A B) |
| 106 | (hb : ∀ i, bB i = t (bA i)) : |
| 107 | Function.Bijective (t.liftEquiv R A A B) := by |
| 108 | let e := (bA.baseChange A).equiv bB (Equiv.refl ι) |
| 109 | have he : (t.liftEquiv R A A B).toLinearMap = e.toLinearMap := by |
| 110 | apply (bA.baseChange A).ext |
| 111 | intro i |
| 112 | change (t.liftEquiv R A A B) (bA.baseChange A i) = |
| 113 | (bA.baseChange A).equiv bB (Equiv.refl ι) (bA.baseChange A i) |
| 114 | rw [Basis.equiv_apply] |
| 115 | simp [hb] |
| 116 | have he' : (t.liftEquiv R A A B : A ⊗[R] A → B) = e := |
| 117 | congrArg (fun f : A ⊗[R] A →ₗ[A] B => (f : A ⊗[R] A → B)) he |
| 118 | rw [he'] |
| 119 | exact e.bijective |
| 120 | |
| 121 | /-- The affine basis criterion yields finite freeness over invariants and |
| 122 | the tensor-product description of the relation algebra. -/ |
| 123 | theorem finiteFree_and_tensor_of_target_basis |
| 124 | (t : A →+* B) (ht : Function.Injective t) (p c : B →+* D) |
| 125 | (hp : ∀ a, p (algebraMap A B a) = algebraMap B D (t a)) |
| 126 | (hc : ∀ a, c (algebraMap A B a) = algebraMap B D (algebraMap A B a)) |
| 127 | (hct : ∀ a, c (t a) = p (t a)) |
| 128 | (x : ι → A) (b : Basis ι A B) (hb : ∀ i, b i = t (x i)) |
| 129 | (hind : LinearIndependent B (fun i => p (b i))) : |
| 130 | let C := (algebraMap A B).eqLocus t |
| 131 | letI : Algebra C A := C.subtype.toAlgebra |
| 132 | Module.Free C A ∧ Module.Finite C A ∧ |
| 133 | ∃ e : A ⊗[C] A ≃ₐ[A] B, ∀ a a', e (a ⊗ₜ[C] a') = algebraMap A B a * t a' := by |
| 134 | let C := (algebraMap A B).eqLocus t |
| 135 | let : Algebra C A := C.subtype.toAlgebra |
| 136 | let : Algebra C B := ((algebraMap A B).comp C.subtype).toAlgebra |
| 137 | have : IsScalarTower C A B := IsScalarTower.of_algebraMap_eq fun _ => rfl |
| 138 | let tC : A →ₐ[C] B := { t with commutes' := fun r => r.property.symm } |
| 139 | obtain ⟨bC, hbC⟩ := exists_basis_over_invariants t ht p c hp hc hct x b hb hind |
| 140 | refine ⟨Module.Free.of_basis bC, Module.Finite.of_basis bC, ?_⟩ |
| 141 | have hbij : Function.Bijective (tC.liftEquiv C A A B) := by |
| 142 | apply tensor_lift_bijective_of_bases tC bC b |
| 143 | intro i |
| 144 | change b i = t (bC i) |
| 145 | rw [hbC, hb] |
| 146 | refine ⟨AlgEquiv.ofBijective (tC.liftEquiv C A A B) hbij, ?_⟩ |
| 147 | intro a a' |
| 148 | exact Algebra.smul_def a (t a') |
| 149 | |
| 150 | end OAI.AlgebraicGeometry.Quotients.FiniteDescent.InvariantBasisOf.Construction.InvariantBasis |