ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 17 Jan 2022 13:27:23 +0100honoring zero element in a custom algebraic structurehttps://ask.sagemath.org/question/60688/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/32064?answer=32066#post-id-32066 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](https://sagecell.sagemath.org/?q=hhjrbi).Sun, 16 Jan 2022 01:50:48 +0100https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/Comment by rburing for <p>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.</p>
<p>Let's use the code from <a href="https://ask.sagemath.org/question/32064?answer=32066#post-id-32066">https://ask.sagemath.org/question/320...</a> as an illustration. The monoid defined by <code>F = FiniteMonoidFromMultiplicationTable([[0, 0, 0], [0, 1, 1], [0, 1, 2]])</code> has zero <code>F(0)</code>. Now, if I define an algebra <code>A = F.algebra(QQ)</code>, it has no idea that <code>A(F(0))</code> is simply zero. How to adjust the monoid definition to make its zero recognized by the algebra (i.e., <code>A(F(0))</code> must be the same as <code>A(0)</code>)? </p>
<p>For convenience, here is <a href="https://sagecell.sagemath.org/?q=hhjrbi">complete example code at sagecell</a>.</p>
https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60707#post-id-60707@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.Mon, 17 Jan 2022 13:27:23 +0100https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60707#post-id-60707Comment by Emmanuel Charpentier for <p>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.</p>
<p>Let's use the code from <a href="https://ask.sagemath.org/question/32064?answer=32066#post-id-32066">https://ask.sagemath.org/question/320...</a> as an illustration. The monoid defined by <code>F = FiniteMonoidFromMultiplicationTable([[0, 0, 0], [0, 1, 1], [0, 1, 2]])</code> has zero <code>F(0)</code>. Now, if I define an algebra <code>A = F.algebra(QQ)</code>, it has no idea that <code>A(F(0))</code> is simply zero. How to adjust the monoid definition to make its zero recognized by the algebra (i.e., <code>A(F(0))</code> must be the same as <code>A(0)</code>)? </p>
<p>For convenience, here is <a href="https://sagecell.sagemath.org/?q=hhjrbi">complete example code at sagecell</a>.</p>
https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60706#post-id-60706@`rburning` : shouldn't your comments be edited as an **answer** for the benefit of future users perusing the archives ?Mon, 17 Jan 2022 12:49:13 +0100https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60706#post-id-60706Comment by rburing for <p>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.</p>
<p>Let's use the code from <a href="https://ask.sagemath.org/question/32064?answer=32066#post-id-32066">https://ask.sagemath.org/question/320...</a> as an illustration. The monoid defined by <code>F = FiniteMonoidFromMultiplicationTable([[0, 0, 0], [0, 1, 1], [0, 1, 2]])</code> has zero <code>F(0)</code>. Now, if I define an algebra <code>A = F.algebra(QQ)</code>, it has no idea that <code>A(F(0))</code> is simply zero. How to adjust the monoid definition to make its zero recognized by the algebra (i.e., <code>A(F(0))</code> must be the same as <code>A(0)</code>)? </p>
<p>For convenience, here is <a href="https://sagecell.sagemath.org/?q=hhjrbi">complete example code at sagecell</a>.</p>
https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60697#post-id-60697I guess take a quotient, but it doesn't seem to be implemented.Sun, 16 Jan 2022 14:16:49 +0100https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60697#post-id-60697Comment by Max Alekseyev for <p>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.</p>
<p>Let's use the code from <a href="https://ask.sagemath.org/question/32064?answer=32066#post-id-32066">https://ask.sagemath.org/question/320...</a> as an illustration. The monoid defined by <code>F = FiniteMonoidFromMultiplicationTable([[0, 0, 0], [0, 1, 1], [0, 1, 2]])</code> has zero <code>F(0)</code>. Now, if I define an algebra <code>A = F.algebra(QQ)</code>, it has no idea that <code>A(F(0))</code> is simply zero. How to adjust the monoid definition to make its zero recognized by the algebra (i.e., <code>A(F(0))</code> must be the same as <code>A(0)</code>)? </p>
<p>For convenience, here is <a href="https://sagecell.sagemath.org/?q=hhjrbi">complete example code at sagecell</a>.</p>
https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60696#post-id-60696What 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.Sun, 16 Jan 2022 13:37:34 +0100https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60696#post-id-60696Comment by rburing for <p>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.</p>
<p>Let's use the code from <a href="https://ask.sagemath.org/question/32064?answer=32066#post-id-32066">https://ask.sagemath.org/question/320...</a> as an illustration. The monoid defined by <code>F = FiniteMonoidFromMultiplicationTable([[0, 0, 0], [0, 1, 1], [0, 1, 2]])</code> has zero <code>F(0)</code>. Now, if I define an algebra <code>A = F.algebra(QQ)</code>, it has no idea that <code>A(F(0))</code> is simply zero. How to adjust the monoid definition to make its zero recognized by the algebra (i.e., <code>A(F(0))</code> must be the same as <code>A(0)</code>)? </p>
<p>For convenience, here is <a href="https://sagecell.sagemath.org/?q=hhjrbi">complete example code at sagecell</a>.</p>
https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60694#post-id-60694The 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.Sun, 16 Jan 2022 11:06:56 +0100https://ask.sagemath.org/question/60688/honoring-zero-element-in-a-custom-algebraic-structure/?comment=60694#post-id-60694