Skip to content

Commit

Permalink
Moved old tests to examples
Browse files Browse the repository at this point in the history
Amend: Fixed typo
  • Loading branch information
S17A05 committed May 8, 2024
1 parent 6f0fca4 commit 6973ae9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/sage/schemes/elliptic_curves/ell_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -1818,6 +1818,17 @@ def weil_pairing(self, Q, n, algorithm=None):
sage: z.multiplicative_order()
360
Another larger example::
sage: F = GF(65537^2, modulus=[3,-1,1], name='a')
sage: F.inject_variables()
Defining a
sage: E = EllipticCurve(F, [0,1])
sage: P = E(22, 28891)
sage: Q = E(-93, 2728*a + 64173)
sage: P.weil_pairing(Q, 7282, algorithm='sage')
53278*a + 36700
An example over a number field::
sage: # needs sage.rings.number_field
Expand Down Expand Up @@ -2051,6 +2062,17 @@ def tate_pairing(self, Q, n, k, q=None):
sage: Px.weil_pairing(Qx, 41)^e == num/den
True
An example over a large base field::
sage: F = GF(65537^2, modulus=[3,46810,1], name='z2')
sage: F.inject_variables()
Defining z2
sage: E = EllipticCurve(F, [0,1])
sage: P = E(22, 28891)
sage: Q = E(-93, 40438*z2 + 31573)
sage: P.tate_pairing(Q, 7282, 2)
34585*z2 + 4063
TESTS:
The point ``P (self)`` must have ``n`` torsion::
Expand Down

0 comments on commit 6973ae9

Please sign in to comment.