src/HOL/Algebra/Module.thy
author wenzelm
Thu, 22 Dec 2005 00:28:36 +0100
changeset 18457 356a9f711899
parent 16417 9bc16273c2d4
child 19783 82f365a14960
permissions -rw-r--r--
structure ProjectRule; updated auxiliary facts for induct method; tuned proofs;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14706
71590b7733b7 tuned document;
wenzelm
parents: 14651
diff changeset
     1
(*  Title:      HOL/Algebra/Module.thy
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
     2
    ID:         $Id$
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
     3
    Author:     Clemens Ballarin, started 15 April 2003
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
     4
    Copyright:  Clemens Ballarin
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
     5
*)
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
     6
14577
dbb95b825244 tuned document;
wenzelm
parents: 13975
diff changeset
     7
header {* Modules over an Abelian Group *}
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
     8
16417
9bc16273c2d4 migrated theory headers to new format
haftmann
parents: 15095
diff changeset
     9
theory Module imports CRing begin
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    10
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    11
record ('a, 'b) module = "'b ring" +
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    12
  smult :: "['a, 'b] => 'b" (infixl "\<odot>\<index>" 70)
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    13
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    14
locale module = cring R + abelian_group M +
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    15
  assumes smult_closed [simp, intro]:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    16
      "[| a \<in> carrier R; x \<in> carrier M |] ==> a \<odot>\<^bsub>M\<^esub> x \<in> carrier M"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    17
    and smult_l_distr:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    18
      "[| a \<in> carrier R; b \<in> carrier R; x \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    19
      (a \<oplus> b) \<odot>\<^bsub>M\<^esub> x = a \<odot>\<^bsub>M\<^esub> x \<oplus>\<^bsub>M\<^esub> b \<odot>\<^bsub>M\<^esub> x"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    20
    and smult_r_distr:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    21
      "[| a \<in> carrier R; x \<in> carrier M; y \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    22
      a \<odot>\<^bsub>M\<^esub> (x \<oplus>\<^bsub>M\<^esub> y) = a \<odot>\<^bsub>M\<^esub> x \<oplus>\<^bsub>M\<^esub> a \<odot>\<^bsub>M\<^esub> y"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    23
    and smult_assoc1:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    24
      "[| a \<in> carrier R; b \<in> carrier R; x \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    25
      (a \<otimes> b) \<odot>\<^bsub>M\<^esub> x = a \<odot>\<^bsub>M\<^esub> (b \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    26
    and smult_one [simp]:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    27
      "x \<in> carrier M ==> \<one> \<odot>\<^bsub>M\<^esub> x = x"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    28
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    29
locale algebra = module R M + cring M +
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    30
  assumes smult_assoc2:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    31
      "[| a \<in> carrier R; x \<in> carrier M; y \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    32
      (a \<odot>\<^bsub>M\<^esub> x) \<otimes>\<^bsub>M\<^esub> y = a \<odot>\<^bsub>M\<^esub> (x \<otimes>\<^bsub>M\<^esub> y)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    33
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    34
lemma moduleI:
14651
02b8f3bcf7fe improved notation;
wenzelm
parents: 14577
diff changeset
    35
  includes struct R + struct M
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    36
  assumes cring: "cring R"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    37
    and abelian_group: "abelian_group M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    38
    and smult_closed:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    39
      "!!a x. [| a \<in> carrier R; x \<in> carrier M |] ==> a \<odot>\<^bsub>M\<^esub> x \<in> carrier M"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    40
    and smult_l_distr:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    41
      "!!a b x. [| a \<in> carrier R; b \<in> carrier R; x \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    42
      (a \<oplus> b) \<odot>\<^bsub>M\<^esub> x = (a \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> (b \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    43
    and smult_r_distr:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    44
      "!!a x y. [| a \<in> carrier R; x \<in> carrier M; y \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    45
      a \<odot>\<^bsub>M\<^esub> (x \<oplus>\<^bsub>M\<^esub> y) = (a \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> (a \<odot>\<^bsub>M\<^esub> y)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    46
    and smult_assoc1:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    47
      "!!a b x. [| a \<in> carrier R; b \<in> carrier R; x \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    48
      (a \<otimes> b) \<odot>\<^bsub>M\<^esub> x = a \<odot>\<^bsub>M\<^esub> (b \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    49
    and smult_one:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    50
      "!!x. x \<in> carrier M ==> \<one> \<odot>\<^bsub>M\<^esub> x = x"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    51
  shows "module R M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    52
  by (auto intro: module.intro cring.axioms abelian_group.axioms
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    53
    module_axioms.intro prems)
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    54
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    55
lemma algebraI:
14651
02b8f3bcf7fe improved notation;
wenzelm
parents: 14577
diff changeset
    56
  includes struct R + struct M
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    57
  assumes R_cring: "cring R"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    58
    and M_cring: "cring M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    59
    and smult_closed:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    60
      "!!a x. [| a \<in> carrier R; x \<in> carrier M |] ==> a \<odot>\<^bsub>M\<^esub> x \<in> carrier M"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    61
    and smult_l_distr:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    62
      "!!a b x. [| a \<in> carrier R; b \<in> carrier R; x \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    63
      (a \<oplus> b) \<odot>\<^bsub>M\<^esub> x = (a \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> (b \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    64
    and smult_r_distr:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    65
      "!!a x y. [| a \<in> carrier R; x \<in> carrier M; y \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    66
      a \<odot>\<^bsub>M\<^esub> (x \<oplus>\<^bsub>M\<^esub> y) = (a \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> (a \<odot>\<^bsub>M\<^esub> y)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    67
    and smult_assoc1:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    68
      "!!a b x. [| a \<in> carrier R; b \<in> carrier R; x \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    69
      (a \<otimes> b) \<odot>\<^bsub>M\<^esub> x = a \<odot>\<^bsub>M\<^esub> (b \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    70
    and smult_one:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    71
      "!!x. x \<in> carrier M ==> (one R) \<odot>\<^bsub>M\<^esub> x = x"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    72
    and smult_assoc2:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    73
      "!!a x y. [| a \<in> carrier R; x \<in> carrier M; y \<in> carrier M |] ==>
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    74
      (a \<odot>\<^bsub>M\<^esub> x) \<otimes>\<^bsub>M\<^esub> y = a \<odot>\<^bsub>M\<^esub> (x \<otimes>\<^bsub>M\<^esub> y)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    75
  shows "algebra R M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    76
  by (auto intro!: algebra.intro algebra_axioms.intro cring.axioms 
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    77
    module_axioms.intro prems)
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    78
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    79
lemma (in algebra) R_cring:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    80
  "cring R"
14651
02b8f3bcf7fe improved notation;
wenzelm
parents: 14577
diff changeset
    81
  by (rule cring.intro)
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    82
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    83
lemma (in algebra) M_cring:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    84
  "cring M"
14651
02b8f3bcf7fe improved notation;
wenzelm
parents: 14577
diff changeset
    85
  by (rule cring.intro)
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    86
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    87
lemma (in algebra) module:
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    88
  "module R M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    89
  by (auto intro: moduleI R_cring is_abelian_group
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    90
    smult_l_distr smult_r_distr smult_assoc1)
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    91
14651
02b8f3bcf7fe improved notation;
wenzelm
parents: 14577
diff changeset
    92
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    93
subsection {* Basic Properties of Algebras *}
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    94
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    95
lemma (in algebra) smult_l_null [simp]:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
    96
  "x \<in> carrier M ==> \<zero> \<odot>\<^bsub>M\<^esub> x = \<zero>\<^bsub>M\<^esub>"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    97
proof -
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    98
  assume M: "x \<in> carrier M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
    99
  note facts = M smult_closed
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   100
  from facts have "\<zero> \<odot>\<^bsub>M\<^esub> x = (\<zero> \<odot>\<^bsub>M\<^esub> x \<oplus>\<^bsub>M\<^esub> \<zero> \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub> (\<zero> \<odot>\<^bsub>M\<^esub> x)" by algebra
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   101
  also from M have "... = (\<zero> \<oplus> \<zero>) \<odot>\<^bsub>M\<^esub> x \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub> (\<zero> \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   102
    by (simp add: smult_l_distr del: R.l_zero R.r_zero)
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   103
  also from facts have "... = \<zero>\<^bsub>M\<^esub>" by algebra
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   104
  finally show ?thesis .
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   105
qed
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   106
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   107
lemma (in algebra) smult_r_null [simp]:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   108
  "a \<in> carrier R ==> a \<odot>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub> = \<zero>\<^bsub>M\<^esub>";
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   109
proof -
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   110
  assume R: "a \<in> carrier R"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   111
  note facts = R smult_closed
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   112
  from facts have "a \<odot>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub> = (a \<odot>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub> \<oplus>\<^bsub>M\<^esub> a \<odot>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub>) \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub> (a \<odot>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub>)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   113
    by algebra
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   114
  also from R have "... = a \<odot>\<^bsub>M\<^esub> (\<zero>\<^bsub>M\<^esub> \<oplus>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub>) \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub> (a \<odot>\<^bsub>M\<^esub> \<zero>\<^bsub>M\<^esub>)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   115
    by (simp add: smult_r_distr del: M.l_zero M.r_zero)
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   116
  also from facts have "... = \<zero>\<^bsub>M\<^esub>" by algebra
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   117
  finally show ?thesis .
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   118
qed
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   119
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   120
lemma (in algebra) smult_l_minus:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   121
  "[| a \<in> carrier R; x \<in> carrier M |] ==> (\<ominus>a) \<odot>\<^bsub>M\<^esub> x = \<ominus>\<^bsub>M\<^esub> (a \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   122
proof -
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   123
  assume RM: "a \<in> carrier R" "x \<in> carrier M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   124
  note facts = RM smult_closed
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   125
  from facts have "(\<ominus>a) \<odot>\<^bsub>M\<^esub> x = (\<ominus>a \<odot>\<^bsub>M\<^esub> x \<oplus>\<^bsub>M\<^esub> a \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub>(a \<odot>\<^bsub>M\<^esub> x)"
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   126
    by algebra
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   127
  also from RM have "... = (\<ominus>a \<oplus> a) \<odot>\<^bsub>M\<^esub> x \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub>(a \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   128
    by (simp add: smult_l_distr)
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   129
  also from facts smult_l_null have "... = \<ominus>\<^bsub>M\<^esub>(a \<odot>\<^bsub>M\<^esub> x)" by algebra
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   130
  finally show ?thesis .
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   131
qed
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   132
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   133
lemma (in algebra) smult_r_minus:
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   134
  "[| a \<in> carrier R; x \<in> carrier M |] ==> a \<odot>\<^bsub>M\<^esub> (\<ominus>\<^bsub>M\<^esub>x) = \<ominus>\<^bsub>M\<^esub> (a \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   135
proof -
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   136
  assume RM: "a \<in> carrier R" "x \<in> carrier M"
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   137
  note facts = RM smult_closed
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   138
  from facts have "a \<odot>\<^bsub>M\<^esub> (\<ominus>\<^bsub>M\<^esub>x) = (a \<odot>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub>x \<oplus>\<^bsub>M\<^esub> a \<odot>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub>(a \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   139
    by algebra
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   140
  also from RM have "... = a \<odot>\<^bsub>M\<^esub> (\<ominus>\<^bsub>M\<^esub>x \<oplus>\<^bsub>M\<^esub> x) \<oplus>\<^bsub>M\<^esub> \<ominus>\<^bsub>M\<^esub>(a \<odot>\<^bsub>M\<^esub> x)"
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   141
    by (simp add: smult_r_distr)
15095
63f5f4c265dd Theories now take advantage of recent syntax improvements with (structure).
ballarin
parents: 14706
diff changeset
   142
  also from facts smult_r_null have "... = \<ominus>\<^bsub>M\<^esub>(a \<odot>\<^bsub>M\<^esub> x)" by algebra
13936
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   143
  finally show ?thesis .
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   144
qed
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   145
d3671b878828 Greatly extended CRing. Added Module.
ballarin
parents:
diff changeset
   146
end