# 签名（逻辑）

在数理逻辑中，**签名**（也称词汇表或语言）是可用于在形式语言中构造公式的非逻辑符号的集合，以及每个符号的元数。它规定了一阶语言包含哪些常量符号、函数符号和关系符号，以及每个符号接受多少个参数；其余的一切，如变量、联结词和量词，是所有语言共有的固定逻辑机制。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup><sup> • </sup><sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 签名是一组关系符号和函数符号，每个符号配有元数 \( k \in \mathbb{N} \)；许多处理方式还会加入一组常量符号。<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup><sup> • </sup><sup>[3](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)</sup> |
| 常量作为函数 | 常量符号可以被视为元数为0的函数符号，因此一些作者仅用函数符号和关系符号来定义签名。<sup>[3](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)</sup> |
| 标准例子 | 集合论：\(\{\in\}\)，单个二元谓词；图论：\(\{E\}\)，单个二元谓词；数论：\(\{0, S, +, \times\}\)，包含一个常量、一个一元函数和两个二元函数。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup> |
| 多类形式 | 在多类签名中，每个函数符号带有一个秩或类型 \( f : s_{1} \ldots s_{n} \mapsto s \)，其中 \( s_{i}, s \) 取自一个类集 \( S \)，变量也带有类型。<sup>[4](https://www.sciencedirect.com/topics/mathematics/algebraic-logic)</sup> |
| 在语义学中的作用 | 签名的结构（或模型）在一个域上解释每个符号：函数符号解释为函数，关系符号解释为关系，常量解释为元素。<sup>[3](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)</sup> |
| 非唯一性 | 不同的签名可以编码同一个理论；数论可以用 \(\{0, S, +, \times\}\) 书写，也可以用更丰富的 \(\{0, 1, S, +, \times, E, <\}\) 书写。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup> |

## 签名包含什么

一阶签名有三个标准组成部分：一组常量符号、一组函数符号和一组谓词（关系）符号。每个函数符号和谓词符号都带有一个正整数，称为它的元数，即它接受的参数个数；元数为1的符号是一元的，元数为2的符号是二元的。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>伯克利模型论讲义以语言 \( L = (F, R, C) \) 的形式给出了相同的结构，包含函数符号、带元数的关系符号和常量符号，并指出常量可以作为元数为0的情形被吸收进函数符号中。<sup>[3](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)</sup>

各种表述在取何为原始概念上有所不同。博迪尔斯基的模型论讲义将签名定义为一组带元数的关系符号和函数符号，列出了诸如 \( e \)、\( 0 \) 和 \( 1 \) 这样的0元函数符号，以及像 \( + \) 和 \( \cdot \) 这样的二元函数符号。<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>其他讲义使用仅由关系符号和常量符号组成的词汇表，完全没有函数符号，并由此构造结构。<sup>[5](https://www.cl.cam.ac.uk/~ad260/talks/fmt-swansea1.pdf)</sup>这些只是同一底层思想的不同记号选择：签名固定了用以构造项和原子公式的非逻辑词汇。<sup>[6](https://www.researchgate.net/publication/411803415_Part_I_-Foundations_of_First-Order_Logic_Chapter_1)</sup>

## 签名与结构

签名只是整个设置的一半；结构提供解释。给定一个语言 \( L \)，一个 \( L \)-结构由一个非空域 \( M \)、对每个函数符号的一个函数 \( f^{M} : M^{n_{f}} \to M \)、对每个关系符号的一个关系 \( R^{M} \subseteq M^{n_{R}} \)，以及对每个常量符号的一个元素 \( c^{M} \in M \) 组成。<sup>[3](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)</sup>熟悉的数学对象由此成为结构：\( (\mathbb{R}^{+}, \{\cdot, {}^{-1}\}, \{1\}) \) 和 \( (\mathbb{Z}, \{+, -\}, 0) \) 是群语言中的结构，\( (\mathbb{Q}, \{<\}) \) 是线性序语言中的结构。<sup>[3](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)</sup>

签名还决定了项和原子公式的样子。项由变量和常量符号通过应用函数符号构造而成，因此在皮亚诺算术的签名中——其中 \(\mathsf{zero}\) 的元数为0，\(\mathsf{succ}\) 的元数为1，\(\mathsf{plus}\)、\(\mathsf{times}\) 的元数为2——诸如 \(\mathsf{succ}(\mathsf{zero})\) 和 \(\mathsf{plus}(x, x)\) 这样的表达式就是项。<sup>[7](https://www.andrej.com/zapiski/ISRM-LOGRAC-2022/05-logic.lagda.html)</sup>原子公式则是等式 \( t_{1} = t_{2} \) 以及关系符号对项的应用 \( R_{j}(t_{1}, \ldots, t_{k}) \)。<sup>[7](https://www.andrej.com/zapiski/ISRM-LOGRAC-2022/05-logic.lagda.html)</sup>

## 标准例子

众所周知的签名展示了理论可以被何等紧凑地指定：<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>

- **图**：\(\tau_{\mathrm{Graph}} = \{E\}\)，一个二元关系符号；满足 \(\forall x \neg Exx \wedge \forall x \forall y (Exy \to Eyx)\) 的结构恰好是无自环的无向图。<sup>[5](https://www.cl.cam.ac.uk/~ad260/talks/fmt-swansea1.pdf)</sup>
- **群**：\(\tau_{\mathrm{Group}} = \{\circ, {}^{-1}, e\}\)，包含一个二元函数、一个一元函数和一个常量。<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>
- **环与有序环**：\(\tau_{\mathrm{Ring}} = \tau_{\mathrm{AGroup}} \cup \{1, \cdot\}\)，而 \(\tau_{\mathrm{ORing}} = \tau_{\mathrm{Ring}} \cup \tau_{\mathrm{LO}}\) 加入序符号 \( < \)。<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>
- **集合论**：标准签名是 \(\{\in\}\)，单个二元谓词，没有常量符号或函数符号。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>
- **算术**：\(\tau_{\mathrm{Arithmetic}} = \{0, s, +, \cdot, <\}\)。<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>

同一个符号字母可以以不同含义出现在不同签名中：\( E \) 在一个数论签名中充当幂运算，而在图论中充当边关系。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>

## 签名的选择

签名是一种建模决策，而非由主题内容所固定。不同的签名可以编码同一个理论：数论可以用 \(\{0, S, +, \times\}\) 呈现，其中完全没有谓词符号；也可以用 \(\{0, 1, S, +, \times, E, <\}\) 呈现，后者增加了第二个常量、幂运算和一个序关系。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>通常人们选择最能代表预期含义的符号。<sup>[1](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)</sup>

这种选择有实际后果。仅含关系符号和常量的签名使子结构保持简单，因为不存在需要检查闭包条件的函数。<sup>[5](https://www.cl.cam.ac.uk/~ad260/talks/fmt-swansea1.pdf)</sup>反过来，纯函数签名使每个结构都成为泛代数意义上的代数，而纯关系签名则给出关系结构。<sup>[2](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)</sup>

## 多类签名

普通一阶逻辑在单一域上量化。多类逻辑则允许在多个域上量化，这些域称为类，每个类有不相交的变量集。<sup>[8](https://plato.stanford.edu/archives/spr2024/entries/logic-many-sorted/)</sup>在多类签名中，函数符号 \( f \) 带有一个秩或类型 \( f : s_{1} \ldots s_{n} \mapsto s \)，其中 \( s_{i} \) 和 \( s \) 来自一个类集 \( S \)，变量也带有类型，因此 \( x : s \) 表示 \( x \) 在类 \( s \) 上取值。<sup>[4](https://www.sciencedirect.com/topics/mathematics/algebraic-logic)</sup>于是，多类代数的每个类都有一个载体集，其运算接受带类别的参数。<sup>[4](https://www.sciencedirect.com/topics/mathematics/algebraic-logic)</sup>

斯坦福哲学百科全书的表述将签名设为一个有序三元组，由类集、运算符号集和一个为每个符号指定其分类元数的秩函数构成；在一个关于二元关系的双类例子中，类是 \( i \)（个体）和 \( r \)（二元关系），一个三元谓词符号 \( \epsilon_{2} \) 的秩为 \( \langle i, i, r, 0 \rangle \)。<sup>[9](https://plato.stanford.edu/archives/win2024/entries/logic-many-sorted/index.html)</sup>

**非空类。** 为使多类逻辑的通常演绎规则保持有效，只考虑各类均非空的模型。<sup>[4](https://www.sciencedirect.com/topics/mathematics/algebraic-logic)</sup>这一要求在一个单类结构转换为多类结构时浮现出来：转换可能因两个原因失败，第一，每个类的论域——取为满足一元谓词 \( Q_{i} \) 的元素集合——必须非空；第二，秩为 \( \langle i_{1}, \ldots, i_{n}, i_{0} \rangle \) 的函数符号在限制到相应的论域积上时，必须返回 \( i_{0} \)-论域中的值。<sup>[10](https://plato.stanford.edu/entries/logic-many-sorted/index.html)</sup>补救办法是加入句子，要求每个 \( Q_{i} \) 非空，且每个函数尊重其分类秩。<sup>[10](https://plato.stanford.edu/entries/logic-many-sorted/index.html)</sup>

**嵌入单类逻辑。** 多类逻辑可以通过将所有分类域合并为一个域、加入一元谓词符号以追踪各类、并将每个量词相对化到其所属类的谓词，而嵌入普通一阶逻辑。关于德国人和法语使用者的双类例子变成一个单类语言，除原有关系外还带有一元谓词 \(\mathrm{German}\) 和 \(\mathrm{French}\)，而类的要求从语法中被抹去。<sup>[11](https://human.libretexts.org/Bookshelves/Philosophy/Logic_and_Reasoning/Sets_Logic_Computation_%28Zach%29/02%3A_II-_First-order_Logic/2.07%3A_Beyond_First-order_Logic/2.7.02%3A_Many-Sorted_Logic)</sup>反过来，任何单类一阶逻辑的演算都可扩展为多类演算；只需将量词规则和替换规则调整为适应多种类。<sup>[10](https://plato.stanford.edu/entries/logic-many-sorted/index.html)</sup>

**有序类扩展。** 一些框架在类之间加入子类关系。声明 \( \mathrm{Nat} < \mathrm{Int} \) 在标准模型中解释为自然数到整数的包含关系 \( \mathbb{N} \subseteq \mathbb{Z} \)。<sup>[4](https://www.sciencedirect.com/topics/mathematics/algebraic-logic)</sup>

## 基础之外的应用

签名并不局限于纯逻辑。在计算机科学中，约瑟夫·戈根（Joseph Goguen）的机构理论形式化了保持真值的逻辑系统之间的翻译，这一机制被应用于OBJ系列语言的模块系统，包括BOBJ、CafeOBJ、Maude、CASL和OBJ3，后来又被推广到一般编程语言的模块系统。<sup>[12](https://cseweb.ucsd.edu/~goguen/projs/inst.html)</sup>Ada、C++、Lotos和ML的模块系统受到了这些思想的影响，其中这一概念在Standard ML的签名、结构和函子中得到了最接近的实现。<sup>[12](https://cseweb.ucsd.edu/~goguen/projs/inst.html)</sup>多类一阶逻辑还充当自动推理中的目标语义：已有研究将回答集编程翻译为多类一阶逻辑，以赋予逻辑程序模块化的意义，从而绕过 grounding 并允许自动定理证明器验证程序性质。<sup>[13](https://arxiv.org/abs/2502.09230)</sup>

## References

1. [Syntax of First-Order Logic, CS 245, University of Waterloo](https://cs.uwaterloo.ca/~eblais/cs245e/f25/fol-syntax)
2. [Model Theory lecture notes, M. Bodirsky, TU Dresden](https://wwwpub.zih.tu-dresden.de/~bodirsky/Model-theory.pdf)
3. [Model Theory, Cambridge Part III Lecture Notes, Lent 2023](https://math.berkeley.edu/~ltomczak/notes/Lent2023/ModelTheory_Notes.pdf)
4. [Algebraic Logic: An Overview, ScienceDirect Topics](https://www.sciencedirect.com/topics/mathematics/algebraic-logic)
5. [Finite Model Theory lecture notes, A. Dawar, University of Cambridge](https://www.cl.cam.ac.uk/~ad260/talks/fmt-swansea1.pdf)
6. [Part I: Foundations of First-Order Logic, Chapter 1, ResearchGate](https://www.researchgate.net/publication/411803415_Part_I_-Foundations_of_First-Order_Logic_Chapter_1)
7. [Logic in Computer Science lecture notes, A. Bauer](https://www.andrej.com/zapiski/ISRM-LOGRAC-2022/05-logic.lagda.html)
8. [Many-Sorted Logic, Stanford Encyclopedia of Philosophy (Spring 2024 edition)](https://plato.stanford.edu/archives/spr2024/entries/logic-many-sorted/)
9. [Many-Sorted Logic, Stanford Encyclopedia of Philosophy (Winter 2024 edition)](https://plato.stanford.edu/archives/win2024/entries/logic-many-sorted/index.html)
10. [Many-Sorted Logic, Stanford Encyclopedia of Philosophy](https://plato.stanford.edu/entries/logic-many-sorted/index.html)
11. [Many-Sorted Logic, Sets, Logic, Computation (Zach), Humanities LibreTexts](https://human.libretexts.org/Bookshelves/Philosophy/Logic_and_Reasoning/Sets_Logic_Computation_%28Zach%29/02%3A_II-_First-order_Logic/2.07%3A_Beyond_First-order_Logic/2.7.02%3A_Many-Sorted_Logic)
12. [Institutions, J. A. Goguen, UCSD](https://cseweb.ucsd.edu/~goguen/projs/inst.html)
13. [Relating Answer Set Programming and Many-sorted Logics for Formal Verification, arXiv](https://arxiv.org/abs/2502.09230)

---
*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/signature-logic

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