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.

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.

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.

Ralf


On 7/31/24 02:43, Waldek Hebisch wrote:
With the patch applied the following gives wrong result (the
last thing should be stream of zero matrices, I get 5 zero
terms and then nonzero terms):

rI := SquareMatrix(2, FRAC(INT))
sT := Stream(rI)
sTO := StreamTaylorSeriesOperations(rI)
m1 := matrix([[0, 1],[0, 0]])$rI
m2 := matrix([[0, 0],[1, 0]])$rI
s1 := construct([3::rI, 0, m1, m2, 1])$sT
rs1 := recip(s1)$sTO;

s2 := construct([1::rI, 1::rI + m1, m2, m2])$sT
rs2 := recip(s2)$sTO;rI := SquareMatrix(2, FRAC(INT))

s3 := (*$sTO)(rs2, s1)
((/$sTO)(s3, s1) - rs2)$sTO

--
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/207c87a8-25bb-4bea-b877-e452d24269ac%40gmail.com.

Reply via email to