Skip to content

[Merged by Bors] - refactor(LinearAlgebra/BilinearForm/TensorProduct): Tensor products of bilinear maps#14988

Closed
mans0954 wants to merge 66 commits intomasterfrom
mans0954/tensorDistrib
Closed

[Merged by Bors] - refactor(LinearAlgebra/BilinearForm/TensorProduct): Tensor products of bilinear maps#14988
mans0954 wants to merge 66 commits intomasterfrom
mans0954/tensorDistrib

Conversation

@mans0954
Copy link
Copy Markdown
Collaborator

@mans0954 mans0954 commented Jul 21, 2024

Extend the results in Mathlib/LinearAlgebra/BilinearForm/TensorProduct.lean from Bilinear Forms to Bilinear Maps

Similarly for LinearAlgebra/QuadraticForm/TensorProduct.

I had originally intended to extend much more, but was blocked by not being able to extend LinearMap.IsSymm from forms to maps.

The existing BilinMap names were actually specific to bilinear forms; these have been renamed to make room for the generalizations.

Moves:

  • LinearMap.BilinMap.tensorDistribLinearMap.BilinForm.tensorDistrib
  • LinearMap.BilinMap.tensorDistrib_tmulLinearMap.BilinForm.tensorDistrib_tmul
  • LinearMap.BilinMap.tmulLinearMap.BilinForm.tmul
  • LinearMap.BilinMap.baseChangeLinearMap.BilinForm.baseChange
  • LinearMap.BilinMap.baseChange_tmulLinearMap.BilinForm.baseChange_tmul

Open in Gitpod

@mans0954 mans0954 added the WIP Work in progress label Jul 21, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 21, 2024

PR summary 21ea33a912

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.LinearAlgebra.BilinearForm.TensorProduct 1275 1277 +2 (+0.16%)
Mathlib.LinearAlgebra.QuadraticForm.TensorProduct 1308 1310 +2 (+0.15%)
Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange 1325 1327 +2 (+0.15%)
Import changes for all files
Files Import difference
6 files Mathlib.LinearAlgebra.QuadraticForm.QuadraticModuleCat.Symmetric Mathlib.LinearAlgebra.QuadraticForm.QuadraticModuleCat.Monoidal Mathlib.LinearAlgebra.BilinearForm.TensorProduct Mathlib.LinearAlgebra.CliffordAlgebra.BaseChange Mathlib.LinearAlgebra.QuadraticForm.TensorProduct Mathlib.LinearAlgebra.QuadraticForm.TensorProduct.Isometries
2

Declarations diff

+ exists_quadraticMap_ne_zero
++ tensorDistrib
++ tensorDistrib_tmul
++- baseChange
++- baseChange_tmul
+-++ tmul

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.

@mans0954 mans0954 marked this pull request as ready for review July 22, 2024 21:35
@mans0954 mans0954 removed the WIP Work in progress label Jul 22, 2024
@mans0954
Copy link
Copy Markdown
Collaborator Author

CC: @eric-wieser

@mans0954 mans0954 changed the title refactor(Mathlib/LinearAlgebra/BilinearForm/TensorProduct.lean): Tensor products of bilinear maps refactor(LinearAlgebra/BilinearForm/TensorProduct): Tensor products of bilinear maps Jul 22, 2024
@mans0954 mans0954 added the t-algebra Algebra (groups, rings, fields, etc) label Jul 30, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 7, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 7, 2024
@mans0954
Copy link
Copy Markdown
Collaborator Author

mans0954 commented Aug 8, 2024

@eric-wieser did you have any further thoughts on this please?

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Aug 9, 2024
@mans0954 mans0954 requested a review from eric-wieser October 25, 2024 22:09
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Can you fill out the "moves" section of the PR template to indicate that BilinMap.tmul and friends have moved to BilinForm.tmul?

Comment on lines +98 to +104
/- Previously `QuadraticForm.tensorDistrib` was defined in a similar way to
`QuadraticMap.tensorDistrib`. We now obtain the definition of `QuadraticForm.tensorDistrib`
from `QuadraticMap.tensorDistrib` using `A ⊗[R] R ≃ₗ[A] A`. Hypothesis `e1` below shows that the
new definition is equal to the old, and allows us to reuse the old proof.

TODO: Define `IsSymm` for bilinear maps and generalise this result to Quadratic Maps.
-/
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.

Can you put this inside the proof just before have e1? After all, this is a comment about the proof, not the theorem

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, thanks.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

For a proper solution we probably want something like:

variable [AddCommMonoid M] [CommSemiring R] [Module R M] [StarRing R] [Star M]

/-- The proposition that a sesquilinear form is conjugate symmetric -/
def LinearMap.IsSymm (B : M →ₛₗ[starRingEnd R] M →ₗ[R] R) : Prop :=
  ∀ x y, star (B x y) = B y x

But preferably with [NonUnitalSemiring R] (or even [NonUnitalNonAssocSemiringSemiring R]) instead of [CommSemiring R] in order that this would cover Hilbert C*-modules.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've come up with this: #18406

@eric-wieser
Copy link
Copy Markdown
Member

bors merge

Thanks!

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Oct 29, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 29, 2024
…f bilinear maps (#14988)

Extend the results in `Mathlib/LinearAlgebra/BilinearForm/TensorProduct.lean` from Bilinear Forms to Bilinear Maps

Similarly for `LinearAlgebra/QuadraticForm/TensorProduct`.

I had originally intended to extend much more, but was blocked by not being able to extend `LinearMap.IsSymm` from forms to maps.

The existing `BilinMap` names were actually specific to bilinear forms; these have been renamed to make room for the generalizations.

Moves:
- `LinearMap.BilinMap.tensorDistrib` → `LinearMap.BilinForm.tensorDistrib`
- `LinearMap.BilinMap.tensorDistrib_tmul` → `LinearMap.BilinForm.tensorDistrib_tmul`
- `LinearMap.BilinMap.tmul` → `LinearMap.BilinForm.tmul`
- `LinearMap.BilinMap.baseChange` → `LinearMap.BilinForm.baseChange`
- `LinearMap.BilinMap.baseChange_tmul` → `LinearMap.BilinForm.baseChange_tmul`



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

mathlib-bors bot commented Oct 29, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(LinearAlgebra/BilinearForm/TensorProduct): Tensor products of bilinear maps [Merged by Bors] - refactor(LinearAlgebra/BilinearForm/TensorProduct): Tensor products of bilinear maps Oct 29, 2024
@mathlib-bors mathlib-bors bot closed this Oct 29, 2024
@mathlib-bors mathlib-bors bot deleted the mans0954/tensorDistrib branch October 29, 2024 23:14
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. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants