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 <24516-0@swan.cl.cam.ac.uk>; Thu, 7 May 1992 16:19:40 +0100
Received: by ted.cs.uidaho.edu (16.6/1.34) id AA11460;
          Thu, 7 May 92 08:07:20 -0700
Sender: info-hol-request@edu.uidaho.cs.ted
Errors-To: info-hol-request@edu.uidaho.cs.ted
Received: from crl.dec.com by ted.cs.uidaho.edu (16.6/1.34) id AA11456;
          Thu, 7 May 92 08:07:15 -0700
Received: by crl.dec.com; id AA06100; Thu, 7 May 92 11:07:35 -0400
Received: by easynet.crl.dec.com; id AA28057; Thu, 7 May 92 10:52:47 -0400
Message-Id: <9205071452.AA28057@easynet.crl.dec.com>
Received: from ricks.enet; by crl.enet; Thu, 7 May 92 10:52:48 EDT
Date: Thu, 7 May 92 10:52:48 EDT
From: "Tim Leonard, DTN 225-5809, HLO2-3/C11 07-May-1992 1037" <leonard@com.dec.enet.ricks>
To: info-hol@edu.uidaho.cs.ted
Apparently-To: info-hol@ted.cs.uidaho.edu
Subject: re: discarding theory segments

Mark van de Voort asks if there's some way to discard theory segments.  As I
remember, the difficulty is that the ML environment may include theorems (that
is, ML objects of type :thm) that depend on the current theory segment.  In
order to preserve validity, the current theory must be preserved, or those
theorems must be discarded with it.  Unfortunately, there's no direct way of
finding such objects, or ridding the ML environment of them.

I think there's a fairly simple solution, but I haven't thought about theories
enough to know if it actually works.  The idea is that the current theory in
ML memory has a version number, and the ML abstract objects called theorems also
include version numbers.  The operation to discard a theory segment ("forget",
or "revoke", or "rescind", or something) must not only remove the specified
segments from the current theory, but must also increment the current theory's
version number.  All primitive operations on theorems (inference rules, pretty
printing, and theorem-saving, for example) must check that the theorems they
are applied to have the current version number. 

Tim
