-
Notifications
You must be signed in to change notification settings - Fork 251
opposite of a Ring
#1900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opposite of a Ring
#1900
Changes from 3 commits
09f7409
a681dc7
2b93bbf
69d0dff
92305c2
0d2a36d
22b5b22
e54f2a7
3891c16
7c592c1
83cb803
46aa741
0575c70
a0f96d8
3b0923c
d23bc6f
5baffde
1fbffab
a0d1107
08cdea6
64fb403
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,14 @@ module _ (≈ : Rel A ℓ) (∙ : Op₂ A) where | |
inverse : Inverse ≈ ε ⁻¹ ∙ → Inverse ≈ ε ⁻¹ (flip ∙) | ||
inverse inv = Prod.swap inv | ||
|
||
zero : Zero ≈ ε ∙ → Zero ≈ ε (flip ∙) | ||
zero zer = Prod.swap zer | ||
|
||
module _ (+ : Op₂ A) where | ||
|
||
distributes : (≈ DistributesOver ∙) + → (≈ DistributesOver (flip ∙)) + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other thing we could do to make this is a little nicer is to import There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah... will now turn to this. And it seems that this applies throughout, even to the original module contents: so I've now named each previously anonymous module, and opened it locally in place with the appropriate arguments. is this better now? See most recent commit. |
||
distributes distrib = Prod.swap distrib | ||
|
||
------------------------------------------------------------------------ | ||
-- Structures | ||
|
||
|
@@ -163,6 +171,23 @@ module _ {≈ : Rel A ℓ} {∙ : Op₂ A} where | |
} | ||
where module g = IsAbelianGroup g | ||
|
||
module _ {≈ : Rel A ℓ} {+ * : Op₂ A} { - : Op₁ A} {0# 1# : A} where | ||
|
||
isRing : IsRing ≈ + * - 0# 1# → IsRing ≈ + (flip *) - 0# 1# | ||
isRing r = record | ||
{ +-isAbelianGroup = r-isAbelianGroup | ||
; *-cong = preserves₂ ≈ ≈ ≈ r.*-cong | ||
; *-assoc = associative ≈ * sym r.*-assoc | ||
; *-identity = identity ≈ * r.*-identity | ||
; distrib = distributes ≈ * + r.distrib | ||
; zero = zero ≈ * r.zero | ||
} | ||
where | ||
module r = IsRing r | ||
r-isAbelianGroup = r.+-isAbelianGroup | ||
jamesmckinna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
open IsAbelianGroup r-isAbelianGroup using (sym) | ||
MatthewDaggitt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
------------------------------------------------------------------------ | ||
-- Bundles | ||
|
||
|
@@ -239,3 +264,7 @@ group g = record { isGroup = isGroup g.isGroup } | |
abelianGroup : AbelianGroup a ℓ → AbelianGroup a ℓ | ||
abelianGroup g = record { isAbelianGroup = isAbelianGroup g.isAbelianGroup } | ||
where module g = AbelianGroup g | ||
|
||
ring : Ring a ℓ → Ring a ℓ | ||
ring r = record { isRing = isRing r.isRing } | ||
where module r = Ring r |
Uh oh!
There was an error while loading. Please reload this page.