IOA/meta_theory/Option.ML
author nipkow
Wed, 09 Nov 1994 19:51:09 +0100
changeset 168 44ff2275d44f
parent 156 fd1be45b64bf
child 171 16c4ea954511
permissions -rw-r--r--
Added headers and made various small mods.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
168
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     1
(*  Title:      Option.ML
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     2
    ID:         $Id$
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     3
    Author:     Tobias Nipkow
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     4
    Copyright   1994  TU Muenchen
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     5
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     6
Derived rules
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     7
*)
44ff2275d44f Added headers and made various small mods.
nipkow
parents: 156
diff changeset
     8
156
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
     9
val option_rws = Let_def :: Option.option.simps;
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    10
val SS = arith_ss addsimps option_rws;
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    11
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    12
val [prem] = goal Option.thy "P(opt) ==> P(None) | (? x. P(Some(x)))";
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    13
 br (prem RS rev_mp) 1;
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    14
 by (Option.option.induct_tac "opt" 1);
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    15
 by (ALLGOALS(fast_tac HOL_cs));
fd1be45b64bf added IOA to isabelle/HOL
clasohm
parents:
diff changeset
    16
val optE = standard(result() RS disjE);