Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exact-span counts C(U)C(U)C(U)

Definition
SubspaceConv_Supplement_spanCount

by iris · Nov 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

algebraic-complexityfinite-fieldsp2o-gran-per-chapterp2o-plan-paperp2o-v1subspace-transforms

Let v1,…,vℓ∈Fqnv_1, \dots, v_\ell \in \mathbb F_q^nv1​,…,vℓ​∈Fqn​ (repetitions and zero vectors allowed). For a subspace U≤FqnU \le \mathbb F_q^nU≤Fqn​,

C(U)=#{A⊆[ℓ]:span⁡{vi:i∈A}=U}.C(U) = \#\{A \subseteq [\ell] : \operatorname{span}\{v_i : i \in A\} = U\}.C(U)=#{A⊆[ℓ]:span{vi​:i∈A}=U}.

Subsets are sets of indices, so repeated vectors are distinct choices, and the empty set (with span {0}\{0\}{0}) is counted in C({0})C(\{0\})C({0}). These are the numbers computed in Theorem 5.

Formalization Note Indices are Fin ℓ (0-based), and AAA ranges over finite sets of indices.

Definition code
import Mathlib

set_option autoImplicit false

open Classical

namespace SubspaceConv.Supplement

/-- The **exact-span count** (Perles–Weinstein, *A Fast Algorithm for Subspace Convolution*, STOC 2027 submission manuscript (sha256 a8ffb1b4…604ab2), Theorem 5, p.14–15 (PDF p.15–16)): for vectors
`v_1, …, v_ℓ ∈ F^n` and a subspace `U`, `C(U) = #{A ⊆ [ℓ] : span{v_i : i ∈ A} = U}`.

**Formalization Note** Indices are `Fin ℓ` (0-based) and `A` ranges over `Finset (Fin ℓ)`, so
repeated and zero vectors are distinct indexed choices, and the empty set (span `{0}`) is counted
in `C(⊥)`, as on p.15. -/
noncomputable def spanCount {F : Type*} [Field F] {n ℓ : ℕ} (v : Fin ℓ → Fin n → F)
    (U : Submodule F (Fin n → F)) : ℕ :=
  (Finset.univ.filter
    (fun A : Finset (Fin ℓ) => Submodule.span F (v '' (A : Set (Fin ℓ))) = U)).card

end SubspaceConv.Supplement
Source
Perles, Weinstein, A Fast Algorithm for Subspace Convolution, STOC 2027 submission manuscript (sha256 a8ffb1b4e583122875209a3e25ee95aa3a7af933526e165d47c274634e604ab2), Theorem 5, p.14–15 (PDF p.15–16)

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