AFTD Auto-Formalizing Theoretical Domains

is_weighted_partial_permutation

def

A square complex matrix M is a weighted partial permutation matrix if for every row index i, any two column indices with nonzero entries are equal, and for every column index j, any two row indices with nonzero entries are equal.

Statement

def is_weighted_partial_permutation {n : Type*} (M : Matrix n n ℂ) : Prop
Defined in
arXiv:2610.31807 Definition 3.12 and Theorem 3.13
Verified
26 Oct 2026
Axioms
none listed
Used by 5

Read back from the Lean

For a type n and a matrix M : Matrix n n ℂ, is_weighted_partial_permutation M is defined to hold if and only if both of the following conditions hold: 1. For every row index i : n and all column indices j₁, j₂ : n, if M i j₁ ≠ 0 and M i j₂ ≠ 0, then j₁ = j₂ (each row contains at most one non-zero entry); 2. For every column index j : n and all row indices i₁, i₂ : n, if M i₁ j ≠ 0 and M i₂ j ≠ 0, then i₁ = i₂ (each column contains at most one non-zero entry).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A square matrix is a weighted partial permutation matrix if every row and column contains at most one nonzero entry. -/
def is_weighted_partial_permutation {n : Type*} (M : Matrix n n ℂ) : Prop := (∀ i, ∀ j₁ j₂, M i j₁ ≠ 0 → M i j₂ ≠ 0 → j₁ = j₂) ∧
  (∀ j, ∀ i₁ i₂, M i₁ j ≠ 0 → M i₂ j ≠ 0 → i₁ = i₂)
See it in the graphDiscuss this resultChallenge it