The coq-HoTT homotopy type theory library does not import Coq.Init or anything like that. I don't think they want anything dealing with Prop in the namespace, in particular the standard equality proposition, or the notations in the Init.Notations file.
Can anybody think of a way to make use of the CRelation / CMorphism setoid rewriting machinery without introducing the standard init files? Or how could the Prop-heavy stuff and the notations be hidden by the user so the user cannot accidentally invoke something from these files/?
I am worried that solving this problem would involve substantially rewriting the rewrite.ml
file which is a scary thought.
forking coq/theories/Classes/C*.v
is probably unavoidable, the problem seems that rewrite.ml
hardcodes where those files are installed.
Technically, if you only install coq-core
but not coq-stdlib
, you can already write your own version of those files, and that might be enough for today...
"enough" needs scare quotes: nobody who installs the stdlib will be able to use your code :-|
What rewrite.ml
should do is let the library register needed definitions with Coq via the Register
command, so I filed https://github.com/coq/coq/issues/16901.
For instance, both the stdlib and the hott libraries can tell Coq what library symbol to use as equality:
Register eq as core.identity.type.
Paolo Giarrusso said:
Technically, if you only install
coq-core
but notcoq-stdlib
, you can already write your own version of those files, and that might be enough for today...
Not the case unfortuantely due to how "coqlib" is detected internally. Even coqc --config
fails without the stdlib being at least present. There is nothing stopping us from cleaning this up, its just lack of dev time.
not surprised, but that's a hack anyway, and switching to Register
seems more important?
Yeah, having the right Register
's implemented is just a matter of doing it, I don't think there are any technical limitations.
@Patrick Nicodemus What you can do is use the stdlib setoid rewrite in the HoTT library. Sure it will be annoying to have Coq.* back in the namespace but it can be cleaned up in time.
I would suggest you get setoid rewriting working using the stdlib without sinking time into how things need to be setup as that can be cleaned up later.
I dived in and now am turning everything into a register
I hope one day this entire part of the code will be cleaned up and pleasent to work on. Today that is not the case.
Ali Caglayan said:
Patrick Nicodemus What you can do is use the stdlib setoid rewrite in the HoTT library. Sure it will be annoying to have Coq.* back in the namespace but it can be cleaned up in time.
Ok. I'm fine with that if other library maintainers are
Last updated: Oct 03 2023 at 20:01 UTC