Skip to content

Commit

Permalink
fix more doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Aug 11, 2024
1 parent 2fa6517 commit 14c2efd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 39 deletions.
24 changes: 13 additions & 11 deletions src/sage/modular/quatalg/brandt.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@
Order of Quaternion Algebra (-1, -23) with base ring Rational Field with basis (1/2 + 1/2*j, 1/2*i + 1/2*k, j, k)
sage: B.right_ideals()
(Fractional ideal (2 + 2*j, 2*i + 2*k, 4*j, 4*k), Fractional ideal (2 + 2*j, 2*i + 6*k, 8*j, 8*k), Fractional ideal (2 + 10*j + 8*k, 2*i + 8*j + 6*k, 16*j, 16*k))
(Fractional ideal (4, 4*i, 2 + 2*j, 2*i + 2*k),
Fractional ideal (8, 8*i, 2 + 2*j, 6*i + 2*k),
Fractional ideal (16, 16*i, 10 + 8*i + 2*j, 8 + 6*i + 2*k))
sage: B.hecke_matrix(2)
[1 2 0]
Expand Down Expand Up @@ -803,14 +805,14 @@ def cyclic_submodules(self, I, p):
sage: B = BrandtModule(11)
sage: I = B.order_of_level_N().unit_ideal()
sage: B.cyclic_submodules(I, 2)
[Fractional ideal (1/2 + 3/2*j + k, 1/2*i + j + 1/2*k, 2*j, 2*k),
Fractional ideal (1/2 + 1/2*i + 1/2*j + 1/2*k, i + k, j + k, 2*k),
Fractional ideal (1/2 + 1/2*j + k, 1/2*i + j + 3/2*k, 2*j, 2*k)]
[Fractional ideal (2, 2*i, 3/2 + i + 1/2*j, 1 + 1/2*i + 1/2*k),
Fractional ideal (2, 1 + i, 1 + j, 1/2 + 1/2*i + 1/2*j + 1/2*k),
Fractional ideal (2, 2*i, 1/2 + i + 1/2*j, 1 + 3/2*i + 1/2*k)]
sage: B.cyclic_submodules(I, 3)
[Fractional ideal (1/2 + 1/2*j, 1/2*i + 5/2*k, 3*j, 3*k),
Fractional ideal (1/2 + 3/2*j + 2*k, 1/2*i + 2*j + 3/2*k, 3*j, 3*k),
Fractional ideal (1/2 + 3/2*j + k, 1/2*i + j + 3/2*k, 3*j, 3*k),
Fractional ideal (1/2 + 5/2*j, 1/2*i + 1/2*k, 3*j, 3*k)]
[Fractional ideal (3, 3*i, 1/2 + 1/2*j, 5/2*i + 1/2*k),
Fractional ideal (3, 3*i, 3/2 + 2*i + 1/2*j, 2 + 3/2*i + 1/2*k),
Fractional ideal (3, 3*i, 3/2 + i + 1/2*j, 1 + 3/2*i + 1/2*k),
Fractional ideal (3, 3*i, 5/2 + 1/2*j, 1/2*i + 1/2*k)]
sage: B.cyclic_submodules(I, 11)
Traceback (most recent call last):
...
Expand Down Expand Up @@ -1252,9 +1254,9 @@ def right_ideals(self, B=None):
sage: B = BrandtModule(23)
sage: B.right_ideals()
(Fractional ideal (2 + 2*j, 2*i + 2*k, 4*j, 4*k),
Fractional ideal (2 + 2*j, 2*i + 6*k, 8*j, 8*k),
Fractional ideal (2 + 10*j + 8*k, 2*i + 8*j + 6*k, 16*j, 16*k))
(Fractional ideal (4, 4*i, 2 + 2*j, 2*i + 2*k),
Fractional ideal (8, 8*i, 2 + 2*j, 6*i + 2*k),
Fractional ideal (16, 16*i, 10 + 8*i + 2*j, 8 + 6*i + 2*k))
TESTS::
Expand Down
40 changes: 12 additions & 28 deletions src/sage/schemes/elliptic_curves/heegner.py
Original file line number Diff line number Diff line change
Expand Up @@ -4904,8 +4904,8 @@ def right_ideals(self):
EXAMPLES::
sage: heegner_points(11).reduce_mod(3).right_ideals()
(Fractional ideal (2 + 2*j + 28*k, 2*i + 26*k, 4*j + 12*k, 44*k),
Fractional ideal (2 + 2*j + 28*k, 2*i + 4*j + 38*k, 8*j + 24*k, 88*k))
(Fractional ideal (4, 44*i, 2 + 8*i + 2*j, 34*i + 2*k),
Fractional ideal (8, 88*i, 2 + 52*i + 2*j, 4 + 78*i + 2*k))
"""
return self.brandt_module().right_ideals()

Expand Down Expand Up @@ -5135,14 +5135,10 @@ def cyclic_subideal_p1(self, I, c):
sage: H = heegner_points(11).reduce_mod(7)
sage: I = H.brandt_module().right_ideals()[0]
sage: sorted(H.cyclic_subideal_p1(I, 3).items())
[((0, 1),
Fractional ideal (2 + 2*j + 32*k, 2*i + 8*j + 82*k, 12*j + 60*k, 132*k)),
((1, 0),
Fractional ideal (2 + 10*j + 28*k, 2*i + 4*j + 62*k, 12*j + 60*k, 132*k)),
((1, 1),
Fractional ideal (2 + 2*j + 76*k, 2*i + 4*j + 106*k, 12*j + 60*k, 132*k)),
((1, 2),
Fractional ideal (2 + 10*j + 116*k, 2*i + 8*j + 38*k, 12*j + 60*k, 132*k))]
[((0, 1), Fractional ideal (12, 132*i, 10 + 76*i + 2*j, 4 + 86*i + 2*k)),
((1, 0), Fractional ideal (12, 132*i, 2 + 32*i + 2*j, 8 + 130*i + 2*k)),
((1, 1), Fractional ideal (12, 132*i, 10 + 32*i + 2*j, 8 + 86*i + 2*k)),
((1, 2), Fractional ideal (12, 132*i, 2 + 76*i + 2*j, 4 + 130*i + 2*k))]
sage: len(H.cyclic_subideal_p1(I, 17))
18
"""
Expand Down Expand Up @@ -5267,24 +5263,12 @@ def kolyvagin_cyclic_subideals(self, I, p, alpha_quaternion):
sage: alpha_quaternion = f(g[0]); alpha_quaternion
1 - 77/192*i - 5/128*j - 137/384*k
sage: H.kolyvagin_cyclic_subideals(I, 5, alpha_quaternion)
[(Fractional ideal (2 + 2/3*i + 364*j + 231928/3*k,
4/3*i + 946*j + 69338/3*k,
1280*j + 49920*k, 94720*k), 0),
(Fractional ideal (2 + 2/3*i + 108*j + 31480/3*k,
4/3*i + 434*j + 123098/3*k,
1280*j + 49920*k, 94720*k), 1),
(Fractional ideal (2 + 2/3*i + 876*j + 7672/3*k,
4/3*i + 434*j + 236762/3*k,
1280*j + 49920*k, 94720*k), 2),
(Fractional ideal (2 + 2/3*i + 364*j + 61432/3*k,
4/3*i + 178*j + 206810/3*k,
1280*j + 49920*k, 94720*k), 3),
(Fractional ideal (2 + 2/3*i + 876*j + 178168/3*k,
4/3*i + 1202*j + 99290/3*k,
1280*j + 49920*k, 94720*k), 4),
(Fractional ideal (2 + 2/3*i + 1132*j + 208120/3*k,
4/3*i + 946*j + 183002/3*k,
1280*j + 49920*k, 94720*k), 5)]
[(Fractional ideal (2560, 1280 + 47360*i, 1146 + 37678*i + 4*j, 212 + 54664/3*i + 2*j + 2/3*k), 0),
(Fractional ideal (2560, 1280 + 47360*i, 2426 + 9262*i + 4*j, 2004 + 83080/3*i + 2*j + 2/3*k), 1),
(Fractional ideal (2560, 1280 + 47360*i, 1914 + 9262*i + 4*j, 1748 + 111496/3*i + 2*j + 2/3*k), 2),
(Fractional ideal (2560, 1280 + 47360*i, 2170 + 18734*i + 4*j, 212 + 111496/3*i + 2*j + 2/3*k), 3),
(Fractional ideal (2560, 1280 + 47360*i, 890 + 28206*i + 4*j, 1748 + 54664/3*i + 2*j + 2/3*k), 4),
(Fractional ideal (2560, 1280 + 47360*i, 634 + 37678*i + 4*j, 2516 + 83080/3*i + 2*j + 2/3*k), 5)]
"""
X = I.cyclic_right_subideals(p, alpha_quaternion)
return [(J, i) for i, J in enumerate(X)]
Expand Down

0 comments on commit 14c2efd

Please sign in to comment.