harp-project / AML-Formalization

GNU Lesser General Public License v2.1
10 stars 5 forks source link

Extend `mlRewriteBy` notation #441

Closed Thrithralas closed 1 week ago

Thrithralas commented 1 week ago

Adds <-, -> and in notation support for the mlRewriteBy tactic.

I added a local test to demonstrate the changes.

There is an issue which I'm not sure how to fix: mlRewriteBy ... in H applies the proof on the goal if the hypothesis does not have enough occurrences of the LHS of the proof. Me and @Engreyight tried to experiment with using mlAssert to construct a new hypothesis, but we couldn't find a way to compute the type of the new expression. Another potential solution is checking if H has enough matching subexpressions and failing if it doesn't, but I'm not sure how to do this either.