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

Commit

Permalink
Update doctest outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe (W) committed Apr 22, 2019
1 parent ba3b35d commit ed3aab0
Show file tree
Hide file tree
Showing 20 changed files with 170 additions and 169 deletions.
10 changes: 5 additions & 5 deletions src/sage/rings/finite_rings/residue_field.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,10 @@ class ResidueField_generic(Field):
Residue field of Fractional ideal (a)
sage: pi = k.reduction_map(); pi
Partially defined reduction map:
From: Number Field in a with defining polynomial x^3 - 2
From: Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
To: Residue field of Fractional ideal (a)
sage: pi.domain()
Number Field in a with defining polynomial x^3 - 2
Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
sage: pi.codomain()
Residue field of Fractional ideal (a)
Expand Down Expand Up @@ -698,11 +698,11 @@ class ResidueField_generic(Field):
sage: f = k.lift_map(); f
Lifting map:
From: Residue field of Fractional ideal (-a + 2)
To: Maximal Order in Number Field in a with defining polynomial x^3 - 3
To: Maximal Order in Number Field in a with defining polynomial x^3 - 3 with a = 1.442249570307409?
sage: f.domain()
Residue field of Fractional ideal (-a + 2)
sage: f.codomain()
Maximal Order in Number Field in a with defining polynomial x^3 - 3
Maximal Order in Number Field in a with defining polynomial x^3 - 3 with a = 1.442249570307409?
sage: f(k.0)
1
Expand Down Expand Up @@ -787,7 +787,7 @@ cdef class ReductionMap(Map):
Residue field in sqrt17bar of Fractional ideal (5)
sage: R = k.reduction_map(); R
Partially defined reduction map:
From: Number Field in sqrt17 with defining polynomial x^2 - 17
From: Number Field in sqrt17 with defining polynomial x^2 - 17 with sqrt17 = 4.123105625617660?
To: Residue field in sqrt17bar of Fractional ideal (5)
sage: R.<t> = GF(next_prime(2^20))[]; P = R.ideal(t^2 + t + 1)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/function_field/function_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -3337,7 +3337,7 @@ def __init__(self, constant_field, names, category=None):
sage: TestSuite(K).run()
sage: FunctionField(QQ[I], 'alpha')
Rational function field in alpha over Number Field in I with defining polynomial x^2 + 1
Rational function field in alpha over Number Field in I with defining polynomial x^2 + 1 with I = 1*I
Must be over a field::
Expand Down
15 changes: 7 additions & 8 deletions src/sage/rings/number_field/class_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def number_field(self):
sage: K.<a> = QuadraticField(-14)
sage: CS = K.S_class_group(K.primes_above(2))
sage: CS.number_field()
Number Field in a with defining polynomial x^2 + 14
Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
"""
return self._number_field

Expand All @@ -634,8 +634,7 @@ class SClassGroup(ClassGroup):
sage: K.<a> = QuadraticField(-974)
sage: CS = K.S_class_group(K.primes_above(2)); CS
S-class group of order 18 with structure C6 x C3
of Number Field in a with defining polynomial x^2 + 974
S-class group of order 18 with structure C6 x C3 of Number Field in a with defining polynomial x^2 + 974 with a = 31.20897306865447?*I
sage: CS.gen(0) # random
Fractional S-ideal class (3, a + 2)
sage: CS.gen(1) # random
Expand All @@ -653,10 +652,10 @@ def __init__(self, gens_orders, names, number_field, gens, S, proof=True):
sage: I = K.ideal(2,a)
sage: S = (I,)
sage: K.S_class_group(S)
S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14
S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
sage: K.<a> = QuadraticField(-105)
sage: K.S_class_group([K.ideal(13, a + 8)])
S-class group of order 4 with structure C2 x C2 of Number Field in a with defining polynomial x^2 + 105
S-class group of order 4 with structure C2 x C2 of Number Field in a with defining polynomial x^2 + 105 with a = 10.24695076595960?*I
"""
AbelianGroupWithValues_class.__init__(self, gens_orders, names, gens,
values_group=number_field.ideal_monoid())
Expand All @@ -674,10 +673,10 @@ def S(self):
sage: I = K.ideal(2,a)
sage: S = (I,)
sage: CS = K.S_class_group(S);CS
S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14
S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
sage: T = tuple([])
sage: CT = K.S_class_group(T);CT
S-class group of order 4 with structure C4 of Number Field in a with defining polynomial x^2 + 14
S-class group of order 4 with structure C4 of Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
sage: CS.S()
(Fractional ideal (2, a),)
sage: CT.S()
Expand Down Expand Up @@ -741,7 +740,7 @@ def _repr_(self):
sage: K.<a> = QuadraticField(-14)
sage: CS = K.S_class_group(K.primes_above(2))
sage: CS._repr_()
'S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14'
'S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I'
"""
s = 'S-class group of order %s ' % self.order()
if self.order() > 1:
Expand Down
21 changes: 11 additions & 10 deletions src/sage/rings/number_field/galois_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class GaloisGroup_v1(SageObject):
sage: K = QQ[2^(1/3)]
sage: G = K.galois_group(type="pari"); G
Galois group PARI group [6, -1, 2, "S3"] of degree 3 of the Number Field in a with defining polynomial x^3 - 2
Galois group PARI group [6, -1, 2, "S3"] of degree 3 of the Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
sage: G.order()
6
sage: G.group()
PARI group [6, -1, 2, "S3"] of degree 3
sage: G.number_field()
Number Field in a with defining polynomial x^3 - 2
Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
"""

def __init__(self, group, number_field):
Expand Down Expand Up @@ -190,7 +190,7 @@ def __init__(self, number_field, names=None):
EXAMPLES::
sage: QuadraticField(-23,'a').galois_group()
Galois group of Number Field in a with defining polynomial x^2 + 23
Galois group of Number Field in a with defining polynomial x^2 + 23 with a = 4.795831523312720?*I
sage: NumberField(x^3 - 2, 'b').galois_group()
Traceback (most recent call last):
...
Expand Down Expand Up @@ -298,7 +298,7 @@ def _repr_(self):
sage: G = QuadraticField(-23, 'a').galois_group()
sage: G._repr_()
'Galois group of Number Field in a with defining polynomial x^2 + 23'
'Galois group of Number Field in a with defining polynomial x^2 + 23 with a = 4.795831523312720?*I'
sage: G = NumberField(x^3 - 2, 'a').galois_group(names='b')
sage: G._repr_()
'Galois group of Galois closure in b of Number Field in a with defining polynomial x^3 - 2'
Expand Down Expand Up @@ -650,10 +650,11 @@ def fixed_field(self):
sage: G = L.galois_group()
sage: H = G.decomposition_group(L.primes_above(3)[0])
sage: H.fixed_field()
(Number Field in a0 with defining polynomial x^2 + 2, Ring morphism:
From: Number Field in a0 with defining polynomial x^2 + 2
To: Number Field in a with defining polynomial x^4 + 1
Defn: a0 |--> a^3 + a)
(Number Field in a0 with defining polynomial x^2 + 2 with a0 = a^3 + a,
Ring morphism:
From: Number Field in a0 with defining polynomial x^2 + 2 with a0 = a^3 + a
To: Number Field in a with defining polynomial x^4 + 1
Defn: a0 |--> a^3 + a)
"""
if self.order() == 1:
Expand Down Expand Up @@ -712,8 +713,8 @@ def as_hom(self):
sage: G = QuadraticField(-7,'w').galois_group()
sage: G[1].as_hom()
Ring endomorphism of Number Field in w with defining polynomial x^2 + 7
Defn: w |--> -w
Ring endomorphism of Number Field in w with defining polynomial x^2 + 7 with w = 2.645751311064591?*I
Defn: w |--> -w
TESTS:
Expand Down
22 changes: 10 additions & 12 deletions src/sage/rings/number_field/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def __call__(self, im_gens, check=True):
sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))
sage: phi = H([H.domain().gen()]); phi # indirect doctest
Ring morphism:
From: Number Field in a with defining polynomial x^2 + 1
To: Number Field in b with defining polynomial x^2 + 1
Defn: a |--> b
From: Number Field in a with defining polynomial x^2 + 1 with a = 1*I
To: Number Field in b with defining polynomial x^2 + 1 with b = 1*I
Defn: a |--> b
"""
if isinstance(im_gens, NumberFieldHomomorphism_im_gens):
return self._coerce_impl(im_gens)
Expand All @@ -81,7 +81,7 @@ def _coerce_impl(self, x):
sage: H1 = End(QuadraticField(-1, 'a'))
sage: H1.coerce(loads(dumps(H1[1]))) # indirect doctest
Ring endomorphism of Number Field in a with defining polynomial x^2 + 1
Ring endomorphism of Number Field in a with defining polynomial x^2 + 1 with a = 1*I
Defn: a |--> -a
TESTS:
Expand Down Expand Up @@ -120,17 +120,15 @@ def _an_element_(self):
sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))
sage: H.an_element() # indirect doctest
Ring morphism:
From: Number Field in a with defining polynomial x^2 + 1
To: Number Field in b with defining polynomial x^2 + 1
Defn: a |--> b
From: Number Field in a with defining polynomial x^2 + 1 with a = 1*I
To: Number Field in b with defining polynomial x^2 + 1 with b = 1*I
Defn: a |--> b
sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-2, 'b'))
sage: H.an_element()
Traceback (most recent call last):
...
EmptySetError: There is no morphism from Number Field in a with
defining polynomial x^2 + 1 to Number Field in b with defining
polynomial x^2 + 2
EmptySetError: There is no morphism from Number Field in a with defining polynomial x^2 + 1 with a in 1*I to Number Field in b with defining polynomial x^2 + 2 with b in 1.414213562373095?*I
"""
L = self.list()
if len(L) != 0:
Expand All @@ -147,9 +145,9 @@ def _repr_(self):
EXAMPLES::
sage: repr(Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))) # indirect doctest
'Set of field embeddings from Number Field in a with defining polynomial x^2 + 1 to Number Field in b with defining polynomial x^2 + 1'
'Set of field embeddings from Number Field in a with defining polynomial x^2 + 1 with a = 1*I to Number Field in b with defining polynomial x^2 + 1 with b = 1*I'
sage: repr(Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'a'))) # indirect doctest
'Automorphism group of Number Field in a with defining polynomial x^2 + 1'
'Automorphism group of Number Field in a with defining polynomial x^2 + 1 with a = 1*I'
"""
D = self.domain()
C = self.codomain()
Expand Down
Loading

0 comments on commit ed3aab0

Please sign in to comment.