math-comp / algebra-tactics

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

automatic introduction of hyps #7

Closed gares closed 3 years ago

gares commented 3 years ago

The history is a bit messy, but this Fix #5 The split into multiple files is perfectible, there is still some duplicate code. Unfortunately I found a bug in coq-elpi 1.10.0, so this depends on 1.10.1 which is in the making

gares commented 3 years ago

I've reworked the PR, it should have less conflicts.

gares commented 3 years ago

OK, it seems to work. The doc on the Elpi side is still a bit skinny, so I'll sum up it here. Since 1.10 "tactic arguments" are not passed to the tactic, but rather attached to a goal. This solves two problems of the ml API for tactics (the infamous Proofview.tactic monad which type parameter is always set to unit):

The new code repeat a tactic which does intro and passes to the next tactic the hypothesis just introduced, in this way field finds in his list of arguments all the hyps that were introduced so far.

If this behavior is what we want for the defective field. tactic, then we can merge this.