File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/sage/algebras/quatalg Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1074,6 +1074,28 @@ def ramified_primes(self):
1074
1074
# TODO: more examples
1075
1075
return [f [0 ] for f in factor (self .discriminant ())]
1076
1076
1077
+ def is_isomorphic (self , A ) -> bool :
1078
+ r"""
1079
+ Return ``True`` if ``self`` and ``A`` are isomorphic quaternion algebras over Q.
1080
+
1081
+ INPUT:
1082
+
1083
+ - ``A`` -- a quaternion algebra defined over the rationals Q
1084
+
1085
+ EXAMPLES::
1086
+
1087
+ sage: B = QuaternionAlgebra(-46, -87)
1088
+ sage: A = QuaternionAlgebra(-58, -69)
1089
+ sage: B.is_isomorphic(A)
1090
+ True
1091
+ sage: A == B
1092
+ False
1093
+ """
1094
+ if self .base_ring () != QQ or A .base_ring () != QQ :
1095
+ raise NotImplementedError ("isomorphism check only implemented for rational quaternion algebras" )
1096
+
1097
+ return self .discriminant () == A .discriminant ()
1098
+
1077
1099
def _magma_init_ (self , magma ):
1078
1100
"""
1079
1101
Return Magma version of this quaternion algebra.
You can’t perform that action at this time.
0 commit comments