honoring zero element in a custom algebraic structure

I have a custom multiplicative monoid with a zero element, and I'd like to define an algebra over it such that the monoid's zero is coerced to the algebra's zero.

Let's use the code from https://ask.sagemath.org/question/320... as an illustration. The monoid defined by F = FiniteMonoidFromMultiplicationTable([[0, 0, 0], [0, 1, 1], [0, 1, 2]]) has zero F(0). Now, if I define an algebra A = F.algebra(QQ), it has no idea that A(F(0)) is simply zero. How to adjust the monoid definition to make its zero recognized by the algebra (i.e., A(F(0)) must be the same as A(0))?

For convenience, here is complete example code at sagecell.

edit retag close merge delete

The element $1 \cdot z$ in the algebra (where $z$ is the zero of $F$) is the sum of 1 term, whereas the zero element in the algebra is the sum of zero terms. In SageMath, A(F(0)).monomial_coefficients() is {0 : 1} whereas A.zero().monomial_coefficients() is {}. So there is no way to adjust the monoid definition to achieve what you want.

( 2022-01-16 11:06:56 +0200 )edit

What is an alternative? Can we adjust the definition of algebra or create something on the top of it (to nullify the coefficient of z)? In my monoid I have many divisors of zero, which result in unbounded growth of this coefficient under multiplication of algebra elements.

( 2022-01-16 13:37:34 +0200 )edit

I guess take a quotient, but it doesn't seem to be implemented.

( 2022-01-16 14:16:49 +0200 )edit

@rburning : shouldn't your comments be edited as an answer for the benefit of future users perusing the archives ?

( 2022-01-17 12:49:13 +0200 )edit

@Emmanuel I am hoping that there might still exist a positive answer to the intended question (how to obtain a certain algebraic structure), which I would prefer to my negative answer to the literal question.

( 2022-01-17 13:27:23 +0200 )edit