coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gmalecha AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] rewrite_strat Question
- Date: Thu, 7 Jan 2016 12:50:29 -0800
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gmalecha AT gmail.com; spf=Pass smtp.mailfrom=gmalecha AT gmail.com; spf=None smtp.helo=postmaster AT mail-yk0-f173.google.com
- Ironport-phdr: 9a23:SgyZ1hx6SWLMGyzXCy+O+j09IxM/srCxBDY+r6Qd0ewSIJqq85mqBkHD//Il1AaPBtWFraocw8Pt8IneGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwudrqzQtaapv/0/t7x0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY+YtaRu+CVIuv8n69UIEeCjJ/x5HvRkC2ENNHl9z8n2v1GXRgyWo3AYT28+kxxSAgGD4gusDbnrtS6vmfBw1y6ALIXTRLQ5UjSrp/NkTRbshSwHPhY29WjWjop7i6cN80HpnAB234OBONLdD/F5ZK6IOIpCHWc=
Hello --
--
I'm trying to benchmark rewrite_strat and I'm having trouble constructing a strategy that lifts all existential quantifiers over conjunctions. Here are the two lemmas that I'm using:
Theorem pull_ex_and_left
: forall T P Q, Basics.flip Basics.impl ((@ex T P) /\ Q) (exists n, P n /\ Q).
Admitted.
Theorem pull_ex_and_right
: forall T P Q, Basics.flip Basics.impl (Q /\ (@ex T P)) (exists n, Q /\ P n).
Admitted.
Hint Rewrite pull_ex_and_left : pulling.
Hint Rewrite pull_ex_and_right : pulling.
Here is a simple goal that I've been using for testing:
Goal ((((exists _ : nat, 0 = 0) /\ (exists _ : nat, 0 = 0)) /\
(exists _ : nat, 0 = 0) /\ (exists _ : nat, 0 = 0)) /\
((exists _ : nat, 0 = 0) /\ (exists _ : nat, 0 = 0)) /\
(exists _ : nat, 0 = 0) /\ (exists _ : nat, 0 = 0)) /\
(((exists _ : nat, 0 = 0) /\ (exists _ : nat, 0 = 0)) /\ 0 = 0 /\ 0 = 0) /\
(0 = 0 /\ 0 = 0) /\ 0 = 0 /\ 0 = 0.
My idea for the procedure was lift existentials bottom up. When you hit a conjunction, pull all the exisentials out of each side. This seems to require top-down rewriting so I tried:
rewrite_strat (bottomup (repeat (topdown (hints pulling)))).
but this is not able to pull all of the quantifiers in one invocation. Is there something that I am missing about how rewrite_strat works? Or am I just making a foolish mistake.
Thanks so much.
gregory malecha
- [Coq-Club] rewrite_strat Question, Gregory Malecha, 01/07/2016
- Re: [Coq-Club] rewrite_strat Question, Gregory Malecha, 01/07/2016
- Re: [Coq-Club] rewrite_strat Question, Matthieu Sozeau, 01/07/2016
- Re: [Coq-Club] rewrite_strat Question, Gregory Malecha, 01/08/2016
- Re: [Coq-Club] rewrite_strat Question, Matthieu Sozeau, 01/07/2016
- Re: [Coq-Club] rewrite_strat Question, Gregory Malecha, 01/07/2016
Archive powered by MHonArc 2.6.18.