Opened 3 years ago

#22007 new defect

elt.subs( ) is inconsistent across rings and base_rings

Reported by: edgarcosta Owned by:
Priority: major Milestone: sage-7.5
Component: algebra Keywords: PolynomialRing PowerSeriesRing subs substitute
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

g = [1, 2, 1, 2, 2, -4, 1]
for field in [QQ, RR, FiniteField(1009)]:
    print field
    for ring in [PolynomialRing, PowerSeriesRing]:
        R.<x> = ring(field)
        xsub = R(1 + x)
        print R
        print R(g).subs(x = xsub) == R(g).subs(xsub)
    print

Rational Field
Univariate Polynomial Ring in x over Rational Field
True
Power Series Ring in x over Rational Field
False

Real Field with 53 bits of precision
Univariate Polynomial Ring in x over Real Field with 53 bits of precision
True
Power Series Ring in x over Real Field with 53 bits of precision
True

Finite Field of size 1009
Univariate Polynomial Ring in x over Finite Field of size 1009
True
Power Series Ring in x over Finite Field of size 1009
False


Change History (0)

Note: See TracTickets for help on using tickets.