- #1

Stephen Tashi

Science Advisor

- 7,783

- 1,541

- TL;DR Summary
- How do Computer Algebra Systems (CAS) handle the scope of variables.

Computer languages handle the scope of variables in a precise way so that if one symbol, such as "k" is used in different contexts, the program keeps these separate. When sophisticated human beings re-use symbols in writing mathematics, they can keep things straight, but I don't think they follow precise rules. So how do CAS programs handle the translation from human written expressions to computer structures?

For example, a human given the information:

For example, a human given the information:

would probably understand that the "##k##" in the first equation corresponds to the "##k##" of the "##k^2##" in the second equation, but not the "##k##" in "##\sum_{k=1}^2 B^k##". But could this information be entered in a CAS program as it stands? - or would one need to avoid the duplicate use of "##k##"?##k = 2m + 1##

##V = k^2 + \sum_{k=1}^2 B^k##