Opened 14 years ago

Closed 11 years ago

#727 closed enhancement (fixed)

find rational points on plane conic curves

Reported by: was Owned by: mstreng
Priority: major Milestone: sage-4.6.2
Component: geometry Keywords: rational point points conic quadratic form
Cc: ncalexan, justin, mstreng, rlm, pbruin Merged in: sage-4.6.2.alpha2
Authors: Nick Alexander, Marco Streng Reviewers: David Loeffler
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by mstreng)

Implement a Conic class that is able to

  • find rational points on plane conic curves over QQ, finite fields, RR, CC.
  • given a conic with a point over a field, compute a parametrization.

Attachments (13)

trac_727-conic.patch (17.5 KB) - added by mstreng 12 years ago.
Define a Conic class with an interface to Denis Simon's qfsolve
trac_727_more_conic_files.patch (86.4 KB) - added by mstreng 11 years ago.
trac_727_more_conic_files2.patch (446 bytes) - added by mstreng 11 years ago.
apply this patch and the one without "2" to get something that almost works
trac_727_more_conic_files3.patch (7.2 KB) - added by mstreng 11 years ago.
needs two previous tickets trac_727_more... and trac_9334-hilbert.patch
trac_727_more_conic_files4.patch (137.4 KB) - added by mstreng 11 years ago.
apply after trac_727_more_conic_files1,2,3; requires trac_9334-hilbert.patch to work
trac_727_more_conic_files5.patch (104.7 KB) - added by mstreng 11 years ago.
apply on sage 4.4.4 after trac_727_more_conic_files1,2,3,4, shouldn't require trac_9334-hilbert.patch
trac_727_more_conic_files6.patch (10.6 KB) - added by mstreng 11 years ago.
apply on sage 4.4.4 after trac_727_more_conic_files1,2,3,4,5
trac_727_conic_combined_1-6.patch (103.6 KB) - added by mstreng 11 years ago.
apply only this latest file
trac_727_more_conic_files7.patch (15.2 KB) - added by mstreng 11 years ago.
apply the 1-6 patch on sage 4.5.1, then apply this one
trac_727_more_conic_files9.patch (6.0 KB) - added by mstreng 11 years ago.
apply after 7 (there is no 8)
trac_727_conic_combined_1-9.patch (104.2 KB) - added by mstreng 11 years ago.
apply only this latest file (works on sage 4.4.4 and on 4.5.1)
trac_727_conics.patch (95.6 KB) - added by mstreng 11 years ago.
Apply trac_727_conics.patch to sage 4.6 after #2329 and #9334
trac_727_conics_without_number_fields.patch (82.1 KB) - added by mstreng 11 years ago.
Apply only this latest file (works on sage 4.6.1.rc0 without any other patches)

Download all attachments as: .zip

Change History (34)

comment:1 Changed 14 years ago by AlexGhitza

  • Component changed from basic arithmetic to algebraic geometry
  • Owner changed from somebody to was

comment:2 Changed 14 years ago by ncalexan

  • Cc ncalexan added
  • Keywords rational point points conic quadratic form added

This is so random -- I have written code to do this. We already distribute Denis Simon's code to solve such systems, and I have have integrated a little of it. Patch coming up. Please talk to me before implementing this.

comment:3 Changed 13 years ago by mabshoff

  • Component changed from algebraic geometry to quadratic forms
  • Owner changed from was to justin

comment:4 Changed 13 years ago by justin

  • Cc justin added

comment:5 Changed 12 years ago by mstreng

  • Cc mstreng added

Changed 12 years ago by mstreng

Define a Conic class with an interface to Denis Simon's qfsolve

comment:6 Changed 12 years ago by mstreng

  • Component changed from quadratic forms to geometry
  • Owner changed from justin to mhampton
  • Summary changed from find rational points on ternary quadratic forms -- volunteer needed to find rational points on plane conic curves [with patch, needs work]

The patches I just uploaded were part of ncalexan's patch for ticket 6341, implementing Mestre's algorithm. They implement a Conic class and allow one to find points over the rationals. This Conic class needs to be expanded to provide much more functionality, such as finding points and/or rational parametrizations over other fields. If the original question is only for the rationals, then that at least is answered.

comment:7 Changed 12 years ago by mstreng

  • Owner changed from mhampton to mstreng
  • Status changed from new to assigned

I'll work on the Conic class.

Changed 11 years ago by mstreng

comment:8 Changed 11 years ago by mstreng

  • Cc rlm added
  • Report Upstream set to N/A
  • this is being revived at Sage Days 23
  • trac_727-conic-extcode.patch should be removed: it updates Denis Simon's code from 2005 to 2007, while 2009 is already shipped with the latest Sage
  • trac_727_more_conic_files.patch implements a Conic class that uses Denis Simon's code and can find points on conics over number fields and finite fields. It includes most of trac_727-conic.patch and works by itself on 4.4.4. Some doctests fail. It includes an incomplete and incorrect implementation of Hilbert symbols that should be replaced by the Hilbert symbols of #9334

comment:9 Changed 11 years ago by mstreng

  • I missed the file sage/schemes/plane_conics/init.py (which is empty), so the patch in its current form doesn't work

Changed 11 years ago by mstreng

apply this patch and the one without "2" to get something that almost works

Changed 11 years ago by mstreng

needs two previous tickets trac_727_more... and trac_9334-hilbert.patch

Changed 11 years ago by mstreng

apply after trac_727_more_conic_files1,2,3; requires trac_9334-hilbert.patch to work

Changed 11 years ago by mstreng

apply on sage 4.4.4 after trac_727_more_conic_files1,2,3,4, shouldn't require trac_9334-hilbert.patch

Changed 11 years ago by mstreng

apply on sage 4.4.4 after trac_727_more_conic_files1,2,3,4,5

Changed 11 years ago by mstreng

apply only this latest file

comment:10 Changed 11 years ago by mstreng

  • Authors set to Nick Alexander, Marco Streng
  • Cc pbruin added
  • Description modified (diff)
  • Work issues set to documentation formatting, reviewing

Changed 11 years ago by mstreng

apply the 1-6 patch on sage 4.5.1, then apply this one

Changed 11 years ago by mstreng

apply after 7 (there is no 8)

comment:11 Changed 11 years ago by mstreng

  • Description modified (diff)
  • Work issues documentation formatting, reviewing deleted

I'm running a doctest right now. I'll fold them when I get the time. Who wants to review it?

Changed 11 years ago by mstreng

apply only this latest file (works on sage 4.4.4 and on 4.5.1)

comment:12 Changed 11 years ago by mstreng

  • Status changed from needs_work to needs_review

"All tests passed!", and I combined the patches into one file

comment:13 Changed 11 years ago by mstreng

  • Description modified (diff)

comment:14 Changed 11 years ago by mstreng

  • Summary changed from find rational points on plane conic curves [with patch, needs work] to find rational points on plane conic curves [with patch, needs review]

comment:15 Changed 11 years ago by rlm

  • Summary changed from find rational points on plane conic curves [with patch, needs review] to find rational points on plane conic curves

Those [with patch, needs review] bits in the description are no longer necessary, thanks to the workflow.

comment:16 Changed 11 years ago by cremona

  • Status changed from needs_review to needs_work

The patch applies fine to 4.6.alpha0, but not all the tests in the new directory pass:

	sage -t -long "devel/sage-main/sage/schemes/plane_conics/con_field.py"
	sage -t -long "devel/sage-main/sage/schemes/plane_conics/con_number_field.py"
	sage -t -long "devel/sage-main/sage/schemes/plane_conics/con_rational_field.py"
	sage -t -long "devel/sage-main/sage/schemes/plane_conics/rnfisnorm.py"

I feared that it would be worse after the new Pari upgrade (which is in 4.6.alpha0). But it does need looking into.

comment:17 Changed 11 years ago by mstreng

It worked just fine on my 4.5.something. I guess the problems are all in "devel/sage-main/sage/schemes/plane_conics/rnfisnorm.py", which we can get rid of after #2329 is finished. So let's do #2329 first.

Changed 11 years ago by mstreng

Apply trac_727_conics.patch to sage 4.6 after #2329 and #9334

comment:18 Changed 11 years ago by mstreng

  • Description modified (diff)
  • Work issues set to needs serious retesting after #9334 and #2329

Here's a version that uses hilbert symbols and rnfisnorm from resp. #9334 and #2329. This patch provides motivation and testcases for those two other tickets.

Changed 11 years ago by mstreng

Apply only this latest file (works on sage 4.6.1.rc0 without any other patches)

comment:19 Changed 11 years ago by mstreng

  • Description modified (diff)
  • Status changed from needs_work to needs_review
  • Work issues needs serious retesting after #9334 and #2329 deleted

I moved all number field functionality to #10621. Because of this, no patches from other tickets are needed, you only need to apply trac_727_conics_without_number_fields.patch

comment:20 Changed 11 years ago by davidloeffler

  • Reviewers set to David Loeffler
  • Status changed from needs_review to positive_review

This looks really good. It's embarrassing that we've been shipping Denis Simon's scripts with Sage for years but nobody's sat down and written the interface code necessary to make it accessible.

Patch applied fine to 4.6.2.alpha1, all doctests in sage/schemes passed, the ref manual built OK, and all the examples I tried worked.

I have one minor gripe: there are one or two cases where the new Conic classes inherit methods from the generic plane curve classes that perhaps ought to be replaced with more appropriate conic-specific implementations (e.g the method "rational_points"). But that can come in future tickets if people feel it's needed.

comment:21 Changed 11 years ago by jdemeyer

  • Merged in set to sage-4.6.2.alpha2
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.