-
-
Notifications
You must be signed in to change notification settings - Fork 601
Quaternion algebra: bugs in maximal_order
and normalize_basis_at_p
#37217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
When I am running your second code it is giving me an error like below sage: from sage.algebras.quatalg.quaternion_algebra import normalize_basis_at_p
....: A.<i,j,k> = QuaternionAlgebra(-1,-7)
....: e = [A(1), k, j, 1/2 + 1/2*i + 1/2*j + 1/2*k]
....: e_norm = normalize_basis_at_p(e, 2)
....: V = QQ**4
....: V.span([V(x.coefficient_tuple()) for (x,_) in basis]).dimension()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[1], line 6
4 e_norm = normalize_basis_at_p(e, Integer(2))
5 V = QQ**Integer(4)
----> 6 V.span([V(x.coefficient_tuple()) for (x,_) in basis]).dimension()
TypeError: 'function' object is not iterable |
Sorry, copied wrong line from another test. Should be |
I made a PR and then I realized that it was failing for some cases. So I think, I did something wrong, but to confirm that first I have to confirm that the algo which I am understanding is correct, only. So can you please provide me a link to that algorithm ? |
Sure! The basis is evaluated via Algorithms 3.12 from https://arxiv.org/abs/1004.0994, is the only reference I know. |
Steps To Reproduce
Expected Behavior
Actual Behavior
Additional Information
The error can be traced to a supposedly bug for the function$p = 2$ . In fact in the faulty execution it returns a supposed basis of rank $3$ instead of $4$ .
normalize_basis_at_p
whenTrying to debug the function I discovered that actually in some situations it return a list of$4$ vectors with the last two being equal, clearly not a basis! This strange behaviour can be noted also in the examples inserted for the function:
I already tried to solve the issue myself so I insert here some possibly useful notes:
[(-292, -732), (-48, -564), (-436, -768), (-752, -708), (885, 545), (411, -710), (-411, 593), (805, -591), (-921, 353), (409, 96), (394, 873), (353, -722), (730, 830), (-466, -427), (-213, -630), (-511, 608), (493, 880), (105, -709), (-213, 530), (97, 745)]
,maximal_order
to me seem to be implemented correctly and I believe the error is only traceable tonormalize_basis_at_p
(that in fact contains some differences from the original algorithm)I'll still try to solve the issue, so add here eventual updates.
Environment
Checklist
The text was updated successfully, but these errors were encountered: