Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Coq newbie-Defining a partial map

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Coq newbie-Defining a partial map


chronological Thread 
  • From: darvishdarab AT gmail.com
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] Coq newbie-Defining a partial map
  • Date: Tue, 8 Nov 2011 04:27:59 +0100

Hi everyone,

I am a newbie to Coq and I've got a question that I don't  really think is 
hard
to answer but I spent some time on it with no luck and I couldn't find any
examples online, so I thought I just ask it here:

I have the following:

Require Import FMaps.
Require Import Arith.

Module NatOrd <: OrderedType.
...
End NatOrd.

and then I define:

Definition NatMap := FMapList.Make (NatOrd).

and:

Definition NatNatMap := NatMap.t nat.

My question is that how I can work with this NatNatMap. I don't know how to
actually define something that has type NatMap.t nat and I can add/remove/..
elements to it. What I basically want to do is to define a partial map from
naturals to some other type. What are the possibly ways one can do this in 
Coq?

Thank you in advance for your help. 



Archive powered by MhonArc 2.6.16.

Top of Page