AFTD Auto-Formalizing Theoretical Domains

orth_inter_eq_orth_map

theoremverifiedimported Lean

Restricting to a support before taking the symplectic complement. Fix a prime $p$ and work in the symplectic space $V = \bbf_p^{\,n} \times \bbf_p^{\,n}$ equipped with the form $\omega\big((x,z),(x',z')\big) = \sum_{i=0}^{n-1}(x_i z'_i - z_i x'_i)$, and for a subset $M \subseteq \{0,\dots,n-1\}$ let $V_M$ be the submodule of vectors whose support lies in $M$ and let $r_M \colon V \to V$ be the map that zeroes every coordinate outside $M$ and fixes those in $M$. Then for every $\bbf_p$-subspace $S \le V$, \[ S^{\perp_\omega} \cap V_M \;=\; \big(r_M(S)\big)^{\perp_\omega} \cap V_M, \] where $r_M(S)$ denotes the image of $S$ under $r_M$ and $(\cdot)^{\perp_\omega}$ the orthogonal complement with respect to $\omega$.

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
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
variable {n : ℕ} {p : ℕ} [Fact p.Prime] in
lemma orth_inter_eq_orth_map (M : Finset (Fin n)) (S : Submodule (F p) (V n p)) :
    sym_orth (n:=n) (p:=p) S ⊓ V_sub (p:=p) M
      = sym_orth (n:=n) (p:=p) (S.map (r_E_V (n:=n) (p:=p) M)) ⊓ V_sub (p:=p) M
Source
TCSlib, `orth_inter_eq_orth_map`
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 8
  • sym_orthFor a submodule $S \le V$, $S^{\perp_\omega} = \{v \in V \mid \forall s \in S,\; \omega(v,s) = 0\}$.
  • r_E_VThe composition $r_E^V : V \to V$ of $r_E$ with the inclusion $V_E \hookrightarrow V$.
  • 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_formFor $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). \]
  • V_subFor $C \subseteq \mathrm{Fin}\,n$, the support submodule $V_C = \{v \in V \mid \mathrm{supp}(v) \subseteq C\}$.
  • 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…
  • 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 1
  • 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…

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] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] invariable {n : ℕ} {p : ℕ} [Fact p.Prime] in/-- Orthogonal intersection lemma -/lemma orth_inter_eq_orth_map (M : Finset (Fin n)) (S : Submodule (F p) (V n p)) :    sym_orth (n:=n) (p:=p) S ⊓ V_sub (p:=p) M      = sym_orth (n:=n) (p:=p) (S.map (r_E_V (n:=n) (p:=p) M)) ⊓ V_sub (p:=p) M := by  classical  ext v  constructor  · rintro ⟨hvS, hvM⟩    refine ⟨?_, hvM⟩    rintro _ ⟨s, hs, rfl⟩    have hs0 : sym_form (n:=n) (p:=p) s v = 0 := by      simpa using hvS s hs    have hpair :        sym_form (n:=n) (p:=p) ((r_E_V (n:=n) (p:=p) M) s) v          = sym_form (n:=n) (p:=p) s v :=      sym_form_left_restrict (n:=n) (p:=p) M s v hvM    simp [LinearMap.BilinForm.IsOrtho, symB_apply, hpair]    exact hs0  · rintro ⟨hvMap, hvM⟩    refine ⟨?_, hvM⟩    intro s hs    have h0 : sym_form (n:=n) (p:=p) ((r_E_V (n:=n) (p:=p) M) s) v = 0 := by      simpa using hvMap ((r_E_V (n:=n) (p:=p) M) s) (Submodule.mem_map_of_mem hs)    have hpair :        sym_form (n:=n) (p:=p) ((r_E_V (n:=n) (p:=p) M) s) v          = sym_form (n:=n) (p:=p) s v :=      sym_form_left_restrict (n:=n) (p:=p) M s v hvM    -- goal is sym_form s v = 0    simpa [hpair] using h0/-Checking if S_M and S_perp_M are already defined.-/
See it in the graphDiscuss this resultChallenge it