Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Alon's construction over GF(2^k): character, BCH columns and the connection set

Definition
KonyaginUnitVectors_AlonConstruction

by moona3k · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

alonextremal-combinatoricsfinite-fieldsorthonormal-labelings

Throughout, FFF is a finite field of characteristic 222 with qqq elements, regarded as an algebra over F2\mathbb F_2F2​ (for example GF(2k)\mathrm{GF}(2^k)GF(2k)), Tr:F→F2\mathrm{Tr}:F\to\mathbb F_2Tr:F→F2​ is the absolute trace, and ψ(y)=(−1)Tr(y)∈{1,−1}\psi(y)=(-1)^{\mathrm{Tr}(y)}\in\{1,-1\}ψ(y)=(−1)Tr(y)∈{1,−1} is the associated additive character of FFF.

The module defines the ingredients of Alon's construction of an orthonormal labeling:

  • psi y=ψ(y)=(−1)Tr(y)=\psi(y)=(-1)^{\mathrm{Tr}(y)}=ψ(y)=(−1)Tr(y);
  • chi w g=ψ(w1g1+w2g2+w3g3)=\psi(w_1g_1+w_2g_2+w_3g_3)=ψ(w1​g1​+w2​g2​+w3​g3​), the character of the additive group F3F^3F3 indexed by w∈F3w\in F^3w∈F3;
  • gamma x=(x,x3,x5)∈F3=(x,x^3,x^5)\in F^3=(x,x3,x5)∈F3, the columns of the parity-check matrix of the binary BCH code of designed distance 777;
  • W0={x≠0:Tr(x9)=0}=\{x\ne0:\mathrm{Tr}(x^9)=0\}={x=0:Tr(x9)=0} and W1={x≠0:Tr(x9)=1}=\{x\neq0:\mathrm{Tr}(x^9)=1\}={x=0:Tr(x9)=1}, a partition of F∖{0}F\setminus\{0\}F∖{0};
  • Sset={γ(x)+γ(y):x∈W0, y∈W1}⊆F3=\{\gamma(x)+\gamma(y):x\in W0,\ y\in W1\}\subseteq F^3={γ(x)+γ(y):x∈W0, y∈W1}⊆F3, the connection set of a Cayley graph on F3F^3F3.

Formalization Note. All definitions are for a finite field F with [Algebra (ZMod 2) F]; the trace is Algebra.trace (ZMod 2) F.

Definition code
import Mathlib

/-!
# Alon-type construction over `GF(2^k)` (definitions)

Everything is stated for an arbitrary finite field `F` of characteristic 2 that is an algebra over
`ZMod 2` (e.g. `GaloisField 2 k`). 
-/

set_option autoImplicit false

namespace KonyaginUnitVectors.Alon

variable (F : Type*) [Field F] [Algebra (ZMod 2) F]

/-- The `±1`-valued additive character `ψ y = (-1)^{Tr y}` of `F`, `Tr : F → ZMod 2` the absolute trace. -/
noncomputable def psi (y : F) : ℝ := if Algebra.trace (ZMod 2) F y = 0 then 1 else -1

/-- The character `ψ_w(g) = ψ (w₁ g₁ + w₂ g₂ + w₃ g₃)` of the additive group `F × F × F`. -/
noncomputable def chi (w g : F × F × F) : ℝ := psi F (w.1 * g.1 + w.2.1 * g.2.1 + w.2.2 * g.2.2)

/-- `γ x = (x, x³, x⁵)`: the columns of the parity check matrix of the binary BCH code of designed distance 7. -/
def gamma (x : F) : F × F × F := (x, x ^ 3, x ^ 5)

variable [Fintype F]

open Classical in
/-- Nonzero `x` with `Tr (x⁹) = 0`. -/
noncomputable def W0 : Finset F :=
  Finset.univ.filter fun x => x ≠ 0 ∧ Algebra.trace (ZMod 2) F (x ^ 9) = 0

open Classical in
/-- Nonzero `x` with `Tr (x⁹) = 1`. -/
noncomputable def W1 : Finset F :=
  Finset.univ.filter fun x => x ≠ 0 ∧ Algebra.trace (ZMod 2) F (x ^ 9) ≠ 0

open Classical in
/-- The connection set `S = {γ x + γ y : x ∈ W0, y ∈ W1}` of the Cayley graph on `F × F × F`. -/
noncomputable def Sset : Finset (F × F × F) :=
  (W0 F ×ˢ W1 F).image fun p => gamma F p.1 + gamma F p.2

end KonyaginUnitVectors.Alon
Source
N. Alon, Explicit Ramsey graphs and orthonormal labelings, Electron. J. Combin. 1 (1994), R12, doi:10.37236/1192 (Sections 3 and 4; the construction here partitions by Tr(x^9) instead of the leading bit of x^7)

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