On Wed, Jul 31, 2024 at 04:05:07PM +0200, Ralf Hemmecke wrote:
> Before I am going to fix this, I guess I need a discussion of what
> x/y or 1/x is actually supposed to means in a non-commutative ring.
> 
> You probably realized that
> 
> ((*$sTO)(rs1, s3) - rs2)$sTO
> 
> gives the same "wrong" result.

It should be

((*$sTO)(s3, rs1) - rs2)$sTO

and this works without the patch.

> I have nothing against introducing right-/left- division, but / should be
> reserved for the case when  x * y^(-1) = y^(-1) * x otherwise I would leave
> it undefined.

Well, division solves equation x = d*y, so we have d = x * y^(-1).
This definition is necessary to have sane interaction with multiplication.
To do it on the other side is a different operation.  If you look
at definitions in the algebra, FreeDivisionAlgebra, Group and
XPolynomialRing are quite explicit and define x/y as x * y^(-1).
In most other cases order does not matter as corresponding
multiplication is commutative.  Possibly the only unclear definition
is the one in StreamTaylorSeriesOperations.

> In other words we should have
> 
> if A has CommutativeRing then
>     "exquo"      : (ST A,ST A) -> Union(ST A,"failed")
>     "/"          : (ST A,ST A) -> ST A
>     recip        : ST A -> UN
> 
> Maybe we can a bit weaker for recip, but I would still require that
> x * recip(x) = recip(x) * x. Otherwise recip should fail.

We have:

      recip : % -> Union(%,"failed")
        ++ recip(a) returns an element, which is both a left and a right
        ++ inverse of \spad{a},
        ++ or \spad{"failed"} if such an element doesn't exist or cannot
        ++ be determined (see unitsKnown).

So yes, x * recip(x) = recip(x) * x = e where e is the unit element
for multiplication.

And once you have recip "/" follows logically.

And we also have 'leftRecip' and 'rightRecip' for cases when inverse
works only on one side.

-- 
                              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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZqpO7Q3-m7T1mMeU%40fricas.org.

Reply via email to