Skip to Content.
Sympa Menu

ssreflect - Re: [ssreflect] [rewrite foo in hyp] weirdness

Subject: Ssreflect Users Discussion List

List archive

Re: [ssreflect] [rewrite foo in hyp] weirdness


Chronological Thread 
  • From: (Emilio Jesús Gallego Arias)
  • To: Robbert Krebbers <>
  • Cc:
  • Subject: Re: [ssreflect] [rewrite foo in hyp] weirdness
  • Date: Wed, 13 Jan 2016 13:16:46 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:N5UG0xywoTdh1O/XCy+O+j09IxM/srCxBDY+r6Qd0eIVIJqq85mqBkHD//Il1AaPBtWFraIbwLCN+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStCU35v8jbv60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884movRHW6/3ZbhwbqZVBj4rKXt9sMjitB3CSwSL52AASU0MlRBCDhLZ7wv3VJ38qDC8sO4riweAOsijQrkwXTmt6I9gUh6uhSEcMiZ//nufyuF1jaZap1qDqgft2Mb7aYWROfV5NorHfNoBBDkSFv1NXjBMV9vvJ7AECPAMaL5V
  • Organization: CRI ParisTech

Hi Robbert,

Robbert Krebbers
<>
writes:

> I often make use of "rewrite foo in hyp", which does not work well in
> ssreflect: it changes the order of the hypotheses, and it does not
> work with setoids. See the attached example.

I'm not expert in the inner workings of the rewrite tactic and likely
others will answer more accurately; here are a couple of comments
however:

8<--------------------------------------------------8<
H1 : P x
H2 : x = y
============================
True
8<--------------------------------------------------8<

> rewrite H2 in H1.
> (* flips the order of H1 and H2 *)

This is expected, if I recall correctly from the manual, rewrite A in B
this is roughly equivalent to:

move: B; rewrite A; move=> B.

However it has some particularities, as your next example shows:

> rewrite H1 in H2.
> (* Error: tampering with discharged assumptions of "in" tactical *)

This may be avoided using:

> rewrite H1 in H2 *.

The manual does a better job than I could ever do in explaining "in *".

Best regards,
Emilio



Archive powered by MHonArc 2.6.18.

Top of Page