Skip to content

Commit d38e964

Browse files
authored
Mess around with IsSemiringWithoutOne reexports (#2499)
* Mess around with IsSemiringWithoutOne reexports It was missing several and had some duplicated, which was causing problems when trying to use those names I don't know how to changelog this * Add changelog note
1 parent 8d5403a commit d38e964

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ Non-backwards compatible changes
2323

2424
* In `Data.List.Relation.Binary.Sublist.Propositional.Properties` the implicit module parameters `a` and `A` have been replaced with `variable`s. This should be a backwards compatible change for the overwhelming majority of uses, and would only be non-backwards compatible if you were explicitly supplying these implicit parameters for some reason when importing the module. Explicitly supplying the implicit parameters for functions exported from the module should not be affected.
2525

26+
* The names exposed by the `IsSemiringWithoutOne` record have been altered to
27+
better correspond to other algebraic structures. In particular:
28+
* `Carrier` is no longer exposed.
29+
* Several laws have been re-exposed from `IsCommutativeMonoid +` renaming
30+
them to name the operation `+`.
31+
* `distribˡ` and `distribʳ` are defined in the record.
32+
2633
Minor improvements
2734
------------------
2835

src/Algebra/Structures.agda

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,15 +415,22 @@ record IsSemiringWithoutOne (+ * : Op₂ A) (0# : A) : Set (a ⊔ ℓ) where
415415
zero : Zero 0# *
416416

417417
open IsCommutativeMonoid +-isCommutativeMonoid public
418-
using (setoid)
418+
using (setoid; isEquivalence)
419419
renaming
420-
( comm to +-comm
420+
( ∙-cong to +-cong
421+
; ∙-congˡ to +-congˡ
422+
; ∙-congʳ to +-congʳ
423+
; assoc to +-assoc
424+
; identity to +-identity
425+
; identityˡ to +-identityˡ
426+
; identityʳ to +-identityʳ
427+
; comm to +-comm
421428
; isMonoid to +-isMonoid
422429
; isCommutativeMagma to +-isCommutativeMagma
423430
; isCommutativeSemigroup to +-isCommutativeSemigroup
424431
)
425432

426-
open Setoid setoid public
433+
open IsEquivalence isEquivalence public
427434

428435
*-isMagma : IsMagma *
429436
*-isMagma = record
@@ -444,6 +451,12 @@ record IsSemiringWithoutOne (+ * : Op₂ A) (0# : A) : Set (a ⊔ ℓ) where
444451
; ∙-congʳ to *-congʳ
445452
)
446453

454+
distribˡ : * DistributesOverˡ +
455+
distribˡ = proj₁ distrib
456+
457+
distribʳ : * DistributesOverʳ +
458+
distribʳ = proj₂ distrib
459+
447460
zeroˡ : LeftZero 0# *
448461
zeroˡ = proj₁ zero
449462

0 commit comments

Comments
 (0)