coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Laurent Théry <Laurent.Thery AT inria.fr>
- To: Kevin Sullivan <sullivan.kevinj AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] An interated composition puzzle
- Date: Sat, 10 Nov 2012 16:37:44 +0100
On 11/10/2012 02:54 PM, Kevin Sullivan wrote:
Fixpoint ant {X: Type} (f: X->X) (x: X) (n: nat) : X :=You can prove it directly with two inductions, or only one induction using an intermediate lemme
match n with
| O => x
| S n' => f (ant f x n')
end.
Fixpoint ant' {X: Type} (f: X->X) (x: X) (n: nat) : X :=
match n with
| O => x
| S n' => ant' f (f x) n'
end.
Theorem equiv: forall (X: Type) (f: X->X) (x: X) (n: nat),
(ant f x n) = (ant' f x n).
Proof. admit.
f (ant' f x n) = ant' f (f x) n (that is proved by induction)
Hint: don' t forget to generalize your goal before doing the induction!
--
Laurent
- [Coq-Club] An interated composition puzzle, Kevin Sullivan, 11/10/2012
- Re: [Coq-Club] An interated composition puzzle, Adam Chlipala, 11/10/2012
- Re: [Coq-Club] An interated composition puzzle, Laurent Théry, 11/10/2012
- Re: [Coq-Club] An interated composition puzzle, AUGER Cédric, 11/10/2012
- Re: [Coq-Club] An interated composition puzzle, Jean-Francois Monin, 11/11/2012
- Re: [Coq-Club] An interated composition puzzle, Jonas Oberhauser, 11/11/2012
- Re: [Coq-Club] An interated composition puzzle, AUGER Cédric, 11/11/2012
- Re: [Coq-Club] An interated composition puzzle, Jonas Oberhauser, 11/11/2012
- Re: [Coq-Club] An interated composition puzzle, AUGER Cédric, 11/11/2012
- Re: [Coq-Club] An interated composition puzzle, Jonas Oberhauser, 11/11/2012
Archive powered by MHonArc 2.6.18.