Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(linear_algebra/matrix): Add matrix properties for sesquilinear forms#15906

Closed
mcdoll wants to merge 34 commits intomasterfrom
mcdoll/bilin_form_matrix_refactor
Closed

[Merged by Bors] - feat(linear_algebra/matrix): Add matrix properties for sesquilinear forms#15906
mcdoll wants to merge 34 commits intomasterfrom
mcdoll/bilin_form_matrix_refactor

Conversation

@mcdoll
Copy link
Copy Markdown
Member

@mcdoll mcdoll commented Aug 7, 2022

The main goal of this PR is to move linear_algebra/matrix/bilinear_form to the curried bilinear map form. Since this file as quite few dependencies we copy it to a new file linear_algebra/matrix/sesquilinear_form and then move all the dependencies.

The structure is taken literally from linear_algebra/matrix/bilinear_form with generalizations and easier proofs where possible. The new lemmas are named exactly as the old ones with the following changes:

  • the namespace changed from bilin_form to linear_map
  • bilin is changed to linear_map₂. In case there is the necessity for separate bilinear and semi-bilinear lemmas we use linear_map₂ and linear_mapₛₗ₂
  • If bilin is not in the name of a lemma, matrix is changed to matrix₂ to avoid nameclashes with lemmas for linear maps M →ₛₗ[ρ₁₂] N

Moreover, the following changes were necessary:

linear_algebra/bilinear_map:

  • Weakened some typeclass assumptions
  • Added bilinear version of sum_repr_mul_repr_mul and moved sesquilinear version to sum_repr_mul_repr_mulₛₗ

linear_algebra/matrix/bilinear_form:

  • Moved basis.equiv_fun_symm_std_basis to linear_algebra/std_basis
  • adjoint_pair section: Removed a few definitions (they are now in linear_algebra/matrix/sesquilinear_form) and added a prime to the names of lemmas that have the same name as the version in linear_algebra/matrix/sesquilinear_form

linear_algebra/sesquilinear_form:

  • Added a few missing lemmas about left-separating bilinear forms (note that separating_left was previously known as nondegenerate)

linear_algebra/std_basis:

  • Lemma std_basis_apply' for calculating the application of i' : ι to (std_basis R (λ (_x : ι), R) i)

algebra/hom/ring/:

  • Lemmas for calculating a ring homomorphism applied to ite 0 1 and ite 1 0

The last two additions are needed to get a reasonable proof for matrix.to_linear_map₂'_aux_std_basis.


There are some bikeshedding questions about docstrings: Should the map M →ₛₗ[ρ₁₂] N →ₛₗ[σ₁₂] R be called "semi-bilinear" or "sesquilinear" or something completely different?
I have very slight naming inconsistency in that I add a subscript after matrix in some lemmas if there is no reference to bilinear maps in some sense, i.e., there is linear_map.mul_to_matrix₂_mul (l. 412), but linear_map.to_matrix'_to_linear_map₂'(l.223).
I thought about using the subscript everywhere but I find these subscripts annoying to type.

Please let me know if you want any further explanation of the naming schemes, I find them completely obvious but I spend too much time on this PR..

Open in Gitpod

@mcdoll mcdoll added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Aug 18, 2022
@Vierkantor Vierkantor self-assigned this Sep 24, 2022
Copy link
Copy Markdown
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

A couple of suggestions, looks pretty good overall. I didn't have time yet to go through the entirety of matrix/sesquilinear_form.lean.

@Vierkantor Vierkantor added awaiting-author A reviewer has asked the author a question or requested changes review-in-progress A reviewer is thinking about this PR offline. and removed awaiting-review The author would like community review of the PR labels Sep 24, 2022
@mcdoll mcdoll added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Sep 26, 2022
Copy link
Copy Markdown
Collaborator

@Vierkantor Vierkantor 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 d+

@bors
Copy link
Copy Markdown

bors bot commented Sep 28, 2022

✌️ mcdoll can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Sep 28, 2022
@mcdoll
Copy link
Copy Markdown
Member Author

mcdoll commented Oct 1, 2022

@Vierkantor your suggestion gives funny errors and I have no idea how to fix them without reverting to the original version.

@mcdoll
Copy link
Copy Markdown
Member Author

mcdoll commented Oct 3, 2022

bors merge

bors bot pushed a commit that referenced this pull request Oct 3, 2022
…orms (#15906)

The main goal of this PR is to move `linear_algebra/matrix/bilinear_form` to the curried bilinear map form. Since this file as quite few dependencies we copy it to a new file `linear_algebra/matrix/sesquilinear_form` and then move all the dependencies.

The structure is taken literally from `linear_algebra/matrix/bilinear_form` with generalizations and easier proofs where possible. The new lemmas are named exactly as the old ones with the following changes:
- the namespace changed from `bilin_form` to `linear_map`
- `bilin` is changed to `linear_map₂`. In case there is the necessity for separate bilinear and semi-bilinear lemmas we use `linear_map₂` and `linear_mapₛₗ₂`
- If `bilin` is not in the name of a lemma, `matrix` is changed to `matrix₂` to avoid nameclashes with lemmas for linear maps `M →ₛₗ[ρ₁₂] N`

Moreover, the following changes were necessary:

`linear_algebra/bilinear_map`:
- Weakened some typeclass assumptions
- Added bilinear version of `sum_repr_mul_repr_mul` and moved sesquilinear version to `sum_repr_mul_repr_mulₛₗ`

`linear_algebra/matrix/bilinear_form`:
- Moved `basis.equiv_fun_symm_std_basis` to `linear_algebra/std_basis`
- `adjoint_pair` section: Removed a few definitions (they are now in `linear_algebra/matrix/sesquilinear_form`) and added a prime to the names of lemmas that have the same name as the version in `linear_algebra/matrix/sesquilinear_form`

`linear_algebra/sesquilinear_form`:
- Added a few missing lemmas about left-separating bilinear forms (note that `separating_left` was previously known as `nondegenerate`)

`linear_algebra/std_basis`:
- Lemma `std_basis_apply'` for calculating the application of `i' : ι` to `(std_basis R (λ (_x : ι), R) i)`

`algebra/hom/ring/`:
- Lemmas for calculating a ring homomorphism applied to `ite 0 1` and `ite 1 0`

The last two additions are needed to get a reasonable proof for `matrix.to_linear_map₂'_aux_std_basis`.



Co-authored-by: Moritz Doll <[email protected]>
@bors
Copy link
Copy Markdown

bors bot commented Oct 4, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(linear_algebra/matrix): Add matrix properties for sesquilinear forms [Merged by Bors] - feat(linear_algebra/matrix): Add matrix properties for sesquilinear forms Oct 4, 2022
@bors bors bot closed this Oct 4, 2022
@bors bors bot deleted the mcdoll/bilin_form_matrix_refactor branch October 4, 2022 00:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

delegated The PR author may merge after reviewing final suggestions. review-in-progress A reviewer is thinking about this PR offline. t-algebra Algebra (groups, rings, fields etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants