Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] proofs involving variables appeared from matching

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] proofs involving variables appeared from matching


chronological Thread 
  • From: Matthieu Sozeau <Matthieu.Sozeau AT lri.fr>
  • To: coq-club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] proofs involving variables appeared from matching
  • Date: Mon, 28 Apr 2008 12:26:55 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hello,

Another alternative would be to use the Program extension and write:

Program Fixpoint SupL (n:nat) (f:Less n -> nat) {struct n} : nat :=
  match n with
    | 0 => 0
    | S n' => f n'
  end.

You can look at the definition of SupL to see how equalities between the matched term and the patterns are kept in each branch. They are used to discharge the proof obligation arising from the coercion of n' from nat to Less n at the "f n'" call. Program is documented in the manual.

--
Matthieu Sozeau
http://www.lri.fr/~sozeau





Archive powered by MhonArc 2.6.16.

Top of Page