Thanks for reporting the bug. I opened trac ticket #34733 
<https://trac.sagemath.org/ticket/34733> for this.

On Tuesday, November 8, 2022 at 3:20:51 AM UTC-7 pkopr...@pkoprowski.eu 
wrote:

> Hello everyone,
>
> I just discovered a bug in the polynomial division over quaternion 
> algebras. I don't see it discussed anywhere on the internet, so I believe 
> this is a proper place to report it.
>
> Bug description: the quo_rem method for polynomials with quaternionic 
> coefficients outputs incorrect results. Moreover, there is no way to 
> specify whether we want a right or left division. Here is a specific 
> example. 
>
> # Take the quaternion algebra (-1, -1)_QQ and the ring of polynomials over 
> it:
> HH = QuaternionAlgebra(QQ, -1, -1)
> P.<x> = HH[]
> # Take two polynomials
> f = x^3 + HH.0*x + (HH.1 + 2*HH.2); print("f =", f)
> g = HH.2*x + HH.1 + 3; print("g =", g)
> # Try to compute the quotient and remainder
> q, r = f.quo_rem(g)
> # Check the correctness of the result assuming that this is RIGHT division
> print(q*g + r == f)
> # Check the correctness of the result assuming that this is LEFT division
> print(g*q + r == f)
>
> Both tests output False. Tested on Sage 9.5.
>
> Mathematical background: the division with the remainder for polynomials 
> over division rings is well known and fully described e.g. in [1] even in a 
> more general setting when the variable does not commute with the 
> coefficients (in our case it does commute). So it is just a matter of 
> proper implementation.
>
> *[1] Ore, Oystein*. Theory of non-commutative polynomials. *Ann. of Math. 
> (2)* * 34 * (1933), no. 3, 480--508. MR1503119 
> <https://mathscinet.ams.org/mathscinet-getitem?mr=1503119>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/663c1350-770f-467b-b9af-7275af6a47d7n%40googlegroups.com.

Reply via email to