Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Two beginner questions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Two beginner questions


Chronological Thread 
  • From: Kristopher Micinski <krismicinski AT gmail.com>
  • To: Kevin Sullivan <sullivan.kevinj AT gmail.com>
  • Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Two beginner questions
  • Date: Wed, 4 Sep 2013 16:49:52 -0400

What you probably want is something with a sigma type in the positive position, for which you can use refine, since you're working with a logical term:

Definition pair_fun_template : forall (p : nat * nat), {k | k = fst p}.
   refine (fun p => match p with pair t u => (exist _ _ _) end); crush.
Defined.

Kris



On Wed, Sep 4, 2013 at 9:29 AM, Kevin Sullivan <sullivan.kevinj AT gmail.com> wrote:
(1) I know that I can take advantage of partial proofs using refine, but can I treat partial proofs as first class values? E.g., I'm trying to do this, but Coq complains that it can't infer the value of the hole.

Definition pair_fun_template: pair_nat_nat -> nat :=
(fun p: pair_nat_nat => 
    match p with mk_pair t u => (_ : nat) end).

(2) When using CoqIDE and literate Coq in the style of Pierce's book, Coq constantly complains, "Warning: query commands should not be inserted in scripts." How can I turn off these warnings?

Thanks!
Kevin




Archive powered by MHonArc 2.6.18.

Top of Page