Hello
I am wondering if there's a well known algebraic structure which follows the following patterns. Let's call it S:
It's update-able with some opaque "a" (which can be an element or an operation with an element):
update :: S -> a -> S
There's a well defined zero for it:
empty :: S
Operations on it are idempotent:
update s a == update (update s a) a
Every S can be reconstructed from a sequence of updates:
forall s. exists [a]. s == foldl update empty [a]
An example of this would be Data.Set:
empty = Set.empty
update = flip Set.insert
Is there something like this in algebra?
Cheers,
Gleb