Skip to content

Commit

Permalink
Trac #17326: Implementing subschemes functionality for projective "is…
Browse files Browse the repository at this point in the history
…_morphism"

Changing the projective "is_morphism" to work over subschemes

URL: http://trac.sagemath.org/17326
Reported by: jdefaria
Ticket author(s): Joao Alberto de Faria
Reviewer(s): Ben Hutz
  • Loading branch information
Release Manager authored and vbraun committed Feb 17, 2015
2 parents da07338 + f9ce9da commit aed83b5
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/sage/schemes/projective/projective_morphism.py
Expand Up @@ -1179,17 +1179,25 @@ def is_morphism(self):
sage: f = H([x*z-t*y^2,x^2-y^2,t*z^2])
sage: f.is_morphism()
True
Map that is not morphism on projective space, but is over a subscheme::
sage: P.<x,y,z> = ProjectiveSpace(RR,2)
sage: X = P.subscheme([x*y + y*z])
sage: H = Hom(X,X)
sage: f = H([x*z-y*z,x^2-y^2,z^2])
sage: f.is_morphism()
True
"""
from sage.schemes.projective.projective_space import is_ProjectiveSpace
if is_ProjectiveSpace(self.domain()) is False or is_ProjectiveSpace(self.codomain()) is False:
raise NotImplementedError

R = self.coordinate_ring()
F = self._polys
defpolys = list(self.domain().defining_polynomials())
if R.base_ring().is_field():
J = R.ideal(F)
J = R.ideal(F + defpolys)
else:
S = PolynomialRing(R.base_ring().fraction_field(), R.gens(), R.ngens())
J = S.ideal([S.coerce(F[i]) for i in range(R.ngens())])
J = S.ideal([S(f) for f in F] + [S(f) for f in defpolys])
if J.dimension() > 0:
return False
else:
Expand Down

0 comments on commit aed83b5

Please sign in to comment.