Skip to content

[Merged by Bors] - refactor(LinearAlgebra/QuadraticForm/Basic): Use bilinear maps for the companion#10097

Closed
mans0954 wants to merge 17 commits intomasterfrom
mans0954/quadratic-form-bilinear-map
Closed

[Merged by Bors] - refactor(LinearAlgebra/QuadraticForm/Basic): Use bilinear maps for the companion#10097
mans0954 wants to merge 17 commits intomasterfrom
mans0954/quadratic-form-bilinear-map

Conversation

@mans0954
Copy link
Copy Markdown
Collaborator

This PR replaces the companion (B : BilinForm R M) of a quadratic form with a bilinear map (B : M →ₗ[R] M →ₗ[R] R).

This is intended as a baby step towards generalising quadratic forms to quadratic maps. In the future we could allow for companion bilinear or even sesquilinear maps into an R-module.


I've previously tried to go straight to quadratic maps (#7569) but it's making for a PR that is too big and unwieldy. This PR is hopefully more achievable.

Open in Gitpod

@mans0954
Copy link
Copy Markdown
Collaborator Author

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 4a55b3a.
There were significant changes against commit e8bfb67:

  Benchmark                                                           Metric         Change
  =========================================================================================
+ ~Mathlib.CategoryTheory.Limits.FilteredColimitCommutesFiniteLimit   instructions   -19.2%
- ~Mathlib.LinearAlgebra.QuadraticForm.Basic                          instructions    16.9%

Copy link
Copy Markdown
Member

@mcdoll mcdoll left a comment

Choose a reason for hiding this comment

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

Thank you so much, I would be very happy if we could remove BilinForm entirely from mathlib and this is a big step.

@mcdoll mcdoll added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Jan 31, 2024
@mans0954 mans0954 added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Jan 31, 2024
@mans0954
Copy link
Copy Markdown
Collaborator Author

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit bdecf41.
There were significant changes against commit 0a0bb6e:

  Benchmark                                    Metric         Change
  ==================================================================
- ~Mathlib.LinearAlgebra.QuadraticForm.Basic   instructions    16.8%

@mcdoll
Copy link
Copy Markdown
Member

mcdoll commented Feb 1, 2024

maintainer merge

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 1, 2024

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

Copy link
Copy Markdown
Member

@jcommelin jcommelin 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

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Feb 1, 2024
@eric-wieser eric-wieser self-assigned this Feb 1, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 1, 2024
…e companion (#10097)

This PR replaces the companion `(B : BilinForm R M)` of a quadratic form with a bilinear map `(B : M →ₗ[R] M →ₗ[R] R)`.

This is intended as a baby step towards generalising quadratic forms to quadratic maps. In the future we could allow for companion bilinear or even sesquilinear maps into an `R`-module.



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 1, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 1, 2024
…e companion (#10097)

This PR replaces the companion `(B : BilinForm R M)` of a quadratic form with a bilinear map `(B : M →ₗ[R] M →ₗ[R] R)`.

This is intended as a baby step towards generalising quadratic forms to quadratic maps. In the future we could allow for companion bilinear or even sesquilinear maps into an `R`-module.



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Feb 1, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(LinearAlgebra/QuadraticForm/Basic): Use bilinear maps for the companion [Merged by Bors] - refactor(LinearAlgebra/QuadraticForm/Basic): Use bilinear maps for the companion Feb 1, 2024
@mathlib-bors mathlib-bors bot closed this Feb 1, 2024
@mathlib-bors mathlib-bors bot deleted the mans0954/quadratic-form-bilinear-map branch February 1, 2024 13:47

variable [Monoid S] [Monoid T] [DistribMulAction S R] [DistribMulAction T R]
variable [SMulCommClass S R R] [SMulCommClass T R R]
variable [SMulCommClass R S R] [SMulCommClass S R R] [SMulCommClass T R R] [SMulCommClass R T R]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like a regression to me; one implies the other so there should be no need for both

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Addressed in #10167

mathlib-bors bot pushed a commit that referenced this pull request Feb 7, 2024
I didn't get a chance to review #10097 before it was merged; this contains some minor fixups.

This removes `LinearMap.linMulLin`, as it can be recovered easily via `LinearMap.mul`.
mathlib-bors bot pushed a commit that referenced this pull request Feb 7, 2024
I didn't get a chance to review #10097 before it was merged; this contains some minor fixups.

This removes `LinearMap.linMulLin`, as it can be recovered easily via `LinearMap.mul`.
mathlib-bors bot pushed a commit that referenced this pull request Feb 8, 2024
I didn't get a chance to review #10097 before it was merged; this contains some minor fixups.

This removes `LinearMap.linMulLin`, as it can be recovered easily via `LinearMap.mul`.
atarnoam pushed a commit that referenced this pull request Feb 9, 2024
I didn't get a chance to review #10097 before it was merged; this contains some minor fixups.

This removes `LinearMap.linMulLin`, as it can be recovered easily via `LinearMap.mul`.
mathlib-bors bot pushed a commit that referenced this pull request Feb 26, 2024
…lar valued bi `LinearMap` (#10238)

Following on from #10097, which converted the companion of a quadratic form with a bilinear map, this PR replaces a number of results about quadratic forms and bilinear forms with results about quadratic forms and scalar valued bilinear maps. The long term aim is to be able to consider quadratic maps.

The main change is to `LinearAlgebra/QuadraticForm/Basic`, but this necessitates changes throughout `LinearAlgebra/QuadraticForm/`. Minor changes are also required elsewhere:

- `LinearAlgebra/CliffordAlgebra/`
- `LinearAlgebra/Matrix/PosDef`
- `LinearAlgebra/SesquilinearForm`
- A number of additional results about tensor products and linear maps are also required.



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
riccardobrasca pushed a commit that referenced this pull request Mar 1, 2024
…lar valued bi `LinearMap` (#10238)

Following on from #10097, which converted the companion of a quadratic form with a bilinear map, this PR replaces a number of results about quadratic forms and bilinear forms with results about quadratic forms and scalar valued bilinear maps. The long term aim is to be able to consider quadratic maps.

The main change is to `LinearAlgebra/QuadraticForm/Basic`, but this necessitates changes throughout `LinearAlgebra/QuadraticForm/`. Minor changes are also required elsewhere:

- `LinearAlgebra/CliffordAlgebra/`
- `LinearAlgebra/Matrix/PosDef`
- `LinearAlgebra/SesquilinearForm`
- A number of additional results about tensor products and linear maps are also required.



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
I didn't get a chance to review #10097 before it was merged; this contains some minor fixups.

This removes `LinearMap.linMulLin`, as it can be recovered easily via `LinearMap.mul`.
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
…lar valued bi `LinearMap` (#10238)

Following on from #10097, which converted the companion of a quadratic form with a bilinear map, this PR replaces a number of results about quadratic forms and bilinear forms with results about quadratic forms and scalar valued bilinear maps. The long term aim is to be able to consider quadratic maps.

The main change is to `LinearAlgebra/QuadraticForm/Basic`, but this necessitates changes throughout `LinearAlgebra/QuadraticForm/`. Minor changes are also required elsewhere:

- `LinearAlgebra/CliffordAlgebra/`
- `LinearAlgebra/Matrix/PosDef`
- `LinearAlgebra/SesquilinearForm`
- A number of additional results about tensor products and linear maps are also required.



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
xgenereux pushed a commit that referenced this pull request Apr 15, 2024
…lar valued bi `LinearMap` (#10238)

Following on from #10097, which converted the companion of a quadratic form with a bilinear map, this PR replaces a number of results about quadratic forms and bilinear forms with results about quadratic forms and scalar valued bilinear maps. The long term aim is to be able to consider quadratic maps.

The main change is to `LinearAlgebra/QuadraticForm/Basic`, but this necessitates changes throughout `LinearAlgebra/QuadraticForm/`. Minor changes are also required elsewhere:

- `LinearAlgebra/CliffordAlgebra/`
- `LinearAlgebra/Matrix/PosDef`
- `LinearAlgebra/SesquilinearForm`
- A number of additional results about tensor products and linear maps are also required.



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants