AFTD Auto-Formalizing Theoretical Domains

is_moore_penrose_inverse

def

A real matrix A_pinv is the Moore-Penrose pseudoinverse of A if A * A_pinv * A = A, A_pinv * A * A_pinv = A_pinv, and both A * A_pinv and A_pinv * A are symmetric.

Statement

def is_moore_penrose_inverse {m n : Type*} [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]
    (A : Matrix m n ℝ) (A_pinv : Matrix n m ℝ) : Prop
Defined in
Penrose 1955, A generalized inverse for matrices, Proc. Cambridge Philos. Soc. 51:406-413
Verified
18 Nov 2026
Axioms
none listed
Used by 3

Read back from the Lean

Given finite types m and n with decidable equality, and matrices A : Matrix m n ℝ and A_pinv : Matrix n m ℝ, is_moore_penrose_inverse A A_pinv is the proposition that: 1. A * A_pinv * A = A, 2. A_pinv * A * A_pinv = A_pinv, 3. Matrix.transpose (A * A_pinv) = A * A_pinv, and 4. Matrix.transpose (A_pinv * A) = A_pinv * A.

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 real matrix A_pinv is the Moore-Penrose pseudoinverse of A. -/
def is_moore_penrose_inverse {m n : Type*} [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]
    (A : Matrix m n ℝ) (A_pinv : Matrix n m ℝ) : Prop :=
  A * A_pinv * A = A ∧
  A_pinv * A * A_pinv = A_pinv ∧
  Matrix.transpose (A * A_pinv) = A * A_pinv ∧
  Matrix.transpose (A_pinv * A) = A_pinv * A
See it in the graphDiscuss this resultChallenge it