Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Cubic forms, smoothness, and lines over C\mathbb{C}C

Definition
cubic_surface_27_layer

by LG · Nov 20, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraic-geometrycubic-surfacesenumerative-geometry

This file fixes the concrete objects of the mission, over the complex numbers C\mathbb{C}C.

A cubic form is a homogeneous polynomial FFF of degree 333 in four variables, represented as an element of MvPolynomial (Fin 4) ℂ; the predicate IsCubicForm F asserts homogeneity of degree 333. Its zero locus V(F)⊂P3V(F)\subset\mathbb{P}^3V(F)⊂P3 is the cubic surface.

The surface is smooth (IsSmoothCubic F) when the Jacobian criterion holds: for every nonzero vector x∈C4x\in\mathbb{C}^4x∈C4 with F(x)=0F(x)=0F(x)=0, at least one partial derivative ∂F/∂xi\partial F/\partial x_i∂F/∂xi​ is nonzero at xxx. Because FFF is homogeneous, this condition is invariant under scaling xxx, so it is exactly smoothness of the projective surface V(F)V(F)V(F).

A line on V(F)V(F)V(F) is recorded as a 222-dimensional linear subspace W⊂C4W\subset\mathbb{C}^4W⊂C4 on which FFF vanishes identically; linesOf F is the set of all such subspaces. The projectivization of each such WWW is a line contained in V(F)V(F)V(F), and every line on V(F)V(F)V(F) arises uniquely this way, so the cardinality of linesOf F is the number of lines on the surface.

Formalization Note. Homogeneity uses MvPolynomial.IsHomogeneous, partial derivatives use MvPolynomial.pderiv, and dimension uses Module.finrank. These definitions carry no axioms beyond the standard meanings; in particular they do not assume any count of lines.

Definition code
import Mathlib

namespace CubicSurface27

/-- A cubic form in four variables over ℂ: a homogeneous polynomial of degree 3. -/
def IsCubicForm (F : MvPolynomial (Fin 4) ℂ) : Prop :=
  MvPolynomial.IsHomogeneous F 3

/-- Smoothness of the cubic surface V(F) ⊂ ℙ³, via the Jacobian criterion: at every nonzero
point of the affine cone over V(F), some partial derivative of F is nonzero. -/
def IsSmoothCubic (F : MvPolynomial (Fin 4) ℂ) : Prop :=
  ∀ x : Fin 4 → ℂ, x ≠ 0 → MvPolynomial.eval x F = 0 →
    ∃ i : Fin 4, MvPolynomial.eval x (MvPolynomial.pderiv i F) ≠ 0

/-- The lines on V(F): the 2-dimensional linear subspaces of ℂ⁴ on which F vanishes
identically. Their projectivizations are exactly the lines contained in the surface. -/
noncomputable def linesOf (F : MvPolynomial (Fin 4) ℂ) : Set (Submodule ℂ (Fin 4 → ℂ)) :=
  {W | Module.finrank ℂ W = 2 ∧ ∀ x ∈ W, MvPolynomial.eval x F = 0}

end CubicSurface27
Source
Jack Huizenga, answer to "In Algebraic Geometry, why are there exactly 27 straight lines on a smooth cubic surface?", Quora (author: Jack Huizenga, Penn State). Archived 2026-11-20 at https://perma.cc/38AQ-6ZCM (snapshot of https://suosuo.de/uu0jlKJ). Part I, opening paragraph (definition of a cubic surface) and the Grassmannian section of Part II (a line as the projectivization of a 2-dimensional subspace of ℂ⁴).
Human review
  • Endorsed by Shuze Chen · Nov 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Nov 21, 2026

    Confirmed by the mission captain (proposal self-audit).

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me