Skip to Content.
Sympa Menu

ssreflect - [ssreflect] rewrite instantiating evars in the goal

Subject: Ssreflect Users Discussion List

List archive

[ssreflect] rewrite instantiating evars in the goal


Chronological Thread 
  • From: Enrico Tassi <>
  • To:
  • Subject: [ssreflect] rewrite instantiating evars in the goal
  • Date: Mon, 22 Feb 2016 13:31:42 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:0HBGNB9/QRzJtP9uRHKM819IXTAuvvDOBiVQ1KB91+IcTK2v8tzYMVDF4r011RmSDdqdtq4P0LqempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lRciP04/sh6ibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V07NVaXKv+cq8kZblDFnEnNXo07YvqswPCRE2B/CgySGITxzdOGQnO61nGV4zqs2Ouu+xn2SKde9H/Vqs1cTWk9aZiDhHy3nRUfwUl+X3a35QjxJlQpwis8kRy

From the ssreflect user manual:

The rewrite tactic will not instantiate existing existential
metavariables when matching a redex pattern.

Issue #30 on github:

https://github.com/math-comp/math-comp/issues/30

made me realize that this invariant is today broken. Eg.

Axiom H : forall x, 3 + x = x.

Goal exists y, y + 4 = y.
eexists.
rewrite H.

works, and instantiates ?y with 3. I've a patch that makes this rewrite
step being rejected (or better, makes the flexible subterm "?y + 4" not
match the "3 + _" pattern).

Unfortunately such change may break your scripts, hence this message.

The behavior of rewrite w.r.t. the instantiation of evars in the goal
has been discussed at length both in the context of Coq and Ssreflect,
so I guess there is no argument against restoring the documented
behavior.

The check is O(n*log k) where n is the number of evars in the goal
and k is the number of open goals. So I guess its cost is OK.

Best,
--
Enrico Tassi


  • [ssreflect] rewrite instantiating evars in the goal, Enrico Tassi, 02/22/2016

Archive powered by MHonArc 2.6.18.

Top of Page