AFTD Auto-Formalizing Theoretical Domains

sym_form

defimported Lean

For $u = (x,z), v = (x',z') \in V = \mathbb{F}_p^n \times \mathbb{F}_p^n$, \[ \omega(u,v) \;=\; \sum_{i=0}^{n-1}(x_i z'_i - z_i x'_i). \]

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 sym_form (u v : V n p) : F p
Defined in
TCSlib, `sym_form`
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 16
  • orth_inter_eq_orth_mapRestricting to a support before taking the symplectic complement. Fix a prime $p$ and work in the symplectic space…
  • sym_form_sub_isReflReflexivity of the restricted symplectic form. Fix a prime $p$, a natural number $n$, and a subset $M \subseteq \{0,1,\dots,n-1\}$, and…
  • symB_applyEvaluation of the bundled symplectic form. Fix a prime $p$ and an integer $n$, and set $V = \bbf_p^n \times \bbf_p^n$, equipped with the…
  • sym_form_smul_leftAdditivity of the symplectic form in the first argument. Let $p$ be prime and work over the space $V = \bbf_p^n \times \bbf_p^n$ equipped…
  • sym_form_add_leftAdditivity of the symplectic form in the first argument. Let $p$ be prime and work over the space $V = \bbf_p^n \times \bbf_p^n$ equipped…
  • 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…
  • 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…
  • sym_form_nondegenerateNondegeneracy of the symplectic form. Let $p$ be a prime and $n \ge 0$, and let $\omega$ be the symplectic form on…
  • sym_form_add_rightAdditivity of the symplectic form in the first argument. Let $p$ be prime and work over the space $V = \bbf_p^n \times \bbf_p^n$ equipped…
  • sym_form_smul_rightAdditivity of the symplectic form in the first argument. Let $p$ be prime and work over the space $V = \bbf_p^n \times \bbf_p^n$ equipped…
  • symB_isReflReflexivity of the symplectic form. Let $p$ be a prime, $n$ a natural number, and let $\omega$ be the bilinear form on…
  • sym_form_swapAntisymmetry of the symplectic form. Fix a prime $p$ and an integer $n$, and equip $V = \bbf_p^n \times \bbf_p^n$ with the bilinear form…
  • 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…
  • symB$\omega$ packaged as a LinearMap.BilinForm.

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
/-- Standard symplectic form on V: `sym_form (u, v) = ∑ i, u₁ᵢ v₂ᵢ - u₂ᵢ v₁ᵢ`. -/
noncomputable def sym_form (u v : V n p) : F p :=
  Finset.univ.sum (fun i : Fin n => (u.1 i * v.2 i - u.2 i * v.1 i))
See it in the graphDiscuss this resultChallenge it