Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Understanding "auto"

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Understanding "auto"


Chronological Thread 
  • From: Klaus Ostermann <klaus.ostermann AT uni-tuebingen.de>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Understanding "auto"
  • Date: Sun, 9 Oct 2016 19:27:18 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=klaus.ostermann AT uni-tuebingen.de; spf=None smtp.mailfrom=klaus.ostermann AT uni-tuebingen.de; spf=None smtp.helo=postmaster AT mx04.uni-tuebingen.de
  • Ironport-phdr: 9a23:1FkW7xANNszeZwwSEThoUyQJP3N1i/DPJgcQr6AfoPdwSP7/oMbcNUDSrc9gkEXOFd2CrakV0ayN7Ou5ATxIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD1YLsiKvro82bSj4LrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGwD884mosVHSODxe7kyZb1eFjUvdW4vt+PxshyWbg+G+2BUdX4KnwBNCg7DpEX5Wp7sqW39rfZwwiyTO8veULY1HCi/4q1qThDljmELOmhqoynslsVsgfcD81qarBtlztuMbQ==

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




Archive powered by MHonArc 2.6.18.

Top of Page