math-comp / algebra-tactics

Ring, field, lra, nra, and psatz tactics for Mathematical Components
33 stars 2 forks source link

Credits #34

Closed pi8027 closed 2 years ago

pi8027 commented 3 years ago
gares commented 3 years ago

Give me credit in the readme, or nothing at all (github already says I did contribute a few commits)

amahboubi commented 2 years ago

I have no strong opinion about where to put credit.

amahboubi commented 2 years ago

Where would you like me to write something about the "large" example?

pi8027 commented 2 years ago

Where would you like me to write something about the "large" example?

@amahboubi Please write that as a comment here. Then I will reflect it to the last section of README.

amahboubi commented 2 years ago

This example was given to me by Sander Dahmen. It is related to a computational proof that elliptic curves are endowed with a group law. As suggested by @thery a while ago, this problem is a good benchmark for proof systems. Laurent Théry and Guillaume Hanrot formally verified this property in Coq in 2007, see the paper.

thery commented 2 years ago

good does this mean that II will soon be able to move my elliptic proof to mathcomp :smile: ?

pi8027 commented 2 years ago

@amahboubi Thanks. I updated README in #51 (based on your comment, with slight modifications).

@thery I hope so, although I don't have time to check that at the moment. BTW, isn't it already done in elliptic-curves-ssr?

thery commented 2 years ago

@pi8027 no Pierre Yves's proof is a completly different one,

thery commented 2 years ago

@pi8027 do you support ring[H1 .. Hn] and field[H1 .. Hn]?

pi8027 commented 2 years ago

@pi8027 do you support ring[H1 .. Hn] and field[H1 .. Hn]?

@thery Yes, but in ssreflect-like syntax: ring: H1 .. Hn.

thery commented 2 years ago

@pi8027 Just did the port from of the elliptic file in Coprime to its mathcomp equivalent with your tactics. This is pretty intensive (~50 calls to field). It works pretty well :fireworks: but it is a bit slower :disappointed: Before

real    0m7.975s
user    0m7.641s
sys 0m0.310s

with mathcomp

real    0m22.157s
user    0m21.680s
sys 0m0.402s

Did you already notice this kind of slow down?

pi8027 commented 2 years ago

@thery I thought Algebra Tactics are slower than the original ring and field tactics because of conversion checking and preprocessing, but do not think x3 slowdown is a reasonable price to pay. I have some potential ways to mitigate this slowdown in my mind. But, it will never be faster than the original ring and field tactics, and I do not have time to try them right now.

Anyway, could you open a new issue for this? I will think about it later.

pi8027 commented 2 years ago

Also please make sure that you are using the right version of Coq-Elpi (1.13.0 or later) since there was a significant performance improvement in 1.13.0.