-
-
Notifications
You must be signed in to change notification settings - Fork 688
Open
Description
This will greatly facilitate writing generic code.
sage: from sage.groups.multiplicative_wrapper import MultiplicativeWrapper
sage: R.<x,y> = ZZ[]
sage: G = MultiplicativeWrapper(R)
sage: a, b = G(x), G(y)
sage: a^2 * b^5 * a
(3*x + 5*y)
sage: a/b
(x - y)
sage: E = EllipticCurve('37a')
sage: P = E([0,0])
sage: G = MultiplicativeWrapper(P.parent(), repr_format=None); G
sage: a = G(P); a
(0 : 0 : 1)
sage: b = G(5*P); b
(1/4 : -5/8 : 1)
sage: a^2 * b
(-5/9 : 8/27 : 1)
sage: 7*P
(-5/9 : 8/27 : 1)
sage: 10*P == a^10
True
Component: basic arithmetic
Issue created by migration from https://trac.sagemath.org/ticket/3999