Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] calculating values depending on the structure of proofs

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] calculating values depending on the structure of proofs


chronological Thread 
  • From: Adam Chlipala <adam AT chlipala.net>
  • To: CHA Reeseo <reeseo AT formal.korea.ac.kr>
  • Cc: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] calculating values depending on the structure of proofs
  • Date: Wed, 07 Apr 2010 15:52:44 -0400

CHA Reeseo wrote:
QUESTION 1: Is there really no way to retrieve detailed information from
the proofs of inductive predicates (whose final type is Prop) when the
current goal has sort Set?

There should not be a way. If such a way were found, I would call it a bug. The meaning of [Prop] is more or less "values that cannot be used to influence the behavior of extracted programs." If you don't want that behavior, then you should code using [Set] versions of connectives that the Coq standard library puts in [Prop]. You would only be losing [Prop]'s impredicativity; everything else can be duplicated in [Set].

You also have the option of using one of the axioms of choice found in the Coq standard library.

     1 subgoal

       P : nat ->  Prop
       x : nat
       H : P x
       ============================
        P ?7

QUESTION 2: Why 'eexact H' fails here?

     foo<  eexact H.
     Toplevel input, characters 0-8:
     >  eexact H.
     >  ^^^^^^^^
     Error: Impossible to unify "?7" with "x".

The unification variable [?7] was introduced before [x] was introduced. In other words, [?7] must be valid in a typing context that has no [x], so the instantiation may not mention [x]. If you try to do the proof by hand, in a very pedantic way, I think you will see why the step you are attempting is invalid, for simple syntactic reasons.



Archive powered by MhonArc 2.6.16.

Top of Page