Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,7 @@ Other minor changes
record Quasigroup c ℓ : Set (suc (c ⊔ ℓ))
record RawLoop c ℓ : Set (suc (c ⊔ ℓ))
record Loop c ℓ : Set (suc (c ⊔ ℓ))
record RingWithoutOne c ℓ : Set (suc (c ⊔ ℓ))
```
and the existing record `Lattice` now provides
```agda
Expand Down Expand Up @@ -805,6 +806,7 @@ Other minor changes
record IsInvertibleUnitalMagma (_∙_ : Op₂ A) (ε : A) (⁻¹ : Op₁ A) : Set (a ⊔ ℓ)
record IsQuasigroup (∙ \\ // : Op₂ A) : Set (a ⊔ ℓ)
record IsLoop (∙ \\ // : Op₂ A) (ε : A) : Set (a ⊔ ℓ)
record IsRingWithoutOne (+ * : Op₂ A) (-_ : Op₁ A) (0# : A) : Set (a ⊔ ℓ)
```
and the existing record `IsLattice` now provides
```
Expand Down
34 changes: 34 additions & 0 deletions src/Algebra/Bundles.agda
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,40 @@ record CancellativeCommutativeSemiring c ℓ : Set (suc (c ⊔ ℓ)) where
; _≉_
)

------------------------------------------------------------------------
-- Bundles with 2 binary operations, 1 unary operation & 1 element
------------------------------------------------------------------------

record RingWithoutOne c ℓ : Set (suc (c ⊔ ℓ)) where
infix 8 -_
infixl 7 _*_
infixl 6 _+_
infix 4 _≈_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ
_+_ : Op₂ Carrier
_*_ : Op₂ Carrier
-_ : Op₁ Carrier
0# : Carrier
isRingWithoutOne : IsRingWithoutOne _≈_ _+_ _*_ -_ 0#

open IsRingWithoutOne isRingWithoutOne public

+-abelianGroup : AbelianGroup _ _
+-abelianGroup = record { isAbelianGroup = +-isAbelianGroup }

*-semigroup : Semigroup _ _
*-semigroup = record { isSemigroup = *-isSemigroup }

open AbelianGroup +-abelianGroup public
using () renaming (group to +-group; invertibleMagma to +-invertibleMagma; invertibleUnitalMagma to +-invertibleUnitalMagma)

open Semigroup *-semigroup public
using () renaming
( rawMagma to *-rawMagma
; magma to *-magma
)

------------------------------------------------------------------------
-- Bundles with 2 binary operations, 1 unary operation & 2 elements
Expand Down
67 changes: 67 additions & 0 deletions src/Algebra/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,74 @@ record IsCancellativeCommutativeSemiring (+ * : Op₂ A) (0# 1# : A) : Set (a

open IsCommutativeSemiring isCommutativeSemiring public

------------------------------------------------------------------------
-- Structures with 2 binary operations, 1 unary operation & 1 element
------------------------------------------------------------------------

record IsRingWithoutOne (+ * : Op₂ A) (-_ : Op₁ A) (0# : A) : Set (a ⊔ ℓ) where
field
+-isAbelianGroup : IsAbelianGroup + 0# -_
*-cong : Congruent₂ *
*-assoc : Associative *
distrib : * DistributesOver +
zero : Zero 0# *

open IsAbelianGroup +-isAbelianGroup public
renaming
( assoc to +-assoc
; ∙-cong to +-cong
; ∙-congˡ to +-congˡ
; ∙-congʳ to +-congʳ
; identity to +-identity
; identityˡ to +-identityˡ
; identityʳ to +-identityʳ
; inverse to -‿inverse
; inverseˡ to -‿inverseˡ
; inverseʳ to -‿inverseʳ
; ⁻¹-cong to -‿cong
; comm to +-comm
; isMagma to +-isMagma
; isSemigroup to +-isSemigroup
; isMonoid to +-isMonoid
; isUnitalMagma to +-isUnitalMagma
; isCommutativeMagma to +-isCommutativeMagma
; isCommutativeMonoid to +-isCommutativeMonoid
; isCommutativeSemigroup to +-isCommutativeSemigroup
; isInvertibleMagma to +-isInvertibleMagma
; isInvertibleUnitalMagma to +-isInvertibleUnitalMagma
; isGroup to +-isGroup
)

*-isMagma : IsMagma *
*-isMagma = record
{ isEquivalence = isEquivalence
; ∙-cong = *-cong
}

zeroˡ : LeftZero 0# *
zeroˡ = proj₁ zero

zeroʳ : RightZero 0# *
zeroʳ = proj₂ zero

distribˡ : * DistributesOverˡ +
distribˡ = proj₁ distrib

distribʳ : * DistributesOverʳ +
distribʳ = proj₂ distrib

*-isSemigroup : IsSemigroup *
*-isSemigroup = record
{ isMagma = *-isMagma
; assoc = *-assoc
}

open IsMagma *-isMagma public
using ()
renaming
( ∙-congˡ to *-congˡ
; ∙-congʳ to *-congʳ
)

------------------------------------------------------------------------
-- Structures with 2 binary operations, 1 unary operation & 2 elements
Expand Down