Return-Path: <john.harrison-request@uk.ac.cam.cl>
Delivery-Date: 
Received: from ted.cs.uidaho.edu (no rfc931) by swan.cl.cam.ac.uk 
          with SMTP (PP-6.4) outside ac.uk; Wed, 10 Mar 1993 09:01:17 +0000
Received: by ted.cs.uidaho.edu (16.6/1.34) id AA04858;
          Wed, 10 Mar 93 00:38:06 -0800
Sender: info-hol-request@edu.uidaho.cs.ted
Errors-To: info-hol-request@edu.uidaho.cs.ted
Precedence: bulk
Received: from Ucthpx.UCT.AC.ZA by ted.cs.uidaho.edu (16.6/1.34) id AA04853;
          Wed, 10 Mar 93 00:37:14 -0800
Received: by ucthpx.uct.ac.za (/\==/\ Smail3.1.24.1 #24.2) id m0nWMHR-000NykC;
          Wed, 10 Mar 93 10:36 SAST
Received: by elc.mth.uct.ac.za (4.1/SMI-4.1) id AA04021;
          Wed, 10 Mar 93 10:34:39+020
From: rait@za.ac.uct.mth.elc (Rait Harnett)
Message-Id: <9303100834.AA04021@elc.mth.uct.ac.za>
Subject: simultaneous inductive defns.
To: info-hol@edu.uidaho.cs.ted
Date: Wed, 10 Mar 93 10:34:38 EET
Cc: elc.mth.uct.ac.za!rait@za.ac.uct.ucthpx (Rait Harnett)
X-Mailer: ELM [version 2.3 PL11]

I have the following problem:

I need to define a type which arises from a BNF grammar very similar to
the grammar used to generate arithmetic expressions over the variables
a,b,c :
  E -> T|E+T|E-T 
  T -> F|TxF|T/F
  F -> a|b|c|(E).
(Yes I know that this is an unambiguous grammar, but so is the grammar I
need to embed in some existing type.)

The ML function define_type won't be handle this as I see it. One
way possible way to handle this would be to mechanize a formal
presentation of simultaneous inductive definitions. The presentation
I have in mind considers the closure of a collection of sets under a 
family of constructors. If the closure is freely generated in the
sense that elements of the sets making up the closure get into these
sets in a unique way, a certain type of recursive funtion definition
succeeds. Once one has implementation of such a theory in HOL I imagine
one could use it to define the grammar above as a subset of ({a,b,c}+
{+} + {-} + {x} + {/} + {()})ltree. So what one would essentially be
doing is applying the same techniques used by T. Melham in his paper
"Automating recursive type definitions in higher order logic".

I would be grateful to hear from anybody who has come across the same
problem and of how they managed to solve it.

Thanks,
Rait
