从Mathics,我尝试过:
Subscript[a, 0] = 1
但它给出了错误:
Subscript[a, 0] 中的标记下标是受保护的。
此消息意味着您尝试做的事情没有意义。下标是一个系统函数,可以防止被无意地重新定义,就像加号 (+) 或任何其他内置系统函数一样。
根据:
https://reference.wolfram.com/language/ref/Subscript.html
下标是一个格式为 x_(y) 的对象。
您会收到与尝试相同的错误消息:
Plus[a, 0] = 1
还要注意 Wolfram 语言和数学中的列表从 1 开始,而不是 0.
以下是如何使用索引 1 处包含值 1 的元素创建列表变量a :
$ mathics
Mathics 2.0.1.dev
on CPython 3.8.8 (default, Feb 27 2021, 09:08:32)
using SymPy 1.7.1, mpmath 1.2.1, numpy 1.20.1, cython 0.29.22
Copyright (C) 2011-2021 The Mathics Team.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions.
See the documentation for the full license.
Quit by evaluating Quit[] or by pressing CONTROL-D.
In[1]:= a = {1}
Out[1]= {1}
In[2]:= a[[1]]
Out[2]= 1
也许https://www.wolfram.com/language/fast-introduction-for-programmers/en/lists/和https://www.wolfram.com/language/fast-introduction-for-programmers/en/assignments/是开始的好地方。