12.07.2015 Views

Sage Reference Manual: Elliptic and Plane Curves - Mirrors

Sage Reference Manual: Elliptic and Plane Curves - Mirrors

Sage Reference Manual: Elliptic and Plane Curves - Mirrors

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Elliptic</strong> <strong>and</strong> <strong>Plane</strong> <strong>Curves</strong>, Release 6.1.1sage: Conic(FiniteField(37), [1, 2, 3, 4, 5, 6]).has_rational_point()Truesage: C = Conic(FiniteField(2), [1, 1, 1, 1, 1, 0]); CProjective Conic Curve over Finite Field of size 2 defined by x^2 + x*y + y^2 + x*z + y*zsage: C.has_rational_point(point = True) # output is r<strong>and</strong>om(True, (0 : 0 : 1))sage: p = next_prime(10^50)sage: F = FiniteField(p)sage: C = Conic(F, [1, 2, 3]); CProjective Conic Curve over Finite Field of size 1000000000000000000000000000000000000000000sage: C.has_rational_point(point = True) # output is r<strong>and</strong>om(True,(14971942941468509742682168602989039212496867586852 : 7523546570801779289276220208817474105sage: F. = FiniteField(7^20)sage: C = Conic([1, a, -5]); CProjective Conic Curve over Finite Field in a of size 7^20 defined by x^2 + (a)*y^2 + 2*z^2sage: C.has_rational_point(point = True) # output is r<strong>and</strong>om(True,(a^18 + 2*a^17 + 4*a^16 + 6*a^13 + a^12 + 6*a^11 + 3*a^10 + 4*a^9 + 2*a^8 + 4*a^7 + a^6 + 4TESTS:sage: l = Sequence(cartesian_product_iterator([[0, 1] for i in range(6)]))sage: bigF = GF(next_prime(2^100))sage: bigF2 = GF(next_prime(2^50)^2, ’b’)sage: m = [[F(b) for b in a] for a in l for F in [GF(2), GF(4, ’a’), GF(5), GF(9, ’a’), bigFsage: m += [[F.r<strong>and</strong>om_element() for i in range(6)] for j in range(20) for F in [GF(5), bigF]sage: c = [Conic(a) for a in m if a != [0,0,0,0,0,0]]sage: assert all([C.has_rational_point() for C in c])sage: r = r<strong>and</strong>range(0, 5)sage: assert all([C.defining_polynomial()(Sequence(C.has_rational_point(point = True)[1])) =38 Chapter 8. Projective plane conics over finite fields

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!