src/HOL/GroupTheory/Group.thy
author wenzelm
Fri, 09 Nov 2001 00:09:47 +0100
changeset 12114 a8e860c86252
parent 11394 e88c2c89f98e
child 12459 6978ab7cac64
permissions -rw-r--r--
eliminated old "symbols" syntax, use "xsymbols" instead;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     1
(*  Title:      HOL/GroupTheory/Group
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     2
    ID:         $Id$
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     3
    Author:     Florian Kammueller, with new proofs by L C Paulson
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     4
    Copyright   1998-2001  University of Cambridge
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     5
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     6
Group theory using locales
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     7
*)
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
     8
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
     9
Group = Main +
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    10
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    11
  (*Giving funcset the nice arrow syntax \\<rightarrow> *)
12114
a8e860c86252 eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents: 11394
diff changeset
    12
syntax (xsymbols)
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    13
  "op funcset" :: "['a set, 'b set] => ('a => 'b) set"  (infixr "\\<rightarrow>" 60) 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    14
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    15
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    16
record 'a semigrouptype = 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    17
  carrier  :: "'a set"    
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    18
  bin_op   :: "['a, 'a] => 'a"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    19
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    20
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    21
record 'a grouptype = 'a semigrouptype +
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    22
  inverse  :: "'a => 'a"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    23
  unit     :: "'a"
12114
a8e860c86252 eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents: 11394
diff changeset
    24
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    25
syntax 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    26
  "@carrier" :: "'a semigrouptype => 'a set"            ("_ .<cr>"  [10] 10)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    27
  "@bin_op"  :: "'a semigrouptype => (['a, 'a] => 'a)"  ("_ .<f>"   [10] 10)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    28
  "@inverse" :: "'a grouptype => ('a => 'a)"        ("_ .<inv>" [10] 10)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    29
  "@unit"    :: "'a grouptype => 'a"                ("_ .<e>"   [10] 10) 
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    30
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    31
translations
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    32
  "G.<cr>"  => "carrier G"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    33
  "G.<f>"   => "bin_op G"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    34
  "G.<inv>" => "inverse G"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    35
  "G.<e>"   => "unit G"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    36
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    37
constdefs
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    38
  Semigroup :: "('a semigrouptype)set"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    39
  "Semigroup == {G. (bin_op G): carrier G \\<rightarrow> carrier G \\<rightarrow> carrier G  &
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    40
             (! x: carrier G. ! y: carrier G. !z: carrier G.
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    41
                    (bin_op G (bin_op G x y) z = bin_op G (x) (bin_op G y z)))}"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    42
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    43
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    44
constdefs
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    45
  Group :: "('a grouptype)set"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    46
  "Group == {G. (bin_op G): carrier G \\<rightarrow> carrier G \\<rightarrow> carrier G & inverse G : carrier G \\<rightarrow> carrier G 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    47
             & unit G : carrier G &
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    48
             (! x: carrier G. ! y: carrier G. !z: carrier G.
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    49
                       (bin_op G (inverse G x) x = unit G) 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    50
                     & (bin_op G (unit G) x = x) 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    51
                     & (bin_op G (bin_op G x y) z = bin_op G (x) (bin_op G y z)))}"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    52
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    53
  order     :: "'a grouptype => nat"            "order(G) == card(carrier G)"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    54
  
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    55
  AbelianGroup :: "('a grouptype) set"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    56
  "AbelianGroup == {G. G : Group &
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    57
                       (! x:(G.<cr>). ! y:(G.<cr>). ((G.<f>) x y = (G.<f>) y x))}"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    58
consts
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    59
  subgroup :: "('a grouptype * 'a set)set"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    60
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    61
defs
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    62
  subgroup_def  "subgroup == SIGMA G: Group. {H. H <= carrier G & 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    63
        ((| carrier = H, bin_op = lam x: H. lam y: H. (bin_op G) x y, 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    64
            inverse = lam x: H. (inverse G) x, unit = unit G |) : Group)}"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    65
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    66
syntax
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    67
  "@SG"  :: "['a set, 'a grouptype] => bool" ("_ <<= _" [51,50]50)
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    68
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    69
translations
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    70
  "H <<= G" == "(G,H) : subgroup"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    71
11394
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    72
locale group = 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    73
  fixes 
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    74
    G        ::"'a grouptype"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    75
    e        :: "'a"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    76
    binop    :: "'a => 'a => 'a" 	(infixr "##" 80)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    77
    INV      :: "'a => 'a"              ("i (_)"      [90]91)
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    78
  assumes
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    79
    Group_G   "G: Group"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    80
  defines
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    81
    e_def     "e == unit G"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    82
    binop_def "op ## == bin_op G"
e88c2c89f98e Locale-based group theory proofs
paulson
parents: 11370
diff changeset
    83
    inv_def   "INV == inverse G"
11370
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    84
end
680946254afe new GroupTheory example, e.g. the Sylow theorem (preliminary version)
paulson
parents:
diff changeset
    85