# 单项式序

单项式序是多项式环上单项式的一种全序，例如形如 \( x^{a} = x_{1}^{a_{1}} x_{2}^{a_{2}} \cdots x_{n}^{a_{n}} \)（指数为 \( a \in \mathbb{N}^{n} \)）的单项式，它要求与乘法相容，并且是良序。所谓相容，是指 \( x^{a} < x^{b} \) 对任意 \( \gamma \in \mathbb{N}^{n} \) 都蕴含 \( x^{\gamma} x^{a} < x^{\gamma} x^{b} \)；所谓良序，是指任意非空单项式集合都有最小元。<sup>[1](https://math.bu.edu/people/drhast/Notes/Math746-ring-theory-notes.pdf)</sup> 单变量时次序是唯一被决定的：\( \cdots > x^{n+1} > x^{n} > \cdots > x > 1 \)。多变量时则存在许多种序，选哪一种决定了多项式哪一项算作它的首项。<sup>[2](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 单项式上的一种全序，与乘法相容，且任意非空单项式集合都有最小元<sup>[1](https://math.bu.edu/people/drhast/Notes/Math746-ring-theory-notes.pdf)</sup> |
| 标准序 | 字典序（lex）、分次字典序（grlex）与分次反字典序（grevlex）<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup> |
| 软件默认 | Macaulay2 的默认是 GRevLex，即分次反字典序<sup>[4](https://www.macaulay2.com/doc/Macaulay2-1.23/share/doc/Macaulay2/Macaulay2Doc/html/_monomial_sporderings.html)</sup> |
| 矩阵形式 | 任何单项式序都可以用矩阵 \( M \in GL(n,\mathbb{R}) \) 表示；实际应用中只用整数元素<sup>[5](https://fossies.org/linux/singular/doc/pdata.doc)</sup> |
| 全局与局部 | 全局序满足 \( 1 < x_{i} \) 对每个变量成立，且是良序；局部序满足 \( 1 > x_{i} \)，且不是良序<sup>[5](https://fossies.org/linux/singular/doc/pdata.doc)</sup> |
| 主要用途 | 该序确定了多元除法算法与格罗布纳基计算所依据的首项<sup>[4](https://www.macaulay2.com/doc/Macaulay2-1.23/share/doc/Macaulay2/Macaulay2Doc/html/_monomial_sporderings.html)</sup> |

## 定义

\( \mathbb{N}^{n} \) 上的一个序，经由 \( a > b \Rightarrow x^{a} > x^{b} \) 迁移到单项式上，若满足三个条件，则称为可容许的（即单项式序）：它是全序；它与指数向量加法相容，即 \( a > b \) 蕴含 \( a + g > b + g \)；且对所有 \( a \in \mathbb{N}^{n} \) 有 \( a \geq 0 \)。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup> 在前两个条件成立的前提下，第三个条件等价于良序，正是它使算法能够终止：若每一步中某一项都严格递减，则这样的过程（例如多项式除法）不可能无限进行下去。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup>

序一旦固定，每个非零多项式 \( f \) 都获得一个多重次数（其中出现的最大指数向量）、首项系数 \( \mathrm{LC}(f) \)、首单项式 \( \mathrm{LM}(f) \) 以及首项 \( \mathrm{LT}(f) = \mathrm{LC}(f) \cdot \mathrm{LM}(f) \)。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup> 多重次数满足 \( \mathrm{multideg}(fg) = \mathrm{multideg}(f) + \mathrm{multideg}(g) \) 以及 \( \mathrm{multideg}(f+g) \leq \max(\mathrm{multideg}(f), \mathrm{multideg}(g)) \)，当两个多重次数不同时，求和式取等号。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup>

## 三种标准序

固定变量次序 \( x_{1} > x_{2} > \cdots > x_{n} \)。下面每一种序都因变量排序方式的不同而有 \( n! \) 种变体。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup>

- **字典序（lex）。** 通过比较 \( a - b \) 最左边非零分量来比较指数向量 \( a \) 与 \( b \)；当该分量为正时 \( a >_{\mathrm{lex}} b \)。这与词典中词的次序一致。<sup>[2](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)</sup>
- **分次字典序（grlex）。** 先比较总次数 \( |a| = a_{1} + \cdots + a_{n} \)；平局时用字典序打破。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup>
- **分次反字典序（grevlex）。** 先比较总次数；平局时看 \( a - b \) 最右边非零分量，该分量必须为负，因此同次数的单项式中，最后一个变量幂次较小者胜出。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup>

这些序确实彼此不同。在 \( k[x,y,z] \) 中设 \( x > y > z \)，有 \( x^{3}y^{2}z >_{\mathrm{lex}} x^{2}y^{6}z^{12} \)，因为 \( (3,2,1) - (2,6,12) \) 最左边的分量为正；而 \( x^{2}y^{6}z^{12} >_{\mathrm{grevlex}} x^{3}y^{2}z \)，因为总次数 19 胜过 6。即便在总次数相同的单项式上，三个或更多变量时这些序也可能产生分歧：\( x^{2}y^{2}z^{2} >_{\mathrm{lex}} xy^{4}z \)，但 \( xy^{4}z >_{\mathrm{grevlex}} x^{2}y^{2}z^{2} \)。<sup>[2](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)</sup> 两个变量时，在固定次数上分歧消失：在 \( x > y \) 下，字典序与分次反字典序对固定总次数 \( d \) 的单项式给出的次序相同。<sup>[2](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)</sup>

## 矩阵与权重表示

每种单项式序都可以用矩阵来描述。给定 \( m \times n \) 实矩阵 \( M \)，其行为 \( w_{1}, \ldots, w_{m} \)，先比较 \( x^{a} \) 与 \( x^{b} \) 的 \( w_{1} \)-权重 \( a \cdot w_{1} \) 与 \( b \cdot w_{1} \)，若平局则用 \( w_{2} \) 打破，依此类推。这一构造给出全序，当且仅当 \( \ker(M) \cap \mathbb{Z}^{n} = \{0 \} \)；要求所有元素非负是良序的充分条件，但并非必要条件。<sup>[2](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)</sup> 在 \( x > y > z \) 下的字典序来自单位矩阵，而分次反字典序来自含负元素的矩阵，例如行为 \( (1,1,1), (1,1,0), (1,0,0) \) 的矩阵。<sup>[2](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)</sup> Singular 的文档给出了这一普遍结论：任何单项式序都可由矩阵 \( M \in GL(n,\mathbb{R}) \) 表示，而实践中只涉及整数元素。<sup>[5](https://fossies.org/linux/singular/doc/pdata.doc)</sup>

Sage 直接实现了这一点：给定方阵 \( A \)，\( x^{a} <_{A} x^{b} \) 当且仅当按字典序比较有 \( Aa < Ab \)。<sup>[6](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/term_order.html)</sup>

## 全局序、局部序与块序

实践中最重要的区分是全局序与局部序之别。全局序是良序，且对每个变量有 \( 1 < x_{i} \)；局部序对每个变量满足 \( 1 > x_{i} \)；混合序则把某些变量按全局处理、另一些按局部处理。局部序与混合序不是良序，在这些序下的计算要在多项式环的某个局部化中解释。<sup>[5](https://fossies.org/linux/singular/doc/pdata.doc)</sup> 在 Sage 中，只有 degrevlex、deglex、degneglex、wdegrevlex、wdeglex、invlex 与 lex 是全局序；neglex 等负变体是局部序。<sup>[6](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/term_order.html)</sup>

序也可以组合。给定 \( k[x] \) 上的序 \( <_{1} \) 与 \( k[y] \) 上的序 \( <_{2} \)，\( k[x,y] \) 上的积（块）序规定：当 \( x^{a} <_{1} x^{A} \)，或当 \( x^{a} = x^{A} \) 且 \( y^{b} <_{2} y^{B} \) 时，\( x^{a}y^{b} < x^{A}y^{B} \)。<sup>[6](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/term_order.html)</sup> 消元序（Macaulay2 以 Eliminate 提供）是用于消去指定变量的块序。<sup>[4](https://www.macaulay2.com/doc/Macaulay2-1.23/share/doc/Macaulay2/Macaulay2Doc/html/_monomial_sporderings.html)</sup>

## 在格罗布纳基计算中的作用

多元除法算法与格罗布纳基理论由布鲁诺·布赫贝格尔（Bruno Buchberger）在其 1965 年于因斯布鲁克大学（University of Innsbruck）的博士论文中提出，它们是相对于某个固定的单项式序来表述的。<sup>[7](https://www.sciencedirect.com/science/article/pii/S0747717105001483)</sup> 格罗布纳基是相对于某一种序计算的，它生成的首项理想依赖于该序。序的选择可能使所需的时间和空间相差悬殊，对格罗布纳基计算尤其如此。<sup>[4](https://www.macaulay2.com/doc/Macaulay2-1.23/share/doc/Macaulay2/Macaulay2Doc/html/_monomial_sporderings.html)</sup>

**实践中的序选择。** 分次反字典序通常计算最快，而求解零维多项式方程组通常先计算 degrevlex 格罗布纳基，再用换序算法转换为 lex 基。<sup>[8](https://arxiv.org/abs/2202.09226)</sup> Sage 中的 msolve 求解器即遵循此模式：先计算分次反字典序基，再将其变换为目标环所要求的序。<sup>[9](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/msolve.html)</sup> 相反，字典序是解方程组时消去变量所需的序。<sup>[3](https://www.lpthe.jussieu.fr/~talon/orderings.html)</sup>

**序之间的转换。** 格罗布纳游走算法通过沿理想的格罗布纳扇中的一条路径，把某一种项序下的格罗布纳基转换为另一种项序下的基——格罗布纳扇是序空间的多面体分解，分解成的每个锥上首项理想保持不变；每走一步都计算该理想某个环面退化的格罗布纳基。<sup>[10](https://www.sciencedirect.com/science/article/pii/S0747717196901455)</sup> 算法上的改进仍在继续：福热尔的 F4 算法（1999 年）用稀疏线性代数同时约化多个多项式，取代布赫贝格尔算法中经典的多项式约化，从而加快了基的计算；它并未改善最坏情形复杂度，但比先前的实现快数倍。<sup>[11](https://explore.openaire.eu/search/publication?pid=10.1016%2Fs0022-4049%2899%2900005-5)</sup>

**自动选择序。** 尽管可能的单项式序近乎连续统，多数实现仍依赖 GrevLex 这类静态启发式，并由专家直觉引导。2025 年的一篇 arXiv 研究将序的选择视为可容许序空间上的强化学习问题，使用反映格罗布纳基计算代价的奖励信号；在来自系统生物学与计算机视觉的基准问题上，学到的策略始终优于标准启发式，显著降低了计算代价。<sup>[12](https://arxiv.org/abs/2602.02972)</sup>

## References

1. [Ring theory notes, Math 746, Boston University (Definition II.1.14, monomial orders)](https://math.bu.edu/people/drhast/Notes/Math746-ring-theory-notes.pdf)
2. [David Cox, Using Algebraic Geometry, Chapter 1 (monomial orders and matrix orders)](https://eclass.uoa.gr/modules/document/file.php/D231/Papers/Cox-UsingAlgebraicGeometry.pdf)
3. [Monomial orderings, LPTH Jussieu (definitions of lex, grlex, grevlex, multidegree)](https://www.lpthe.jussieu.fr/~talon/orderings.html)
4. [Monomial orderings, Macaulay2 documentation](https://www.macaulay2.com/doc/Macaulay2-1.23/share/doc/Macaulay2/Macaulay2Doc/html/_monomial_sporderings.html)
5. [SINGULAR documentation: pdata.doc (orderings, global and local orders, matrix representation)](https://fossies.org/linux/singular/doc/pdata.doc)
6. [Term orders, SageMath reference manual](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/term_order.html)
7. [Bruno Buchberger's PhD thesis 1965 (English translation), Journal of Symbolic Computation 41 (2006)](https://www.sciencedirect.com/science/article/pii/S0747717105001483)
8. [Faster change of order algorithm for Gröbner bases under shape and stability assumptions, arXiv:2202.09226](https://arxiv.org/abs/2202.09226)
9. [Solution of polynomial systems using msolve, SageMath reference manual](https://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/msolve.html)
10. [Collart, Kalkbrener, Mall (1997). Converting Bases with the Gröbner Walk. Journal of Symbolic Computation 24](https://www.sciencedirect.com/science/article/pii/S0747717196901455)
11. [Faugère, Jean-Charles (1999). A new efficient algorithm for computing Gröbner bases (F4). Journal of Pure and Applied Algebra 139](https://explore.openaire.eu/search/publication?pid=10.1016%2Fs0022-4049%2899%2900005-5)
12. [Learning Fast Monomial Orders for Gröbner Basis Computations, arXiv:2602.02972](https://arxiv.org/abs/2602.02972)

---
*Initially written Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Computational and symbolic algebra › Symbolic and algebraic algorithms › Gröbner bases and polynomial ideal algorithms

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/monomial-order

English original: https://www.edgepedia.org/monomial-order
