-
Notifications
You must be signed in to change notification settings - Fork 73
Clean up monoidal functor properties #492
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
base: master
Are you sure you want to change the base?
Conversation
- Expanded definition of flip-bifunctor (instead of composing with the Swap functor) to allow for simpler proofs of the functor laws. - Added properties for "flipping" natural transformations and natural isomorphisms between bifunctors. This makes flipping twice definitionally involutive.
|
Will review 'soon' - first have to fix the broken CI. So there will be a delay. |
|
(closing and reopening to get the CI to run) |
|
Upon further inspection, |
|
I'm fairly sure that the issue isn't with proofs in record fields (directly), but with proofs used as arguments to functions to construct morphisms (e.g. various limits' |
|
There are issues with nameless proofs. First, usability: goals become giant. Second, because Agda is fairly eager to delta and eta expand, some record fields do end up duplicated. So more 'modern' BTW, I've warmed up to co-patterns, so in some cases, I would be fine using those instead of records, if it feels more ergonomic to do so. |
I was intending to improve typechecking time, but I think I ended up making more progress on the "lines of Haskell compiled to" metric.
The biggest improvements came from moving equational proofs out of records fields and into where blocks, but I also noticed that some of my changes (not sure which) to make the proofs more readable also reduced the size of the Haskell.
So far
Categories.Functor.Monoidal.Propertiesis down from 242362 lines of Haskell to 95295 lines. I'm not quite done updating that file yet. I plan to updateCategories.Functor.Monoidal.Construction.Productas part of this PR as well.I also added opposite braided and symmetric monoidal categorites, and an
opfield to the bundled forms. This does make accessing theopof the underlying category ever so slightly harder.I changed the definition of
flip-bifunctorfor better definitional equality, and added a way to get the oplax structure of a strong monoidal functor.