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

feat: Port Algebra.Category.Ring.Basic #3105

Closed
wants to merge 13 commits into from

Conversation

adamtopaz
Copy link
Contributor

@adamtopaz adamtopaz commented Mar 26, 2023


Open in Gitpod

Mathbin -> Mathlib
fix certain import statements
move "by" to end of line
add import to Mathlib.lean
@adamtopaz adamtopaz added the WIP Work in progress label Mar 26, 2023
@adamtopaz adamtopaz added help-wanted The author needs attention to resolve issues mathlib-port This is a port of a theory file from mathlib. and removed WIP Work in progress labels Mar 26, 2023
@adamtopaz
Copy link
Contributor Author

I got the file to build, but I am still quite unhappy with several things. I had to use some hacks in many places, and some automation didn't work when it should have. I added porting notes for all of these issue.

I won't have much time to look after this PR for the rest of this week, so I will tag it with help_wanted and please_adopt if someone wants to take over to move things along.

@semorrison
Copy link
Contributor

Okay, I agree, this is pretty bad. :-(

bors bot pushed a commit that referenced this pull request May 12, 2023
I think the ports
* #2902 (MonCat)
* #3036 (GroupCat)
* #3260 (ModuleCat)

didn't quite get things right, and also have some variation between them. This PR tries to straighten things out.

Major changes:
* Have the coercion to type be via `X.\a`, and put attribute `@[coe]` on this.
* Make sure the coercion from morphisms to functions means that simp lemmas about the underlying bundled morphisms apply directly.
  * This means we drop lemmas like
  ```
  lemma Hom.map_mul {X Y : MonCat} (f : X ⟶ Y) (x y : X) : ((forget MonCat).map f) (x * y) = f x * f y
   ```
   * But at the expense of adding lemmas like
   ```
   lemma coe_comp {X Y Z : MonCat} {f : X ⟶ Y} {g : Y ⟶ Z} : (f ≫ g : X → Z) = g ∘ f := rfl
   ```

Overall I'm pretty happy, and it allows me to unstick the long stuck #3105.

This is not everything I want to do to refactor these files, but once I was satisfied that I can move forward with RingCat, I want to get this merged so we can unblock porting progress. I'll promise to come back to this soon! :-)



Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>
bors bot pushed a commit that referenced this pull request May 14, 2023
This is a replacement for #3105 which makes use of the refactors proposed in #3900.

I'm happy to just merge this into #3105 if that's preferred, but since it depends on a refactor I thought I'd keep it separate for now.

- [x] depends on: #3900

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)


Co-authored-by: Adam Topaz <adamtopaz@users.noreply.github.com>
Co-authored-by: adamtopaz <github@adamtopaz.com>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>
Co-authored-by: Johan Commelin <johan@commelin.net>
@semorrison
Copy link
Contributor

Closing, as this was replaced by #3901.

@semorrison semorrison closed this May 14, 2023
@int-y1 int-y1 deleted the port/Algebra.Category.Ring.Basic branch July 1, 2023 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted The author needs attention to resolve issues mathlib-port This is a port of a theory file from mathlib. please-adopt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants