AFTD Auto-Formalizing Theoretical Domains

V_sub

defimported Lean

For $C \subseteq \mathrm{Fin}\,n$, the support submodule $V_C = \{v \in V \mid \mathrm{supp}(v) \subseteq C\}$.

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
noncomputable def V_sub (C : Finset (Fin n)) : Submodule (F p) (V n p)
Defined in
TCSlib, `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
none listed
Built on 2
  • VThe ambient space $V = \mathbb{F}_p^n \times \mathbb{F}_p^n$ of pairs of coordinate vectors.
  • FThe prime field $\mathrm{GF}(p)$, realized as $\mathbb{Z}/p\mathbb{Z}$ via ZMod.
Used by 30
  • extendFromCThe linear map $(C \to \mathbb{F}_p) \times (C \to \mathbb{F}_p) \to V_C$ that extends a pair of functions on $C$ to a vector of $V$ by…
  • orth_inter_eq_orth_mapRestricting to a support before taking the symplectic complement. Fix a prime $p$ and work in the symplectic space…
  • extendFromC_restrictToCExtension recovers a vector supported on $C$. Fix a prime $p$ and a subset $C \subseteq \{1,\dots,n\}$ of coordinates, and let…
  • r_E_VThe composition $r_E^V : V \to V$ of $r_E$ with the inclusion $V_E \hookrightarrow V$.
  • dim_map_r_ERank of a restricted subspace of $\mathbb{F}_p^n \times \mathbb{F}_p^n$. Fix a prime $p$ and an integer $n \ge 0$, and let…
  • dim_S_M_add_dim_S_M_c_le_dim_SAdditivity bound for support-restricted subspaces. Fix a prime $p$ and an integer $n$, and let $S$ be a subspace of the ambient space…
  • orth_inter_eq_orth_sub_imageOrthogonal complement of a subspace, intersected with a support submodule. Let $p$ be a prime and let $\omega$ be the symplectic form on…
  • V_sub_isoV_sub_iso
  • ker_r_EKernel of the coordinate restriction map. Fix a prime $p$ and let $V = \bbf_p^n \times \bbf_p^n$. For a subset…
  • S_perp_MThe submodule $S^{\perp}_M = S^{\perp_\omega} \cap V_M$.
  • correctable_implies_g_zeroCorrectable coordinate sets carry no supportable logical operators. Fix a prime $p$, let $V = \bbf_p^n \times \bbf_p^n$ be equipped with…
  • sym_form_subAn abbreviation for $\mathrm{symB\_sub}$, the symplectic form viewed as a bilinear form on $V_M$.
  • dim_V_subDimension 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…
  • sym_form_nondegenerate_on_V_subNon-degeneracy of the symplectic form on a support submodule. Let $p$ be a prime, let $n$ be a natural number, and let…
  • sym_form_r_ESymplectic form is unchanged by restricting the second argument. Fix a prime $p$ and an integer $n$, and work in the space…
  • 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…
  • r_EThe linear map $r_E : V \to V_E$ that zeroes out the coordinates of a vector outside $E$, keeping those in $E$ unchanged.
  • S_MFor a submodule $S \le V$ and $M \subseteq \mathrm{Fin}\,n$, the submodule $S_M = S \cap V_M$.
  • sym_form_left_restrictLeft restriction is invisible to the symplectic form on the support submodule. Fix a prime $p$ and a natural number $n$, and let…
  • sym_form_sub_applyEvaluation of the restricted symplectic form. Fix a prime $p$ and let $\omega$ denote the symplectic form on…
  • symB_subThe symplectic bilinear form $\mathrm{symB}$ restricted to the subspace $V_M$.
  • dist_implies_correctableErasure correction below the code distance. Let $p$ be prime and let $S$ be an $\mathbb{F}_p$-subspace of the symplectic space…
  • V_sub_univ_eq_topFull index set gives the whole space. Fix a prime $p$ and an integer $n$, and let $V = \bbf_p^n \times \bbf_p^n$. Taking $C$ to be the…
  • 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…
  • restrictToCFor $C \subseteq \mathrm{Fin}\,n$, the linear map $V_C \to (C \to \mathbb{F}_p) \times (C \to \mathbb{F}_p)$ sending a vector supported on…
  • correctableAn erasure set $E \subseteq \mathrm{Fin}\,n$ is correctable for $S$ if every $v \in V_E \cap S^{\perp_\omega}$ is already in $S$.
  • 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…
  • sym_form_sub_nondegenerateNondegeneracy of the restricted symplectic form. Let $p$ be a prime, and equip $V = \bbf_p^n \times \bbf_p^n$ with the symplectic form…

Lean source view module on GitHub

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
/-- Support subspace V_C -/
noncomputable def V_sub (C : Finset (Fin n)) : Submodule (F p) (V n p) where
  carrier := {v | ∀ i ∉ C, v.1 i = 0 ∧ v.2 i = 0}
  add_mem' := by
    intro a b a_1 a_2
    simp_all only [Set.mem_setOf_eq, Prod.fst_add, Pi.add_apply, not_false_eq_true, add_zero, Prod.snd_add, and_self,
      implies_true]
  zero_mem' := by
    simp_all only [Set.mem_setOf_eq, Prod.fst_zero, Pi.zero_apply, Prod.snd_zero, and_self, implies_true]
  smul_mem' := by
    intro c x a
    simp_all only [Set.mem_setOf_eq, Prod.smul_fst, Pi.smul_apply, not_false_eq_true, smul_eq_mul, mul_zero,
      Prod.smul_snd, and_self, implies_true]

/-
Isomorphism between V_C and F^|C| x F^|C|.
-/
See it in the graphDiscuss this resultChallenge it