coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Generalized version of [change]/[subst]?
- Date: Mon, 2 Jul 2012 00:25:43 -0400
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 in
assert (xeqy : x = y) by (taceq || symmetry; taceq);
let x' := fresh in
pose x as x';
let xeqx' := fresh in
let x'eqy := fresh in
assert (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.