Skip to content

refactor(LinearAlgebra/BilinearForm/Properties): Restrict the definition of BilinForm.IsSymm to commutative semiring#10422

Closed
mans0954 wants to merge 4 commits intomasterfrom
mans0954/bilinform-symm
Closed

refactor(LinearAlgebra/BilinearForm/Properties): Restrict the definition of BilinForm.IsSymm to commutative semiring#10422
mans0954 wants to merge 4 commits intomasterfrom
mans0954/bilinform-symm

Conversation

@mans0954
Copy link
Copy Markdown
Collaborator

@mans0954 mans0954 commented Feb 11, 2024

Restrict the definition of BilinForm.IsSymm and BilinForm.IsRefl to modules over a commutative semiring.

Currently BilinForm.IsSymm and BilinForm.IsRefl are defined for modules over a semiring, whereas LinearMap.IsSymm is defined for modules over a commutative semiring. We wish to redefine BilinForm.IsSymm in terms of LinearMap.IsSymm as part of #10432. This PR is a preliminary step in that direction.


Open in Gitpod

@mans0954 mans0954 marked this pull request as ready for review February 11, 2024 13:01
@adri326
Copy link
Copy Markdown
Contributor

adri326 commented Feb 14, 2024

This sounds like a strict downgrade: the definition of BilinForm.IsSymm doesn't use the commutative property, and LinearMap doesn't require a commutative semiring, so why restrict it?

@Vierkantor
Copy link
Copy Markdown
Contributor

This sounds like a strict downgrade: the definition of BilinForm.IsSymm doesn't use the commutative property, and LinearMap doesn't require a commutative semiring, so why restrict it?

Linear maps don't, but bilinear maps do, since the instance Module R (M₂ →ₛₗ[I₂] M) does (or to be more precise, we need SMulCommClass R R M), to show that map_smul holds: a • f (c • x) = c • a • f x. See also this Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/.60bilinear_form.60

@Vierkantor
Copy link
Copy Markdown
Contributor

I think replacing BilinearForm with a bilinear map is the way to go, since the bilinear condition in the non-commutative setting is not very useful anyway. But this approach seems fragile and too much work. If the commutativity will be required in the end anyway, why not make a PR that replaces the [Semiring] and [Ring] assumptions with [CommSemiring] and [CommRing] everywhere in the LinearAlgebra/Bilinear/ folder?

@Vierkantor
Copy link
Copy Markdown
Contributor

I made a start in commit 4244c22, and it builds. We still need to deduplicate/rename the variables in those files. Feel free to adopt.

@Vierkantor Vierkantor added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Feb 27, 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 Mar 18, 2024
mathlib-bors bot pushed a commit that referenced this pull request Mar 18, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
@eric-wieser
Copy link
Copy Markdown
Member

I attempted to resolve the conflicts, it seems that #11280 completely subsumed this.

@mans0954 mans0954 deleted the mans0954/bilinform-symm branch March 19, 2024 01:33
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
utensil pushed a commit that referenced this pull request Mar 26, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
mathlib-bors bot pushed a commit that referenced this pull request Apr 9, 2024
…Mathlib, migrate all of `_root_.BilinForm` to `LinearMap.BilinForm` (#11278)

Remove `structure BilinForm` from `LinearAlgebra/BilinearForm/Basic` and migrate all of `_root_.BilinForm` to `LinearMap.BilinForm`

Closes: #10553 

This isn't the end of the story, as there's still a lot of overlap between `LinearAlgebra/BilinearForm` and `LinearAlgebra/SesquilinearForm` but that can be sorted out in subsequent PRs.

Supersedes: 

- #11057
- #11032
- #10432
- #10422



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Vierkantor <[email protected]>
xgenereux pushed a commit that referenced this pull request Apr 15, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
xgenereux pushed a commit that referenced this pull request Apr 15, 2024
…Mathlib, migrate all of `_root_.BilinForm` to `LinearMap.BilinForm` (#11278)

Remove `structure BilinForm` from `LinearAlgebra/BilinearForm/Basic` and migrate all of `_root_.BilinForm` to `LinearMap.BilinForm`

Closes: #10553 

This isn't the end of the story, as there's still a lot of overlap between `LinearAlgebra/BilinearForm` and `LinearAlgebra/SesquilinearForm` but that can be sorted out in subsequent PRs.

Supersedes: 

- #11057
- #11032
- #10432
- #10422



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Vierkantor <[email protected]>
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
…Mathlib, migrate all of `_root_.BilinForm` to `LinearMap.BilinForm` (#11278)

Remove `structure BilinForm` from `LinearAlgebra/BilinearForm/Basic` and migrate all of `_root_.BilinForm` to `LinearMap.BilinForm`

Closes: #10553 

This isn't the end of the story, as there's still a lot of overlap between `LinearAlgebra/BilinearForm` and `LinearAlgebra/SesquilinearForm` but that can be sorted out in subsequent PRs.

Supersedes: 

- #11057
- #11032
- #10432
- #10422



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Vierkantor <[email protected]>
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
…Mathlib, migrate all of `_root_.BilinForm` to `LinearMap.BilinForm` (#11278)

Remove `structure BilinForm` from `LinearAlgebra/BilinearForm/Basic` and migrate all of `_root_.BilinForm` to `LinearMap.BilinForm`

Closes: #10553 

This isn't the end of the story, as there's still a lot of overlap between `LinearAlgebra/BilinearForm` and `LinearAlgebra/SesquilinearForm` but that can be sorted out in subsequent PRs.

Supersedes: 

- #11057
- #11032
- #10432
- #10422



Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Vierkantor <[email protected]>
callesonne pushed a commit that referenced this pull request Apr 22, 2024
…dules over commutative semirings (#11280)

Require the module in the definition of the `BilinForm` structure to be over a commutative semiring.

This PR is a per-requisite for #11278. It supersedes #10422.

It's been pointed out elsewhere that the current definition over a non-commutative semiring doesn't make mathematical sense: #10553 (comment)

Eventually the non-commutative situation may be considered in a mathematically meaningful way in the context of sesquilinear maps (e.g. something like #9334 (review)).

Co-authored-by: @Vierkantor 



Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Christopher Hoskin <[email protected]>
Co-authored-by: Eric Wieser <[email protected]>
callesonne pushed a commit that referenced this pull request Apr 22, 2024
…Mathlib, migrate all of `_root_.BilinForm` to `LinearMap.BilinForm` (#11278)

Remove `structure BilinForm` from `LinearAlgebra/BilinearForm/Basic` and migrate all of `_root_.BilinForm` to `LinearMap.BilinForm`

Closes: #10553 

This isn't the end of the story, as there's still a lot of overlap between `LinearAlgebra/BilinearForm` and `LinearAlgebra/SesquilinearForm` but that can be sorted out in subsequent PRs.

Supersedes: 

- #11057
- #11032
- #10432
- #10422



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

Labels

awaiting-author A reviewer has asked the author a question or requested changes. merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants