-
Notifications
You must be signed in to change notification settings - Fork 246
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
Mechanize the Algebra hierarchy #2287
Comments
Two comments, not (entirely; or even, at all ;-)) tongue-in-cheek:
|
I obviously agree emphatically with this. And, to a certain extent, this is roughly the work that Yasmine did for her Ph.D. thesis. If you couple it with the produce-documented-human-readable-code that Drasil can do, in theory I have the needed pieces in hand to do this. In practice, these pieces are not (yet) integrated. I would propose that we first implement this as a pre-processor. The published agda-stdlib would contain, in part, output from that pre-processor. This could be done immediately. Then we could abstract out the features that we need to make it into a language feature. Pinging @TOTBWF as I think he's quite interested in things like this. (Ok, what's described here is probably "baby steps" for what @TOTBWF really is interested in, but it does seem to be in a compatible direction.) |
Is what Drasil's been working on anywhere where I can read it? |
Just getting around to this: I think the way forward is to patch Agda to have a more refined form of what I outlined at WITS '22, where record types are extended with a telescope that tracks some definitional equalities for fields. |
@TOTBWF Link to your WITS talk? The workshop site offers no clues... |
It's available here, but I'll also summarize the relevant bits, as I'm sure we all know the problem quite well 😁 The original idea in
This doesn't buy you much as is, but A lot of this pretty specific to this one implementation, but there's a kernel of a bigger idea in there. Namely, we can control bundling by carrying around a telescope of definitional equality constraints with a record type. There are a couple of ways to realize this, but I think the cleanest is to change the I'm not that familiar with the ins and outs of the Agda codebase, but none of this should be problematic at all. The only part that might be a bit tricky is subtyping those telescopes, but it shouldn't be particularly difficult. |
This is where we want to loop in people like @jespercockx - who I guess must have been at that talk. |
While I am very sympathetic to the stated goals here, I am a bit wary of proposing a change to Agda. In the past we have been quite eager to extend Agda with more features and this is now starting to take its cost in terms on maintenance of the codebase and integration of all these features. So realistically speaking, if we want to add something like this to Agda we would first need to increase our developer team - not just to maintain the feature itself but also integrate it with all of Agda's other features. |
Completely understandable: you all have a very hard and important job, and I definitely do not want to make it harder! |
(Warning: airing a bit of frustration.) Agda seems to be a playground for type theory ideas, and it keeps growing in that sense, by adding various new flags and modalities and ... That's great for some people. Who loses out? People who are actually trying to use Agda as a system on which to base large libraries. Very few features have lately been implemented that help that. And the understandable desire to not make the maintenance burden worse means that library developers are forced to write silly amounts of boilerplate because Agda lacks the features to do otherwise. So we may end up being forced to be pragmatic and create |
Many of the modules under
Algebra
(e.g.Algebra.Structures
,Algebra.Bundles
,Algebra.Morphism.Structures
...) are highly structured and repetitive. This makes it a lot of work to add something new, and very easy to miss things. We should come up with a way to mechanize this and generate this portion of the library from a more concise form somehow.Considerations
Current state of affairs
We have three modules of "structures", containing records of laws for various algebraic structures, parameterized by their equivalence relation and operations. We have three modules of "bundles" containing records bundling the equivalence relation, operations, and the law structure, and three modules of "raw bundles" which omit the law structure. We have three modules of morphism structure, each of which is parameterized on the raw bundle. We have many modules of various properties of structures and morphisms, which may be harder to mechanize.
The text was updated successfully, but these errors were encountered: