src/HOL/AxClasses/Tutorial/BoolGroupInsts.thy
author nipkow
Mon Oct 21 09:50:50 1996 +0200 (1996-10-21)
changeset 2115 9709f9188549
parent 1247 18b1441fb603
child 2907 0e272e4c7cb2
permissions -rw-r--r--
Added trans_tac (see Provers/nat_transitive.ML)
wenzelm@1247
     1
(*  Title:      HOL/AxClasses/Tutorial/BoolGroupInsts.thy
wenzelm@1247
     2
    ID:         $Id$
wenzelm@1247
     3
    Author:     Markus Wenzel, TU Muenchen
wenzelm@1247
     4
wenzelm@1247
     5
Define overloaded constants "<*>", "inv", "1" on type "bool"
wenzelm@1247
     6
appropriately, then prove that this forms a group.
wenzelm@1247
     7
*)
wenzelm@1247
     8
wenzelm@1247
     9
BoolGroupInsts = Group +
wenzelm@1247
    10
wenzelm@1247
    11
(* bool as abelian group *)
wenzelm@1247
    12
wenzelm@1247
    13
defs
wenzelm@1247
    14
  prod_bool_def "x <*> y == x ~= (y::bool)"
wenzelm@1247
    15
  inv_bool_def  "inv x   == x::bool"
wenzelm@1247
    16
  unit_bool_def "1       == False"
wenzelm@1247
    17
wenzelm@1247
    18
instance
wenzelm@1247
    19
  bool :: agroup                {| ALLGOALS (fast_tac HOL_cs) |}
wenzelm@1247
    20
  (*"instance" automatically uses above defs, 
wenzelm@1247
    21
    the remaining goals are proven 'inline'*)
wenzelm@1247
    22
wenzelm@1247
    23
end