Skip to content

Commit f7baf6b

Browse files
author
Release Manager
committed
sagemathgh-38805: use specialized 2-dimensional .log() method in .matrix_on_subgroup() This should be equivalent but faster (see sagemath#38347). ```sage sage: E = EllipticCurve(GF((2^77-33, 2)), [1,0]) ....: P, Q = E.gens() ....: pi = E.automorphisms()[-1] ....: %time pi.matrix_on_subgroup([P, Q]) ``` Sage 10.5.beta7: ``` CPU times: user 13.8 s, sys: 32.5 ms, total: 13.8 s ``` This branch: ``` CPU times: user 48.1 ms, sys: 64 µs, total: 48.2 ms ``` URL: sagemath#38805 Reported by: Lorenz Panny Reviewer(s): grhkm21
2 parents a118f51 + fc05e23 commit f7baf6b

File tree

1 file changed

+2
-4
lines changed
  • src/sage/schemes/elliptic_curves

1 file changed

+2
-4
lines changed

src/sage/schemes/elliptic_curves/hom.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,10 +1118,8 @@ def matrix_on_subgroup(self, domain_gens, codomain_gens=None):
11181118
imP = self._eval(P)
11191119
imQ = self._eval(Q)
11201120

1121-
from sage.groups.additive_abelian.additive_abelian_wrapper import AdditiveAbelianGroupWrapper
1122-
H = AdditiveAbelianGroupWrapper(R.parent(), [R,S], [n,n])
1123-
vecP = H.discrete_log(imP)
1124-
vecQ = H.discrete_log(imQ)
1121+
vecP = imP.log([R, S])
1122+
vecQ = imQ.log([R, S])
11251123

11261124
from sage.matrix.constructor import matrix
11271125
from sage.rings.finite_rings.integer_mod_ring import Zmod

0 commit comments

Comments
 (0)