From kimdam@sun.tfl.dk  Tue Aug 21 05:54:56 1990
Received: by iris.ucdavis.edu (5.57/UCD.EECS.2.0)
        id AA09044; Tue, 21 Aug 90 05:54:56 PDT
Received: from danpost.uni-c.dk by clover.ucdavis.edu (5.59/UCD.EECS.1.11)
        id AA03076; Tue, 21 Aug 90 05:58:34 PDT
Received: from vms2.uni-c.dk by danpost.uni-c.dk (5.61/4.7)
        id AA03313; Tue, 21 Aug 90 12:54:52 GMT
Received: from tfl.dk by vms2.uni-c.dk; Tue, 21 Aug 90 14:56 GMT+2
Received: from sun0.tfl.dk by tfl.dk; Tue, 21 Aug 90 14:54 +2:00
Received: by sun0.tfl.dk (5.61++/IDA-1.2.8) id AA06179; Tue, 21 Aug 90 14:57:08
 +0200
Date: Tue, 21 Aug 90 14:57:08 +0200
From: Kim Dam Petersen <kimdam@tfl.dk>
Subject: About the choice and existence operator
To: info-hol@clover.ucdavis.edu
Message-Id: <9008211257.AA06179@sun0.tfl.dk>
X-Envelope-To: info-hol@clover.ucdavis.edu

Hi Wim,

    when dealing with existential quantifiers I use STRIP_ASSUME_TAC, when
it appear as a hypothesis, HOL then gives me a Skolem constants for which
the existence property holds; I use EXISTS_TAC when it appear as the
conclusion of a goal, after I've made it possible to create an object for
which the existence property holds.

    When dealing with the choice operator I use SELECT_TAC, if applicable
when it appear in the conclusion; I've defined a tactic SELECT_IMP_TAC which
I use if SELECT_TAC is not applicable. This tactic works is defined below.
When the choice operator occurs as a hypothesis I have no general tactic to
help me.  Usually I search for a siutable theorem that has a matching choice
operator (in it's context) as hypothesis and use IMP_RES_TAC with this
theorem.

Kindly Regards
        Kim Dam Petersen

-------- 8< -=[ Cut here ]=- >8 --------
%<
SELECT_IMP_TAC: "@x. P[x]" goal

                A |- Q[@x. P[x]]
        =============================================
        A |- ?x. P[x]   A, P[@x. P[x]] |- Q[@x. P[x]]

>%
let SELECT_IMP_TAC (term:term) (g:goal) =
 let (x,Px) = dest_select term ?
        failwith `SELECT_IMP_TAC: term not of form @x. P[x]` in
  let (hyp,conc) = g in
   let hyp1 = subst[term,x]Px in
  ( [(hyp, mk_exists(x,Px));
     ((hyp1.hyp), conc)],
    (\ [thm1;thm2].
      MP (DISCH hyp1 thm2) (SELECT_RULE thm1)));;


