Return-Path:
Return-Path: <john.harrison-request@uk.ac.cam.cl>
Received: from ted.cs.uidaho.edu by swan.cl.cam.ac.uk with SMTP (PP-6.0)
          id <06606-0@swan.cl.cam.ac.uk>; Sun, 26 Jan 1992 23:25:05 +0000
Received: by ted.cs.uidaho.edu (16.6/1.34) id AA09822;
          Sun, 26 Jan 92 15:09:00 -0800
Sender: info-hol-request@edu.uidaho.cs.ted
Errors-To: info-hol-request@edu.uidaho.cs.ted
Received: from Maui.CS.UCLA.EDU by ted.cs.uidaho.edu (16.6/1.34) id AA09818;
          Sun, 26 Jan 92 15:08:55 -0800
Received: from LocalHost.cs.ucla.edu
          by maui.cs.ucla.edu (Sendmail 5.61b+YP/3.13) id AA15708;
          Sun, 26 Jan 92 15:11:11 -0800
Message-Id: <9201262311.AA15708@maui.cs.ucla.edu>
To: info-hol@edu.uidaho.cs.ted
Cc: chou@edu.ucla.cs
Subject: Overloading of constant names
Date: Sun, 26 Jan 92 15:11:07 PST
From: chou@edu.ucla.cs

In HOL, if I have defined:

(1)     neg:num->num = \x.0-x

then I can no longer define:

(2)     neg:bool->bool = \x.~x

But why?  DESCRIPTION says a HOL constant is a (name, type) pair.
Clearly neg:num->num and neg:bool->bool are two different constants.
So why does definition (1) preclude definition (2)?

I'm asking this because I would like to use abstract theories but
found the above naming constraint very annoying.  For instance,
I want to define a type :graph and, for any G:graph, get its
adjacency relation by saying adj(G).  Later I want to talk about
graphs in which edges are weighted, so I want to define another
type :w_graph.  But then, to get the adjacency relation of a
weighted graph WG, I would have to say something like w_adj(WG).
instead of simply adj(WG).  If I want to consider yet another
new type :cw_graph of connected weighted graphs, I would have to
introduce yet another set of constant names.  Is there a way out?

- Ching Tsun

