Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

oneRun r PE inhabitance via edge_of_pivs (no pad)

Definition
IntMul_Kappa_R8_Data_BitOppbankOneRunPE2

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

bitnbinteger-multiplicationkappaonerun2oppbankr8

OneRunPE2 — PE inhabitance for corrected one-run

If qqq is an idempotent 529×529529\times529529×529 matrix of rank rrr (0<r<5290<r<5290<r<529) with diagonal origin pivots IsPiv q k k\mathrm{IsPiv}\,q\,k\,kIsPivqkk for all k<rk<rk<r, then there exists an edge realising PE q (oneRun r)\mathrm{PE}\,q\,(\mathrm{oneRun}\,r)PEq(oneRunr).

Constructed from the proved R6 lemma edge_of_pivs with seed run [(0,0,r)][(0,0,r)][(0,0,r)]; the pad is empty precisely when rank=r\mathrm{rank}=rrank=r, matching Jain's one-child-of-width-rrr compile.

Formalization Note. Includes rank-111 specialization oneRun1_of_piv.

Definition code
import Mathlib
import Definitions.Def_IntMul_Kappa_R6_Defs4
import Definitions.Def_IntMul_Kappa_R8_Data_BitOppbankOneRun2
import Theorems.Thm_IntMul_Kappa_R6_Bit_NB_edge_of_pivs

set_option autoImplicit false
set_option relaxedAutoImplicit false
set_option maxHeartbeats 4000000

/-!
# OneRun2 PE inhabitance from `edge_of_pivs`

General rank-`r` case: a contiguous origin run of width `r` with `q.rank = r`
realises `oneRun r` (no singleton pad).
-/

namespace IntMul.Kappa.R8.Bit.Oppbank.OneRunPE2

open IntMul.Kappa.R6.Bit
open IntMul.Kappa.R6.Bit.NB
open IntMul.Kappa.R8.Bit.Oppbank.OneRunNet2
open Matrix

private theorem one_lt_529 : 1 < 529 := by decide

def rsR (r : ℕ) : List (ℕ × ℕ × ℕ) := [(0, 0, r)]

theorem runPairs_rsR (r : ℕ) : NB.runPairs (rsR r) = (List.range r).map fun k => (k, k) := by
  simp [rsR, NB.runPairs]

theorem nodup_diag (r : ℕ) : ((List.range r).map fun k => (k, k)).Nodup := by
  have hnd : (List.range r).Nodup := List.nodup_range
  refine (List.nodup_map_iff_inj_on hnd).2 ?_
  intro a ha b hb h
  exact (Prod.ext_iff.1 h).1

theorem nodup_rsR (r : ℕ) : (NB.runPairs (rsR r)).Nodup := by
  simpa [runPairs_rsR] using nodup_diag r

/-- Rank-`r` idempotent with origin diagonal pivots ⇒ `PE q (oneRun r)`. -/
theorem oneRun_of_pivs (r : ℕ) (hr : 0 < r) (hrm : r < 529)
    (q : Matrix (Fin 529) (Fin 529) ℚ)
    (hq : q * q = q) (hrank : q.rank = r)
    (hp : ∀ k, k < r → IsPiv q k k) :
    ∃ e, PE q (oneRun r) e := by
  have hok : ∀ ρ ∈ rsR r, RunOK 529 ρ := by
    intro ρ hρ; simp [rsR] at hρ; subst hρ; exact runOK_origin hr hrm
  have hpiv : ∀ x ∈ NB.runPairs (rsR r), IsPiv q x.1 x.2 := by
    intro x hx
    rw [runPairs_rsR] at hx
    obtain ⟨k, hk, rfl⟩ := List.mem_map.1 hx
    exact hp k (List.mem_range.1 hk)
  obtain ⟨e, ⟨rs', hrs, h1, hlen⟩, hRun, hE1u, hE1d, hE2u, hE2d, hpsw⟩ :=
    edge_of_pivs (m := 529) one_lt_529 q hq (rsR r) hok (nodup_rsR r) hpiv
  have hlen_rp : (NB.runPairs (rsR r)).length = r := by
    simp [runPairs_rsR]
  have hrs' : rs' = [] := by
    have : rs'.length = 0 := by omega
    exact List.eq_nil_of_length_eq_zero this
  have hruns : e.runs = [(0, 0, r)] := by simp [hrs, hrs', rsR]
  refine ⟨e, ⟨hRun, hE1u, hE1d, hE2u, hE2d, hpsw⟩, ?_⟩
  exact ⟨hr, hrm, hruns⟩

theorem oneRun1_of_piv (q : Matrix (Fin 529) (Fin 529) ℚ)
    (hq : q * q = q) (hr : q.rank = 1) (hp : IsPiv q 0 0) :
    ∃ e, PE q (oneRun 1) e :=
  oneRun_of_pivs 1 (by decide) (by decide) q hq hr (fun k hk => by
    have : k = 0 := by omega
    simpa [this] using hp)

end IntMul.Kappa.R8.Bit.Oppbank.OneRunPE2
Source
OneRun2 e0d447f6; R6 edge_of_pivs

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