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
- is_resistance_regularA finite simple graph G is resistance-regular if G is connected and there exists a Moore-Penrose pseudoinverse of its real Laplacian…
- is_moore_penrose_inverse_zeroFor any natural number $n$, the $n \times n$ real zero matrix is its own Moore–Penrose pseudoinverse.
- op1917_exists_nonregular_resistance_regular_order_16There exists a finite type V with 16 elements and a simple graph G on V such that G is resistance-regular and G is not regular (there does…
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