Skip to content
Merged
Changes from 1 commit
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
17 changes: 17 additions & 0 deletions src/Algebra/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,23 @@ record IsAbelianGroup (∙ : Op₂ A)
-- Structures with 2 binary operations & 1 element
------------------------------------------------------------------------

-- In what follows, for all the `IsXRing` structures, there is a
-- fundamental representation problem, namely how to associate the
-- multiplicative structure to the additive, in such a way as to avoid
-- the possibility of ambiguity as to the underlying `IsEquivalence`
-- substructure which is to be *shared* between the two operations.

-- The `stdlib` designers have chosen to privilege the underlying
-- *additive* structure over the multiplicative: thus for structure
-- `IsNearSemiring` defined here, the additive structure is declared
-- via a field `+-isMonoid : IsMonoid + 0#`, while the multiplicative
-- is given 'unbundled' as the *components* of an `IsMagma *` structure,
-- namely as an operation satisfying both `*-cong : Congruent₂ *` and
-- also `*-assoc : Associative *`, from which the corresponding `IsMagma *`
-- may then be immediately derived.

-- Similar considerations apply to all of the `Ring`-like structures below.

record IsNearSemiring (+ * : Op₂ A) (0# : A) : Set (a ⊔ ℓ) where
field
+-isMonoid : IsMonoid + 0#
Expand Down