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] - feat(linear_algebra/pi_tensor_product): define the tensor product of an indexed family of semimodules #5311

Closed
wants to merge 46 commits into from

Conversation

dupuisf
Copy link
Collaborator

@dupuisf dupuisf commented Dec 10, 2020

This PR defines the tensor product of an indexed family s : ι → Type* of semimodules over commutative semirings. We denote this space by ⨂[R] i, s i and define it as free_add_monoid (R × Π i, s i) quotiented by the appropriate equivalence relation. The treatment follows very closely that of the binary tensor product in linear_algebra/tensor_product.lean.


Zulip thread

@dupuisf dupuisf added the WIP Work in progress label Dec 10, 2020
@eric-wieser
Copy link
Member

Note that as mentioned on zulip, ⨂[R] (i : fin 0), M i should probably be isomorphic to R and not the zero ring as it currently is.

@dupuisf dupuisf added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Dec 12, 2020
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
@jcommelin
Copy link
Member

#5385 is using tprod for finite products of types

@jcommelin jcommelin 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 Dec 16, 2020
@dupuisf dupuisf added the awaiting-review The author would like community review of the PR label Dec 18, 2020
Copy link
Member

@kbuzzard kbuzzard left a comment

Choose a reason for hiding this comment

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

This is some very elegant code. I suggest some very minor things.

src/linear_algebra/multilinear.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
dupuisf and others added 11 commits December 28, 2020 23:00
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Jan 3, 2021
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Jan 3, 2021
Copy link
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.

Thank you so much! This looks very clean. I thought that two lemmas could be tagged with simp. Or does the simp-linter disagree?

bors d+

src/linear_algebra/pi_tensor_product.lean Show resolved Hide resolved
src/linear_algebra/pi_tensor_product.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Jan 6, 2021

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

section semiring

variables {ι : Type*} {R : Type*} [comm_semiring R]
variables {R' : Type*} [comm_semiring R'] [algebra R' R]
Copy link
Member

Choose a reason for hiding this comment

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

Requiring algebra feels quite strict here. Was is_scalar_tower not enough?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could probably do it with [semimodule R' R] [is_scalar_tower R' R R], but isn't that just equivalent to algebra anyway?

@jcommelin
Copy link
Member

Ok, thanks for looking into those simp attributes.
Nice work!!

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Jan 7, 2021
bors bot pushed a commit that referenced this pull request Jan 7, 2021
…an indexed family of semimodules (#5311)

This PR defines the tensor product of an indexed family `s : ι → Type*` of semimodules over commutative semirings. We denote this space by `⨂[R] i, s i` and define it as `free_add_monoid (R × Π i, s i)` quotiented by the appropriate equivalence relation. The treatment follows very closely that of the binary tensor product in `linear_algebra/tensor_product.lean`.



Co-authored-by: Frédéric Dupuis <31101893+dupuisf@users.noreply.github.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented Jan 7, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(linear_algebra/pi_tensor_product): define the tensor product of an indexed family of semimodules [Merged by Bors] - feat(linear_algebra/pi_tensor_product): define the tensor product of an indexed family of semimodules Jan 7, 2021
@bors bors bot closed this Jan 7, 2021
@bors bors bot deleted the pi_tensor_product branch January 7, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

4 participants