src/HOL/AxClasses/Tutorial/ProdGroupInsts.thy
author paulson
Tue, 16 Jul 1996 15:49:46 +0200
changeset 1868 836950047d85
parent 1266 3ae9fe3c0f68
child 4091 771b1f6422a8
permissions -rw-r--r--
Put in minimal simpset to avoid excessive simplification, just as in revision 1.9 of HOL/indrule.ML
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1247
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     1
(*  Title:      HOL/AxClasses/Tutorial/ProdGroupInsts.thy
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     2
    ID:         $Id$
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     3
    Author:     Markus Wenzel, TU Muenchen
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     4
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     5
Lift constant "<*>" to cartesian products, then prove that the
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     6
'functor' "*" maps semigroups into semigroups.
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     7
*)
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     8
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     9
ProdGroupInsts = Prod + Group +
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    10
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    11
(* direct products of semigroups *)
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    12
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    13
defs
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    14
  prod_prod_def "p <*> q == (fst p <*> fst q, snd p <*> snd q)"
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    15
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    16
instance
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    17
  "*" :: (semigroup, semigroup) semigroup
1266
3ae9fe3c0f68 added local simpsets
clasohm
parents: 1247
diff changeset
    18
    {| simp_tac (!simpset addsimps [assoc]) 1 |}
1247
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    19
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    20
end