coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Leonardo Rodriguez <leonardomatiasrodriguez AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: [Coq-Club] MSet of keys of a FMap
- Date: Mon, 13 Apr 2015 19:00:49 -0300
Hi Club,
I'm trying to understand the std library of finite maps. I would like
I'm trying to understand the std library of finite maps. I would like
Set Implicit Arguments.
Require Import FMapInterface.
Require Import FMapList.
Require Import OrderedTypeEx.
Require Import FSetList.
Require Import MSetList.
Definition var := nat.
Definition var_eq := Nat_as_OT.eq.
Definition var_dec := Nat_as_OT.eq_dec.
Module VarMap := FMapList.Make Nat_as_OT.
Module VarFSet := FSetList.Make Nat_as_OT.
Module VarSet := VarFSet.MSet.
Definition keys_list A (m : VarMap.t A) : list VarMap.key
:= map (@fst _ _) (VarMap.elements m).
(* how to implement this ??
Definition keys_set A (m : VarMap.t A) : VarSet.t
:= map (@fst _ _) (VarMap.elements m).
*)
Is there a way to "coerce" keys_list into a MSet ?
Any hint will be appreciated,Thanks in advance,
Leo.
- [Coq-Club] MSet of keys of a FMap, Leonardo Rodriguez, 04/14/2015
- <Possible follow-up(s)>
- Re: [Coq-Club] MSet of keys of a FMap, CJ Bell, 04/14/2015
Archive powered by MHonArc 2.6.18.