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

Substitution of variable doesn't always work when variable's name and representation are different #78

Closed
tomchor opened this issue Jun 23, 2017 · 2 comments

Comments

@tomchor
Copy link

tomchor commented Jun 23, 2017

I recently started using Sagemath and I noticed this behavior:

>>> a1=var('a_1')
>>> E=x^a1
>>> E(a1=1)

 a₁
x  
>>> E(a_1=1)
x

Should this be the behavior? I feel like this is a bug and the correct way would be to indeed use E(a1=1) because that is the name of the variable, while a_1 is just its representation. For example, if I use Sympy's syntax it works as it should:

>>> E.subs({a1:1})
x

I'm using SageMath version 7.5.1 compiled for Linux Mint 18.1.

@rwst
Copy link
Contributor

rwst commented Jun 23, 2017

I think you're right, I have created a trac ticket:
https://trac.sagemath.org/ticket/23320
Please follow there. We don't use github yet for development so this issue will be closed.

@tomchor
Copy link
Author

tomchor commented Jun 23, 2017

Fair enough. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants