Ticket #7956 (closed defect: fixed)

Opened 3 years ago

Last modified 9 months ago

constructing a scheme morphism to an affine curve

Reported by: wjp Owned by: AlexGhitza
Priority: major Milestone: sage-5.3
Component: algebraic geometry Keywords:
Cc: mjo Work issues:
Report Upstream: N/A Reviewers: Marco Streng
Authors: Michael Orlitzky Merged in: sage-5.3.beta2
Dependencies: Stopgaps:

Description (last modified by mstreng) (diff)

From  http://groups.google.com/group/sage-devel/browse_thread/thread/1f3d4eca8bbff6c2/d3108ab8f2060050

Ronald van Luijk encountered the following problem:

sage: S.<p,q> = QQ[]
sage: A1.<r> = AffineSpace(QQ,1)
sage: A1_emb = Curve(p-2)
sage: type(A1_emb)
<class 'sage.schemes.plane_curves.affine_curve.AffineCurve_generic'>
sage: g = A1.hom([2,r],A1_emb)
TypeError: _point_morphism_class() takes exactly 1 non-keyword argument (3 given)

This is fixed in current Sage (e.g. 5.0.prealpha1). A doctest is added by

Here's a description of the other patch, which fixes an apparent oversight in the class hierarchy.

We browsed through the schemes module a bit, and the functionality for a morphism to an affine curve does seem to exist through functions such as AlgebraicScheme_subscheme_affine._point_morphism_class(), but is not accessible since AlgebraicScheme_subscheme_affine is not a superclass of AffineCurve_generic. Comparing it to the projective case, AlgebraicScheme_subscheme_projective _is_ a superclass of ProjectiveCurve_generic.

Is this a simple oversight in the class hierarchy for AffineCurve_generic, or is there a more fundamental reason why this does not yet work?

wjp made a patch (for sage 4.2) that makes the class hierarchy for affine curves similar to that of projective curves, but would appreciate if someone familiar with the schemes module could take a look since it is a rather invasive change:

 http://www.math.leidenuniv.nl/~wpalenst/sage/affine_morphism.patch

The patch also changes the constructor of SchemeMorphism_on_points_affine_space to expect a number of polynomials equal to the dimension of the ambient space instead of the dimension of the curve/subscheme, analogous to a change to SchemeMorphism_on_points_projective_space by David Kohel from 2007.

Apply

Attachments

affine_morphism.patch Download (3.3 KB) - added by wjp 3 years ago.
sage-trac_7956.patch Download (1.1 KB) - added by mjo 16 months ago.
Add a doctest constructing such a morphism.

Change History

comment:1 Changed 3 years ago by wjp

A cleaner version of the code to reproduce it:

sage: S.<p,q> = QQ[]
sage: A1.<r> = AffineSpace(QQ,1)
sage: A1_emb = Curve(p-2)
sage: type(A1_emb)
<class 'sage.schemes.plane_curves.affine_curve.AffineCurve_generic'>
sage: g = A1.hom([2,r],A1_emb)
TypeError: _point_morphism_class() takes exactly 1 non-keyword argument (3 given)

Changed 3 years ago by wjp

comment:2 Changed 3 years ago by wjp

  • Description modified (diff)

Changed 16 months ago by mjo

Add a doctest constructing such a morphism.

comment:3 follow-up: ↓ 4 Changed 16 months ago by mjo

  • Cc mjo added
  • Status changed from new to needs_review
  • Authors set to Michael Orlitzky

It looks like this is working, here's a doctest for it.

comment:4 in reply to: ↑ 3 Changed 16 months ago by mstreng

  • Description modified (diff)

Replying to mjo:

It looks like this is working, here's a doctest for it.

You mean that the bug is fixed in current Sage already, not that wjp's patch is working.

Apply sage-trac_7956.patch only.

comment:5 follow-up: ↓ 6 Changed 16 months ago by mstreng

Why not just have the ticket closed, instead of adding a doctest?

comment:6 in reply to: ↑ 5 Changed 16 months ago by mjo

Replying to mstreng:

Why not just have the ticket closed, instead of adding a doctest?

Primarily to prevent someone from breaking it again in the future (by accident, anyway).

comment:7 Changed 10 months ago by mstreng

  • Status changed from needs_review to positive_review
  • Reviewers set to Marco Streng

comment:8 Changed 9 months ago by jdemeyer

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