Skip to content

Commit

Permalink
Type check is_isomorphic
Browse files Browse the repository at this point in the history
Added a type check to .is_isomorphic to ensure that A is a quaternion algebra of the form (a,b)_K.
  • Loading branch information
S17A05 committed Jan 20, 2024
1 parent d3173af commit e3e69c2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,9 @@ def is_isomorphic(self, A) -> bool:
sage: A == B
False
"""
if not isinstance(A, QuaternionAlgebra_ab):
raise TypeError("A must be a quaternion algebra of the form (a,b)_K")

if self.base_ring() != QQ or A.base_ring() != QQ:
raise NotImplementedError("isomorphism check only implemented for rational quaternion algebras")

Expand Down

0 comments on commit e3e69c2

Please sign in to comment.