coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Adam Chlipala <adamc AT csail.mit.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Understanding "auto"
- Date: Sun, 9 Oct 2016 13:30:34 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=adamc AT csail.mit.edu; spf=Pass smtp.mailfrom=adamc AT csail.mit.edu; spf=None smtp.helo=postmaster AT outgoing-stata.csail.mit.edu
- Ironport-phdr: 9a23:VyGU/xRiMJdXNxOO3tT4ErmE/dpsv+yvbD5Q0YIujvd0So/mwa64ZxaN2/xhgRfzUJnB7Loc0qyN4vqmAjNLuM7R+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLshrr0oMKYOl0YzBOGIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46FppIZ8VvDxeL19RrhFBhwnNXo07Yvlr0rtVwyKs1IQW2BeuRpMAhDM6BiyCp79uy7xnuFm0Siee8j3UfY5VSn0vPQjcwPhlCpSb21xy2rQkMEl1K8=
I think [auto] is implementing individual steps more like [simple apply] than [apply], so that definition unfolding isn't included, which can pay off in improved performance of checking which hints apply for each subgoal.
On 10/09/2016 01:27 PM, Klaus Ostermann wrote:
I'm trying to understand the behavior of "auto".
My understanding so far was that the following invariant holds:
A proof that consists of a series of "apply" steps, where all applied
terms are in the
hints database, can also be solved by "auto" (with sufficient search depth).
However, this doesn't seem to be the case. For instance, consider:
Inductive foo : nat -> Prop :=
| baz : forall n: nat, foo n -> foo (S n)
| z : foo O.
Hint Constructors foo.
Now the following goal can be solved with "auto".
Goal foo(2). auto. Qed.
This small variant of the goal cannot be solved with "auto".
But it can be solved by adding an "apply baz" - although "baz" is already
in the hint database for "auto".
Definition id{A: Set}(x: A) := x.
Goal foo(id(2)). apply baz. auto.
Does an explicit "apply" do more than an "apply" performed by "auto"?
What is the explanation of this behavior? And how can I automate a proof
like the one above such that I don't have to apply baz manually?
Klaus
- [Coq-Club] Understanding "auto", Klaus Ostermann, 10/09/2016
- Re: [Coq-Club] Understanding "auto", Adam Chlipala, 10/09/2016
Archive powered by MHonArc 2.6.18.