Hi,

DirectProducts can be created with the unitVector function.

However, I find the respective condition in DirectProductCategory that
the argument domain must be of type Ring a bit restrictive.

https://github.com/hemmecke/fricas/blob/master-hemmecke/src/algebra/vector.spad#L276

         if R has Ring then
           BiModule(R, R)
           DifferentialExtension R
           FullyLinearlyExplicitRingOver R
           unitVector : PositiveInteger -> %
             ++ unitVector(n) produces a vector with 1 in position n and
             ++ zero elsewhere.

What is needed for this function is 0 and 1 and that is clearly already
in SemiRing or even in Join(AbelianMonoid, Monoid). And since nothing
more is claimed for unitVector it would even be sufficient to do
something lik

  ZeroOne ==> with (0: %, 1: %)
  if R has ZeroOne then
      unitVector : PositiveInteger -> %
          ++ unitVector(n) produces a vector with 1 in position n and
          ++ zero elsewhere.

Given that NNI is used for exponent vectors, having unitVector exported
wouldn't be that bad.

Ralf

(56) -> NonNegativeInteger has Monoid

   (56)  true
                           Type: Boolean
(57) -> NonNegativeInteger has Ring

   (57)  false
                           Type: Boolean
(58) -> NonNegativeInteger has SemiRing

   (58)  true
                           Type: Boolean

-- 
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].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to