-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
On the need for "funext" in agda-algebras #19
Comments
This is an interesting and important issue and your comments are very helpful. Thank you!
I would definitely like to see you implement a getter and then use that to avoid using funext somehow. That would be cool!
An alternative that I think I will implement today, along side the general Op type, is an operation type with countable arity. I need to start using this for my current research in complexity theory asap! In my research even Fin n arity would do, but I haven't enjoyed working with the Fin type. (Nat is so much easier for me... but that's my fault and I need to eventually make peace with the Fins. :) So, for now, it is most expedient for me to encode operations with countable arity, I think. Will such a type let us get away without funext?
Overall, I agree with your recommendations. We should keep things standard and Setoid-based in this version and have a separate cubical version.
|
Actually, what I need right now (if not yesterday!) for my work are relational structures, as well as structures with general signatures (i.e., signatures with both relation symbols and operation symbols). I had started working on a version called "cubical-structures." But I'm realizing that translating to cubical will take too long for the short term goals of my current research, so I suppose I'll quickly cobble together another library, similar to agda-algebras, but with general (relational-algebraic) signatures. Unless... do you think we should incorporate this into agda-algebras? I think the general signatures will be much more complicated to work with, so I'm more inclined to make this a separate library. Also, do you happen to know of other good model theory formalizations? Can you tell me if agda-categories already formalizes much theory of relational and general structures? Of course, the relations in the standard library (e.g., here) won't do, since they're much too special---not only are the relations' arities fixed, they are limited to 0, 1, or 2! ...but maybe I'm just not looking in the right places for existing formalizations...? |
Let me try to address all of the items in turn. Using an abstract interface would not let us escape An Working with Regarding relational structures: I think it would be worthwhile to have multiple areas in Not model-theory per se, but [Wolfram Kahl's(https://www.cas.mcmaster.ca/~kahl/) RATH-Agda contains a lot of relevant material. For both relational structures and the usual ones, if you're going to go countable, it's worth exploring the standard library's n-ary support (that's just an introduction, there's more). See also the paper "Generic Level Polymorphic N-ary Functions" on G. Allais's publications page. Lots of good stuff here. |
Thank you very much for all this useful information and for sharing your expertise. It and the links are a lot to process. I'll respond again later after digesting it. Thanks! |
One of the large sources of "funext" is this definition
agda-algebras/UniversalAlgebra/Relations/Discrete.lagda
Lines 77 to 79 in 5a5687e
Op
.In theory, I like it a lot. That one can model arity by an arbitrary type, instead of involving
Fin n
, is one of the really elegant things in this library. So I definitely want to preserve the design decision that we can haveI
-ary operation symbols.However, the design decision to model these as Agda functions is a source of problems. If
Fin n
was used, for example, and then operation symbols modeled withVec A n
, all such uses [wd: of funext (?)] would go away. That does seem too drastic a move.What seems to be needed is an abstract notion of arity and representation of
I
-ary operation, with an explicit getter. Then one could define an explicit equality for these easily enough. Of course, that gets us into the land ofSetoid
.This may not be so bad: agda-stdlib is mostly Setoid-based already. And, this also helps with quotients!
My recommendation would be that, for this version of the library, things should be based on
Setoid
instead of propositional equality. Yet another version should probably exist in cubical-agda that would make radically different choices (appropriately so).The text was updated successfully, but these errors were encountered: