# 项（逻辑）

在逻辑学中，**项**（term）是一阶逻辑形式语言中的一种表达式，用来指称论域中的某个对象——论域即该语言所谈论的个体的集合。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup> 项是形式语言中的指称表达式：数词、变元，以及像 \( 20 + 17 \) 或 \( f(f(f(a))) \) 这样由函数符号作用于更简单的项而构造出来的复合表达式。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup> 项与公式的关系大致相当于名词与句子的关系：项命名某物，而公式则陈述某种可以为真或为假的东西。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup>

| 关键事实 | 细节 |
|---|---|
| 定义 | 一阶逻辑中用来指称论域中某个对象的表达式<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup> |
| 构成要素 | 变元、常元符号（名称），以及作用于项之上的函数符号；一个项是变元、常元，或者对于某个 \( n \) 元函数符号和项 \( t_1, \ldots, t_n \) 而言的 \( f(t_1, \ldots, t_n) \)<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup><sup> • </sup><sup>[3](https://pages.cs.wisc.edu/~dyer/cs540/notes/spring97/fopc.html)</sup> |
| 地位 | 项不是公式；它不作出任何可以为真或为假的断言<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup> |
| 基项 | 不含变元的项；一个语言的所有基项构成的集合就是它的Herbrand宇宙<sup>[4](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)</sup> |
| 大小 | 只要该语言含有元数大于0的函数符号，Herbrand宇宙就是无限的，其基数与整数相同<sup>[4](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)</sup> |
| 在计算中的作用 | 用项代换变元、并通过合一加以组织，是罗宾逊于1965年为自动定理证明提出的消解原理的基本操作<sup>[5](https://www.sciencedirect.com/topics/computer-science/unification-problem)</sup> |

## 形式定义

一阶语言的项集是递归地定义的，即定义为满足以下两个条件的最小封闭集合：一个名称（或常元）是项；如果 \( t_1, \ldots, t_n \) 是项，而 \( f \) 是一个 \( n \) 元函数符号，则 \( f(t_1, \ldots, t_n) \) 是项。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup> 将变元也视为项的教科书会再加一条基础子句：语言 \( \mathcal{L} \) 的项是由 \( \mathcal{L} \) 中符号组成的非空有限字符串，它是变元、常元符号，或者 \( f t_1 t_2 \ldots t_n \)，其中 \( f \) 是 \( n \) 元函数符号，每个 \( t_i \) 都是项。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup> 计算机科学中的表述则把同一意思说成：项是常元符号、变元符号，或者 \( n \) 个项的 \( n \) 元函数。<sup>[3](https://pages.cs.wisc.edu/~dyer/cs540/notes/spring97/fopc.html)</sup>

由于定义是递归的，每个复合项都包含本身也是项的较短子串；又因为子串所含的符号少于整个字符串，这一递归是有良基的。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup> 该定义还保证了解析的唯一性：每个项都只有一种分解方式，因此像 \( S(S(S(S(0)))) \) 这样的字符串只有唯一一种树形结构。<sup>[6](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>

两条基础子句可以合并为一条。形式逻辑中的名称本质上就是一个0元函数符号，所以如果允许第二条子句包含 \( n = 0 \) 的情形，第一条子句便不再必要，已被第二条的极限情形所涵盖。ANU逻辑讲义之所以将两条子句分开保留，是为了清晰起见，也因为有些逻辑学家倾向于把名称与其他函数符号区别开来。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup>

## 项与公式

项与公式是并列地定义的，但扮演着不同的角色。一个语言的项是表示其结构中元素的字符串；公式则是对这些元素作出断言的字符串。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup> 原子公式是通过将关系符号或等词符号作用于项而构成的：\( R(t_1, \ldots, t_n) \) 或 \( t_1 = t_2 \)。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup> 一个既不含关系符号也不含等词符号的字符串不可能是公式，因为它不作出任何可以为真或为假的断言；它可能是一个项，也可能是无意义的符号串。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup>

在自然语言中，扮演项这一角色的表达式类别包括专名、限定摹状词，以及像“7 + 5”这样的函数表达式。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup>

## 例子

- 在算术语言中，数词“20”和“17”是分别指称数20和17的项；“+”是表示加法的二元函数符号，因此“20+17”是指称数37的项。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup>
- 如果“a”是名称，“f”是一元函数符号，那么“f(f(f(a)))”是一个项。<sup>[1](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)</sup>
- 在一个对每个自然数都有一个常元符号、并具有二元函数符号 \( + \) 和 \( \cdot \) 的语言中，字符串 \( \bar{714} \)、\( + \bar{3} \bar{2} \) 和 \( \cdot + \bar{3} \bar{2} \bar{4} \) 都是项，而 \( \bar{1} \bar{2} \bar{3} \) 不是项，而是三个项排成一列构成的序列。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup>
- 滑铁卢大学的语法讲义将 \( (3+2) \)、\( S(S(S(S(0)))) \)、\( (x_1 + (x_2 \times 0)) \) 以及裸变元 \( x_{23} \) 列为项的例子。<sup>[6](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>

记号法各有不同。有些表述以不带逗号的前缀形式书写项，于是规范字符串 \( < SSSSS0SS0 \) 用中缀记法和常规括号显示为 \( SSSSS0 < SS0 \)；这些都是叠加在同一递归定义之上的可读性手段。<sup>[2](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)</sup>

## 基项与Herbrand宇宙

不含任何变元的项称为基项。<sup>[7](https://aic.ai.wu.ac.at/~polleres/teaching/lma2006/lecture5.pdf)</sup> 一阶语言的所有基项构成的集合就是它的Herbrand宇宙。<sup>[4](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)</sup> 如果该语言没有常元，则任意添加一个新的常元，以使该集合非空。<sup>[4](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)</sup> Herbrand宇宙是可枚举的；只要该语言含有元数大于0的函数符号，它就是无限的，且基数与整数相同；若只有常元，则它是一个有限非空集合。<sup>[4](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)</sup><sup> • </sup><sup>[8](https://www.cs.bu.edu/faculty/kfoury/UNI-Teaching/CS512/AK_Documents_Past_Semesters/compactness.pdf)</sup>

这个集合承担着实质性的语义工作。Herbrand结构以基项本身作为论域，将每个基项解释为其自身，将每个函数符号解释为显而易见的造项运算；在同一签名上，不同的Herbrand结构之间只有谓词符号的解释有所不同。<sup>[8](https://www.cs.bu.edu/faculty/kfoury/UNI-Teaching/CS512/AK_Documents_Past_Semesters/compactness.pdf)</sup> 对于子句集而言，存在模型当且仅当存在Herbrand模型，这就把模型的寻找归结为对基原子的真值指派，而基原子的集合称为Herbrand基。<sup>[4](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)</sup>

Herbrand宇宙还可以充当数据类型。非负整数 \( 0, 1, 2, \ldots \) 可以等同于由一个常元符号 \( \mathbf{o} \) 和一个一元函数符号 \( \mathbf{s} \) 生成的项 \( \mathbf{o}, \mathbf{s}(\mathbf{o}), \mathbf{s}(\mathbf{s}(\mathbf{o})), \ldots \)；表、树以及其他数据类型也可以用适当的函数符号类似地生成。<sup>[9](https://encyclopediaofmath.org/wiki/Logic_programming)</sup> 有限词汇表之所以能命名无穷多个对象，正是在这个意义上说的：斯坦福《逻辑学导论》课程正是在这一基础上引入项逻辑，把语言从赤裸的对象常元扩展到由它们以无穷多种方式构造出来的复合项，从而使得具有无穷多个对象的世界——例如整数上的算术——可以用有限多个常元加以公理化。<sup>[10](https://complaw.stanford.edu/intrologic/chapters/chapter_11.html)</sup>

## 自动推理中的项

用项代换变元，是把一般性陈述应用于具体情况所用的机制，而对它的系统处理正是自动定理证明的基础。罗宾逊（J. A. Robinson）1965年的论文《一种基于消解原理的面向机器的逻辑》分析了用项代换变元的过程，并将其与真值函项分析结合为单一的推理过程——消解，其迭代效率远高于以往交替进行代换与真值函项分析阶段的循环式程序。<sup>[11](https://web.stanford.edu/class/linguist289/robinson65.pdf)</sup> 罗宾逊引入合一作为消解原理的基本操作，并证明了可合一的项具有最一般合一子，同时给出了计算它的算法，于是定理证明器可以算出所需的变元实例化，而不必盲目地搜索它们。<sup>[5](https://www.sciencedirect.com/topics/computer-science/unification-problem)</sup> 在这一研究方向中成长起来的逻辑程序设计，其语言是霍恩子句一阶逻辑，原子是由关系符号和项构成的表达式 \( \mathbf{r}(t_1 \ldots t_n) \)。<sup>[9](https://encyclopediaofmath.org/wiki/Logic_programming)</sup>

## References

1. [Term, Glossary, ANU Logic Notes](https://users.cecs.anu.edu.au/~jks/LogicNotes/glossary/g_term.html)
2. [Terms and Formulas, A Friendly Introduction to Mathematical Logic (Leary & Kristiansen), Mathematics LibreTexts](https://math.libretexts.org/Bookshelves/Mathematical_Logic_and_Proof/Book%3A_Friendly_Introduction_to_Mathematical_Logic_%28Leary_and_Kristiansen%29/01%3A_Structures_and_Languages/1.04%3A_Terms_and_Formulas)
3. [CS 540 Lecture Notes: First-Order Logic, University of Wisconsin](https://pages.cs.wisc.edu/~dyer/cs540/notes/spring97/fopc.html)
4. [The Herbrand Universe and Herbrand Base, University of Miami](https://www.cs.miami.edu/home/geoff/Courses/TPTPSYS/FirstOrder/Herbrand.shtml)
5. [Unification Problem, ScienceDirect Topics](https://www.sciencedirect.com/topics/computer-science/unification-problem)
6. [Syntax of First-Order Logic, CS 245, University of Waterloo](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)
7. [Unification, Resolution lecture notes, Vienna University of Technology](https://aic.ai.wu.ac.at/~polleres/teaching/lma2006/lecture5.pdf)
8. [Herbrand universes, Herbrand structures, Herbrand models, lecture notes, Boston University](https://www.cs.bu.edu/faculty/kfoury/UNI-Teaching/CS512/AK_Documents_Past_Semesters/compactness.pdf)
9. [Logic programming, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Logic_programming)
10. [Chapter 11: Term Logic, Stanford Introduction to Logic](https://complaw.stanford.edu/intrologic/chapters/chapter_11.html)
11. [J. A. Robinson (1965). A Machine-Oriented Logic Based on the Resolution Principle. Journal of the ACM 12(1), 23–41.](https://web.stanford.edu/class/linguist289/robinson65.pdf)

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

Topic: 物质世界与数学 › 数学与统计学 › 逻辑与离散数学 › Formal logic and foundations › Logical calculi and logical syntax › Predicate logic › First-order syntax and formulas

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/term-logic

English original: https://www.edgepedia.org/term-logic
