File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -1617,6 +1617,7 @@ Other minor changes
1617
1617
leftSemimedial : LeftSemimedial _∙_
1618
1618
rightSemimedial : RightSemimedial _∙_
1619
1619
middleSemimedial : ∀ x y z → (x ∙ y) ∙ (z ∙ x) ≈ (x ∙ z) ∙ (y ∙ x)
1620
+ semimedial : Semimedial _∙_
1620
1621
```
1621
1622
1622
1623
* Added new proofs to ` Algebra.Properties.Semigroup ` :
@@ -1630,6 +1631,9 @@ Other minor changes
1630
1631
* Added new proofs to ` Algebra.Properties.Ring ` :
1631
1632
``` agda
1632
1633
-1*x≈-x : ∀ x → - 1# * x ≈ - x
1634
+ x+x≈x⇒x≈0 : ∀ x → x + x ≈ x → x ≈ 0#
1635
+ x[y-z]≈xy-xz : ∀ x y z → x * (y - z) ≈ x * y - x * z
1636
+ [y-z]x≈yx-zx : ∀ x y z → (y - z) * x ≈ (y * x) - (z * x)
1633
1637
```
1634
1638
1635
1639
* Added new definitions to ` Algebra.Structures ` :
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ open CommutativeSemigroup CS
16
16
17
17
open import Algebra.Definitions _≈_
18
18
open import Relation.Binary.Reasoning.Setoid setoid
19
+ open import Data.Product
19
20
20
21
------------------------------------------------------------------------------
21
22
-- Re-export the contents of semigroup
@@ -168,3 +169,6 @@ middleSemimedial x y z = begin
168
169
x ∙ ((z ∙ y) ∙ x) ≈⟨ ∙-congˡ ( assoc z y x) ⟩
169
170
x ∙ (z ∙ (y ∙ x)) ≈⟨ sym (assoc x z ((y ∙ x))) ⟩
170
171
(x ∙ z) ∙ (y ∙ x) ∎
172
+
173
+ semimedial : Semimedial _∙_
174
+ semimedial = semimedialˡ , semimedialʳ
Original file line number Diff line number Diff line change 6
6
7
7
{-# OPTIONS --without-K --safe #-}
8
8
9
- open import Algebra
9
+ open import Algebra using (Ring)
10
10
11
11
module Algebra.Properties.Ring {r₁ r₂} (R : Ring r₁ r₂) where
12
12
@@ -15,6 +15,8 @@ open Ring R
15
15
import Algebra.Properties.AbelianGroup as AbelianGroupProperties
16
16
open import Function.Base using (_$_)
17
17
open import Relation.Binary.Reasoning.Setoid setoid
18
+ open import Algebra.Definitions _≈_
19
+ open import Data.Product
18
20
19
21
------------------------------------------------------------------------
20
22
-- Export properties of abelian groups
@@ -67,3 +69,17 @@ open AbelianGroupProperties +-abelianGroup public
67
69
- (1# * x) ≈⟨ -‿cong ( *-identityˡ x ) ⟩
68
70
- x ∎
69
71
72
+ x+x≈x⇒x≈0 : ∀ x → x + x ≈ x → x ≈ 0#
73
+ x+x≈x⇒x≈0 x eq = +-identityˡ-unique x x eq
74
+
75
+ x[y-z]≈xy-xz : ∀ x y z → x * (y - z) ≈ x * y - x * z
76
+ x[y-z]≈xy-xz x y z = begin
77
+ x * (y - z) ≈⟨ distribˡ x y (- z) ⟩
78
+ x * y + x * - z ≈⟨ +-congˡ (sym (-‿distribʳ-* x z)) ⟩
79
+ x * y - x * z ∎
80
+
81
+ [y-z]x≈yx-zx : ∀ x y z → (y - z) * x ≈ (y * x) - (z * x)
82
+ [y-z]x≈yx-zx x y z = begin
83
+ (y - z) * x ≈⟨ distribʳ x y (- z) ⟩
84
+ y * x + - z * x ≈⟨ +-congˡ (sym (-‿distribˡ-* z x)) ⟩
85
+ y * x - z * x ∎
You can’t perform that action at this time.
0 commit comments