Skip to content

Modified quaternion algebra documentation #37557

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

Merged
merged 4 commits into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6360,7 +6360,8 @@ REFERENCES:
.. [Voi2012] \J. Voight. Identifying the matrix ring: algorithms for
quaternion algebras and quadratic forms, to appear.

.. [Voi2021] \J. Voight. Quaternion algebras, Springer Nature (2021).
.. [Voi2021] \J. Voight. Quaternion Algebras. Graduate Texts in
Mathematics 288. Springer Cham, 2021.

.. [VS06] \G.D. Villa Salvador. Topics in the Theory of Algebraic Function
Fields. Birkh\"auser, 2006.
Expand Down
37 changes: 18 additions & 19 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,13 +1809,12 @@ def discriminant(self):

return (MatrixSpace(QQ, 4, 4)(L)).determinant().sqrt()

def is_maximal(self):
def is_maximal(self) -> bool:
r"""
Check whether the order of ``self`` is maximal in the ambient quaternion algebra.

Only works in quaternion algebras over number fields

OUTPUT: Boolean
Only implemented for quaternion algebras over number fields; for reference,
see Theorem 15.5.5 in [Voi2021]_.

EXAMPLES::

Expand Down Expand Up @@ -2552,8 +2551,7 @@ def random_element(self, *args, **kwds):

sage: B.<i,j,k> = QuaternionAlgebra(211)
sage: I = B.ideal([1, 1/4*j, 20*(i+k), 2/3*i])
sage: x = I.random_element() # random
sage: x in I
sage: I.random_element() in I
True
"""
return sum(ZZ.random_element(*args, **kwds) * g for g in self.gens())
Expand Down Expand Up @@ -3277,14 +3275,14 @@ def cyclic_right_subideals(self, p, alpha=None):
ans.append(J)
return ans

def is_integral(self):
def is_integral(self) -> bool:
r"""
Check if a quaternion fractional ideal is integral. An ideal in a quaternion algebra is
said integral if it is contained in its left order. If the left order is already defined it just
check the definition, otherwise it uses one of the alternative definition of Lemma 16.2.8 of
[Voi2021]_.
Check whether the quaternion fractional ideal ``self`` is integral.

OUTPUT: a boolean.
An ideal in a quaternion algebra is integral if and only if it is
contained in its left order. If the left order is already defined
this method just checks this definition, otherwise it uses one
of the alternative definitions from Lemma 16.2.8 of [Voi2021]_.

EXAMPLES::

Expand Down Expand Up @@ -3313,7 +3311,8 @@ def primitive_decomposition(self):
Let `I` = ``self``. If `I` is an integral left `\mathcal{O}`-ideal return its decomposition
as an equivalent primitive ideal and an integer such that their product is the initial ideal.

OUTPUTS: and quivalent primitive ideal to `I`, i.e. equivalent ideal not contained in `n\mathcal{O}` for any `n>0`, and the smallest integer such that `I \subset g\mathcal{O}`.
OUTPUTS: A primitive ideal equivalent to `I`, i.e. an equivalent ideal not contained
in `n\mathcal{O}` for any `n>0`, and the smallest integer `g` such that `I \subset g\mathcal{O}`.

EXAMPLES::

Expand All @@ -3330,7 +3329,7 @@ def primitive_decomposition(self):

TESTS:

Checks on random crafted ideals that they decompose as expected::
Check that randomly generated ideals decompose as expected::

sage: for d in ( m for m in range(400, 750) if is_squarefree(m) ):
....: A = QuaternionAlgebra(d)
Expand Down Expand Up @@ -3362,13 +3361,13 @@ def primitive_decomposition(self):

return J, g

def is_primitive(self):
def is_primitive(self) -> bool:
r"""
Check if the quaternion fractional ideal is primitive. An integral left
$O$-ideal for some order $O$ is said primitive if for all integers $n > 1$
$I$ is not contained in $nO$.
Check whether the quaternion fractional ideal ``self`` is primitive.

OUTPUT: a boolean.
An integral left `\mathcal{O}`-ideal for some order `\mathcal{O}`
is called primitive if for all integers `n > 1` it is not
contained in `n\mathcal{O}`.

EXAMPLES::

Expand Down
Loading