src/HOL/AxClasses/Group/GroupDefs.ML
author berghofe
Fri, 02 Aug 1996 12:25:26 +0200
changeset 1899 0075a8d26a80
parent 1465 5d7a7e439cec
child 2907 0e272e4c7cb2
permissions -rw-r--r--
Classical tactics now use default claset.
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))";
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    10
by (Fast_tac 1);
1247
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)";
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    14
by (Fast_tac 1);
1247
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)";
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    18
by (Fast_tac 1);
1247
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)";
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    22
by (Fast_tac 1);
1247
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))";
1899
0075a8d26a80 Classical tactics now use default claset.
berghofe
parents: 1465
diff changeset
    26
by (Fast_tac 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    40
by (rtac (surjective_pairing RS sym) 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    45
by (rtac (surjective_pairing RS sym) 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    61
by (rtac allI 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    62
by (rtac assoc 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    67
by (rtac allI 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    68
by (rtac Monoid.left_unit 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    73
by (rtac allI 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    74
by (rtac Monoid.right_unit 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    79
by (rtac allI 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    80
by (rtac left_inv 1);
1247
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);
1465
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    85
by (rtac allI 1);
5d7a7e439cec expanded tabs
clasohm
parents: 1266
diff changeset
    86
by (rtac commut 1);
1247
18b1441fb603 Various axiomatic type class demos;
wenzelm
parents:
diff changeset
    87
qed "fun_commut";