Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168733
Image: ubuntu2004
N = 26167;R=Integers(N); R.is_field = lambda : True; E1 = EllipticCurve(R, [4, 128]);E1.discriminant()
9273
P = E1(2,12); P;
(2 : 12 : 1)
factorial(2)*P;
(23256 : 1930 : 1)
factorial(3)*P;
(21778 : 1960 : 1)
factorial(4)*P;
(22648 : 14363 : 1)
factorial(6)*P;
(7881 : 16198 : 1)
factorial(7)*P;
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_10.py", line 9, in <module> exec compile(ur'open("___code___.py","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZmFjdG9yaWFsKDcpKlA7"),globals())+"\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmp0v0nXR/___code___.py", line 3, in <module> exec compile(ur'factorial(_sage_const_7 )*P;' + '\n', '', 'single') File "", line 1, in <module> File "element.pyx", line 1396, in sage.structure.element.RingElement.__mul__ (sage/structure/element.c:11210) File "coerce.pyx", line 709, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:6075) File "coerce_actions.pyx", line 453, in sage.structure.coerce_actions.IntegerMulAction._call_ (sage/structure/coerce_actions.c:6252) File "coerce_actions.pyx", line 518, in sage.structure.coerce_actions.fast_mul_long (sage/structure/coerce_actions.c:6939) File "element.pyx", line 925, in sage.structure.element.ModuleElement.__iadd__ (sage/structure/element.c:7583) File "element.pyx", line 917, in sage.structure.element.ModuleElement._add_ (sage/structure/element.c:7447) File "/usr/local/sage/local/lib/python2.6/site-packages/sage/schemes/elliptic_curves/ell_point.py", line 629, in _add_ raise ZeroDivisionError, "Inverse of %s does not exist"%(x1-x2) ZeroDivisionError: Inverse of 19482 does not exist
gcd(N, 19482)
191
26167/191
137
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_3.py", line 9, in <module> exec compile(ur'open("___code___.py","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("RTEuZGlzY3JpbWluYW50KCk="),globals())+"\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmp4pIoIu/___code___.py", line 2, in <module> exec compile(ur'E1.discriminant()' + '\n', '', 'single') File "", line 1, in <module> NameError: name 'E1' is not defined
M.<T> = GF(8);
F = EllipticCurve(M, [1,0,1, T,T+1]);F;
Elliptic Curve defined by y^2 + x*y + y = x^3 + T*x + (T+1) over Finite Field in T of size 2^3
F.discriminant()
T^2 + 1
P=F(1+T+T^2, 1+T); P; Q = F(T^2, T); Q; R = (1+T+T^2, 1+T^2); R; P+Q; R+R;
(T^2 + T + 1 : T + 1 : 1) (T^2 : T : 1) (T^2 + T + 1, T^2 + 1) (T^2 + T + 1 : T^2 + 1 : 1) (T^2 + T + 1, T^2 + 1, T^2 + T + 1, T^2 + 1)
F.order();
6
F.gens();
((T^2 + T + 1 : T^2 + 1 : 1),)
F.list();
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_43.py", line 9, in <module> exec compile(ur'open("___code___.py","w").write("# -*- coding: utf-8 -*-\n" + _support_.preparse_worksheet_cell(base64.b64decode("Ri5saXN0KCk7"),globals())+"\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in <module> File "/tmp/tmpYfrlqZ/___code___.py", line 2, in <module> exec compile(ur'F.list();' + '\n', '', 'single') File "", line 1, in <module> File "parent.pyx", line 638, in sage.structure.parent.Parent.__getattr__ (sage/structure/parent.c:5092) File "parent.pyx", line 171, in sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2610) AttributeError: 'EllipticCurve_finite_field' object has no attribute 'list'
Z = F([T^2+T+1, T^2+1]);Z
(T^2 + T + 1 : T^2 + 1 : 1)
2*Z;
(T^2 : T : 1)
3*Z;
(1 : 0 : 1)
4*Z;
(T^2 : T^2 + T + 1 : 1)
5*Z;
(T^2 + T + 1 : T + 1 : 1)
6*Z;
(0 : 1 : 0)
7*Z;
(T^2 + T + 1 : T^2 + 1 : 1)
E1 = EllipticCurve(GF(1051), [0,23]); E1; P1=E1([109, 203]); Q1= E1([240, 203]); P1.weil_pairing(Q1, 5);
671
E2 = EllipticCurve(GF(883), [-35, -9]); E2; P2 = E2([5,66]);Q2 = E2([103, 602]); P2.weil_pairing(Q2, 7);
749
E3 = EllipticCurve(GF(1009), [37,0]); E3; P3 = E3([8,703]); Q3 = E3([49, 20]); P3.weil_pairing(Q3, 7);
105
E4 = EllipticCurve(GF(1009), [37, 0]); E4; P4 = E4([417, 952]); Q4 = E4([561, 153]); print P4.weil_pairing(Q4, 7); Pp = P4+P4; Qp = 3*Q4; Pp.weil_pairing(Qp, 7);
394 105
E = EllipticCurve(GF(691), [1,0]); E; P = E([301, 14]); print P; R=E.gens()[0]; print R;p = 691;
Elliptic Curve defined by y^2 = x^3 + x over Finite Field of size 691 (301 : 14 : 1) (155 : 643 : 1)
F.<x> = GF(p)[];
K.<alpha> = GF(p^2, name='alpha', modulus=x^2+1 ); F=E.change_ring(K)
P = F(301, 14); Q = F(-301, 14*alpha); zeta = P.weil_pairing(Q, 173);
zeta.multiplicative_order()
173
zeta^173
1