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 | /- |
| 2 | Copyright (c) 2026 AINTLIB contributors. All rights reserved. |
| 3 | Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | This file has been modified. |
| 5 | -/ |
| 6 | import Mathlib.Algebra.Category.ModuleCat.Descent |
| 7 | import Mathlib.Algebra.Category.ModuleCat.ProjectiveDimension |
| 8 | import Mathlib.Algebra.Polynomial.Module.TensorProduct |
| 9 | import Mathlib.CategoryTheory.Preadditive.Projective.Preserves |
| 10 | |
| 11 | /-! # Hilbert Syzygy M -/ |
| 12 | |
| 13 | namespace OAI.AlgebraicGeometry.SheafCohomology.Projective.HilbertSyzygyM.HilbertSyzygy |
| 14 | |
| 15 | noncomputable section |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | open _root_.CategoryTheory Abelian _root_.Module _root_.ModuleCat Limits |
| 20 | |
| 21 | attribute [local instance] RingHomInvPair.of_ringEquiv |
| 22 | |
| 23 | /-- The ring homomorphism `R → R[X]`. -/ |
| 24 | abbrev polyAlg (R : Type u) [CommRing R] : R →+* Polynomial R := algebraMap R (Polynomial R) |
| 25 | |
| 26 | /-- The identity map, viewed as a semilinear equivalence from the `restrictScalars`-transported |
| 27 | module back to the original module along a ring isomorphism `e`. -/ |
| 28 | def restrictScalarsSemilinearEquiv {R R' : Type u} [CommRing R] [CommRing R'] (e : R ≃+* R') |
| 29 | (M : ModuleCat.{u} R') : |
| 30 | ((ModuleCat.restrictScalars (e : R →+* R')).obj M) ≃ₛₗ[(e : R →+* R')] M where |
| 31 | toFun x := x |
| 32 | invFun x := x |
| 33 | map_add' _ _ := rfl |
| 34 | map_smul' _ _ := rfl |
| 35 | left_inv _ := rfl |
| 36 | right_inv _ := rfl |
| 37 | |
| 38 | /-- Transport a projective-dimension bound across a ring isomorphism: if the `R`-module obtained |
| 39 | from `M` by restricting scalars along `e: R ≃+* R'` has projective dimension `≤ n`, then so does |
| 40 | the `R'`-module `M`. -/ |
| 41 | lemma hasProjectiveDimensionLE_of_ringEquiv {R R' : Type u} [CommRing R] [CommRing R'] |
| 42 | (e : R ≃+* R') (M : ModuleCat.{u} R') (n : ℕ) |
| 43 | [HasProjectiveDimensionLE ((ModuleCat.restrictScalars (e : R →+* R')).obj M) n] : |
| 44 | HasProjectiveDimensionLE M n := |
| 45 | ModuleCat.hasProjectiveDimensionLE_of_semiLinearEquiv e (restrictScalarsSemilinearEquiv e M) n |
| 46 | |
| 47 | /-- Extension of scalars along `R → R[X]` preserves the bound `projective dimension ≤ n`: |
| 48 | if the `R`-module `N` has projective dimension `≤ n`, then the `R[X]`-module `R[X] ⊗_R N` does too. |
| 49 | |
| 50 | `R[X]` is free, hence flat, over `R`, so `extendScalars` is exact; and it preserves projective |
| 51 | objects, being a left adjoint whose right adjoint `restrictScalars` preserves epimorphisms. The |
| 52 | proof then mirrors `ModuleCat.localizedModule_hasProjectiveDimensionLE`. -/ |
| 53 | lemma hasProjectiveDimensionLE_extendScalars (R : Type u) [CommRing R] (n : ℕ) |
| 54 | (N : ModuleCat.{u} R) [HasProjectiveDimensionLE N n] : |
| 55 | HasProjectiveDimensionLE ((extendScalars (polyAlg R)).obj N) n := by |
| 56 | have hepi : (restrictScalars.{u} (polyAlg R)).PreservesEpimorphisms := |
| 57 | { preserves := fun g h => by rw [ModuleCat.epi_iff_surjective] at h ⊢; exact h } |
| 58 | have plim : PreservesFiniteLimits (extendScalars.{u, u, u} (polyAlg R)) := |
| 59 | ModuleCat.preservesFiniteLimits_extendScalars_of_flat |
| 60 | (RingHom.flat_algebraMap_iff.mpr Module.Flat.of_free) |
| 61 | have padd : (extendScalars.{u, u, u} (polyAlg R)).Additive := |
| 62 | Functor.additive_of_preserves_binary_products _ |
| 63 | have pproj : (extendScalars.{u, u, u} (polyAlg R)).PreservesProjectiveObjects := |
| 64 | Functor.preservesProjectiveObjects_of_adjunction_of_preservesEpimorphisms |
| 65 | (ModuleCat.extendRestrictScalarsAdj (polyAlg R)) |
| 66 | induction n generalizing N with |
| 67 | | zero => |
| 68 | have projle : HasProjectiveDimensionLE N 0 := ‹_› |
| 69 | simp only [HasProjectiveDimensionLE, zero_add] at projle ⊢ |
| 70 | rw [← projective_iff_hasProjectiveDimensionLT_one] at projle ⊢ |
| 71 | exact (extendScalars.{u, u, u} (polyAlg R)).projective_obj_of_projective projle |
| 72 | | succ n ih => |
| 73 | rcases ModuleCat.enoughProjectives.1 N with ⟨⟨P, g⟩⟩ |
| 74 | let T := ShortComplex.mk (kernel.ι g) g (kernel.condition g) |
| 75 | have T_exact : T.ShortExact := { exact := ShortComplex.kernelSequence_exact g } |
| 76 | let TS := T.map (extendScalars.{u, u, u} (polyAlg R)) |
| 77 | have TS_exact : TS.ShortExact := T_exact.map_of_exact (extendScalars.{u, u, u} (polyAlg R)) |
| 78 | have hp2 : Projective TS.X₂ := (extendScalars.{u, u, u} (polyAlg R)).projective_obj _ |
| 79 | have := (T_exact.hasProjectiveDimensionLT_X₃_iff n ‹_›).mp ‹_› |
| 80 | exact (TS_exact.hasProjectiveDimensionLT_X₃_iff n hp2).mpr (ih (kernel g)) |
| 81 | |
| 82 | section Char |
| 83 | open _root_.Polynomial TensorProduct |
| 84 | open scoped ChangeOfRings |
| 85 | variable (R : Type u) [CommRing R] (M : ModuleCat.{u} (Polynomial R)) |
| 86 | |
| 87 | /-- `M` restricted to an `R`-module. -/ |
| 88 | abbrev Mr : ModuleCat.{u} R := (restrictScalars (polyAlg R)).obj M |
| 89 | /-- Left tensor factor `S` as an `R`-module (via `restrictScalars`). -/ |
| 90 | abbrev SL := ((restrictScalars (polyAlg R)).obj (ModuleCat.of (Polynomial R) (Polynomial R))) |
| 91 | /-- The extended module `R[X] ⊗_R Mᵣ`. -/ |
| 92 | abbrev X2 : ModuleCat.{u} (Polynomial R) := (extendScalars (polyAlg R)).obj (Mr R M) |
| 93 | /-- The concrete `R[X]`-module `PolynomialModule R Mᵣ ≅ ℕ →₀ M`. -/ |
| 94 | abbrev P := PolynomialModule R (Mr R M) |
| 95 | |
| 96 | /-- `Module R` on `↑X2` (the tensor's base `R`-module), needed to bridge instances. -/ |
| 97 | instance instModuleRX2 : Module R (X2 R M) := |
| 98 | inferInstanceAs (Module R (TensorProduct R (SL R) (Mr R M))) |
| 99 | |
| 100 | /-! ### The bridge `P ≃ₗ[R[X]] X2` -/ |
| 101 | |
| 102 | def Lequiv : (Polynomial R) ⊗[R] (Mr R M) ≃ₗ[Polynomial R] HilbertSyzygy.P R M := |
| 103 | PolynomialModule.polynomialTensorProductLEquivPolynomialModule R (Mr R M) |
| 104 | |
| 105 | def leftBridge : (Polynomial R) ≃ₗ[R] (SL R) where |
| 106 | toFun s := s |
| 107 | invFun s := s |
| 108 | map_add' _ _ := rfl |
| 109 | map_smul' r s := by |
| 110 | simp only [RingHom.id_apply] |
| 111 | show (r • s : Polynomial R) = polyAlg R r • (s : SL R) |
| 112 | rw [Algebra.smul_def, smul_eq_mul] |
| 113 | left_inv _ := rfl |
| 114 | right_inv _ := rfl |
| 115 | |
| 116 | @[simp] lemma leftBridge_apply (s : Polynomial R) : leftBridge R s = s := rfl |
| 117 | |
| 118 | def bridgeR : (Polynomial R) ⊗[R] (Mr R M) ≃ₗ[R] (X2 R M) := |
| 119 | TensorProduct.congr (leftBridge R) (LinearEquiv.refl R (Mr R M)) |
| 120 | |
| 121 | @[simp] lemma bridgeR_tmul (s : Polynomial R) (m : Mr R M) : |
| 122 | bridgeR R M (s ⊗ₜ[R] m) = (s ⊗ₜ[R, polyAlg R] m : X2 R M) := rfl |
| 123 | |
| 124 | def bridgeS : (Polynomial R) ⊗[R] (Mr R M) ≃ₗ[Polynomial R] (X2 R M) where |
| 125 | toFun := bridgeR R M |
| 126 | invFun := (bridgeR R M).symm |
| 127 | map_add' := map_add _ |
| 128 | map_smul' s x := by |
| 129 | simp only [RingHom.id_apply] |
| 130 | induction x using TensorProduct.inductionOn with |
| 131 | | tmul a m => |
| 132 | rw [TensorProduct.smul_tmul', smul_eq_mul, bridgeR_tmul, bridgeR_tmul] |
| 133 | exact (ExtendScalars.smul_tmul (polyAlg R) s a m).symm |
| 134 | | add x y hx hy => rw [smul_add, map_add, map_add, hx, hy, smul_add] |
| 135 | left_inv := (bridgeR R M).left_inv |
| 136 | right_inv := (bridgeR R M).right_inv |
| 137 | |
| 138 | def eLin : HilbertSyzygy.P R M ≃ₗ[Polynomial R] (X2 R M) := (Lequiv R M).symm.trans (bridgeS R M) |
| 139 | |
| 140 | lemma Lequiv_Xpow_tmul (i : ℕ) (m : Mr R M) : |
| 141 | Lequiv R M (((X:Polynomial R)^i) ⊗ₜ[R] m) = PolynomialModule.single R i m := by |
| 142 | change LinearMap.liftBaseChange (Polynomial R) |
| 143 | (PolynomialModule.lsingle R 0) (((X:Polynomial R)^i) ⊗ₜ[R] m) = _ |
| 144 | rw [LinearMap.liftBaseChange_tmul, ← Polynomial.monomial_one_right_eq_X_pow] |
| 145 | show monomial i (1:R) • PolynomialModule.single R 0 m = PolynomialModule.single R i m |
| 146 | rw [PolynomialModule.monomial_smul_single, one_smul, Nat.add_zero] |
| 147 | |
| 148 | lemma eLin_single (i : ℕ) (m : Mr R M) : |
| 149 | eLin R M (PolynomialModule.single R i m) |
| 150 | = (((X:Polynomial R)^i) ⊗ₜ[R, polyAlg R] m : X2 R M) := by |
| 151 | rw [eLin, LinearEquiv.trans_apply, ← Lequiv_Xpow_tmul, LinearEquiv.symm_apply_apply] |
| 152 | exact bridgeR_tmul R M _ m |
| 153 | |
| 154 | /-! ### The counit surjection `ε` -/ |
| 155 | |
| 156 | lemma counit_tmul (s : Polynomial R) (m : Mr R M) : |
| 157 | (ExtendRestrictScalarsAdj.Counit.map (polyAlg R)).hom |
| 158 | (s ⊗ₜ[R, polyAlg R] m : X2 R M) = s • m := by |
| 159 | erw [ExtendRestrictScalarsAdj.Counit.map_hom_apply] |
| 160 | rfl |
| 161 | |
| 162 | /-- `ε: P → M`, the counit transported along the bridge. -/ |
| 163 | def epsP : HilbertSyzygy.P R M →ₗ[Polynomial R] (M : Type u) := |
| 164 | (ExtendRestrictScalarsAdj.Counit.map (polyAlg R)).hom ∘ₗ (eLin R M).toLinearMap |
| 165 | |
| 166 | lemma epsP_single (i : ℕ) (m : Mr R M) : |
| 167 | epsP R M (PolynomialModule.single R i m) = ((X:Polynomial R)^i) • m := by |
| 168 | show (ExtendRestrictScalarsAdj.Counit.map (polyAlg R)).hom |
| 169 | (eLin R M (PolynomialModule.single R i m)) = _ |
| 170 | rw [eLin_single, counit_tmul] |
| 171 | |
| 172 | /-! ### The injection `φ` -/ |
| 173 | |
| 174 | def xAction : (Mr R M) →ₗ[R] (Mr R M) where |
| 175 | toFun x := (X : Polynomial R) • x |
| 176 | map_add' := smul_add _ |
| 177 | map_smul' r x := by |
| 178 | show (X : Polynomial R) • ((polyAlg R r) • x) = (polyAlg R r) • ((X : Polynomial R) • x) |
| 179 | rw [smul_smul, smul_smul, mul_comm] |
| 180 | |
| 181 | @[simp] lemma xAction_apply (x : Mr R M) : xAction R M x = (X : Polynomial R) • x := rfl |
| 182 | |
| 183 | /-- `mapψ: P → P`, applying the `X`-action degreewise; `R[X]`-linear. -/ |
| 184 | def mapPsi : HilbertSyzygy.P R M →ₗ[Polynomial R] HilbertSyzygy.P R M where |
| 185 | toFun := PolynomialModule.map R (xAction R M) |
| 186 | map_add' := map_add _ |
| 187 | map_smul' p q := by |
| 188 | simp only [RingHom.id_apply] |
| 189 | rw [PolynomialModule.map_smul, Algebra.algebraMap_self, Polynomial.map_id] |
| 190 | |
| 191 | @[simp] lemma mapPsi_single (i : ℕ) (m : Mr R M) : |
| 192 | mapPsi R M (PolynomialModule.single R i m) |
| 193 | = PolynomialModule.single R i ((X:Polynomial R) • m) := by |
| 194 | show PolynomialModule.map R (xAction R M) (PolynomialModule.single R i m) = _ |
| 195 | rw [PolynomialModule.map_single, xAction_apply] |
| 196 | |
| 197 | lemma X_smul_single (i : ℕ) (m : Mr R M) : |
| 198 | (X : Polynomial R) • PolynomialModule.single R i m = PolynomialModule.single R (i+1) m := by |
| 199 | rw [← Polynomial.monomial_one_one_eq_X, PolynomialModule.monomial_smul_single, one_smul, |
| 200 | Nat.add_comm] |
| 201 | |
| 202 | /-- `φ: P → P`, the injection `single i m ↦ single (i+1) m − single i (X • m)`. -/ |
| 203 | def phiP : HilbertSyzygy.P R M →ₗ[Polynomial R] HilbertSyzygy.P R M := |
| 204 | LinearMap.lsmul (Polynomial R) (HilbertSyzygy.P R M) (X : Polynomial R) - mapPsi R M |
| 205 | |
| 206 | @[simp] lemma phiP_single (i : ℕ) (m : Mr R M) : |
| 207 | phiP R M (PolynomialModule.single R i m) |
| 208 | = PolynomialModule.single R (i+1) m - PolynomialModule.single R i ((X:Polynomial R) • m) := by |
| 209 | rw [phiP, LinearMap.sub_apply, mapPsi_single, LinearMap.lsmul_apply, X_smul_single] |
| 210 | |
| 211 | /-! ### Exactness -/ |
| 212 | |
| 213 | set_option backward.isDefEq.respectTransparency false in |
| 214 | /-- `ε ∘ φ = 0`. -/ |
| 215 | lemma epsP_phiP (q : HilbertSyzygy.P R M) : epsP R M (phiP R M q) = 0 := by |
| 216 | induction q using PolynomialModule.induction_linear with |
| 217 | | zero => simp |
| 218 | | add p q hp hq => rw [map_add, map_add, hp, hq, add_zero] |
| 219 | | single i m => |
| 220 | rw [phiP_single, map_sub, epsP_single, epsP_single, smul_smul, ← pow_succ, sub_self] |
| 221 | |
| 222 | set_option backward.isDefEq.respectTransparency false in |
| 223 | /-- `ε` is surjective. -/ |
| 224 | lemma epsP_surjective : Function.Surjective (epsP R M) := |
| 225 | fun m => ⟨PolynomialModule.single R 0 m, by rw [epsP_single, pow_zero, one_smul]⟩ |
| 226 | |
| 227 | /-- The `(n+1)`-coefficient of `φ q`. -/ |
| 228 | lemma phiP_coeff_succ (q : HilbertSyzygy.P R M) (n : ℕ) : |
| 229 | (phiP R M q).coeff (n+1) = q.coeff n - (X:Polynomial R) • (q.coeff (n+1)) := by |
| 230 | show ((LinearMap.lsmul (Polynomial R) (HilbertSyzygy.P R M) (X:Polynomial R) - mapPsi R M) q).coeff (n+1) = _ |
| 231 | rw [LinearMap.sub_apply, LinearMap.lsmul_apply] |
| 232 | change ((X:Polynomial R) • q).coeff (n+1) - (mapPsi R M q).coeff (n+1) |
| 233 | = q.coeff n - (X:Polynomial R) • (q.coeff (n+1)) |
| 234 | congr 1 |
| 235 | rw [← Polynomial.monomial_one_one_eq_X, PolynomialModule.monomial_smul_apply] |
| 236 | simp |
| 237 | |
| 238 | lemma Pcoe_sub (a b : HilbertSyzygy.P R M) (i : ℕ) : (a - b).coeff i = a.coeff i - b.coeff i := by |
| 239 | have : (a - b).coeff = a.coeff - b.coeff := map_sub PolynomialModule.coeffAddEquiv a b |
| 240 | rw [this, Finsupp.sub_apply] |
| 241 | lemma Pcoe_single (k : ℕ) (a : Mr R M) (i : ℕ) : |
| 242 | (PolynomialModule.single R k a).coeff i = if k = i then a else 0 := by |
| 243 | rw [PolynomialModule.coeff_single, Finsupp.single_apply] |
| 244 | |
| 245 | /-- `φ` is injective. -/ |
| 246 | lemma phiP_injective : Function.Injective (phiP R M) := by |
| 247 | rw [injective_iff_map_eq_zero] |
| 248 | intro q hq |
| 249 | by_contra h |
| 250 | have hcne : q.coeff ≠ 0 := fun hc => h (PolynomialModule.coeff_injective (by simp [hc])) |
| 251 | have hne : q.coeff.support.Nonempty := Finsupp.support_nonempty_iff.mpr hcne |
| 252 | set N := q.coeff.support.max' hne with hN |
| 253 | have hNmem : N ∈ q.coeff.support := q.coeff.support.max'_mem hne |
| 254 | have hqN : q.coeff N ≠ 0 := Finsupp.mem_support_iff.mp hNmem |
| 255 | have hqN1 : q.coeff (N+1) = 0 := by |
| 256 | by_contra hc |
| 257 | have : N+1 ∈ q.coeff.support := Finsupp.mem_support_iff.mpr hc |
| 258 | have := q.coeff.support.le_max' _ this |
| 259 | omega |
| 260 | have : (phiP R M q).coeff (N+1) = q.coeff N := by |
| 261 | rw [phiP_coeff_succ, hqN1, smul_zero, sub_zero] |
| 262 | rw [hq] at this |
| 263 | exact hqN this.symm |
| 264 | |
| 265 | /-- `ker ε ⊆ range φ`, by downward induction on the degree bound `n`. -/ |
| 266 | lemma ker_le_range_aux : ∀ (n : ℕ) (q : HilbertSyzygy.P R M), |
| 267 | (∀ i, n < i → q.coeff i = 0) → epsP R M q = 0 → q ∈ LinearMap.range (phiP R M) := by |
| 268 | intro n |
| 269 | induction n with |
| 270 | | zero => |
| 271 | intro q hq he |
| 272 | have hq0 : q = PolynomialModule.single R 0 (q.coeff 0) := by |
| 273 | refine PolynomialModule.ext ?_ |
| 274 | refine Finsupp.ext fun j => ?_ |
| 275 | rw [Pcoe_single] |
| 276 | rcases Nat.eq_zero_or_pos j with hj | hj |
| 277 | · subst hj; simp |
| 278 | · rw [hq j hj, ite_eq_right (by omega)] |
| 279 | have hval : epsP R M q = q.coeff 0 := by |
| 280 | conv_lhs => rw [hq0] |
| 281 | rw [epsP_single, pow_zero, one_smul] |
| 282 | rw [hval] at he |
| 283 | refine ⟨0, ?_⟩ |
| 284 | rw [map_zero, hq0, he] |
| 285 | exact (PolynomialModule.single_zero (R := R) 0).symm |
| 286 | | succ n ih => |
| 287 | intro q hq he |
| 288 | set m := q.coeff (n+1) with hm |
| 289 | set q' := q - phiP R M (PolynomialModule.single R n m) with hq' |
| 290 | have hbound : ∀ i, n < i → q'.coeff i = 0 := by |
| 291 | intro i hi |
| 292 | rw [hq', Pcoe_sub, phiP_single, Pcoe_sub, Pcoe_single, Pcoe_single] |
| 293 | rcases Nat.lt_or_ge (n+1) i with h1 | h1 |
| 294 | · rw [hq i h1, ite_eq_right (by omega), ite_eq_right (by omega)]; simp |
| 295 | · have : i = n+1 := by omega |
| 296 | subst this |
| 297 | rw [ite_eq_left rfl, ite_eq_right (by omega), ← hm]; simp |
| 298 | have he' : epsP R M q' = 0 := by rw [hq', map_sub, he, epsP_phiP, sub_zero] |
| 299 | obtain ⟨p', hp'⟩ := ih q' hbound he' |
| 300 | refine ⟨p' + PolynomialModule.single R n m, ?_⟩ |
| 301 | rw [map_add, hp', hq'] |
| 302 | abel |
| 303 | |
| 304 | /-- The sequence `P --φ--> P --ε--> M` is exact. -/ |
| 305 | lemma phiP_epsP_exact : Function.Exact (phiP R M) (epsP R M) := by |
| 306 | intro q |
| 307 | constructor |
| 308 | · intro he |
| 309 | refine ker_le_range_aux R M (q.coeff.support.sup id) q (fun i hi => ?_) he |
| 310 | by_contra hc |
| 311 | have hle := Finset.le_sup (f := id) (Finsupp.mem_support_iff.mpr hc) |
| 312 | simp only [id_eq] at hle |
| 313 | omega |
| 314 | · rintro ⟨p, rfl⟩ |
| 315 | exact epsP_phiP R M p |
| 316 | |
| 317 | /-! ### Assembly -/ |
| 318 | |
| 319 | lemma of_coe_X2 : ModuleCat.of (Polynomial R) (X2 R M : Type u) = X2 R M := rfl |
| 320 | lemma of_coe_M : ModuleCat.of (Polynomial R) (M : Type u) = M := rfl |
| 321 | |
| 322 | /-- The characteristic short complex `P --φ--> P --ε--> M`. -/ |
| 323 | def charSES : ShortComplex (ModuleCat.{u} (Polynomial R)) := |
| 324 | ModuleCat.shortComplexOfCompEqZero (phiP R M) (epsP R M) |
| 325 | (by ext q; exact epsP_phiP R M q) |
| 326 | |
| 327 | lemma charSES_shortExact : (charSES R M).ShortExact := |
| 328 | ModuleCat.shortComplex_shortExact _ (phiP_epsP_exact R M) |
| 329 | (phiP_injective R M) (epsP_surjective R M) |
| 330 | |
| 331 | end Char |
| 332 | |
| 333 | /-- **The characteristic short exact sequence** of an `R[X]`-module `M`: |
| 334 | `0 → R[X] ⊗_R M → R[X] ⊗_R M → M → 0` (restriction of scalars is left implicit in the tensor |
| 335 | factors). The surjection is the counit of `extendScalars ⊣ restrictScalars`; the injection is |
| 336 | `s ⊗ m ↦ sX ⊗ m - s ⊗ (X • m)`. |
| 337 | |
| 338 | It is proved as a standard `Finsupp` exactness computation, transporting the concrete |
| 339 | `PolynomialModule R Mᵣ` model to `R[X] ⊗_R Mᵣ` through |
| 340 | `PolynomialModule.polynomialTensorProductLEquivPolynomialModule`; see the mathematical overview and the |
| 341 | `charSES` helpers above. -/ |
| 342 | lemma exists_characteristicShortExact (R : Type u) [CommRing R] |
| 343 | (M : ModuleCat.{u} (Polynomial R)) : |
| 344 | ∃ S : ShortComplex (ModuleCat.{u} (Polynomial R)), S.ShortExact ∧ |
| 345 | Nonempty (S.X₁ ≅ (extendScalars (polyAlg R)).obj ((restrictScalars (polyAlg R)).obj M)) ∧ |
| 346 | Nonempty (S.X₂ ≅ (extendScalars (polyAlg R)).obj ((restrictScalars (polyAlg R)).obj M)) ∧ |
| 347 | Nonempty (S.X₃ ≅ M) := by |
| 348 | exact ⟨charSES R M, charSES_shortExact R M, |
| 349 | ⟨(eLin R M).toModuleIso⟩, ⟨(eLin R M).toModuleIso⟩, ⟨Iso.refl _⟩⟩ |
| 350 | |
| 351 | /-- **Polynomial change of rings for projective dimension.** If every `R`-module has projective |
| 352 | dimension `≤ d`, then every `R[X]`-module has projective dimension `≤ d + 1`. |
| 353 | |
| 354 | Proved from `hasProjectiveDimensionLE_extendScalars` and `exists_characteristicShortExact`: the |
| 355 | characteristic sequence `0 → R[X] ⊗_R M → R[X] ⊗_R M → M → 0` has both outer terms of projective |
| 356 | dimension `≤ d`, so `ShortComplex.ShortExact.hasProjectiveDimensionLT_X₃` bounds `M` by `d + 1`. -/ |
| 357 | lemma polynomialChangeOfRings (R : Type u) [CommRing R] (d : ℕ) |
| 358 | (hd : ∀ (N : ModuleCat.{u} R), HasProjectiveDimensionLE N d) |
| 359 | (M : ModuleCat.{u} (Polynomial R)) : |
| 360 | HasProjectiveDimensionLE M (d + 1) := by |
| 361 | have hMdown : HasProjectiveDimensionLE ((restrictScalars (polyAlg R)).obj M) d := hd _ |
| 362 | have hP : HasProjectiveDimensionLE |
| 363 | ((extendScalars (polyAlg R)).obj ((restrictScalars (polyAlg R)).obj M)) d := |
| 364 | hasProjectiveDimensionLE_extendScalars R d _ |
| 365 | obtain ⟨S, hSE, ⟨e1⟩, ⟨e2⟩, ⟨e3⟩⟩ := exists_characteristicShortExact R M |
| 366 | have hX3 : HasProjectiveDimensionLT S.X₃ (d + 2) := by |
| 367 | have h1 : HasProjectiveDimensionLT S.X₁ (d + 1) := by |
| 368 | have : HasProjectiveDimensionLT ((extendScalars (polyAlg R)).obj |
| 369 | ((restrictScalars (polyAlg R)).obj M)) (d + 1) := hP |
| 370 | exact hasProjectiveDimensionLT_of_iso e1.symm (d + 1) |
| 371 | have h2 : HasProjectiveDimensionLT S.X₂ (d + 2) := by |
| 372 | have : HasProjectiveDimensionLE ((extendScalars (polyAlg R)).obj |
| 373 | ((restrictScalars (polyAlg R)).obj M)) (d + 1) := |
| 374 | hasProjectiveDimensionLT_of_ge _ (d + 1) (d + 2) (by omega) |
| 375 | exact hasProjectiveDimensionLT_of_iso e2.symm (d + 2) |
| 376 | exact hSE.hasProjectiveDimensionLT_X₃ (d + 1) h1 h2 |
| 377 | exact hasProjectiveDimensionLT_of_iso e3 (d + 2) |
| 378 | |
| 379 | /-- Base case of Hilbert's syzygy theorem: every module over `MvPolynomial (Fin 0) K` (which is |
| 380 | isomorphic to the field `K`) has projective dimension `≤ 0`, i.e. is projective. -/ |
| 381 | lemma hasProjectiveDimensionLE_of_field_zero (K : Type u) [Field K] |
| 382 | (M : ModuleCat.{u} (MvPolynomial (Fin 0) K)) : |
| 383 | HasProjectiveDimensionLE M 0 := by |
| 384 | -- `MvPolynomial (Fin 0) K ≃+* K`, so restricting scalars turns `M` into a `K`-vector space. |
| 385 | let e : K ≃+* MvPolynomial (Fin 0) K := (MvPolynomial.isEmptyRingEquiv K (Fin 0)).symm |
| 386 | let Msrc := (ModuleCat.restrictScalars (e : K →+* MvPolynomial (Fin 0) K)).obj M |
| 387 | -- A `K`-vector space is free, hence projective, hence has projective dimension `≤ 0`. |
| 388 | have : HasProjectiveDimensionLE Msrc 0 := |
| 389 | (CategoryTheory.projective_iff_hasProjectiveDimensionLE_zero Msrc).mp |
| 390 | (ModuleCat.projective_of_free (Module.Free.chooseBasis K Msrc)) |
| 391 | exact hasProjectiveDimensionLE_of_ringEquiv e M 0 |
| 392 | |
| 393 | /-- **Hilbert's syzygy theorem.** For a field `K`, every module over the polynomial ring |
| 394 | `MvPolynomial (Fin n) K` has projective dimension `≤ n`. (The bound holds for all modules, not |
| 395 | merely finitely generated ones.) -/ |
| 396 | theorem hasProjectiveDimensionLE_of_field (K : Type u) [Field K] (n : ℕ) |
| 397 | (M : ModuleCat.{u} (MvPolynomial (Fin n) K)) : |
| 398 | HasProjectiveDimensionLE M n := by |
| 399 | induction n with |
| 400 | | zero => exact hasProjectiveDimensionLE_of_field_zero K M |
| 401 | | succ n hn => |
| 402 | -- `MvPolynomial (Fin (n+1)) K ≃+* (MvPolynomial (Fin n) K)[X]`. |
| 403 | let e : Polynomial (MvPolynomial (Fin n) K) ≃+* MvPolynomial (Fin (n + 1)) K := |
| 404 | (MvPolynomial.finSuccEquiv K n).toRingEquiv.symm |
| 405 | -- Restrict `M` to an `R[X]`-module and apply the polynomial change-of-rings bound with the IH. |
| 406 | have hstep : HasProjectiveDimensionLE |
| 407 | ((ModuleCat.restrictScalars (e : _ →+* _)).obj M) (n + 1) := |
| 408 | polynomialChangeOfRings (MvPolynomial (Fin n) K) n hn _ |
| 409 | exact hasProjectiveDimensionLE_of_ringEquiv e M (n + 1) |
| 410 | |
| 411 | /-- Hilbert's syzygy theorem, in the requested finitely-generated form: a finitely generated module |
| 412 | over `MvPolynomial (Fin n) K` has projective dimension `≤ n`. -/ |
| 413 | theorem hasProjectiveDimensionLE_of_field_of_finite (K : Type u) [Field K] (n : ℕ) |
| 414 | (M : ModuleCat.{u} (MvPolynomial (Fin n) K)) [Module.Finite (MvPolynomial (Fin n) K) M] : |
| 415 | HasProjectiveDimensionLE M n := |
| 416 | hasProjectiveDimensionLE_of_field K n M |
| 417 | |
| 418 | /-- Hilbert's syzygy theorem, phrased with `projectiveDimension`: |
| 419 | `projectiveDimension M ≤ n` for every module over `MvPolynomial (Fin n) K`. -/ |
| 420 | theorem projectiveDimension_le_of_field (K : Type u) [Field K] (n : ℕ) |
| 421 | (M : ModuleCat.{u} (MvPolynomial (Fin n) K)) : |
| 422 | projectiveDimension M ≤ (n : WithBot ℕ∞) := |
| 423 | (CategoryTheory.projectiveDimension_le_iff M n).mpr (hasProjectiveDimensionLE_of_field K n M) |
| 424 | |
| 425 | end |
| 426 | |
| 427 | end OAI.AlgebraicGeometry.SheafCohomology.Projective.HilbertSyzygyM.HilbertSyzygy |