Return-Path: <John.Harrison-request@cl.cam.ac.uk>
Delivery-Date: 
Received: from ted.cs.uidaho.edu (no rfc931) by swan.cl.cam.ac.uk 
          with SMTP (PP-6.5) outside ac.uk; Tue, 15 Jun 1993 23:52:29 +0100
Received: by ted.cs.uidaho.edu (16.6/1.34) id AA12494;
          Tue, 15 Jun 93 15:43:51 -0700
Sender: info-hol-request@ted.cs.uidaho.edu
Errors-To: info-hol-request@ted.cs.uidaho.edu
Precedence: bulk
Received: from Maui.CS.UCLA.EDU by ted.cs.uidaho.edu (16.6/1.34) id AA12489;
          Tue, 15 Jun 93 15:43:46 -0700
Received: by maui.cs.ucla.edu (Sendmail 5.61d+YP/3.21) id AA05095;
          Tue, 15 Jun 93 15:44:07 -0700
Date: Tue, 15 Jun 93 15:44:07 -0700
From: toal@cs.ucla.edu (Ray Toal)
Message-Id: <9306152244.AA05095@maui.cs.ucla.edu>
To: info-hol@ted.cs.uidaho.edu, slind@informatik.tu-muenchen.de, 
    toal@cs.ucla.edu
Subject: Re: A simple question

From Konrad Slind's EXISTS_NTH_TAC example it is easy to obtain


letrec SIFT_EXISTS_CONV x t =
  let bvars = fst (strip_exists t) in
  if not (mem x bvars) then failwith `Variable not bound`
  else if x = hd bvars then ALL_CONV t
  else if x = hd (tl bvars) then SWAP_EXISTS_CONV t
  else (RAND_CONV (ABS_CONV (SIFT_EXISTS_CONV x)) THENC SWAP_EXISTS_CONV) t;;

let MY_EXISTS_TAC x u =
  CONV_TAC (SIFT_EXISTS_CONV x) THEN
  EXISTS_TAC u;;

Ray
