src/HOL/AxClasses/Group/GroupDefs.ML
author paulson
Thu, 18 Jan 1996 10:38:29 +0100
changeset 1444 23ceb1dc9755
parent 1266 3ae9fe3c0f68
child 1465 5d7a7e439cec
permissions -rw-r--r--
trivial updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1247
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     1
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     2
open GroupDefs;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     3
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     4
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     5
(* bool *)
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     6
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     7
(*this is really overkill - should be rather proven 'inline'*)
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     8
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
     9
goalw thy [times_bool_def] "(x * y) * z = x * (y * (z::bool))";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    10
by (fast_tac HOL_cs 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    11
qed "bool_assoc";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    12
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    13
goalw thy [times_bool_def, one_bool_def] "1 * x = (x::bool)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    14
by (fast_tac HOL_cs 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    15
qed "bool_left_unit";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    16
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    17
goalw thy [times_bool_def, one_bool_def] "x * 1 = (x::bool)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    18
by (fast_tac HOL_cs 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    19
qed "bool_right_unit";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    20
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    21
goalw thy [times_bool_def, inv_bool_def, one_bool_def] "inv(x) * x = (1::bool)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    22
by (fast_tac HOL_cs 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    23
qed "bool_left_inv";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    24
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    25
goalw thy [times_bool_def] "x * y = (y * (x::bool))";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    26
by (fast_tac HOL_cs 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    27
qed "bool_commut";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    28
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    29
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    30
(* cartesian products *)
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    31
1266
3ae9fe3c0f68 added local simpsets
clasohm
parents: 1247
diff changeset
    32
val prod_ss = simpset_of "Prod";
3ae9fe3c0f68 added local simpsets
clasohm
parents: 1247
diff changeset
    33
1247
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    34
goalw thy [times_prod_def] "(x * y) * z = x * (y * (z::'a::semigroup*'b::semigroup))";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    35
by (simp_tac (prod_ss addsimps [assoc]) 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    36
qed "prod_assoc";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    37
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    38
goalw thy [times_prod_def, one_prod_def] "1 * x = (x::'a::monoid*'b::monoid)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    39
by (simp_tac (prod_ss addsimps [Monoid.left_unit]) 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    40
br (surjective_pairing RS sym) 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    41
qed "prod_left_unit";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    42
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    43
goalw thy [times_prod_def, one_prod_def] "x * 1 = (x::'a::monoid*'b::monoid)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    44
by (simp_tac (prod_ss addsimps [Monoid.right_unit]) 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    45
br (surjective_pairing RS sym) 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    46
qed "prod_right_unit";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    47
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    48
goalw thy [times_prod_def, inv_prod_def, one_prod_def] "inv x * x = (1::'a::group*'b::group)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    49
by (simp_tac (prod_ss addsimps [left_inv]) 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    50
qed "prod_left_inv";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    51
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    52
goalw thy [times_prod_def] "x * y = y * (x::'a::agroup*'b::agroup)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    53
by (simp_tac (prod_ss addsimps [commut]) 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    54
qed "prod_commut";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    55
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    56
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    57
(* function spaces *)
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    58
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    59
goalw thy [times_fun_def] "(x * y) * z = x * (y * (z::'a => 'b::semigroup))";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    60
by (stac expand_fun_eq 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    61
br allI 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    62
br assoc 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    63
qed "fun_assoc";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    64
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    65
goalw thy [times_fun_def, one_fun_def] "1 * x = (x::'a => 'b::monoid)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    66
by (stac expand_fun_eq 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    67
br allI 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    68
br Monoid.left_unit 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    69
qed "fun_left_unit";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    70
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    71
goalw thy [times_fun_def, one_fun_def] "x * 1 = (x::'a => 'b::monoid)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    72
by (stac expand_fun_eq 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    73
br allI 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    74
br Monoid.right_unit 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    75
qed "fun_right_unit";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    76
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    77
goalw thy [times_fun_def, inv_fun_def, one_fun_def] "inv x * x = (1::'a => 'b::group)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    78
by (stac expand_fun_eq 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    79
br allI 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    80
br left_inv 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    81
qed "fun_left_inv";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    82
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    83
goalw thy [times_fun_def] "x * y = y * (x::'a => 'b::agroup)";
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    84
by (stac expand_fun_eq 1);
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    85
br allI 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    86
br commut 1;
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    87
qed "fun_commut";