coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Michael Shulman <shulman AT sandiego.edu>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] A version of "ring" that substitutes equalities
- Date: Wed, 4 Nov 2015 08:09:57 -0800
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=viritrilbia AT gmail.com; spf=Pass smtp.mailfrom=viritrilbia AT gmail.com; spf=None smtp.helo=postmaster AT mail-lf0-f45.google.com
- Ironport-phdr: 9a23:sQmxHBMnH2LYHe+XgUUl6mtUPXoX/o7sNwtQ0KIMzox0KPv5rarrMEGX3/hxlliBBdydsKIZzbGO+PC5EUU7or+/81k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i760zceF13FOBZvIaytQ8iJ35nxjLj5q8SbSj4LrQT+SIs6FA+xowTVu5teqqpZAYF19CH0pGBVcf9d32JiKAHbtR/94sCt4MwrqHwI6LoJvvRNWqTifqk+UacQTHF/azh0t4XXskzoShLHzX8BWC1CmR1RRgPB8RvSX5HrsyK8uPAriweAOsijaLE/WT2v6+9QSALsjS4Bf2oi8HzTj8V2pLlSph6gqhN4hYPYfdfGZ7JFYqrBcIZCFiJ6VcFLWnkEW9vkYg==
I wanted a version of the tactic "ring" which is able to make use of
equalities in the context. So I wrote my own:
Ltac ring_useeq :=
first [ ring
| match goal with
| [ H : ?a = ?b |- _ ] =>
first [ rewrite H; clear H; ring_useeq
| rewrite <- H; clear H; ring_useeq
| clear H; ring_useeq ]
end ].
If I did it right, this is doing a tree search through all possible
combinations of rewriting in either direction or not at all with each
equality in the context. However, one could imagine it being even
smarter and trying more things, e.g. in theory it might matter what
order the rewrites happen in. Does a tactic like this exist already
somewhere?
Mike
- [Coq-Club] A version of "ring" that substitutes equalities, Michael Shulman, 11/04/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Jonathan Leivent, 11/04/2015
- Message not available
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Michael Shulman, 11/04/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Jonathan Leivent, 11/04/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Jonathan Leivent, 11/04/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Jonathan Leivent, 11/04/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Michael Shulman, 11/04/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Assia Mahboubi, 11/05/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Laurent Thery, 11/05/2015
- Message not available
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Michael Shulman, 11/05/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Dmitrii Pasechnik, 11/05/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Frédéric Besson, 11/05/2015
- Re: [Coq-Club] A version of "ring" that substitutes equalities, Michael Shulman, 11/05/2015
Archive powered by MHonArc 2.6.18.