-
Notifications
You must be signed in to change notification settings - Fork 260
Mess around with IsSemiringWithoutOne reexports #2499
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
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -415,15 +415,22 @@ record IsSemiringWithoutOne (+ * : Op₂ A) (0# : A) : Set (a ⊔ ℓ) where | |
| zero : Zero 0# * | ||
|
|
||
| open IsCommutativeMonoid +-isCommutativeMonoid public | ||
| using (setoid) | ||
| using (setoid; isEquivalence) | ||
| renaming | ||
| ( comm to +-comm | ||
| ( ∙-cong to +-cong | ||
| ; ∙-congˡ to +-congˡ | ||
| ; ∙-congʳ to +-congʳ | ||
| ; assoc to +-assoc | ||
| ; identity to +-identity | ||
| ; identityˡ to +-identityˡ | ||
| ; identityʳ to +-identityʳ | ||
| ; comm to +-comm | ||
| ; isMonoid to +-isMonoid | ||
| ; isCommutativeMagma to +-isCommutativeMagma | ||
| ; isCommutativeSemigroup to +-isCommutativeSemigroup | ||
| ) | ||
|
|
||
| open Setoid setoid public | ||
| open IsEquivalence isEquivalence public | ||
|
Contributor
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. Doesn't this removal of
Member
Author
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. Yes, this is intentional - no other structure exposes
Contributor
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. [UPDATED}
Contributor
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. Re: the export of |
||
|
|
||
| *-isMagma : IsMagma * | ||
| *-isMagma = record | ||
|
|
@@ -444,6 +451,12 @@ record IsSemiringWithoutOne (+ * : Op₂ A) (0# : A) : Set (a ⊔ ℓ) where | |
| ; ∙-congʳ to *-congʳ | ||
| ) | ||
|
|
||
| distribˡ : * DistributesOverˡ + | ||
| distribˡ = proj₁ distrib | ||
|
|
||
| distribʳ : * DistributesOverʳ + | ||
| distribʳ = proj₂ distrib | ||
|
|
||
|
Comment on lines
+454
to
+459
Contributor
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. These additions make sense, but if you are going to make them, then perhaps you should re-export them downstream from eg |
||
| zeroˡ : LeftZero 0# * | ||
| zeroˡ = proj₁ zero | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd double down on @Taneb 's suggestions, and remove the
setoidexport entirely. As noted in my longer meta-comment, I think it's a design error for aStructureto export a sub-Bundle... one to chalk up to my relative inexperience/lack of understanding when raising and then tackling #1917 which caused all this in the first place. hey-ho!