Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - refactor(data/matrix/basic): merge duplicate algebra structures #8486

Closed
wants to merge 17 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Aug 1, 2021

By putting the algebra instance in the same file as scalar, a future patch can probably remove matrix.scalar entirely (it's just another spelling of algebra_map).

Note that we actually had two instances of algebra R (matrix n n R) in different files, and the second one was strictly more general than the first. This removes the less general one.

Moving the imports around like this changes the number of simp lemmas available in downstream files, which can make simp slow enough to push a proof into a timeout.

A lot of files were expecting a transitive import of algebra.algebra.basic to import data.fintype.card, which it no longer does; hence the need to add this import explicitly.

There are no new lemmas or generalizations in this change; the old matrix_algebra has been deleted, and everything else has been moved with some variables renamed.


Open in Gitpod

@eric-wieser eric-wieser force-pushed the eric-wieser/move-matrix-algebra branch from 06cd890 to 68c2784 Compare August 1, 2021 10:34
@eric-wieser eric-wieser changed the title refactor(data/matrix/basic): make the algebra structure available earlier refactor(data/matrix/basic): merge duplicate algebra structures Aug 1, 2021
@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Aug 1, 2021
@eric-wieser eric-wieser requested a review from urkud August 1, 2021 20:52
Copy link
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.

I never noticed the duplicate algebras, thanks for spotting it!

src/ring_theory/matrix_algebra.lean Outdated Show resolved Hide resolved
src/linear_algebra/multilinear.lean Outdated Show resolved Hide resolved
src/data/matrix/basic.lean Show resolved Hide resolved
@Vierkantor Vierkantor added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 2, 2021
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@eric-wieser eric-wieser 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 Aug 2, 2021
@Vierkantor
Copy link
Collaborator

bors d+

@bors
Copy link

bors bot commented Aug 2, 2021

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

@github-actions github-actions bot 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 Aug 2, 2021
@eric-wieser
Copy link
Member Author

bors r+

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Aug 2, 2021
@bors
Copy link

bors bot commented Aug 2, 2021

Canceled.

@eric-wieser eric-wieser force-pushed the eric-wieser/move-matrix-algebra branch from 628cd0e to 7ec6d40 Compare August 2, 2021 11:42
@eric-wieser
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Aug 2, 2021
By putting the algebra instance in the same file as `scalar`, a future patch can probably remove `matrix.scalar` entirely (it's just another spelling of `algebra_map`).

Note that we actually had two instances of `algebra R (matrix n n R)` in different files, and the second one was strictly more general than the first. This removes the less general one.

Moving the imports around like this changes the number of simp lemmas available in downstream files, which can make `simp` slow enough to push a proof into a timeout.

A lot of files were expecting a transitive import of `algebra.algebra.basic` to import `data.fintype.card`, which it no longer does; hence the need to add this import explicitly.

There are no new lemmas or generalizations in this change; the old `matrix_algebra` has been deleted, and everything else has been moved with some variables renamed.
@bors
Copy link

bors bot commented Aug 2, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(data/matrix/basic): merge duplicate algebra structures [Merged by Bors] - refactor(data/matrix/basic): merge duplicate algebra structures Aug 2, 2021
@bors bors bot closed this Aug 2, 2021
@bors bors bot deleted the eric-wieser/move-matrix-algebra branch August 2, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants