Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Rational and irrational linear and affine subspaces of Rn\mathbb R^nRn

Definition
MaxLatticeFree_Geometry_Supplement_Rational

by mikedeng1 · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

discrete-geometryinteger-programminglattice-free-setsp2o-batch-supp500p2o-gran-per-chapterp2o-plan-paperp2o-v1

A linear subspace L⊆RnL\subseteq\mathbb R^nL⊆Rn is rational if it is generated by the integral points it contains:

L=⟨L∩Zn⟩,L=\langle L\cap\mathbb Z^n\rangle ,L=⟨L∩Zn⟩,

where ⟨X⟩\langle X\rangle⟨X⟩ is the real linear span. An affine subspace A⊆RnA\subseteq\mathbb R^nA⊆Rn is rational if it is the affine hull of its integral points, A=aff⁡(A∩Zn)A=\operatorname{aff}(A\cap\mathbb Z^n)A=aff(A∩Zn). A subspace that is not rational is called irrational. For instance the line x2=2 x1x_2=\sqrt2\,x_1x2​=2​x1​ in R2\mathbb R^2R2 contains only the integral point 000 and is irrational, while x2=2x1x_2=2x_1x2​=2x1​ is rational; the plane x1+x2+2x3=1x_1+x_2+\sqrt2x_3=1x1​+x2​+2​x3​=1 in R3\mathbb R^3R3 is irrational, its integral points spanning only the line x1+x2=1, x3=0x_1+x_2=1,\ x_3=0x1​+x2​=1, x3​=0.

Rationality separates the two kinds of maximal lattice-free sets in Theorems 1, 2 and 5: cylinders over polytopes whose lineality space is rational, and hyperplanes whose direction is irrational.

Formalization Note The zero subspace is rational (the span of {0}\{0\}{0}). A nonempty rational affine subspace necessarily contains an integral point; the empty set is rational in the affine sense.

Definition code
import Mathlib
import Definitions.Def_MaxLatticeFree_Inequalities_RelaxationModel

namespace MaxLatticeFree.Geometry.Supplement

open MaxLatticeFree.Inequalities

/-- A linear subspace `L ⊆ ℝⁿ` is *rational* if it is generated by the integral points it contains
(arXiv:1701.06543v1, p. 2): `L` is the real linear span of `L ∩ ℤⁿ`. `{0}` is rational. -/
def IsRationalSubspace {n : ℕ} (L : Submodule ℝ (EuclideanSpace ℝ (Fin n))) : Prop :=
  Submodule.span ℝ ((L : Set (EuclideanSpace ℝ (Fin n))) ∩ integralPoints n) = L

/-- An affine subspace `A ⊆ ℝⁿ` (given as a set) is *rational* if it is generated by the integral
points it contains (arXiv:1701.06543v1, p. 2): `A` equals the affine hull of `A ∩ ℤⁿ`. A
nonempty rational affine subspace contains an integral point. -/
def IsRationalAffine {n : ℕ} (A : Set (EuclideanSpace ℝ (Fin n))) : Prop :=
  ((affineSpan ℝ (A ∩ integralPoints n) : AffineSubspace ℝ (EuclideanSpace ℝ (Fin n))) :
    Set (EuclideanSpace ℝ (Fin n))) = A

end MaxLatticeFree.Geometry.Supplement
Source
Basu, Conforti, Cornuéjols, Zambelli, Maximal lattice-free convex sets in linear subspaces, arXiv:1701.06543v1, p. 2, definition of a rational subspace

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