coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arnaud Spiwack <aspiwack AT lix.polytechnique.fr>
- To: Jason Gross <jasongross9 AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Generalized version of [change]/[subst]?
- Date: Mon, 2 Jul 2012 07:53:33 +0200
replace
rewrite
These are what you are looking for.
On 2 July 2012 06:25, Jason Gross <jasongross9 AT gmail.com> wrote:
Hi,I was wondering if there's a version of [change] that requires only equality, rather than convertibility, or a version of [subst] that applies to terms and not just identifiers? [change] only works when the terms are convertible, and [subst] only works if one them is an identifier. I wrote a version myself (see below), but I'm wondering if there's something that does this in Coq, already. Thanks.(* equivalent to [change x with y], but requires that [x = y] be provable with [taceq],rather than that [x] and [y] are convertible *)Tactic Notation "generalized_change" constr(x) "with" constr(y) "by" tactic(taceq) :=let xeqy := fresh inassert (xeqy : x = y) by (taceq || symmetry; taceq);let x' := fresh inpose x as x';let xeqx' := fresh inlet x'eqy := fresh inassert (xeqx' : x = x') by reflexivity;change x with x';assert (x'eqy : x' = y) by (transitivity y; exact xeqy || symmetry; exact xeqy || trivial);clear xeqx';clearbody x';subst x';clear xeqy.-Jason
- [Coq-Club] Generalized version of [change]/[subst]?, Jason Gross, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Arnaud Spiwack, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Pierre Courtieu, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Jason Gross, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Chung-Kil Hur, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Jason Gross, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Chung-Kil Hur, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Jason Gross, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Pierre Courtieu, 07/02/2012
- Re: [Coq-Club] Generalized version of [change]/[subst]?, Arnaud Spiwack, 07/02/2012
Archive powered by MHonArc 2.6.18.