Skip to content

[Merged by Bors] - feat(LinearAlgebra/Matrix/Nondegenerate): more API and generalize to non-domains#39634

Closed
SnirBroshi wants to merge 27 commits into
leanprover-community:masterfrom
SnirBroshi:feature/matrix/nondegenerate-generalize-nonzerodivisors
Closed

[Merged by Bors] - feat(LinearAlgebra/Matrix/Nondegenerate): more API and generalize to non-domains#39634
SnirBroshi wants to merge 27 commits into
leanprover-community:masterfrom
SnirBroshi:feature/matrix/nondegenerate-generalize-nonzerodivisors

Conversation

@SnirBroshi

@SnirBroshi SnirBroshi commented May 20, 2026

Copy link
Copy Markdown
Collaborator
  • Syntactically generalize the bilinear form identities to non-square matrices
  • Prove iff and transpose theorems for SeparatingLeft/SeparatingRight/Nondegenerate
  • Prove M *ᵥ v = 0 → v = 0 and v ᵥ* M = 0 → v = 0 given Nondegenerate
    (extracted from the existing eq_zero_of_*_eq_zero)
  • Generalize M.det ≠ 0 → M.Nondegenerate to M.det ∈ R⁰ → M.Nondegenerate (over any CommRing)
  • Add M *ᵥ v = 0 → v = 0 and v ᵥ* M = 0 → v = 0 theorems given M.det ∈ R⁰
  • Allow NonUnitalNonAssocSemirings in the defs

Open in Gitpod

…generate` to non-domains with `det ∈ nonZeroDivisors`
@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label May 20, 2026
@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown

PR summary d991d28488

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ Nondegenerate.of_det_mem_nonZeroDivisors
+ Nondegenerate.transpose
+ SeparatingLeft.eq_zero_of_vecMul_eq_zero
+ SeparatingLeft.nondegenerate
+ SeparatingLeft.of_det_mem_nonZeroDivisors
+ SeparatingLeft.separatingRight
+ SeparatingLeft.separatingRight_transpose
+ SeparatingRight.eq_zero_of_mulVec_eq_zero
+ SeparatingRight.nondegenerate
+ SeparatingRight.separatingLeft
+ SeparatingRight.separatingLeft_transpose
+ eq_zero_of_det_mem_nonZeroDivisors_of_mulVec_eq_zero
+ eq_zero_of_det_mem_nonZeroDivisors_of_vecMul_eq_zero
+ nondegenerate_iff_forall_vecMul_and_mulVec_eq_zero
+ nondegenerate_iff_separatingLeft
+ nondegenerate_iff_separatingRight
+ nondegenerate_transpose_iff
+ separatingLeft_iff_forall_vecMul_eq_zero
+ separatingLeft_iff_separatingRight
+ separatingLeft_transpose_iff
+ separatingRight_iff_forall_mulVec_eq_zero
+ separatingRight_transpose_iff

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit d991d28).

  • +22 new declarations
  • −0 removed declarations
+Matrix.Nondegenerate.of_det_mem_nonZeroDivisors
+Matrix.Nondegenerate.transpose
+Matrix.SeparatingLeft.eq_zero_of_vecMul_eq_zero
+Matrix.SeparatingLeft.nondegenerate
+Matrix.SeparatingLeft.separatingRight
+Matrix.SeparatingLeft.separatingRight_transpose
+Matrix.SeparatingRight.eq_zero_of_mulVec_eq_zero
+Matrix.SeparatingRight.nondegenerate
+Matrix.SeparatingRight.separatingLeft
+Matrix.SeparatingRight.separatingLeft_transpose
+Matrix.eq_zero_of_det_mem_nonZeroDivisors_of_mulVec_eq_zero
+Matrix.eq_zero_of_det_mem_nonZeroDivisors_of_vecMul_eq_zero
+Matrix.nondegenerate_iff
+Matrix.nondegenerate_iff_forall_vecMul_and_mulVec_eq_zero
+Matrix.nondegenerate_iff_separatingLeft
+Matrix.nondegenerate_iff_separatingRight
+Matrix.nondegenerate_transpose_iff
+Matrix.separatingLeft_iff_forall_vecMul_eq_zero
+Matrix.separatingLeft_iff_separatingRight
+Matrix.separatingLeft_transpose_iff
+Matrix.separatingRight_iff_forall_mulVec_eq_zero
+Matrix.separatingRight_transpose_iff

No changes to strong technical debt.

No changes to weak technical debt.

Current commit d991d28488
Reference commit 2929a78989

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@SnirBroshi SnirBroshi changed the title feat(LinearAlgebra/Matrix/Nondegenerate): generalize det ≠ 0 → Nondegenerate feat(LinearAlgebra/Matrix/Nondegenerate): more API and generalize to non-domains May 21, 2026
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean Outdated
@SnirBroshi
SnirBroshi requested a review from themathqueen May 21, 2026 22:48
Comment thread Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean
Comment thread Mathlib/LinearAlgebra/Matrix/ToLinearEquiv.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean
@SnirBroshi
SnirBroshi requested a review from themathqueen May 25, 2026 03:00
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean
SnirBroshi and others added 2 commits June 24, 2026 23:02
Co-authored-by: Monica Omar <23701951+themathqueen@users.noreply.github.com>
@SnirBroshi SnirBroshi removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 24, 2026
@SnirBroshi
SnirBroshi requested a review from themathqueen June 24, 2026 20:09
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean Outdated
@themathqueen themathqueen added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 25, 2026
@SnirBroshi SnirBroshi removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 25, 2026
@SnirBroshi
SnirBroshi requested a review from themathqueen June 25, 2026 12:23
Comment thread Mathlib/LinearAlgebra/Matrix/Nondegenerate.lean Outdated
Co-authored-by: Monica Omar <23701951+themathqueen@users.noreply.github.com>
@SnirBroshi
SnirBroshi requested a review from themathqueen June 29, 2026 14:42

@themathqueen themathqueen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by themathqueen.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 30, 2026
@ocfnash

ocfnash commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jul 1, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jul 1, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 1, 2026
…non-domains (#39634)

- Syntactically generalize the bilinear form identities to non-square matrices
- Prove iff and transpose theorems for `SeparatingLeft`/`SeparatingRight`/`Nondegenerate`
- Prove `M *ᵥ v = 0 → v = 0` and `v ᵥ* M = 0 → v = 0` given `Nondegenerate`
  (extracted from the existing `eq_zero_of_*_eq_zero`)
- Generalize `M.det ≠ 0 → M.Nondegenerate` to `M.det ∈ R⁰ → M.Nondegenerate` (over any `CommRing`)
- Add `M *ᵥ v = 0 → v = 0` and `v ᵥ* M = 0 → v = 0` theorems given `M.det ∈ R⁰`
- Allow `NonUnitalNonAssocSemiring`s in the `def`s
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jul 1, 2026
@mathlib-bors

mathlib-bors Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title feat(LinearAlgebra/Matrix/Nondegenerate): more API and generalize to non-domains [Merged by Bors] - feat(LinearAlgebra/Matrix/Nondegenerate): more API and generalize to non-domains Jul 1, 2026
@mathlib-bors mathlib-bors Bot closed this Jul 1, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 2, 2026
…emiring (#41271)

This PR generalizes the `SeparatingLeft`/`SeparatingRight`/`Nondegenerate` lemmas from `CommRing` to `CommSemiring` (the determinant section keeps `CommRing`), and golfs `nondegenerate_def` using the `@[mk_iff]`-generated `nondegenerate_iff`. Follow-up to #39634, which generalized the definitions but left the lemmas at `CommRing`.

🤖 Prepared with Claude Code
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Jul 4, 2026
…non-domains (leanprover-community#39634)

- Syntactically generalize the bilinear form identities to non-square matrices
- Prove iff and transpose theorems for `SeparatingLeft`/`SeparatingRight`/`Nondegenerate`
- Prove `M *ᵥ v = 0 → v = 0` and `v ᵥ* M = 0 → v = 0` given `Nondegenerate`
  (extracted from the existing `eq_zero_of_*_eq_zero`)
- Generalize `M.det ≠ 0 → M.Nondegenerate` to `M.det ∈ R⁰ → M.Nondegenerate` (over any `CommRing`)
- Add `M *ᵥ v = 0 → v = 0` and `v ᵥ* M = 0 → v = 0` theorems given `M.det ∈ R⁰`
- Allow `NonUnitalNonAssocSemiring`s in the `def`s
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Jul 4, 2026
…emiring (leanprover-community#41271)

This PR generalizes the `SeparatingLeft`/`SeparatingRight`/`Nondegenerate` lemmas from `CommRing` to `CommSemiring` (the determinant section keeps `CommRing`), and golfs `nondegenerate_def` using the `@[mk_iff]`-generated `nondegenerate_iff`. Follow-up to leanprover-community#39634, which generalized the definitions but left the lemmas at `CommRing`.

🤖 Prepared with Claude Code
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
…non-domains (leanprover-community#39634)

- Syntactically generalize the bilinear form identities to non-square matrices
- Prove iff and transpose theorems for `SeparatingLeft`/`SeparatingRight`/`Nondegenerate`
- Prove `M *ᵥ v = 0 → v = 0` and `v ᵥ* M = 0 → v = 0` given `Nondegenerate`
  (extracted from the existing `eq_zero_of_*_eq_zero`)
- Generalize `M.det ≠ 0 → M.Nondegenerate` to `M.det ∈ R⁰ → M.Nondegenerate` (over any `CommRing`)
- Add `M *ᵥ v = 0 → v = 0` and `v ᵥ* M = 0 → v = 0` theorems given `M.det ∈ R⁰`
- Allow `NonUnitalNonAssocSemiring`s in the `def`s
michaellee94 pushed a commit to michaellee94/mathlib4 that referenced this pull request Jul 11, 2026
…emiring (leanprover-community#41271)

This PR generalizes the `SeparatingLeft`/`SeparatingRight`/`Nondegenerate` lemmas from `CommRing` to `CommSemiring` (the determinant section keeps `CommRing`), and golfs `nondegenerate_def` using the `@[mk_iff]`-generated `nondegenerate_iff`. Follow-up to leanprover-community#39634, which generalized the definitions but left the lemmas at `CommRing`.

🤖 Prepared with Claude Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants