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

Find/Make a Category Theory Library #167

Open
Lysxia opened this issue Mar 30, 2020 · 3 comments
Open

Find/Make a Category Theory Library #167

Lysxia opened this issue Mar 30, 2020 · 3 comments
Labels
coq-dev Questions related to best practices for Coq programming help wanted Extra attention is needed question Further information is requested

Comments

@Lysxia
Copy link
Collaborator

Lysxia commented Mar 30, 2020

Everything in the library under Basics really belongs in its own library. A huge chunk of that is a whole category theory library.

The next step is to review existing implementations to see whether any one is compatible with what we are doing. Luckily, a recent discussion on the Coq Discourse forum gives a list of them: https://coq.discourse.group/t/survey-of-category-theory-in-coq/371

A related question I have is whether the Monad class from ext-lib can be replaced with a more general class formalizing monads in arbitrary categories (ext-lib's Monad is specialized to the category of functions). Two big sticking points that make such unification difficult are (1) going back and forth between "monadic" and "categorical" notation (for both reasoning and programming), (2) extraction to OCaml, a call-by-value and impure language, where eta-reduction and other pointfree shenanigans significantly impact semantics and performance. (We could also give up (2) and extract to Haskell but then interoperability with QuickChick (which we haven't worked out yet) becomes more difficult...)

@Lysxia Lysxia added coq-dev Questions related to best practices for Coq programming help wanted Extra attention is needed question Further information is requested labels Mar 30, 2020
@euisuny
Copy link
Collaborator

euisuny commented May 6, 2020

Hi Li-Yao! A similar concern came up while trying to work on PropT, so I also started here to attempt generalizing a monad definition to arbitrary categories. It's roughly based on ITree's CategoryFunctor.v, ext-lib's monad definition, and @jwiegley's category theory formalization of monads.

For convenience, I've defined the laws we need for ""practical reasons"", but it doesn't have all the theory behind monads. I was curious if there's been progress on this thread---is this work on finding/making category theory library ongoing somewhere?

@Lysxia
Copy link
Collaborator Author

Lysxia commented May 7, 2020

I haven't gotten around to investigate this yet!

@YaZko
Copy link
Collaborator

YaZko commented May 7, 2020

There's also some additional definitions about opposite categories, dagger categories and products that I defined last month in this branch.
Nothing fancy but we may want to merge them in at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coq-dev Questions related to best practices for Coq programming help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants