src/HOL/Algebra/Ring.thy
changeset 28823 dcbef866c9e2
parent 27933 4b867f6a65d3
child 29237 e90d9d51106b
equal deleted inserted replaced
28822:7ca11ecbc4fb 28823:dcbef866c9e2
     3   Id:        $Id$
     3   Id:        $Id$
     4   Author:    Clemens Ballarin, started 9 December 1996
     4   Author:    Clemens Ballarin, started 9 December 1996
     5   Copyright: Clemens Ballarin
     5   Copyright: Clemens Ballarin
     6 *)
     6 *)
     7 
     7 
     8 theory Ring imports FiniteProduct
     8 theory Ring
       
     9 imports FiniteProduct
     9 uses ("ringsimp.ML") begin
    10 uses ("ringsimp.ML") begin
    10 
    11 
    11 
    12 
    12 section {* The Algebraic Hierarchy of Rings *}
    13 section {* The Algebraic Hierarchy of Rings *}
    13 
    14 
   186   assumes cg: "comm_group \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"
   187   assumes cg: "comm_group \<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"
   187   shows "abelian_group G"
   188   shows "abelian_group G"
   188 proof -
   189 proof -
   189   interpret comm_group ["\<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"]
   190   interpret comm_group ["\<lparr>carrier = carrier G, mult = add G, one = zero G\<rparr>"]
   190     by (rule cg)
   191     by (rule cg)
   191   show "abelian_group G" by (unfold_locales)
   192   show "abelian_group G" ..
   192 qed
   193 qed
   193 
   194 
   194 
   195 
   195 subsection {* Sums over Finite Sets *}
   196 subsection {* Sums over Finite Sets *}
   196 
   197 
   390   by (auto intro: ring.intro
   391   by (auto intro: ring.intro
   391     abelian_group.axioms ring_axioms.intro assms)
   392     abelian_group.axioms ring_axioms.intro assms)
   392 
   393 
   393 lemma (in ring) is_abelian_group:
   394 lemma (in ring) is_abelian_group:
   394   "abelian_group R"
   395   "abelian_group R"
   395   by unfold_locales
   396   ..
   396 
   397 
   397 lemma (in ring) is_monoid:
   398 lemma (in ring) is_monoid:
   398   "monoid R"
   399   "monoid R"
   399   by (auto intro!: monoidI m_assoc)
   400   by (auto intro!: monoidI m_assoc)
   400 
   401 
   668 text {* Field would not need to be derived from domain, the properties
   669 text {* Field would not need to be derived from domain, the properties
   669   for domain follow from the assumptions of field *}
   670   for domain follow from the assumptions of field *}
   670 lemma (in cring) cring_fieldI:
   671 lemma (in cring) cring_fieldI:
   671   assumes field_Units: "Units R = carrier R - {\<zero>}"
   672   assumes field_Units: "Units R = carrier R - {\<zero>}"
   672   shows "field R"
   673   shows "field R"
   673 proof unfold_locales
   674 proof
   674   from field_Units
   675   from field_Units
   675   have a: "\<zero> \<notin> Units R" by fast
   676   have a: "\<zero> \<notin> Units R" by fast
   676   have "\<one> \<in> Units R" by fast
   677   have "\<one> \<in> Units R" by fast
   677   from this and a
   678   from this and a
   678   show "\<one> \<noteq> \<zero>" by force
   679   show "\<one> \<noteq> \<zero>" by force