Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Question about recursion and induction

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Question about recursion and induction


Chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: Ilmārs Cīrulis <ilmars.cirulis AT gmail.com>
  • Cc: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Question about recursion and induction
  • Date: Fri, 13 Sep 2013 18:13:50 -0400

Have you read Chapter 7 of CPDT <http://adam.chlipala.net/cpdt/>?  Especially Section 7.1 seems like a fairly direct match with your question.

On 09/13/2013 05:34 PM, Ilmārs Cīrulis wrote:
Let's suppose that I have
- type T
- wellfounded relation R: T->T->Prop
- function F1: T->T that makes argument "smaller"
- condition C: T->Prop that describes "start values" of R
- function F2: T->T that makes argument "bigger"

How can I make Fixpoint that looks similar to this:

Fixpoint Example (n:T):X :=
  match {C n} + {~C n} with
    left _ => ... |
  right _ => Example (F1 n)
  end.
  

And how I can make possible the following usage of tactic 'induction' (or similar):

Theorem ...
Proof.
 ...
 induction n F.
(* And now I have two goals:
   the first with assumption C n and goal P n,
   the second with assumption P n and goal P (F2 n) *)
 ...
Qed.




Archive powered by MHonArc 2.6.18.

Top of Page