This theory develops the theory of commutative rings. We define the commutative_ring locale, characterize principal ideals, and study the relationship between prime rings, prime ideals, and the absence of zero divisors.
A commutative ring is a ring in which multiplication satisfies the commutativity law. We establish that principal ideals take a simple form in this setting.
A commutative ring is defined as a ring0 in which multiplication is commutative.
locale commutative_ring = ring0 +
assumes commutative: \( M\text{ is commutative on }R \)
For any element \(x\) of a commutative ring, the set \(\{x \cdot y \mid y \in R\}\) is an ideal of the ring.
lemma (in commutative_ring) mult_by_elem:
assumes \( x\in R \)
shows \( \{x\cdot y.\ y\in R\}\triangleleft R \)proofIn a commutative ring the principal ideal generated by an element \(x\) equals \(\{x \cdot y \mid y \in R\}\).
theorem (in commutative_ring) principal_ideal:
assumes \( x\in R \)
shows \( \langle \{x\}\rangle _I = \{x \cdot y .\ y \in R\} \)proofWe characterize prime rings in terms of zero divisors and show that the quotient of a ring by a prime ideal is a prime ring, or equivalently, has no zero divisors in the commutative case.
Commutative prime rings are the same as commutative rings with no zero divisors.
lemma (in commutative_ring) prime_ring_zero_divs_1:
assumes \( [R,A,M]\text{ is a prime ring } \)
shows \( \text{HasNoZeroDivs}(R,A,M) \)proofA commutative ring with no zero divisors is a prime ring.
lemma (in commutative_ring) prime_ring_zero_divs_2:
assumes \( \text{HasNoZeroDivs}(R,A,M) \)
shows \( [R,A,M]\text{ is a prime ring } \)proofThe quotient ring of a ring by a prime ideal is a prime ring.
theorem (in ring0) prime_ideal_no_zero_divs:
assumes \( I\triangleleft _pR \)
shows \( [ \text{QuotientBy}(I), \text{QuotientGroupOp}(R, A, I), \text{ProjFun2}(R, \text{QuotientGroupRel}(R, A, I), M)]\text{ is a prime ring } \)proofIn a commutative ring, the quotient by a prime ideal has no zero divisors. This is a specialization of prime_ideal_no_zero_divs using commutativity to convert the prime ring condition directly into the no-zero-divisors property.
theorem (in commutative_ring) comm_prime_ideal_no_zero_divs:
assumes \( I\triangleleft _pR \)
shows \( \text{HasNoZeroDivs}( \text{QuotientBy}(I), \text{QuotientGroupOp}(R,A,I), \text{ProjFun2}(R, \text{QuotientGroupRel}(R,A,I), M)) \)proofassumes \( a\in R \), \( b\in R \)
shows \( a + b \in R \), \( a - b \in R \), \( a\cdot b \in R \), \( a + b = b + a \)assumes \( a\in R \), \( b\in R \), \( c\in R \)
shows \( a + b + c = a + (b + c) \), \( a\cdot b\cdot c = a\cdot (b\cdot c) \)assumes \( a\in R \), \( b\in R \), \( c\in R \)
shows \( a\cdot (b + c) = a\cdot b + a\cdot c \), \( (b + c)\cdot a = b\cdot a + c\cdot a \)assumes \( a\in R \), \( b\in R \)
shows \( a + b \in R \), \( a - b \in R \), \( a\cdot b \in R \), \( a + b = b + a \)assumes \( \forall x\in I.\ \forall y\in I.\ x + y\in I \), \( \forall x\in I.\ \forall y\in R.\ x\cdot y \in I \), \( \forall x\in I.\ \forall y\in R.\ y\cdot x \in I \), \( I \subseteq R \), \( I\neq 0 \)
shows \( I\triangleleft R \)assumes \( a\in R \)
shows \( ( - a) \in R \), \( ( - ( - a)) = a \), \( a + 0 = a \), \( 0 + a = a \), \( a\cdot 1 = a \), \( 1 \cdot a = a \), \( a - a = 0 \), \( a - 0 = a \), \( 2 \cdot a = a + a \), \( ( - a) + a = 0 \)assumes \( X\subseteq I \), \( I \triangleleft R \)
shows \( \langle X\rangle _I \subseteq I \)assumes \( x\in R \)
shows \( \{x\cdot y.\ y\in R\}\triangleleft R \)assumes \( I \triangleleft R \), \( x\in I \), \( y\in R \)
shows \( x\cdot y \in I \), \( y\cdot x \in I \)assumes \( x\in R \)
shows \( 0 \cdot x = 0 \), \( x\cdot 0 = 0 \)assumes \( I\triangleleft R \)
shows \( \text{equiv}(R, \text{QuotientGroupRel}(R,A,I)) \)assumes \( I\triangleleft R \)
shows \( \text{Congruent2}( \text{QuotientGroupRel}(R, A, I),M) \) and \( \text{IsAmonoid}( \text{QuotientBy}(I), \text{ProjFun2}(R, \text{QuotientGroupRel}(R,A,I), M)) \)assumes \( \text{equiv}(A,r) \) and \( \text{Congruent2}(r,f) \) and \( x\in A \), \( y\in A \)
shows \( \text{ProjFun2}(A,r,f)\langle r\{x\},r\{y\}\rangle = r\{f\langle x,y\rangle \} \)assumes \( \text{IsAnormalSubgroup}(G,P,H) \) and \( a\in G \) and \( r = \text{QuotientGroupRel}(G,P,H) \) and \( \text{ TheNeutralElement}(G//r, \text{QuotientGroupOp}(G,P,H)) = e \)
shows \( r\{a\} = e \longleftrightarrow a\in H \)assumes \( I\triangleleft R \)
shows \( \text{IsAnormalSubgroup}(R,A,I) \)assumes \( P\triangleleft _pR \)
shows \( \forall x\in R.\ \forall y\in R.\ (\forall z\in R.\ x\cdot z\cdot y\in P) \longrightarrow x\in P \vee y\in P \)