Ralf Hemmecke wrote:
> 
> On 7/3/19 11:27 AM, Waldek Hebisch wrote:
> > Ralf Hemmecke wrote:
> 
> >> In fact, I would like to show \omega * 2 as the output of \omega +
> >> \omega (ordinal addition), not 2*\omega.
> > 
> > I think that this goes into user control of output.  More precisely
> > standard notation is 2*\omega, and this agrees with other domains.
> > User may wish different output and it is resonable to provide
> > some means for customization.  And that is much more general
> > problem: users should not be forced to change types to get
> > y*x as output for polynomials.  Sometimes x*2 may be better
> > than  2*x...
> 
> Maybe, but since with a domain where coefficients commute with
> variables, that shouldn't be much of a problem.
> However, for SmallOrd, how do I interpret the * in the output 2*omega?
> It can only be the "natural product, right?

Yes.  "natural" product is commutative.

> Coming back to "semiring" operations. Aren't you lying when you claim
> that SmallOrdinal is a SeminRing? Or do the ordinals form indeed a group
> with respect to "natural" addition?

SemiRing means commutative monoid with respect to addition and we
have this.

> 
> In fact, I wonder how the compiler actually creates code for
> 
> 0 == 0$Rep
> 
> , since the representation is PolynomialRing(NNI, %).
> 
> I guess that can only work, because the representation of the 0 of
> PolynomialRing is the empty list. Would it fail, if it were not the
> empty list?

Yes, that is tricky.  It works because we can compute 0 without
looking at the type.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/E1hifBB-0001Eb-Me%40hera.math.uni.wroc.pl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to