Skip to content

[Merged by Bors] - feat: lemmas about Matrix is symmetric iff bilinear form is symmetric#40201

Closed
gw90 wants to merge 10 commits into
leanprover-community:masterfrom
gw90:gw90/bilin-matrix-lemmas-1
Closed

[Merged by Bors] - feat: lemmas about Matrix is symmetric iff bilinear form is symmetric#40201
gw90 wants to merge 10 commits into
leanprover-community:masterfrom
gw90:gw90/bilin-matrix-lemmas-1

Conversation

@gw90
Copy link
Copy Markdown
Contributor

@gw90 gw90 commented Jun 3, 2026

Adds 4 lemmas, all of which are variants of the statement that a matrix is symmetric if and only if the corresponding bilinear form is symmetric. These lemmas would help me in a downstream project.


Open in Gitpod

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

PR summary 93894ffe7d

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ BilinForm.ext_iff_basis
+ LinearMap.BilinForm.isSymm_toMatrix'_iff_isSymm
+ LinearMap.BilinForm.isSymm_toMatrix_iff_isSymm
+ Matrix.isSymm_toBilin'_iff_isSymm
+ Matrix.isSymm_toBilin_iff_isSymm
+ ext_iff_basis

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 93894ff).

  • +6 new declarations
  • −0 removed declarations
+LinearMap.BilinForm.ext_iff_basis
+LinearMap.BilinForm.isSymm_toMatrix'_iff_isSymm
+LinearMap.BilinForm.isSymm_toMatrix_iff_isSymm
+LinearMap.ext_iff_basis
+Matrix.isSymm_toBilin'_iff_isSymm
+Matrix.isSymm_toBilin_iff_isSymm

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 93894ffe7d
Reference commit a7f9fbe434

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).

@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Jun 3, 2026
@gw90 gw90 temporarily deployed to cache-upload-forks June 3, 2026 21:07 — with GitHub Actions Inactive
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
@gw90 gw90 temporarily deployed to cache-upload-forks June 3, 2026 22:56 — with GitHub Actions Inactive
Copy link
Copy Markdown
Collaborator

@themathqueen themathqueen left a comment

Choose a reason for hiding this comment

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

It's nice to see you contributing again!

(please remember to comment -awaiting-author to remove the label when you're ready for another review!)

Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
@themathqueen themathqueen added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@themathqueen themathqueen self-assigned this Jun 4, 2026
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 11:57 — with GitHub Actions Inactive
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Co-authored-by: Monica Omar <23701951+themathqueen@users.noreply.github.com>
@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 12:07 — with GitHub Actions Inactive
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 12:21 — with GitHub Actions Inactive
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 13:13 — with GitHub Actions Inactive
@gw90
Copy link
Copy Markdown
Contributor Author

gw90 commented Jun 4, 2026

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@themathqueen
Copy link
Copy Markdown
Collaborator

themathqueen commented Jun 4, 2026

Final thing, can you move LinearMap.BilinForm.ext_basis and LinearMap.BilinForm.sum_repr_mul_repr_mul to the bilinear file (where you put the iff version)? I don't think they belong in the Hom file?

(Or if you want, this can be in another PR)

Comment thread Mathlib/LinearAlgebra/Basis/Bilinear.lean Outdated
Comment thread Mathlib/LinearAlgebra/Matrix/BilinearForm.lean Outdated
@gw90
Copy link
Copy Markdown
Contributor Author

gw90 commented Jun 4, 2026

Final thing, can you move LinearMap.BilinForm.ext_basis and LinearMap.BilinForm.sum_repr_mul_repr_mul to the bilinear file (where you put the iff version)? I don't think they belong in the Hom file?

(Or if you want, this can be in another PR)

I'd rather leave this as another PR, mainly because Mathlib.LinearAlgebra.BilinearForm.Hom also lists other to-dos about re-arranging/eliminating redundant code, and I think that deserves its own PR where everything is thought out all together.

@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 15:54 — with GitHub Actions Inactive
Comment thread Mathlib/LinearAlgebra/Basis/Bilinear.lean Outdated
@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 16:11 — with GitHub Actions Inactive
Copy link
Copy Markdown
Collaborator

@themathqueen themathqueen left a comment

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

github-actions Bot commented Jun 4, 2026

🚀 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 4, 2026
Copy link
Copy Markdown
Member

@riccardobrasca riccardobrasca left a comment

Choose a reason for hiding this comment

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

Thanks!

bors merge

@mathlib-triage mathlib-triage Bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Jun 4, 2026
@gw90 gw90 temporarily deployed to cache-upload-forks June 4, 2026 16:22 — with GitHub Actions Inactive
mathlib-bors Bot pushed a commit that referenced this pull request Jun 4, 2026
…#40201)

Adds 4 lemmas, all of which are variants of the statement that a matrix is symmetric if and only if the corresponding bilinear form is symmetric. These lemmas would help me in a downstream project.

Co-authored-by: Gregory Wickham <gwickham99@gmail.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Jun 4, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: lemmas about Matrix is symmetric iff bilinear form is symmetric [Merged by Bors] - feat: lemmas about Matrix is symmetric iff bilinear form is symmetric Jun 4, 2026
@mathlib-bors mathlib-bors Bot closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! 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