-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow evaluation of morphisms of schemes on points over different rings #32209
Comments
Author: Peter Bruin |
Branch: u/pbruin/32209-scheme_morphisms |
Commit: |
comment:4
With the patch, a morphism of affine schemes now happily returns values at points which clearly do not lie in its domain: sage: S.<x,y> = AffineSpace(ZZ, 2)
sage: T.<u,v> = AffineSpace(ZZ, 2)
sage: C = Curve(x**2+y**2-1)
sage: f = C.hom([x,y],T)
sage: P = S([123,456])
sage: f.domain().defining_polynomial()(*P)
223064
sage: f(P)
(123, 456) The following change should fix this according to my very limited testing. It is inspired by the projective case (which did already seem to detect points outside the domain). --- b/src/sage/schemes/affine/affine_morphism.py
+++ b/src/sage/schemes/affine/affine_morphism.py
@@ -262,7 +262,7 @@ class SchemeMorphism_polynomial_affine_space(SchemeMorphism_polynomial):
"""
from sage.schemes.affine.affine_point import SchemeMorphism_point_affine
if check:
- if not isinstance(x, SchemeMorphism_point_affine):
+ if not isinstance(x, SchemeMorphism_point_affine) or self.domain() != x.codomain():
try:
x = self.domain()(x)
except (TypeError, NotImplementedError): |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:7
Thanks for noticing! This looks like a good fix to me. |
Reviewer: Lorenz Panny |
Changed branch from u/pbruin/32209-scheme_morphisms to |
In SageMath 9.3, consider the following setting:
The morphism
h
cannot be evaluated on points over F4:There is no error when the coordinates are in the prime field, but the coordinates of the resulting point are in Z instead of F4:
Component: algebraic geometry
Author: Peter Bruin
Branch/Commit:
d0c30c0
Reviewer: Lorenz Panny
Issue created by migration from https://trac.sagemath.org/ticket/32209
The text was updated successfully, but these errors were encountered: