src/HOL/AxClasses/Group/GroupDefs.thy
changeset 1247 18b1441fb603
child 2907 0e272e4c7cb2
equal deleted inserted replaced
1246:706cfddca75c 1247:18b1441fb603
       
     1 (*  Title:      GroupDefs.thy
       
     2     ID:         $Id$
       
     3     Author:     Markus Wenzel, TU Muenchen
       
     4 *)
       
     5 
       
     6 GroupDefs = MonoidGroupInsts + Prod + Fun +
       
     7 
       
     8 
       
     9 (* bool *)
       
    10 
       
    11 instance
       
    12   bool :: {times, inv, one}
       
    13 
       
    14 defs
       
    15   times_bool_def        "x * y == (x ~= y)"
       
    16   inv_bool_def          "inv x == (x::bool)"
       
    17   one_bool_def          "1 == False"
       
    18 
       
    19 
       
    20 (* cartesian products *)
       
    21 
       
    22 instance
       
    23   "*" :: (term, term) {times, inv, one}
       
    24 
       
    25 defs
       
    26   times_prod_def        "p * q == (fst p * fst q, snd p * snd q)"
       
    27   inv_prod_def          "inv p == (inv (fst p), inv (snd p))"
       
    28   one_prod_def          "1 == (1, 1)"
       
    29 
       
    30 
       
    31 (* function spaces *)
       
    32 
       
    33 instance
       
    34   fun :: (term, term) {times, inv, one}
       
    35 
       
    36 defs
       
    37   times_fun_def         "f * g == (%x. f x * g x)"
       
    38   inv_fun_def           "inv f == (%x. inv (f x))"
       
    39   one_fun_def           "1 == (%x. 1)"
       
    40 
       
    41 end