diff --git a/src/sage/schemes/generic/homset.py b/src/sage/schemes/generic/homset.py index 4115f163b48..5a67c614efd 100644 --- a/src/sage/schemes/generic/homset.py +++ b/src/sage/schemes/generic/homset.py @@ -154,7 +154,7 @@ def create_key_and_extra_args(self, X, Y, category=None, base=None, if isinstance(Y, CommutativeRing): Y = AffineScheme(Y) if base is None: - from sage.structure.all import coercion_model + from sage.structure.element import coercion_model base = coercion_model.common_parent(X.base_ring(), Y.base_ring()) if is_AffineScheme(base): base_spec = base diff --git a/src/sage/schemes/generic/morphism.py b/src/sage/schemes/generic/morphism.py index b1409f05ba1..4c75777c1d1 100644 --- a/src/sage/schemes/generic/morphism.py +++ b/src/sage/schemes/generic/morphism.py @@ -482,7 +482,7 @@ def is_endomorphism(self) -> bool: def base_ring(self): r""" Return the base ring of ``self``, that is, the ring over which - the coefficients of ``self`` are given as polynomials. + the defining polynomials of ``self`` are defined. OUTPUT: @@ -490,31 +490,31 @@ def base_ring(self): EXAMPLES:: - sage: P.=ProjectiveSpace(QQ,1) - sage: H=Hom(P,P) - sage: f=H([3/5*x^2,6*y^2]) + sage: P. = ProjectiveSpace(QQ, 1) + sage: H = Hom(P,P) + sage: f = H([3/5*x^2, 6*y^2]) sage: f.base_ring() Rational Field :: - sage: R.=PolynomialRing(ZZ,1) - sage: P.=ProjectiveSpace(R,1) - sage: H=Hom(P,P) - sage: f=H([3*x^2,y^2]) + sage: R. = PolynomialRing(ZZ, 1) + sage: P. = ProjectiveSpace(R, 1) + sage: H = Hom(P, P) + sage: f = H([3*x^2, y^2]) sage: f.base_ring() Multivariate Polynomial Ring in t over Integer Ring Points have correct base rings too (:trac:`34336`):: - sage: x = P(t,5); x + sage: x = P(t, 5); x (t : 5) sage: x.base_ring() Multivariate Polynomial Ring in t over Integer Ring :: - sage: E = EllipticCurve(GF(17^2), [1,2,3,4,5]) + sage: E = EllipticCurve(GF((17,2)), [1,2,3,4,5]) sage: P = E.random_point() sage: P.base_ring() Finite Field in z2 of size 17^2