Hi @Gregory Malecha ! Thanks for suggesting to create a room :)
What's the status of everything right now @Maxime Dénès ?
I'm updating the GitHub project so that it reflects the current status
then I'll summarize here
ok
great. i'm starting some work to clean up and finish the ExtLib monad library
i don't know if it belongs in stdlib2, but we'll see
probably at least some parts, I guess
i guess this is the question of monolithic repository vs small repositories
so, if you look at https://github.com/orgs/coq/projects/1 you'll see the "in progress" and "infrastructure" columns
it is still missing some things, but there is already a lot that is going on in terms of infrastructure
basically, in order to finish the new prelude, I need the coqlib patch to make tactics rebindable to new definitions of equality, logical connectors, etc
i see
that itself depends on some cleanups of the plugins
is there a timeframe for that?
like removing redundant plugins, to minimize the amount of work after that
I think that part should be doable within two months
weeks? months? years?
ok
then there is another big task, which is to evaluate canonical structures vs typeclasses on large scale libraries
so that we can make informed choices
yeah....for that we need a canonical structures expert
I have a few here, don't worry :)
I even have two experts on canonical structures / typeclass comparison!
but it is still very complex
great
i wonder if there is some way that we could get the best of both worlds
after talking to them, the kind of experiments I would like to do is to take mathcomp and change a few basic constructions to typeclasses
(like eqType typically)
and see what happens
if the whole thing can scale, etc
ah, we are going to be doing something like that with the monads work (which has to be setoidy)
also Enrico, Assia and Cyril did some work on compatibility layers
so that's also valuable information, to know if interoperability between TC and CS works in practice
once we have that, we can make sound design choices for the library
unfortunately these questions have to be answered very early
it seems like ideally you would want just 1
yeah but even if the expressivity is equivalent, each choice has some impact on the packaging of structures, etc
my understanding is that CS are fast and predicatble, and TC are slower and less predictable, but easier to program
yeah but also for example: TC make you want to unbundle a lot of things, then you're missing support for first class contexts, etc
on the other hand CS-based hierarchies are not easy to extend
yes
unfortunately, these questions are showing up as early as when defining structures with decidable equality
and the experiments will take a few months again
the good news is that I feel the system is making progress even during these preliminary steps
so i'm wondering if it is possible to improve type classes (making them faster/more predictable) and add first-class contexts
yeah my guess is that the conclusion of these experiments will be that none of the two mechanisms is perfect
ok
and hopefully it will give a plausible candidate, that should be added a bit of infrastructure to cover all use cases
I hope the plan makes sense
it does
this preliminary phase is the more tricky one to organize
once it is done and the design choices are more stable, it is easier to share the work
also, I'm working on another clean-up, whose first step is https://github.com/coq/coq/pull/8096
the idea is to clarify the scoping of commands
and the meaning of locality
it has some impact on library design
that would be really useful
for example you can't really pack typeclasses in modules in a satisfactory way today
selective import would be a huge win
because the scoping is a bit wrong
yes, exactly
that typically avoids writing a lot of boilerplate
with nested modules just to control the imports
while your at it, a binary format that is independent of Ocaml serialization would be amazing :-)
it did cross my mind ;)
i'd be happy to hack on it with some pointers
in fact I wonder if whitequark wasn't working on that
oh
let me try to find it
yeah I think it was part of https://github.com/coq/coq/issues/7839
there's so much going on in the dev these days that it is hard to keep track even when working full time on it :)
thanks @Maxime Dénès for the pointer
@Théo Zimmermann I just configured the integration for this room, we'll see if it works
Your summary here is great @Maxime Dénès but I think you should also write it in a kind of roadmap in the stdlib2 repo to avoid getting these questions all the time.
yes
I think the stdlib should be contained in one repostiory
even in the main coq one
however, it should be composed of quite a few modular components
we should be able to use a composable build
so modularity is assured
coq_dune should be able to handle that
I have a couple of things to discuss but I should submit the PR soon
the dune one is almost ready, I am finishing the doc up
I'm waiting for coq_dune like the messiah.
well there are some tricky parts yet
as like how to handle native compilation
also it is not clear to me how I should split the stdlib
I guess I will start with one directory = one (1) library
however it seems this is going to require quite a bit of reoganization
more than what we had to do for the ML files
so I dunno
because in coq_dune, when you depend on (library coq.stdlib.zarith)
you may not see list for example
also transitivity is interesting
anyways, I suggest to use a single repository
but structure it in a few smaller libraries
in fact, this is almost how ssreflect's is done
one file would basically be a single lib
ssr.nat
well granularity is not easy
we will see
Well you can maybe just keep the stdlib as one single package and experiment with finer grained modularity on stdlib2
I'd prefer already to test the thing on live code
in fact, for example I want to put streams in coq.stdlib.streams-legacy
so people can migrate
hey by the way
how should we call the files?
in the future writing a dune
file would suffice as coq_dune
would be a pluging
but now we need a filename, maybe coqdune
?
coqproject
I dunno?
You mean it's a temporary name?
Once Dune understands .vo
files hopefully we can deprecate them
this is not near
of course the old files would be supported for a while
the plugin would prefer them
and emit a warning
Is it supposed to subsume _CoqProject
? Otherwise, do not call it coqproject
.
yeah it is a bit different from coqproject
yeah let's call it coqdune
or coqlib
_CoqProject
really has different functionality
:+1: on coqdune
this is more explicit
merci
regarding coqdune coqfind, the main tricky part remaining is the bootstrap; in this setup, the stdlib is not special, coqdune just looks at what's on the tree and composes in the usual way; however there are a couple of tricky points to solve, they are not hard, but time consuming; a few other technical comments are on the issue but so far nobody gave feedback on them [like what's the proper layer for coqfind, etc...]
by the way @Théo Zimmermann the plan is that coqdune puts the vo files in a different directory, such as _build
and generates an install file
I guess that method is Ok for NiX, right?
proof general etc... will have to use the proper wrapper so paths are correctly set, as we do for merlin
tho CoqDune could generate _CoqProject
files for compatiblity
I guess it is easy to teach PG about the current set of packages
Yes that's not a problem for nix. It's even better actually.
There are a few parts in coq that assume that v and go files are together. This may not be a problem but usually will add another delay...
Another question indeed I have [and maybe it is addressed but I didn't see it] is extraction and refinement
Including EAL-like refinement
this is common enough as to have standard structures
EAL refinement is interesting, there was a quest to combine it with https://github.com/parametricity-coq/paramcoq and the later work by Anand and Morrisett https://arxiv.org/abs/1705.01163
AFAIU Cyril Cohen has been struggling to find the right way to implement it. First using typeclasses, then paramcoq, and now Elpi.
So maybe not ready yet to be included in a "standard" library.
Regarding structures vs type classes has anyone looked at lean ? : https://leanprover.github.io/tutorial/
Chapter Structures.
They have a type class implementation, but provide some mechanisms for extending and renaming structures. It seems light weight, but the repackaging that is done behind the scenes looks really helpful and natural.
From what I know, Lean's author, Leonardo, has talked a lot to Georges Gonthier. So we can imagine that these additions were done following his feedback...
Yes, Leo has had a careful look at both ssr, but also math-classes, and seems to have found a good middle way. Maybe this is useful for Coq too.
Hi @Bas Spitters , certainly that seems like a very prioritary area for Coq Indeed.
We had a working group on algebraic structures in Dagstuhl. We are trying to write a conclusion of that https://www.dagstuhl.de/guestWiki/index.php/18341
@Cyril Cohen Was there too.
Thanks!
Related to this discussion about the future of the reals.
https://github.com/coq/coq/pull/9185
Is there an intended semantics for stdlib2? The classical set theoretical model, Propositions as Types, Propositions as Props, HoTT, ...
I don't want to speak for Maxime and Vincent, but I believe the goal is to stay in the setting that is most known (and not to invent anything really new): propositions as Props.
So... no real numbers in stdlib2 ?
real numbers seem like a good library in and of their own right :-)
Any news from the coq call about stdlib2?
we are working on integrating stdlib2's prelude, while still providing the old one for compatibility : https://github.com/coq/coq/pull/11747
Hi, I am in the process of exporting gitter channels (public) data to zulip, (it can be done only once, during the creation of the zulip chatroom), do you wish that I export the data of this channel too?
Last updated: Oct 13 2024 at 01:02 UTC