Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Composition of partial swaps is again a partial swap

Proved
IntMul.Kappa.R8.Bit.Oppbank.pswQ_mul

by Ethan Cheung Wang · Nov 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

bitnbformalokintmulkappapswqr8

Composition of partial swaps

Let mmm be a natural number and let p,p′p,p'p,p′ be m×mm\times mm×m rational matrices. Write pswQ(q)\mathrm{pswQ}(q)pswQ(q) for the partial swap attached to a parameter qqq, namely the 2m×2m2m\times 2m2m×2m block matrix

pswQ(q)=(I−qqqI−q)\mathrm{pswQ}(q)=\begin{pmatrix} I-q & q \\ q & I-q \end{pmatrix}pswQ(q)=(I−qq​qI−q​)

acting on the doubled frame (the precise Lean representative is this block matrix, reindexed by the standard equivalence m⊕m≃2mm\oplus m\simeq 2mm⊕m≃2m).

The composition of two partial swaps is again a partial swap, with parameter equal to the Brauer–Weyl (or Temperley–Lieb) combination of the two factors:

pswQ(p) pswQ(p′)=pswQ(p+p′−2 pp′).\mathrm{pswQ}(p)\,\mathrm{pswQ}(p')=\mathrm{pswQ}\bigl(p+p'-2\,p p'\bigr).pswQ(p)pswQ(p′)=pswQ(p+p′−2pp′).

This identity is the rational-matrix form of edge composition in the flag-basis network: it is what lets a stage frame Φ1(b,c)=pswQ(K(Pc(c),Pl(b)))\Phi_1(b,c)=\mathrm{pswQ}\bigl(K(\mathrm{Pc}(c),\mathrm{Pl}(b))\bigr)Φ1​(b,c)=pswQ(K(Pc(c),Pl(b))) be transported along a move whose edge projector is a difference Dm(o,c)\mathrm{Dm}(o,c)Dm(o,c). The statement is over Q\mathbb{Q}Q and does not depend on the densified code bound or on the packs Pnd\mathrm{Pnd}Pnd and Lab\mathrm{Lab}Lab.

Formalization Note. The constant is pswQ from the published Defs4 pack, submitted in the R8 FormalOK environment as IntMul.Kappa.R8.Bit.Oppbank.pswQ_mul. No QHNet or QHNetRec import.

Preamble
import Definitions.Def_IntMul_Kappa_R6_Defs4
import Mathlib
set_option autoImplicit false
set_option relaxedAutoImplicit false
Formal statement
namespace IntMul.Kappa.R8.Bit.Oppbank
open IntMul.Kappa.R6.Bit.NB
open Matrix
/-- Composition of partial swaps is the partial swap of the Brauer–Weyl combination. -/
theorem pswQ_mul {m : ℕ} (p p' : Matrix (Fin m) (Fin m) ℚ) :
    pswQ p * pswQ p' = pswQ (p + p' - 2 * (p * p')) := by sorry
end IntMul.Kappa.R8.Bit.Oppbank
Source
IntMul Kappa R8 Bit Oppbank FormalOK: pswQ composition identity, the R8 retarget of the R6 pswQ_mul lemma on Defs4 (used by move1).

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