Skip to content

[Merged by Bors] - feat: port CategoryTheory.Bicategory.Functor#2301

Closed
kbuzzard wants to merge 22 commits intomasterfrom
port/CategoryTheory.Bicategory.Functor
Closed

[Merged by Bors] - feat: port CategoryTheory.Bicategory.Functor#2301
kbuzzard wants to merge 22 commits intomasterfrom
port/CategoryTheory.Bicategory.Functor

Conversation

@kbuzzard
Copy link
Copy Markdown
Member

Adam gave this me as a challenge at IPAM.


Open in Gitpod

@kbuzzard
Copy link
Copy Markdown
Member Author

I need to leave it here for a bit; I'll label as help wanted because some dsimp is not tidying up as much as it should be and I'm not very good with debugging that kind of thing. I'm not going to touch this for at least 12 hours

removed the primes from fields in oplaxfunctor and restate_axiom calls,
aligned new names and fixed errors from Lean 3 -> Lean 4 conventions
@mo271 mo271 added the mathlib-port This is a port of a theory file from mathlib. label Feb 17, 2023
…eanprover-community/mathlib4 into port/CategoryTheory.Bicategory.Functor
@kbuzzard kbuzzard added the help-wanted The author needs attention to resolve issues label Feb 19, 2023
@kbuzzard
Copy link
Copy Markdown
Member Author

Ok so the problems with porting this file are the following.

  1. Lean continually PANICs meaning I continually need to restart Lean. Experiencing this on two different machines. Seems very hard to minimise. More precisely: if I edit a line of code there may be a panic, or, even worse, there just may be garbage in the infoview (complaining about stuff which isn't there) and red underlines underlining the wrong thing. In either case I have to restart Lean.

  2. A non-terminal dsimp is broken and it's hard to fix. It's the proof of map₂_associator on line 301. In Lean 3 we have a lot of G.map etc; in Lean 4 it's the far uglier PrelaxFunctor.map G.toPrelaxFunctor and once you see the lean 3 goal (which has about 20 variants of this) you'll see the problem. It might be that some simp lemmas are missing because I had some problems with reassoc on lines 215, 226 etc.

Help!

@kbuzzard
Copy link
Copy Markdown
Member Author

Update: I fixed the non-terminal simp. The PANICs are still annoying and I can't reliably reproduce (they occur when editing, not compiling). The file is noisy because I don't understand attribute [reassoc]. If someone could confirm that the 9 instances of restate_axiom can be removed (and the corresponding 9 fields of structures renamed to not have primes at the end) I'd be much obliged: I was not aware of the relevant Lean 4 change. The file is now compiling but noisy.

@kim-em kim-em added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 23, 2023
@kim-em kim-em removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 23, 2023
@kbuzzard kbuzzard removed the help-wanted The author needs attention to resolve issues label Feb 23, 2023
@kbuzzard
Copy link
Copy Markdown
Member Author

OK this should be compiling now. One thing I wasn't sure about is removing various primes from the names of structure fields. My understanding (possibly incorrect) of Matt's comment above is that I can do this and then drop all the restate_axiom stuff. Example: the Lean 3 definition of Pseudofunctor has a lot of primes in structure fields here but I've removed them all (and also the corresponding restate_axiom stuff just afterwards). Is this right?

I'm about to update the module docstring and then hopefully this is ready to go.

@mattrobball
Copy link
Copy Markdown
Contributor

OK this should be compiling now. One thing I wasn't sure about is removing various primes from the names of structure fields. My understanding (possibly incorrect) of Matt's comment above is that I can do this and then drop all the restate_axiom stuff. Example: the Lean 3 definition of Pseudofunctor has a lot of primes in structure fields here but I've removed them all (and also the corresponding restate_axiom stuff just afterwards). Is this right?

I'm about to update the module docstring and then hopefully this is ready to go.

I got it from here

@ChrisHughes24
Copy link
Copy Markdown
Member

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Feb 27, 2023
bors bot pushed a commit that referenced this pull request Feb 27, 2023
Adam gave this me as a challenge at IPAM.



Co-authored-by: Matthew Ballard <matt@mrb.email>
Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com>
@bors
Copy link
Copy Markdown

bors bot commented Feb 27, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: port CategoryTheory.Bicategory.Functor [Merged by Bors] - feat: port CategoryTheory.Bicategory.Functor Feb 27, 2023
@bors bors bot closed this Feb 27, 2023
@bors bors bot deleted the port/CategoryTheory.Bicategory.Functor branch February 27, 2023 13:48
bors bot pushed a commit that referenced this pull request May 18, 2023
- [x] depends on: #2301 


Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk>
Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com>
Co-authored-by: Matthew Ballard <matt@mrb.email>
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
Co-authored-by: Pol_tta <pol_tta@outlook.jp>
Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com>
Co-authored-by: Scott Morrison <scott@tqft.net>
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
Co-authored-by: Christopher Hoskin <christopher.hoskin@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: MonadMaverick <MonadMaverick@pm.me>
Co-authored-by: David Renshaw <dwrenshaw@gmail.com>
Co-authored-by: Matthew Robert Ballard <matt@mrb.email>
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Co-authored-by: Pol_tta <MonadMaverick@pm.me>
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
Co-authored-by: Kyle Miller <kmill31415@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants