coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Frédéric Besson <frederic.besson AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Power function in Coq standard library?
- Date: Tue, 27 Feb 2018 00:24:32 +0100
- Organization: Inria
Hello,
On Mon, 2018-02-26 at 18:04 -0500, Cao Qinxiang wrote:
> Is power function like the following one defined in Coq standard
> library?
>
> Fixpoint pow_func {A : Type} (f : A -> A) (n : nat) (a : A) : A :=
> match n with
> | O => a
> | S n => f (pow_func f n a)
> end.
There is a iter_nat notation.
Require Import Arith.
Locate iter_nat.
Notation Coq.Arith.Wf_nat.iter_nat
Print iter_nat
Notation iter_nat n A f x := (nat_rect (fun _ => A) x (fun _ => f) n)
Best,
--
Frédéric
- [Coq-Club] Power function in Coq standard library?, Cao Qinxiang, 02/27/2018
- Re: [Coq-Club] Power function in Coq standard library?, Dominique Larchey-Wendling, 02/27/2018
- Re: [Coq-Club] Power function in Coq standard library?, Frédéric Besson, 02/27/2018
Archive powered by MHonArc 2.6.18.