src/FOL/ex/IffOracle.ML
author oheimb
Tue, 07 Apr 1998 13:46:05 +0200
changeset 4800 97c3a45d092b
parent 3817 f20f193d42b4
child 6391 0da748358eff
permissions -rw-r--r--
replaced option_map_SomeD by option_map_eq_Some (RS iffD1) added option_map_eq_Some to simpset(), option_map_eq_Some RS iffD1 to claset()

(*  Title:      FOL/ex/IffOracle.ML
    ID:         $Id$
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
    Copyright   1996  University of Cambridge

Example of how to use an oracle
*)

fun iff_oracle n =
  invoke_oracle IffOracle.thy "iff" (sign_of IffOracle.thy, IffOracleExn n);


iff_oracle 2;
iff_oracle 10;
#der(rep_thm it);

(*These oracle calls had better fail*)

(iff_oracle 5; raise ERROR)
  handle IffOracleExn _ => writeln"Failed, as expected";

(iff_oracle 0; raise ERROR)
  handle IffOracleExn _ => writeln"Failed, as expected";