Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
quatalg: add ramified_infinite_places
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelPage committed Mar 2, 2017
1 parent 1c421f8 commit 0fd6575
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,61 @@ def ramified_primes(self):
raise ValueError("base field must be rational numbers or number field")
return list(self.__ramified_primes)

def ramified_infinite_places(self):
"""
Return the list of infinite places that ramify in this quaternion algebra.
EXAMPLES::
sage: QuaternionAlgebra(QQ, -1, -1).ramified_infinite_places()
[Ring morphism:
From: Rational Field
To: Algebraic Real Field
Defn: 1 |--> 1]
sage: QuaternionAlgebra(2*11*31).ramified_infinite_places()
[Ring morphism:
From: Rational Field
To: Algebraic Real Field
Defn: 1 |--> 1]
sage: QuaternionAlgebra(1).ramified_infinite_places()
[]
sage: QuaternionAlgebra(QQ[sqrt(2)],-3,-19).ramified_infinite_places()
[Ring morphism:
From: Number Field in sqrt2 with defining polynomial x^2 - 2
To: Algebraic Real Field
Defn: sqrt2 |--> 1.414213562373095?, Ring morphism:
From: Number Field in sqrt2 with defining polynomial x^2 - 2
To: Algebraic Real Field
Defn: sqrt2 |--> -1.414213562373095?]
sage: K.<a> = NumberField(x^3-3*x-1)
sage: QuaternionAlgebra(K, 5*a^2-15*a, -6*a^2+a+12).ramified_infinite_places()
[Ring morphism:
From: Number Field in a with defining polynomial x^3 - 3*x - 1
To: Algebraic Real Field
Defn: a |--> 1.879385241571817?]
AUTHOR:
- Aurel Page (2017)
"""
try:
return list(self.__ramified_infinite_places)
except AttributeError:
pass
F = self.base_ring()
if is_NumberField(F):
if is_RationalField(F):
Lpl = F.places(prec=infinity)
else:
Lpl = F.real_places(prec=infinity)
self.__ramified_infinite_places = {pl for pl in Lpl if pl(self._a)<0 and pl(self._b)<0}
else:
raise ValueError("base field must be rational numbers or number field")
return list(self.__ramified_infinite_places)

def _magma_init_(self, magma):
"""
Return Magma version of this quaternion algebra.
Expand Down

0 comments on commit 0fd6575

Please sign in to comment.