Skip to content

Add the Moore-Penrose pseudo-inverse #24787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eric-wieser opened this issue May 11, 2025 · 0 comments
Open

Add the Moore-Penrose pseudo-inverse #24787

eric-wieser opened this issue May 11, 2025 · 0 comments
Labels
t-algebra Algebra (groups, rings, fields, etc)

Comments

@eric-wieser
Copy link
Member

eric-wieser commented May 11, 2025

Note that the naive definition of

import Mathlib

variable {m n R : Type*} [CommRing R] [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]

noncomputable def pinv (A : Matrix m n R) : Matrix n m R :=
  (Aᵀ * A)⁻¹ * Aᵀ

only works when FIntype.card m >= Fintype.card n, and even then only when rank A = Fintype.card n.

Some possible references for a generalized definition:

A quick attempt at the second one seems to start with:

def IsMoorePenroseInverse {α β γ δ} [HMul α β γ] [HMul β α δ] [HMul γ α α] [HMul δ β β] [Star γ] [Star δ]
    (A : α) (As : β) :=
  A * As * A = A ∧ As * A * As = As ∧ star (A * As) = A * As ∧ star (As * A) = As * A

Zulip threads:

@eric-wieser eric-wieser changed the title Add the Moore-Penrose Pseudo-inverse Add the Moore-Penrose pseudo-inverse May 11, 2025
@eric-wieser eric-wieser added the t-algebra Algebra (groups, rings, fields, etc) label May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

No branches or pull requests

1 participant