Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Problems with Program.

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Problems with Program.


chronological Thread 
  • From: Matthieu Sozeau <Matthieu.Sozeau AT lri.fr>
  • To: Adam Koprowski <adam.koprowski AT gmail.com>
  • Cc: Coq Club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Problems with Program.
  • Date: Wed, 25 Mar 2009 15:55:25 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

P.S.: and there's a workaround too:

<<
Section Check.
  Variables  (n : nat) (P : { i | i < n } -> bool).

  Program Fixpoint check_n (p : nat)
    (H : forall (i : { i | i < n }), i < p -> P i = true)
    {measure (fun i => n - i) p} :
    Exc (forall (p : { i | i < n}), P p = true) :=
    match le_lt_dec n p with
    | left _ => value _
    | right cmp =>
      if dec (P p) then
        check_n (S p) _
      else
        error
    end.
>>





Archive powered by MhonArc 2.6.16.

Top of Page