Skip to Content.
Sympa Menu

coq-club - [Coq-Club]Probl�me de d�monstration pas induct ion

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club]Probl�me de d�monstration pas induct ion


chronological Thread 
  • From: "Damien Ledoux" <dam.ledoux AT gmail.com>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club]Problème de démonstration pas induct ion
  • Date: Sun, 23 Apr 2006 12:54:22 +0200
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:to:message-id:from:content-type:mime-version:content-transfer-encoding:date:user-agent; b=BLtd+MFWr6W5zSxUhB9+6MyHGnx+YaicVgt4zZvKaN+XtkiZddbtlWGBULe1QL0pAxz9rjvmM1tlqSusg8ES/F1pKAG7EI85nhU6ImGQEoBCHLDcY7slgAEJ1SAT6dvQJaG+OiJQrYStzQzXd3c2YbujEbw5nuZvVHgX7mKV0JE=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Bonjour,

J'ai un petit problème avec la tactique elim.
En effet quand je veux réaliser une démonstration par induction,
elle me remplace directement le terme de mon induction dans mon lemme
alors que j'aimerais l'avoir en hypothèse.

Pour etre plus clair, j'ai fait un petit exemple montrant mon problème.

Mon problème est la démonstration du lemme test.
Je dois mal utiliser les tactiques ou bien faire une mauvaise induction.
Si je ne me trompe pas il faut réaliser une induction sur "(N2nat n)" puis
après sur "r".


Merci d'avance pour votre aide,
Damien


(************** DEBUT *****************)

Inductive N : Set :=
   | base : N
   | next : N -> N.

Implicit Types n : N.

Fixpoint N2nat n : nat :=
   match n with
   | base => O
   | next n' => S (N2nat n')
   end.


Fixpoint succ_fix (n:nat) : nat  :=
match n with
   | O => (S 0)
   | S n => S (succ_fix n)
end.

Definition succ (n:N) : nat := (N2nat n) + 1.


Lemma test :
   forall (n : N) (r:nat), succ_fix (N2nat n) = r -> succ n = r.
   intro n.
   elim (N2nat n).

   (* CB : (N2nat n) *)
   simpl.

(*************** FIN ******************)





Archive powered by MhonArc 2.6.16.

Top of Page