Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Cubic fields K=Q[x]/(x3+dx+e)K=\mathbb{Q}[x]/(x^3+dx+e)K=Q[x]/(x3+dx+e): the field, the integral model, and Z[θ]\mathbb{Z}[\theta]Z[θ]

Definition
CollapsibleCubics_q7

by quesswho · Sep 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraalgebraic-number-theorynumber-theory

The objects needed to state splitting questions for a depressed cubic. For d,e∈Qd,e\in\mathbb{Q}d,e∈Q we write m(x)=x3+dx+em(x)=x^3+dx+em(x)=x3+dx+e (cubicPoly) and, when mmm is irreducible, K=Q[x]/(m)K=\mathbb{Q}[x]/(m)K=Q[x]/(m) (CubicField), realised as an AdjoinRoot. For D,E∈ZD,E\in\mathbb{Z}D,E∈Z the same cubic over Z\mathbb{Z}Z (cubicPolyInt) is monic, so its root θ\thetaθ is integral over Z\mathbb{Z}Z and lands in the ring of integers OK\mathcal{O}_KOK​ (thetaO). Finally adjoinAddSubgroup views the order Z[θ]⊆OK\mathbb{Z}[\theta]\subseteq\mathcal{O}_KZ[θ]⊆OK​ as an additive subgroup, which is what the index [OK:Z[θ]][\mathcal{O}_K:\mathbb{Z}[\theta]][OK​:Z[θ]] is taken of.

Definition code
import Mathlib

namespace CollapsibleCubics

open Polynomial NumberField

variable (d e : ℚ)

/-- The depressed cubic `x ^ 3 + d * x + e` as an element of `ℚ[X]`. -/
noncomputable def cubicPoly : ℚ[X] := X ^ 3 + C d * X + C e

/-- The cubic field `K = ℚ[X] / (x ^ 3 + d * x + e)`, realised as an `AdjoinRoot`. -/
noncomputable abbrev CubicField := AdjoinRoot (cubicPoly d e)

variable (D E : ℤ)

/-- The depressed cubic `x ^ 3 + D * x + E` as an element of `ℤ[X]`. -/
noncomputable def cubicPolyInt : ℤ[X] := X ^ 3 + C D * X + C E

theorem cubicPolyInt_monic : (cubicPolyInt D E).Monic := by
  unfold cubicPolyInt; monicity!

/-- The integer cubic maps to the rational one under `ℤ[X] → ℚ[X]`. -/
theorem cubicPolyInt_map :
    (cubicPolyInt D E).map (algebraMap ℤ ℚ) = cubicPoly (D : ℚ) (E : ℚ) := by
  unfold cubicPolyInt cubicPoly
  simp

/-- `θ = AdjoinRoot.root (cubicPoly D E)` is integral over `ℤ`. Stated with no irreducibility
hypothesis, so the `CommRing (AdjoinRoot ...)` instance here is the plain quotient-ring one. -/
theorem isIntegral_root : IsIntegral ℤ (AdjoinRoot.root (cubicPoly (D : ℚ) (E : ℚ))) := by
  refine ⟨cubicPolyInt D E, cubicPolyInt_monic D E, ?_⟩
  rw [← Polynomial.aeval_def, ← Polynomial.aeval_map_algebraMap ℚ, cubicPolyInt_map]
  simp

variable [hf : Fact (Irreducible (cubicPoly (D : ℚ) (E : ℚ)))]

/-- `θ`, packaged as an element of `𝓞 K` for `K = CubicField D E`. -/
noncomputable def thetaO : 𝓞 (CubicField (D : ℚ) (E : ℚ)) :=
  ⟨AdjoinRoot.root (cubicPoly (D : ℚ) (E : ℚ)), isIntegral_root D E⟩

variable {K : Type*} [Field K] [NumberField K]

/-- `ℤ[θ] = Algebra.adjoin ℤ {θ}`, viewed as an `AddSubgroup (𝓞 K)`. -/
noncomputable def adjoinAddSubgroup (θ : 𝓞 K) : AddSubgroup (𝓞 K) :=
  (Algebra.adjoin ℤ {θ}).toSubmodule.toAddSubgroup

end CollapsibleCubics
Source
https://quesswho.github.io/miles-blog/2026/08/20/collapsible/ (Collapsible Cubics mission; Macris Problem 3)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me