-
Notifications
You must be signed in to change notification settings - Fork 12
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
More generic multinomial (Dagstuhl discussion) #19
Comments
Hi, Well done Sherlock(s). I hope it did not take too much cocaine to come with this reversed history. I did not finish the merge because of lack of time. I'd like that to complete points 1, 2, 3 & 4 and to do a release before moving to extensions (like point 5). We (you & me) could meet in September on the Sili^W Saclay valley and address the first 4 points if you want. 2 (maybe 3) days of work should be enough. |
Hi @strub. I wanted to have a closer look at malg and finmap, so I started to hack in
Also I didn't yet learnt about finmap's so I didn't change anything on them. |
Hi, I also had a few more details about Florent's item 5. I share them for the record (feel free to edit/correct/comment): mpoly.v provides a datstructure for multivariate polynomials in
|
Hi @amahboubi, As you noticed, there is a lot of legacy / to be deprecated code (and also uncommitted code, but this is something you couldn't see). In a nutshell, freeg.v is here for mpoly.v (both have been written at a time where finmap was not in the field) & mpoly.v is going to be deprecated by monalg.v (or at least is going to be built & generalized using monalg.v). As I said in the first message, I'd like to get rid of this legacy code (i.e. to finish what I started) before moving to extension & renaming. I do think this is a 2-3 day work. Regarding your plan, this is already the direction taken in monalg.v. For instance, if you go at the end of the file, you can see an alternative definition of What is missing is simply to take the contents of mpoly.v and to backport it to either |
I'm just adding a pointer here saying that point 1 is mostly done in my #20 pull request. Please fix/expand/comment. |
To followup on my #20 (comment) and point 6. from @amahboubi, here is what I believe should be done with regard to the evaluation morphism and @hivert #20 (comment). My point was to try to be as close as possible to the categorical presentation of the adjunction between a free algebra and a forgetful functor. Define malg_lift (R : ringType) (X : choiceType) (L : lmodType R) (f : X -> L) : {malg R[X]} -> L. It should be (canonically) Now to get evaluation one just needs to precompose mon_lift (X : choiceType) (M : monoidType) (f : X -> M) : {monoid X} -> M. which should be canonically a monoid morphism, and where Various comments:
edited after reading #20 (comment) |
|
Finally I found some time to finish and complete my |
Could you point me to your slowdowns? |
@CohenCyril : I manage to mitigate the slowdown by adding some lock. But this is still very slow. See the first line of the proof of lemma bla2. On my laptop it takes 20s whereas it was 1/2s at commit |
@CohenCyril : I just hit a point where the slowdown completely stop me. But maybe this is a basic Coq problem. To reproduce the problem:
You probably want to change that to
Maybe my goal is a little too big, but I my experience, Coq should not be so slow. |
Hi @hivert. How can I replay your shufflealg file? I have trouble understanding the dependencies. Also, I could not find the |
@amahoubi : Sorry, I was interrupted before the push and there where some missing infos. Please, see my edit. |
We had a meeting on this generalization work. From my point of view, the first things to do are:
|
Hello @pi8027 , thanks for sharing this log. What kind of difficulties do you foresee in your first item (you seem to suggest that the dependency in finmap is an issue). |
My own item zero in this todo list would be to document |
Very good idea ! |
OK, so I will try that and propose to get feedback. |
My understanding is that, when we replace tuples (from |
Yes, make sense. |
I did some refactoring of monalg.v in #80. I discovered that we can use |
With @amahboubi, @CohenCyril and @Sobernard we had a discussion about multivariate polynomials at Dagstuhl 18341. I'm creating an issue to keep a trace of our conclusions. Please feel free to amend and edit.
Here is the current status from what we understand:
Following a discussion we had, you started to develop monalg.v with the idea that multivariate polynomials could be implemented as the monoid algebra of the free commutative monoid. Having the notion of a generic monoid algebra allows for example to develop easily non-commutative polynomials as the algebra of the free monoid or Laurent polynomials as the algebra of the free commutative group... Moreover the base structure
{malg G[K]}
deals with linear combination of anything which is even not a monoid. The allows to build more general algebras. However it seems that you didn't had the time to rebase mpoly on to of that (or is it another issue ?).Anyway, here is what we feel needs to be done:
1 - Rebase malg on top of finmap/finset 1.1 which is much easier to use. In particular, it allows to handle bigops seamlessly, without having to construct element in complicated finTypes
2 - Check that is is generic enough to handle various cases. I did some experiment on that in Dagstuhl, only admitting lemmas made difficult because of point 1 (See in shufflealg.v implementing the shuffle algebra). It is easy to uses and half of the files is generic enough that it can be contributed back here (ie: the construction of linear/bilinear maps).
3 - Rebase mpoly on top of malg
4 - Non commutative polynomials and refactorization of common code with polynomials
5 - One of the problem I had in Coq-Combi which is appears also in Sophie development is to combine polynomials on several sets of variables. So we wished to have a polynomials on any finite subset of a large (possibly infinite set) while being able to combine them. The typical application is to deals with polynomial which are symmetric only is subset of the set of variables.
Depending on the time, I'm interested to help. For example, I might start to handle task 1 soon. So please coordinate any effort with this plan.
The text was updated successfully, but these errors were encountered: