File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/sage/rings/polynomial Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -867,6 +867,17 @@ cdef class MPolynomial(CommutativePolynomial):
867
867
sage: ( x+ 2* y) . change_ring( GF( 3))
868
868
x - y
869
869
870
+ ::
871
+
872
+ sage: # needs sage. rings. finite_rings
873
+ sage: F. <a> = GF( 7^ 2)
874
+ sage: R. <x,y> = F[]
875
+ sage: f = x^ 2 + a^ 2* y^ 2 + a* x + a^ 3* y
876
+ sage: g = f. change_ring( F. frobenius_endomorphism( )) ; g
877
+ x^ 2 + ( -a - 2) * y^ 2 + ( -a + 1) * x + ( 2* a + 2) * y
878
+ sage: g. change_ring( F. frobenius_endomorphism( )) == f
879
+ True
880
+
870
881
::
871
882
872
883
sage: # needs sage. rings. number_field
@@ -903,11 +914,8 @@ cdef class MPolynomial(CommutativePolynomial):
903
914
x
904
915
"""
905
916
if isinstance (R, Map):
906
- if R.domain() == self .base_ring():
907
- return self .map_coefficients(R)
908
- return R(self )
909
- else :
910
- return self .parent().change_ring(R)(self .dict())
917
+ return self .map_coefficients(R)
918
+ return self .parent().change_ring(R)(self .dict())
911
919
912
920
def is_symmetric (self , group = None ):
913
921
r """
You can’t perform that action at this time.
0 commit comments