|
|
|
|
|
by mcguire
3295 days ago
|
|
To the first question, a Semiring has two operations, + and × conventionally (along with ...). That seems to be more than length needs. A Monoid is just an operation and its identity, which should be exactly what you need for length. For the second question, traditional (+,×,...) is a Semiring for integers; so is (&,|,...) (bitwise boolean operations). How can you define both Semiring implementations without getting them confused? There is another reply to my comment that I haven't digested yet. Maybe it answers the second. |
|
And I'm wrong about that. You need a zero and a one, right. What would that structure be?