命题语言
请注意,这个条目所介绍的术语没有标准称呼。仅仅是为了便于描述建立条目取了一个名字。
命题语言(propositional language),也直接称为命题逻辑的语言(language of propositional logic),指研究命题逻辑的形式语言,包括命题变元和逻辑联结词,有时也被称为 [math]\displaystyle{ \mathcal{L}_0 }[/math]。
命题语言是对命题逻辑进行的形式语言理论的分析,对应的句子或公式就是命题公式。
形式语言定义
定义形式语言 [math]\displaystyle{ \mathcal{L}_0 }[/math] 的字母表和规则如下:
字母表
[math]\displaystyle{ \mathcal{L}_0 }[/math] 的字母表是以下集合的并集:
- 命题变元的集合 [math]\displaystyle{ P = \{p_0, p_1, \dots \} }[/math];
- 逻辑联结词的集合 [math]\displaystyle{ C = C_1 \cup C_2 }[/math]:
- 一元逻辑联结词的集合 [math]\displaystyle{ C_1 = \{\lnot\} }[/math];
- 二元逻辑联结词的集合 [math]\displaystyle{ C_2 = \{\land, \lor, \rightarrow, \leftrightarrow\} }[/math];
- 辅助符号的集合,包括左右括号 [math]\displaystyle{ \{ (, ) \} }[/math]。
注:有的定义中包括常项集合,有的定义中包括常量真和假构成的集合,有的定义中包括真和假构成的零元逻辑联结词的集合 [math]\displaystyle{ C_0 }[/math] 并入 [math]\displaystyle{ C }[/math]。
规则
记 [math]\displaystyle{ \mathcal{L}_0 }[/math] 的公式集为 [math]\displaystyle{ F }[/math] ,其中仅包含以下几类元素:
- [math]\displaystyle{ p }[/math],[math]\displaystyle{ p\in P }[/math];
- [math]\displaystyle{ \lnot\phi }[/math],[math]\displaystyle{ \phi \in F }[/math];
- [math]\displaystyle{ (\phi\odot\psi) }[/math],[math]\displaystyle{ \phi,\psi \in F, \odot \in C_2 }[/math]。
且:
- 最外层的括号可省略;
- 可以按照 [math]\displaystyle{ \lnot, \land, \lor, \rightarrow, \leftrightarrow }[/math] 的结合顺序省略括号。
注:有的定义也包括真和假。
BNF 定义
<formula> ::= p | ¬ <formula> | ( <formula> <op> <formula> )
<op> ::= ∧ | ∨ | → | ↔
其中 [math]\displaystyle{ p\in P }[/math]。 且也按上述方式省略括号。