# 计算机代数系统

[计算机代数](https://www.edgepedia.org/zh/computer-algebra)系统（computer algebra system，CAS）是一种对符号而非仅对数字进行数学运算的软件：它操作代数表达式，对函数求导与积分，求解代数方程、超越方程与微分方程，并以精确的符号形式处理多项式与幂级数。<sup>[1](https://math.nist.gov/nesf/Sect3-4/Sect3-4.html)</sup> 普通计算器或数值库返回的是十进制近似值，而CAS则保持 \(\sqrt{5}\) 或 \(1/3\) 这类表达式的精确形式，并对它们应用代数法则。<sup>[2](https://dlmf.nist.gov/3.1)</sup>

| 关键事实 | 详情 |
|---|---|
| 功能 | 对数学公式进行符号处理：化简、代换、求导、积分、方程求解以及幂级数操作，浮点计算为次要能力。<sup>[1](https://math.nist.gov/nesf/Sect3-4/Sect3-4.html)</sup> |
| 算术模型 | 基于有理数 \(p/q\) 的精确有理算术，其中 \(p\) 与 \(q\) 为多字长整数；计算过程中约去公因子，结果可转换为任意长度的十进制小数。<sup>[2](https://dlmf.nist.gov/3.1)</sup> |
| 首个大型系统 | Macsyma，由卡尔·恩格尔曼（Carl Engelman）、威廉·马丁（William Martin）与乔尔·摩西（Joel Moses）于1968年7月在麻省理工学院（MIT）的MAC项目（Project MAC）中启动。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> |
| 商业化世代 | Maple（1980年11月在滑铁卢大学构思的项目）与Mathematica（1988年6月23日发布）将符号数学带到了普通计算机上。<sup>[4](https://www.scg.uwaterloo.ca/history.shtml)</sup><sup> • </sup><sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> |
| 开源脉络 | Maxima（1998至2000年间以GPL发布的能源部Macsyma代码）与SageMath，后者统一了NumPy、SciPy、SymPy、Maxima、GAP、FLINT、R及其他软件包。<sup>[5](https://maxima.sourceforge.io/docs/manual/index.html)</sup><sup> • </sup><sup>[6](https://www.sagemath.org/index)</sup> |
| 占用空间 | CAS安装体积庞大：在Linux下，Axiom占用3.05 GB，Maple 2017占用2.41 GB，Mathematica 11.2占用9.81 GB，Reduce主干版占用1.74 GB，从源码构建的Sage-8.0占用8.53 GB。<sup>[7](https://pmc.ncbi.nlm.nih.gov/articles/PMC6105178/)</sup> |

## CAS如何计算

其决定性特征是符号表示。表达式被存储为由运算符连接的符号与数值对象构成的结构，因此诸如求导之类的命令作用于表达式的形式，而非采样值。<sup>[8](https://doc.sagemath.org/html/en/reference/calculus/index.html)</sup> 大多数系统除非显式引入浮点数，否则避免数值近似；精确有理算术被视为该领域的根本，而任意精度浮点数则作为次要能力提供，其精度可由用户设定。<sup>[1](https://math.nist.gov/nesf/Sect3-4/Sect3-4.html)</sup><sup> • </sup><sup>[2](https://dlmf.nist.gov/3.1)</sup>

第二个特征是交互式命令模型。与编程语言“编写—编译—链接—执行”的循环不同，CAS对键盘输入的命令立即作出响应，系统内部的编程主要用于扩展命令集。<sup>[1](https://math.nist.gov/nesf/Sect3-4/Sect3-4.html)</sup> 用Macsyma项目的术语来说，用户的任务是规划：将问题分解为子问题，每个子问题都可由已知的系统命令解决，直至达到仅包含系统命令的层次。<sup>[9](https://www.cambridge.org/core/journals/bjhs-themes/article/coded-conduct-making-macsyma-users-and-the-automation-of-mathematics/19936AF1E826C13BA410EFDB704026DF)</sup>

## Macsyma与人工智能根源

**Macsyma**（MAC项目的符号操作器，SYmbolic MAnipulator）源于20世纪60年代麻省理工学院人工智能小组对数学软件的研究。<sup>[10](https://www.sciencedirect.com/science/article/pii/S0747717110001483)</sup> 对MAC项目的研究者而言，符号积分是机器智能的基准：一个能像微积分学生那样按模式与策略进行积分的程序，将能说明关于推理的某些问题。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> [乔尔·摩西](https://www.edgepedia.org/zh/joel-moses)（Joel Moses）于1971年至1982年间领导该项目，并编写了积分引擎。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup>

它以Maclisp编写，成长为当时最大的Lisp程序之一——很可能是当时存在的最大的Lisp程序；到1971年，它已包含60,000字的代码以及大约二十个执行数学运算的子程序。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup><sup> • </sup><sup>[9](https://www.cambridge.org/core/journals/bjhs-themes/article/coded-conduct-making-macsyma-users-and-the-automation-of-mathematics/19936AF1E826C13BA410EFDB704026DF)</sup> 它能化简表达式、求解方程、处理多项式，并对大多数人都无法解决的函数进行积分，此后几乎每一个系统都借鉴了它。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> 20世纪70年代，承载它的[PDP-10](https://www.edgepedia.org/zh/pdp-10)计算机成为ARPANET上最受欢迎的节点之一，用户从数学家和物理学家到政府机构、石油天然气公司和军事研究实验室的工程师不等；美国海军1977至1979年的一项调查记录了从响尾蛇导弹控制系统电路分析到波传播统计的各种用途。<sup>[10](https://www.sciencedirect.com/science/article/pii/S0747717110001483)</sup><sup> • </sup><sup>[9](https://www.cambridge.org/core/journals/bjhs-themes/article/coded-conduct-making-macsyma-users-and-the-automation-of-mathematics/19936AF1E826C13BA410EFDB704026DF)</sup>

到20世纪70年代末，Macsyma已超出麻省理工学院的基础设施能力。一个用户联合会——其初始成员包括能源部、NASA、美国海军、斯伦贝谢（Schlumberger）以及若干大学——取代了ARPA的资助，1981至1983年间，该系统成为最早被私有化的政府资助计算机系统之一。<sup>[9](https://www.cambridge.org/core/journals/bjhs-themes/article/coded-conduct-making-macsyma-users-and-the-automation-of-mathematics/19936AF1E826C13BA410EFDB704026DF)</sup> 麻省理工学院于1982年将其授权给[Symbolics](https://www.edgepedia.org/zh/symbolics)公司，到1992年Macsyma公司分拆出来时，其市场份额已从1987年的约70%降至约1%。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> 代码比公司活得长久：德克萨斯大学的威廉·F·谢尔特（William F. Schelter）自1982年起维护能源部的那份副本，1998年获得许可将其以GNU公共许可证发布，并于2000年在[SourceForge](https://www.edgepedia.org/zh/sourceforge)上发起了Maxima项目。<sup>[5](https://maxima.sourceforge.io/docs/manual/index.html)</sup>

## 走出大型机：Maple与Mathematica

20世纪70年代的系统，如Macsyma和Reduce，是基于LISP的大型程序，需要数兆字节的内存和大量CPU时间，因此只有少数能使用大型机的研究者才能使用它们。<sup>[4](https://www.scg.uwaterloo.ca/history.shtml)</sup> 1980年11月，在基思·格迪斯（Keith Geddes）与加斯顿·戈内（Gaston Gonnet）领导下于[滑铁卢大学](https://www.edgepedia.org/zh/university-of-waterloo)构思Maple项目时，其目标是打造一个可供大量研究者和学生使用的系统，将空间效率与时间效率并列为基本标准。<sup>[4](https://www.scg.uwaterloo.ca/history.shtml)</sup> 设计上的答案是：用C语言编写的小型内核（最初在[Honeywell](https://www.edgepedia.org/zh/honeywell)机器上用B语言实现），加上以[Maple](https://www.edgepedia.org/zh/maple-software)自身语言编写的库中的大部分数学功能；到1980年12月的第一周，已存在一个功能有限的运行版本，到1983年底已有约50个外部安装。<sup>[4](https://www.scg.uwaterloo.ca/history.shtml)</sup><sup> • </sup><sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> 滑铁卢Maple公司（后为Maplesoft）于1988年成立以销售该产品。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup>

**Mathematica**则以不同的路径进入同一市场。[斯蒂芬·沃尔夫勒姆](https://www.edgepedia.org/zh/stephen-wolfram)（Stephen Wolfram）曾于1979至1981年间在加州理工学院构建了早期的SMP系统，他于1987年创立[沃尔夫勒姆研究公司](https://www.edgepedia.org/zh/wolfram-research)（Wolfram Research），并于1988年6月23日发布Mathematica 1.0。它将符号代数、数值计算与图形整合在一个笔记本界面中，并与NeXT计算机捆绑销售。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup> 史密森学会（Smithsonian）的记述指出，它尤其以其图形能力和编辑的便捷性而著称。<sup>[11](https://www.americanhistory.si.edu/teachingmath/html/402.htm)</sup> 对大多数学生而言，他们接触到的两个系统是Mathematica和Maple，而两者之间的对比——一个是处于严格集中控制下的统一商业软件包，另一个同样是商业产品却建立在具有学术联系的开放库之上——塑造了此后三十年计算机代数的主流。<sup>[3](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)</sup>

较小的机器也有自己的脉络：阿尔伯特·里奇（Albert Rich）与大卫·斯托特迈尔（David Stoutemyer）于1979年为微型计算机编写了muMath，他们的合伙公司（当时名为Soft [Warehouse](https://www.edgepedia.org/zh/warehouse), Inc.）于1988年推出了后继产品DERIVE；Soft Warehouse的员工后来参与编写了体现在TI-92图形计算器中的程序，该符号计算器于1995年发布。<sup>[11](https://www.americanhistory.si.edu/teachingmath/html/402.htm)</sup><sup> • </sup><sup>[12](https://link.springer.com/article/10.1007/s11786-022-00551-6)</sup>

## 专用系统与开源系统

系统不仅按硬件分化，也按范围分化。有些专用于特定领域，如用于代数群论的GAP和用于代数几何与交换代数的[Macaulay2](https://www.edgepedia.org/zh/macaulay2)，而Maple和Mathematica则保持通用。<sup>[13](https://newtraell.cs.uchicago.edu/files/tr_authentic/TR-2013-07.pdf)</sup><sup> • </sup><sup>[14](https://github.com/Foadsf/Awesome-FLOSS-CAS)</sup> 开源社区产出了Maxima，以及后来的SageMath——一个以GPL许可的自由系统，建立在包括NumPy、SciPy、SymPy、Maxima、GAP、FLINT和R在内的现有软件包之上，并提供与其他系统（包括PARI、Singular、[Magma](https://www.edgepedia.org/zh/magma-computer-algebra-system)、Maple和Mathematica）的接口。<sup>[6](https://www.sagemath.org/index)</sup><sup> • </sup><sup>[15](https://www.sagemath.org/doc/tutorial/introduction.html)</sup> 这遵循了商业双雄所设定的全合一数学开发环境的模式。<sup>[13](https://newtraell.cs.uchicago.edu/files/tr_authentic/TR-2013-07.pdf)</sup>

## 纯数学之外的用途

大多数计算机代数研究在纯数学内部应用自动化方法，但这些系统早期就已被用于应用场景；早在1988年，它们就被用于生成Fortran计算代码。<sup>[13](https://newtraell.cs.uchicago.edu/files/tr_authentic/TR-2013-07.pdf)</sup> 在教育领域，CAS能力已通过TI-92等符号计算器以及Maxima、REDUCE和Xcas向智能手机操作系统的移植，到达手持设备和手机级别的设备，不过研究指出，尽管已有这些可用的工具，CAS在中等教育中的使用仍然稀少。<sup>[12](https://link.springer.com/article/10.1007/s11786-022-00551-6)</sup>

## 可靠性

计算机代数算法常被描述为永不失败，意思是它们被证明对任何输入都能产生解，且计算时间有先验界，但实际实现并不总能达到这一标准；已发布的系统中存在有据可查的缺陷和意外结果，Maple的可靠性是其中一项研究方向的特别焦点。<sup>[16](https://www.researchgate.net/publication/229945706_Bugs_errors_and_unexpected_results_in_computer_algebra_packages)</sup> 由于CAS算法未经形式验证，其输出本身在安全关键环境中不可信赖；一种应对方式是将CAS结果导入Isabelle/HOL等证明助手，后者依据其小型可信内核来认证常微分方程的符号解。<sup>[17](https://arxiv.org/abs/2102.02679)</sup> 另一条互补的研究路线是让系统相互交叉检验：2022年的一项工作将NIST数学函数数字图书馆中的公式转译到Maple和Mathematica中，以相互验证该库和这两个系统。<sup>[18](https://www.nist.gov/publications/comparative-verification-validation-digital-mathematical-libraries-and-computer-algebra)</sup>

## References

1. [Numerical Evaluation of Special Functions, §3.4, NIST](https://math.nist.gov/nesf/Sect3-4/Sect3-4.html)
2. [DLMF §3.1 Arithmetics and Error Measures, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/3.1)
3. [Computer Algebra Systems, Geschichte der Informatik](https://www.geschichte-der-informatik.de/articles/computer_algebra_systems/)
4. [History of Maple Computer Algebra Software, Symbolic Computation Group, University of Waterloo](https://www.scg.uwaterloo.ca/history.shtml)
5. [Maxima 5.49.0 Manual, Maxima project](https://maxima.sourceforge.io/docs/manual/index.html)
6. [SageMath - Open-Source Mathematical Software System](https://www.sagemath.org/index)
7. [Computer algebra in gravity research, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC6105178/)
8. [Symbolic Calculus, SageMath Reference Manual](https://doc.sagemath.org/html/en/reference/calculus/index.html)
9. [Stephanie A. Dick (2020). Coded conduct: making MACSYMA users and the automation of mathematics. BJHS Themes 5, 205-224.](https://www.cambridge.org/core/journals/bjhs-themes/article/coded-conduct-making-macsyma-users-and-the-automation-of-mathematics/19936AF1E826C13BA410EFDB704026DF)
10. [Joel Moses (2012). Macsyma: A personal history. Journal of Symbolic Computation 47(2), 123-130.](https://www.sciencedirect.com/science/article/pii/S0747717110001483)
11. [Slates, Sliderules and Software - Teaching Math in America, Smithsonian National Museum of American History](https://www.americanhistory.si.edu/teachingmath/html/402.htm)
12. [Eugenio Roanes-Lozano (2023). Can I Bring My Calculator to the Exam? Some Reflections on the Abstraction Level of Computer Algebra Systems. Mathematics in Computer Science 17, article 1.](https://link.springer.com/article/10.1007/s11786-022-00551-6)
13. [History of Computer Algebra, University of Chicago Technical Report TR-2013-07](https://newtraell.cs.uchicago.edu/files/tr_authentic/TR-2013-07.pdf)
14. [Awesome-FLOSS-CAS: a curated list of free and open source computer algebra systems, GitHub](https://github.com/Foadsf/Awesome-FLOSS-CAS)
15. [Introduction, SageMath Tutorial](https://www.sagemath.org/doc/tutorial/introduction.html)
16. [Walter Krämer (2008). Bugs, errors, and unexpected results in computer algebra packages. PAMM 7(1), 2140009-2140010.](https://www.researchgate.net/publication/229945706_Bugs_errors_and_unexpected_results_in_computer_algebra_packages)
17. [Thomas Hickman, Christian Pardillo Laursen, Simon Foster (2021). Certifying Differential Equation Solutions from Computer Algebra Systems in Isabelle/HOL. arXiv:2102.02679.](https://arxiv.org/abs/2102.02679)
18. [Comparative Verification & Validation of Digital Mathematical Libraries and Computer Algebra Systems, NIST](https://www.nist.gov/publications/comparative-verification-validation-digital-mathematical-libraries-and-computer-algebra)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Sep 17, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods › Numerical, string, and geometric algorithms › Symbolic and computer algebra

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/computer-algebra-system

English original: https://www.edgepedia.org/computer-algebra-system
