Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A rectangular matrix mask retains a block with the selected cardinalities

Proved
mme_MMObj_rectangle_mask_cardinality_restriction

by Robertboy18 · Sep 22, 2026 · Mathlib 777aaa6 (Lean v4.29.0-rc3)

matrix-multiplicationtensor-restriction

Let KKK be a field and n,m,pn,m,pn,m,p be natural numbers. Choose sets CCC of column indices among nnn labels and RRR of row indices among ppp labels. In the third coordinate of ⟨n,m,p⟩\langle n,m,p\rangle⟨n,m,p⟩, retain precisely the matrix units ek,ie_{k,i}ek,i​ with k∈Rk\in Rk∈R and i∈Ci\in Ci∈C, leaving the first two coordinates unchanged. The resulting projected tensor restricts to

⟨∣C∣,m,∣R∣⟩.\langle |C|,m,|R|\rangle.⟨∣C∣,m,∣R∣⟩.

Thus a rectangular shared-coordinate mask retains a matrix block of volume ∣C∣m∣R∣|C|m|R|∣C∣m∣R∣. Empty selections and zero dimensions are allowed.

Preamble
import Definitions.Def_mme_tensor_rank
import Definitions.Def_mme_permutation
import Mathlib.Tactic.FinCases

open MME PiTensorProduct Module BigOperators
universe u
set_option autoImplicit false
Formal statement
theorem mme_MMObj_rectangle_mask_cardinality_restriction
    {K : Type u} [Field K] (n m p : ℕ)
    (C : Fin n → Prop) (R : Fin p → Prop) [DecidablePred C] [DecidablePred R] :
    let P : ∀ i, (MMObj K n m p).V i →ₗ[K] (MMObj K n m p).V i :=
      Function.update (fun _ ↦ LinearMap.id) 2
        (LinearMap.pi (fun ki : Fin p × Fin n ↦
          if R ki.1 ∧ C ki.2 then LinearMap.proj ki else 0))
    TensorObj.Restrict
      (MMObj K (Fintype.card {i : Fin n // C i}) m (Fintype.card {k : Fin p // R k}))
      { MMObj K n m p with t := PiTensorProduct.map P (MMObj K n m p).t } := by sorry
Source
Coordinate restriction along injective row and column enumerations, followed by commutation with the rectangular mask.

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