Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

LIDT definitions: LDT / Basic / AxisParallelLine

Definition
LIDT_MIPStarRE_LDT_Basic_AxisParallelLine

by Dengnifer · Oct 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

lidt

This bundle sets up affine axis-parallel lines in the finite-field point space. It provides the canonical line through a sampled point, rebasing operations, and the embedding of a line into a successor slice used by axis tests and induction.

Principal definitions:

  • AxisParallelLine: A line is a base point in Fqm\mathbb{F}_q^mFqm​ together with a coordinate direction.
  • pointAt: Evaluates the line at ttt by adding ttt in its selected coordinate and leaving the other coordinates fixed.
  • throughPoint: Chooses the canonical representative of the axis-parallel line through uuu in direction iii, with zero in the moving coordinate.
  • sampleParameter: The parameter of uuu on the canonical line in direction iii, namely its iiith coordinate.
  • rebaseAt: Makes the point at parameter ttt the new base while preserving the direction.
  • appendAtHeight: Embeds a line in Fqm\mathbb{F}_q^mFqm​ into the height-xxx slice of Fqm+1\mathbb{F}_q^{m+1}Fqm+1​ and embeds its direction among the old coordinates.

Formalization credit: Sirui Lu, Ruixuan Deng, Yanqiao Zhu, and Zhengfeng Ji (arXiv:2609.19814). Mathematical source: Zhengfeng Ji, Anand Natarajan, Thomas Vidick, John Wright, and Henry Yuen (arXiv:2009.12982).

Definition code
-- Generated from MIPStarRE/LDT/Basic/AxisParallelLine.lean by skeleton subtraction.
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_ParametersBase
import Mathlib

namespace LIDT

/-!
# Axis-parallel lines for the low individual degree test

Axis-parallel line geometry on top of the core parameter infrastructure:
`AxisParallelLine` records a base point and a coordinate direction, with
canonical parameterization, rebasing, and slice-embedding operations.

## References

- `references/ldt-paper/test_definition.tex`
- `blueprint/src/chapter/ch02_test.tex`
-/

@[expose] public section

namespace MIPStarRE.LDT

/-- A genuinely axis-parallel affine line in `F_q^m`. -/
structure AxisParallelLine (params : Parameters) where
  base : Point params
  direction : Fin params.m

deriving instance DecidableEq, Inhabited for AxisParallelLine

namespace AxisParallelLine

/-- The canonical affine parameterization `t ↦ base + t e_i`. -/
def pointAt {params : Parameters} [FieldModel params.q]
    (ℓ : AxisParallelLine params) : Fq params → Point params :=
  fun t i =>
    if i = ℓ.direction then
      addCoord (ℓ.base i) t
    else
      ℓ.base i

/-- Canonical geometric axis-parallel line through `u` in direction `i`.

The representative stores zero in the moving coordinate, so all points on the
same geometric line map to the same `AxisParallelLine`. -/
def throughPoint {params : Parameters} [FieldModel params.q]
    (u : Point params) (i : Fin params.m) : AxisParallelLine params where
  base := fun j => if j = i then zeroCoord else u j
  direction := i

/-- Affine parameter of the sampled point on the canonical axis-parallel line
through `u` in direction `i`. -/
def sampleParameter {params : Parameters} [FieldModel params.q]
    (u : Point params) (i : Fin params.m) : Fq params :=
  u i

/-- Rebase an axis-parallel line so that the old point `ℓ.pointAt t`
becomes the new base point. -/
def rebaseAt {params : Parameters} [FieldModel params.q]
    (ℓ : AxisParallelLine params) (t : Fq params) : AxisParallelLine params where
  base := ℓ.pointAt t
  direction := ℓ.direction

@[simp] theorem rebaseAt_pointAt_zero {params : Parameters} [FieldModel params.q]
    (ℓ : AxisParallelLine params) (t : Fq params) :
    (rebaseAt ℓ t).pointAt zeroCoord = ℓ.pointAt t := by
  ext i
  simp [rebaseAt, pointAt, addCoord, zeroCoord]

@[simp] theorem rebaseAt_zero {params : Parameters} [FieldModel params.q]
    (ℓ : AxisParallelLine params) :
    rebaseAt ℓ zeroCoord = ℓ := by
  cases ℓ with
  | mk base direction =>
      change
        ({ base :=
             ({ base := base, direction := direction } : AxisParallelLine params).pointAt zeroCoord,
           direction := direction } : AxisParallelLine params) =
        ({ base := base, direction := direction } : AxisParallelLine params)
      congr
      funext i
      simp [pointAt, addCoord, zeroCoord]

@[simp] theorem rebaseAt_direction {params : Parameters} [FieldModel params.q]
    (ℓ : AxisParallelLine params) (t : Fq params) :
    (rebaseAt ℓ t).direction = ℓ.direction :=
  rfl

/-- The canonical affine parameterization of `throughPoint u i` at parameter
`sampleParameter u i = u i` returns the original point `u`. -/
@[simp] theorem throughPoint_pointAt_sampleParameter {params : Parameters}
    [FieldModel params.q] (u : Point params) (i : Fin params.m) :
    (throughPoint (params := params) u i).pointAt
        (sampleParameter (params := params) u i) = u := by
  ext j
  by_cases h : j = i
  · subst h
    simp [throughPoint, pointAt, sampleParameter, addCoord, zeroCoord]
  · simp [throughPoint, pointAt, h]

/-- Rebasing the canonical line `throughPoint u i` at its sample parameter yields
the axis-parallel line with base `u` and direction `i`. -/
@[simp] theorem rebaseAt_throughPoint_sampleParameter {params : Parameters}
    [FieldModel params.q] (u : Point params) (i : Fin params.m) :
    rebaseAt (throughPoint (params := params) u i)
        (sampleParameter (params := params) u i) =
      { base := u, direction := i } := by
  change
    ({ base :=
        (throughPoint (params := params) u i).pointAt
          (sampleParameter (params := params) u i)
       direction := i } : AxisParallelLine params) =
      { base := u, direction := i }
  congr
  exact throughPoint_pointAt_sampleParameter u i

/-- Embed an axis-parallel line into the slice at height `x`. -/
def appendAtHeight (params : Parameters)
    (ℓ : AxisParallelLine params) (x : Fq params) : AxisParallelLine params.next where
  base := appendPoint params ℓ.base x
  direction := embedCoord params ℓ.direction

@[simp] theorem appendAtHeight_rebaseAt {params : Parameters} [FieldModel params.q]
    (ℓ : AxisParallelLine params) (t x : Fq params) :
    appendAtHeight params (rebaseAt ℓ t) x =
      rebaseAt (appendAtHeight params ℓ x) t := by
  cases ℓ with
  | mk base direction =>
      change
        ({ base :=
             appendPoint params
               (({ base := base, direction := direction } : AxisParallelLine params).pointAt t) x,
           direction := embedCoord params direction } : AxisParallelLine params.next) =
        ({ base :=
             ({ base := appendPoint params base x,
                direction := embedCoord params direction } :
                AxisParallelLine params.next).pointAt t,
           direction := embedCoord params direction } : AxisParallelLine params.next)
      congr
      funext i
      by_cases hdir : i = embedCoord params direction
      · subst i
        simp [appendPoint, pointAt, embedCoord]
        rfl
      · by_cases hi : i.1 < params.m
        · have hdir' : (⟨i.1, hi⟩ : Fin params.m) ≠ direction := by
            intro h
            apply hdir
            apply Fin.ext
            simpa [embedCoord] using congrArg Fin.val h
          simp [appendPoint, pointAt, hi, hdir, hdir']
        · simp [appendPoint, pointAt, hi, hdir]

end AxisParallelLine

end MIPStarRE.LDT

end

end LIDT
Source
https://github.com/LionSR/MIPStarRE/blob/f382c801026f53a9efc260fdee707cb35e0adb15/MIPStarRE/LDT/Basic/AxisParallelLine.lean#L22-L150

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