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

Experiment with notation for algebra and category theory #1037

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

felixwellen
Copy link
Collaborator

@felixwellen felixwellen commented Aug 26, 2023

This is an experiment concerned with the way operators like + or are overloaded with instance arguments.
Currently, given e.g. A : AbGroup ℓ this is done by

open AbGroupStr ⦃...⦄
instance
  _ = snd A

The idea is to gain better notation with more flexibility and overloading by separating the notation from the data structures (just look at the changes). Here are a couple of things that would be nice to have:

  • Use operators with the same name from different structures at the same time, for example _+_ from Semiring and CommRing.
  • Choose notation independent of the definition of a structure. For example, a CommMonoid used multiplicative notation in its definition, but one might want to use + in some contexts.
  • Have more readable output from agda. Currently, goals are sometimes written as something like AbGroupStr._+_ _ x y instead of x + y. I think that shouldn't happen if _+_ is defined on top level with an instance argument.

It is unclear to me, if this is a good idea performance-wise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant