Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
What's the name of the structure which has an element that absorbs the others like 0*1 = 0 ?
Monoid only have an identity object which is 1 in the case of the monoid (a, *, 1), right?
what is the structure (a, *, 1, 0) where 1 is the identity object and 0 the absorbing object?
Oh, sorry, now I see what you mean :sweat_smile:
I'm not aware of a special name for the structure, it will just be a semigroup or whatever with an absorbing element
oh okay! Thanks :P
Would something like
absorbingElement :: (Num a, Monoid a) => a
absorbingElement = mempty - mempty
be a good approach?
@Bolt Theoretically, nothing is stopping me from implementing NonZero type and giving it Num and Monoid instance, does it?
you're right :frown:
I'll just go with this approach: http://hackage.haskell.org/package/zero-0.1.5/docs/Data-Zero.html
@Bolt I've sometimes seen that called an "annihilating element"
You might be looking for a ring or some slight weakening/strengthening of that concept
@Bolt I think the literature calls that a "monoid with zero", but that's equivalent to "monoid with absorbing element" or "monoid with annihilator"
Yes, I found semigroups with zero
Category Theory is a trivial Category Theory
@Emily Pillmore I guess "Abstract" in that topic name is not "abstract" enough for this comment :smiley:
just upon the concept of a near-semiring, which is equipped with an absorbing element, in case that helps