src/HOL/IOA/meta_theory/Option.ML
author nipkow
Thu, 13 Apr 1995 17:05:41 +0200
changeset 1052 e044350bfa52
parent 966 3fd66f245ad7
child 1266 3ae9fe3c0f68
permissions -rw-r--r--
Olafs new version.

(*  Title:      Option.ML
    ID:         $Id$
    Author:     Tobias Nipkow
    Copyright   1994  TU Muenchen

Derived rules
*)

val option_rws = Let_def :: Option.option.simps;
val SS = arith_ss addsimps option_rws;

val [prem] = goal Option.thy "P(opt) ==> P(None) | (? x. P(Some(x)))";
 br (prem RS rev_mp) 1;
 by (Option.option.induct_tac "opt" 1);
 by (ALLGOALS(fast_tac HOL_cs));
val optE = store_thm("optE", standard(result() RS disjE));

goal Option.thy "x=None | (? y.x=Some(y))"; 
by (Option.option.induct_tac "x" 1);
by (asm_full_simp_tac list_ss 1);
by (rtac disjI2 1);
by (rtac exI 1);
by (asm_full_simp_tac list_ss 1);
qed"opt_cases";