Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Ssreflect rewrite term matching in vanilla Coq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Ssreflect rewrite term matching in vanilla Coq


Chronological Thread 
  • From: Pierre Courtieu <pierre.courtieu AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Ssreflect rewrite term matching in vanilla Coq
  • Date: Wed, 23 Dec 2015 10:40:36 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=pierre.courtieu AT gmail.com; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f41.google.com
  • Ironport-phdr: 9a23:lWyDehH+zMBjwN5ra82qWZ1GYnF86YWxBRYc798ds5kLTJ75oMuwAkXT6L1XgUPTWs2DsrQf27SQ7/CrATZIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niabuq9aLOU1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCCI/zM3Vngc2k5DBBGA5xXnVL/wtDH7v6xzwn/JE9fxSOUMWDm49aojYxj1kjsGOiNxpHnWh9ZqgeRQpw+7ux1y3qbbZYiUMLx1eaaLLoBSfnZIQssED38JOYi7dYZaSrNZZes=

Hi,

I am not sure that Guillaume's suggestion has been understood
completely here. In the following (the ".." is real syntax here)

tac;[> tac' | tac''..].

This will apply tac' to the first subgoal and tac' to *all others* ASFAIU.

Best regards,
Pierre


2015-12-21 12:42 GMT+01:00 Guillaume Melquiond
<guillaume.melquiond AT inria.fr>:
> On 21/12/2015 11:11, Robbert Krebbers wrote:
>> Hi coq-club,
>>
>> since Ssreflect's rewrite tactic is much better when dealing with goals
>> involving canonical structures, I am wondering whether we can get a
>> similar behavior for Coq's rewrite tactic.
>>
>> I know of "Set Keyed Unification", but that does not really seem to help
>> (see a simple example in the attachment).
>>
>> Robbert
>>
>> PS : I could just use Ssreflect's rewrite tactic instead, but I am
>> really missing something like "rewrite foo by tac" as we have in vanilla
>> Coq. The by flag is convenient when dealing with lemmas with many
>> side-conditions (as we often have in formalizations of computer
>> science). I know of "rewrite foo //", but I would really like to use an
>> arbitrary tactic, such as eauto/ring/omega, and that tactic to be used
>> solely on the side-conditions, not the resulting goal itself.
>
> I suppose you already considered the following solution, but just in
> case you didn't, here it is. While it is a bit more verbose and less
> readable than "by tac", you can use ";[|tac..]" to achieve the same kind
> of goal solving.
>
> Best regards,
>
> Guillaume



Archive powered by MHonArc 2.6.18.

Top of Page