Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Bruhat involution of a partial-swap frame

Proved
IntMul.OpenAI.partial_swap_bruhat_runs

by xuanji · Oct 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

integer-multiplicationlinear-algebra

Let KKK be a field and ppp an m×mm\times mm×m idempotent with a lower–lower Bruhat factorization p=F1πF2p=F_1\pi F_2p=F1​πF2​: F1,F2F_1,F_2F1​,F2​ are lower triangular with nonzero diagonal, and π\piπ is a 0/10/10/1 matrix with at most one 111 in each row and each column. Order the 2m2m2m coordinates as H0,…,Hm−1,D0,…,Dm−1H_0,\dots,H_{m-1},D_0,\dots,D_{m-1}H0​,…,Hm−1​,D0​,…,Dm−1​, and consider the partial-swap frame

Sp=(1−ppp1−p).S_p=\begin{pmatrix}1-p&p\\p&1-p\end{pmatrix}.Sp​=(1−pp​p1−p​).

Then Sp=E1 w E2S_p=E_1\,w\,E_2Sp​=E1​wE2​ with E1,E2E_1,E_2E1​,E2​ lower triangular with nonzero diagonal, where www is the permutation matrix

w=(diag⁡(1[row i of π empty])ππTdiag⁡(1[column j of π empty])).w=\begin{pmatrix}\operatorname{diag}(\mathbf 1[\text{row }i\text{ of }\pi\text{ empty}])&\pi\\ \pi^{\mathsf T}&\operatorname{diag}(\mathbf 1[\text{column }j\text{ of }\pi\text{ empty}])\end{pmatrix}.w=(diag(1[row i of π empty])πT​πdiag(1[column j of π empty])​).

In words: the Bruhat involution of SpS_pSp​ swaps Hi↔DjH_i\leftrightarrow D_jHi​↔Dj​ exactly for the pivots (i,j)(i,j)(i,j) of ppp, and fixes every other coordinate.

This is the "runs" principle in Jain's flag-basis note. Frames along the edges of the two-stage bit interchange are partial swaps. By Lemma 10 of the OpenAI preprint, an edge then costs one recursive field interchange per transposition, and a run of consecutive pivots (i,j),(i+1,j+1),…(i,j),(i+1,j+1),\dots(i,j),(i+1,j+1),… is a single interchange of contiguous chunks. So the child widths entering the moment certificates ∑wnw(w/m)1−a\sum_w n_w(w/m)^{1-a}∑w​nw​(w/m)1−a are read off from the pivots of the idempotents. With IntMul.OpenAI.idempotent_corner_profile this gives the partial-swap batching lemma: m−am-am−a corner transpositions plus one aligned run of width 2a−m2a-m2a−m.

Formalization Note The 2m2m2m coordinates are Fin (m + m) via finSumFinEquiv (left summand = HHH). Matrices are blocks built with Matrix.fromBlocks.

Preamble
import Mathlib
open Matrix
Formal statement
namespace IntMul.OpenAI

theorem partial_swap_bruhat_runs {m : ℕ} {K : Type*} [Field K] [DecidableEq K]
    (p F₁ π F₂ : Matrix (Fin m) (Fin m) K) (hp : p * p = p)
    (hF₁ : ∀ i j, i < j → F₁ i j = 0) (hd₁ : ∀ i, F₁ i i ≠ 0)
    (hF₂ : ∀ i j, i < j → F₂ i j = 0) (hd₂ : ∀ i, F₂ i i ≠ 0)
    (h01 : ∀ i j, π i j = 0 ∨ π i j = 1)
    (hrow : ∀ i j j', π i j = 1 → π i j' = 1 → j = j')
    (hcol : ∀ i i' j, π i j = 1 → π i' j = 1 → i = i')
    (hfac : p = F₁ * π * F₂) :
    ∃ E₁ E₂ : Matrix (Fin (m + m)) (Fin (m + m)) K,
      (∀ i j, i < j → E₁ i j = 0) ∧ (∀ i, E₁ i i ≠ 0) ∧
      (∀ i j, i < j → E₂ i j = 0) ∧ (∀ i, E₂ i i ≠ 0) ∧
      (Matrix.fromBlocks (1 - p) p p (1 - p)).submatrix finSumFinEquiv.symm finSumFinEquiv.symm =
        E₁ * (Matrix.fromBlocks
            (Matrix.diagonal fun i => if ∃ j, π i j = 1 then (0 : K) else 1) π πᵀ
            (Matrix.diagonal fun j => if ∃ i, π i j = 1 then (0 : K) else 1)).submatrix
              finSumFinEquiv.symm finSumFinEquiv.symm * E₂ := by sorry

end IntMul.OpenAI
Source
S. Jain, integer-mult-kappa, notes/flag-basis.tex (paragraph 'Runs') and notes/partial-swap-batching.tex, https://github.com/Swapnil-jain/integer-mult-kappa ; OpenAI, Integer multiplication below n log n, Lemmas 9-10

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me