id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
24334,sympy symbol -> SR drops assumptions,jdemeyer,,"It is possible to add assumptions on sympy symbols:
{{{
sage: from sympy import Symbol
sage: n = Symbol(""n"", integer=True)
}}}
However, these are lost when converting to `SR`:
{{{
def _sympysage_symbol(self):
""""""
EXAMPLES::
sage: from sympy import Symbol
sage: assert x._sympy_() == Symbol('x')
sage: assert x == Symbol('x')._sage_()
""""""
from sage.symbolic.ring import SR
return SR.var(self.name)
}}}
This is the indirect cause for the different results below (based on a doctest in `src/sage/tests/french_book/recequadiff.py`):
{{{
sage: from sympy import Symbol, rsolve_hyper
sage: n = Symbol(""n"", integer=True)
sage: rsolve_hyper([-2,1], 2^(n+2), n)
2**n*C0 + 2**(n + 2)*(C0 + n/2)
sage: rsolve_hyper([-2,1], 2^(2+n), n)
2**n*C0 - 2**(n + 2)
}}}",defect,new,major,sage-8.2,symbolics,,,rws,,,,N/A,,,,#24067,