Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Some edits and import from sage.structure.element
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Aug 14, 2022
1 parent b07543a commit cad694c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/sage/schemes/generic/homset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions src/sage/schemes/generic/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,39 +482,39 @@ 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:
- ring
EXAMPLES::
sage: P.<x,y>=ProjectiveSpace(QQ,1)
sage: H=Hom(P,P)
sage: f=H([3/5*x^2,6*y^2])
sage: P.<x,y> = 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.<t>=PolynomialRing(ZZ,1)
sage: P.<x,y>=ProjectiveSpace(R,1)
sage: H=Hom(P,P)
sage: f=H([3*x^2,y^2])
sage: R.<t> = PolynomialRing(ZZ, 1)
sage: P.<x,y> = 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
Expand Down

0 comments on commit cad694c

Please sign in to comment.