AFTD Auto-Formalizing Theoretical Domains

dim_V_sub

theoremverifiedimported Lean

Dimension of the support submodule. Fix a prime $p$ and an integer $n$, and let $V = \bbf_p^{\,n} \times \bbf_p^{\,n}$ be the space of pairs of coordinate vectors over the prime field $\bbf_p$. For a subset $C \subseteq \{1, \dots, n\}$, let $V_C \subseteq V$ be the support submodule consisting of those pairs $(u, w)$ for which $u_i = 0$ and $w_i = 0$ at every index $i \notin C$. Then $V_C$ has dimension $\dim_{\bbf_p}(V_C) = 2\lvert C\rvert$ over $\bbf_p$.

Statement

open scoped BigOperators in
set_option linter.mathlibStandardSet false in
open scoped BigOperators in
open scoped Real in
open scoped Nat in
open Classical in
open scoped Pointwise in
set_option maxRecDepth 4000 in
set_option synthInstance.maxHeartbeats 20000 in
set_option synthInstance.maxSize 128 in
set_option relaxedAutoImplicit false in
set_option autoImplicit false in
set_option linter.unnecessarySimpa false in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
lemma dim_V_sub (C : Finset (Fin n)) : Module.finrank (F p) (V_sub (p:=p) C) = 2 * C.card
Source
TCSlib, `dim_V_sub`
Lean proof
By Allan Li, Hydroxyi (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 3
  • V_sub_isoV_sub_iso
  • V_subFor $C \subseteq \mathrm{Fin}\,n$, the support submodule $V_C = \{v \in V \mid \mathrm{supp}(v) \subseteq C\}$.
  • FThe prime field $\mathrm{GF}(p)$, realized as $\mathbb{Z}/p\mathbb{Z}$ via ZMod.
Used by 5
  • g_expansionExpansion of the operator count $g(S,M)$. Fix a prime $p$ and equip $V = \bbf_p^{\,n} \times \bbf_p^{\,n}$ with the symplectic form…
  • g_add_dimsAdditive dimension identity for an isotropic subspace. Let $S$ be an isotropic submodule of the symplectic space…
  • g_le_two_card_CCorrectable part contributes nothing to the operator count. Let $p$ be prime and let $S$ be an $\mathbb{F}_p$-subspace of the symplectic…
  • dim_orth_interDimension of the orthogonal intersection over a coordinate set. Fix a prime $p$, an integer $n$, and work in the symplectic space…
  • finrank_VDimension of the ambient space. Let $p$ be a prime and $\bbf_p$ the field with $p$ elements, and for a natural number $n$ set…

Lean source view module on GitHub

open scoped BigOperators inset_option linter.mathlibStandardSet false inopen scoped BigOperators inopen scoped Real inopen scoped Nat inopen Classical inopen scoped Pointwise inset_option maxRecDepth 4000 inset_option synthInstance.maxHeartbeats 20000 inset_option synthInstance.maxSize 128 inset_option relaxedAutoImplicit false inset_option autoImplicit false inset_option linter.unnecessarySimpa false invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] inlemma dim_V_sub (C : Finset (Fin n)) : Module.finrank (F p) (V_sub (p:=p) C) = 2 * C.card := by  classical  -- finrank preserved by linear equivalence  simpa [Module.finrank_prod, two_mul] using    (LinearEquiv.finrank_eq (V_sub_iso (n:=n) (p:=p) C))/-Definition of restriction map r_E.-/
See it in the graphDiscuss this resultChallenge it