Return-Path: <John.Harrison-request@cl.cam.ac.uk>
Delivery-Date: 
Received: from leopard.cs.byu.edu (no rfc931) by swan.cl.cam.ac.uk 
          with SMTP (PP-6.5) outside ac.uk; Thu, 7 Jul 1994 05:36:21 +0100
Received: by leopard.cs.byu.edu (1.37.109.8/16.2) id AA29322;
          Wed, 6 Jul 1994 22:24:03 -0600
Sender: info-hol-request@lal.cs.byu.edu
Errors-To: info-hol-request@lal.cs.byu.edu
Precedence: bulk
Received: from dworshak.cs.uidaho.edu by leopard.cs.byu.edu 
          with SMTP (1.37.109.8/16.2) id AA29318;
          Wed, 6 Jul 1994 22:23:59 -0600
Received: from toadflax.cs.ucdavis.edu by dworshak.cs.uidaho.edu 
          with SMTP (1.37.109.8/16.2) id AA03102;
          Wed, 6 Jul 1994 21:21:03 -0700
Received: from shangrila.cs.ucdavis.edu 
          by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.5) id AA28571;
          Wed, 6 Jul 94 21:20:59 PDT
Received: by shangrila.cs.ucdavis.edu (5.65/UCD.CS.2.5) id AA27983;
          Wed, 6 Jul 1994 21:21:00 -0700
Date: Wed, 6 Jul 1994 21:21:00 -0700
From: heckman@cs.ucdavis.edu (Mark R. Heckman)
Message-Id: <9407070421.AA27983@shangrila.cs.ucdavis.edu>
To: info-hol@cs.uidaho.edu
Subject: mappings

I'm trying to create a type in hol that implements VDM mappings, but
I don't understand enough about hol types to do this.

Intuitively, a VDM mapping is sort of a cross between a set and a function.
Each element of the mapping consists of an id and a value. 
There is only one element in a mapping that has a particular id. 
For example:

{ (a,1) (b,2) (c,1) } 

is a mapping from the chars to the numbers.

It differs from a set in that, where a set would determine unique
elements based on both the id and value (e.g., it would allow
{(a,1) (a,2)}), a mapping uses only the id.
It differs from a function in that you can manipulate it like a set.
Ideally, I'd like to be able to use fundamentally the same operators
as for sets.

Does this already exist in HOL?  Is there some simple way to
implement this that inexperience prevents me from seeing?
Can someone point me in the right direction?

Thanks,

Mark Heckman
heckman@cs.ucdavis.edu

