coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Laurent Thery <Laurent.Thery AT inria.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] termination when branching with fmaps
- Date: Fri, 19 Feb 2021 18:07:02 +0100
Hi,
> Finite maps are based on finite functions which allow such nested
definitions,
> You can find an example in the doc:
There is actually an example about tree in the header
https://github.com/math-comp/math-comp/blob/17dd3091e7f809c1385b0c0be43d1f8de4fa6be0/mathcomp/ssreflect/finfun.v#L24
the depth function is simply:
Inductive tree : Type := node n of tree ^ n.
Fixpoint depth (t : tree) : nat :=
match t with node n br => (\max_(i <- codom (depth \o br)) i).+1
end.
--
Laurent
- [Coq-Club] termination when branching with fmaps, Lorenzo Gheri, 02/18/2021
- Re: [Coq-Club] termination when branching with fmaps, Li-yao Xia, 02/18/2021
- Re: [Coq-Club] termination when branching with fmaps, Lorenzo Gheri, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Matthieu Sozeau, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Laurent Thery, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Lorenzo Gheri, 02/20/2021
- Re: [Coq-Club] termination when branching with fmaps, Laurent Thery, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Marcel Ullrich, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Matthieu Sozeau, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Lorenzo Gheri, 02/19/2021
- Re: [Coq-Club] termination when branching with fmaps, Li-yao Xia, 02/18/2021
Archive powered by MHonArc 2.6.19+.