Skip to content

Commit

Permalink
Moved code in .is_isomorphic, edited some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
S17A05 committed Feb 2, 2024
1 parent 2de9c56 commit 6e95539
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ def is_definite(self):
"""
Checks whether the quaternion algebra ``self`` is definite, i.e. whether it ramifies at the
unique Archimedean place of its base field QQ. This is the case if and only if both
invariants of ``self`` are negative, see Exercise 2.4(c) in [Voi2021]_.
invariants of ``self`` are negative; see Exercise 2.4(c) in [Voi2021]_.
EXAMPLES::
Expand Down Expand Up @@ -1323,10 +1323,10 @@ def is_isomorphic(self, A) -> bool:
if F != A.base_ring():
raise ValueError("both quaternion algebras must be defined over the same base ring")

Check warning on line 1324 in src/sage/algebras/quatalg/quaternion_algebra.py

View check run for this annotation

Codecov / codecov/patch

src/sage/algebras/quatalg/quaternion_algebra.py#L1324

Added line #L1324 was not covered by tests

try:
if is_RationalField(F):
return self.ramified_places(inf=False) == A.ramified_places(inf=False)
if is_RationalField(F):
return self.ramified_places(inf=False) == A.ramified_places(inf=False)

try:
ram_self = self.ramified_places(inf=True)
ram_A = A.ramified_places(inf=True)
return set(ram_self[0]) == set(ram_A[0]) and ram_self[1] == ram_A[1]
Expand Down Expand Up @@ -2021,7 +2021,8 @@ def is_maximal(self):
r"""
Check whether the order of ``self`` is maximal in the ambient quaternion algebra.
Only works in quaternion algebras over number fields
Only implemented for quaternion algebras over number fields; for reference,
see Theorem 15.5.5 in [Voi2021]_.
OUTPUT: Boolean
Expand Down Expand Up @@ -3268,12 +3269,12 @@ def cyclic_right_subideals(self, p, alpha=None):

def is_integral(self):
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]_.
Checks whether a quaternion fractional ideal is integral. 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]_.
OUTPUT: a boolean.
OUTPUT: A boolean.
EXAMPLES::
Expand Down

0 comments on commit 6e95539

Please sign in to comment.