等价(逻辑)

来自GSXAB的知识库
(重定向自双条件命题
等价
术语名称 等价
英语名称 biconditional
别名 双条件, 实质双条件, material biconditional, 异或非, logical XNOR, 同或

等价(biconditional)是二元逻辑联结词,表示“两个命题具有相同真值”的逻辑关系。也可以说两个命题互相蕴涵

尽管“equivalence”和“等价”用词看似更加对应。 在数理逻辑领域,“equivalence”一般对应等值(命题间的关系),而“biconditional”对应等价(逻辑联结词)。

定义

等价
运算名称 等价
运算符号 [math]\displaystyle{ \leftrightarrow }[/math]
Latex \leftrightarrow
运算对象 命题公式
运算元数 2
运算结果 命题公式


双条件命题
术语名称 双条件命题
英语名称 biconditional proposition
前件
术语名称 前件
英语名称 antecedent
别名 条件, protasis
后件
术语名称 后件
英语名称 consequent
别名 结论, apodosis

对命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math] ,记命题 [math]\displaystyle{ R }[/math] 满足:

  • [math]\displaystyle{ P }[/math] 为真同时 [math]\displaystyle{ Q }[/math] 也为真时, [math]\displaystyle{ R }[/math] 为真;
  • [math]\displaystyle{ P }[/math] 为假同时 [math]\displaystyle{ Q }[/math] 也为假时, [math]\displaystyle{ R }[/math] 为真;
  • [math]\displaystyle{ P }[/math] 为真同时 [math]\displaystyle{ Q }[/math] 为假时, [math]\displaystyle{ R }[/math] 为假;
  • [math]\displaystyle{ P }[/math] 为假同时 [math]\displaystyle{ Q }[/math] 为真时, [math]\displaystyle{ R }[/math] 为假。

称这样的命题 [math]\displaystyle{ R }[/math] 为命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math] 构成的双条件命题(biconditional proposition),记为 [math]\displaystyle{ P \leftrightarrow Q }[/math] ,读作[math]\displaystyle{ P }[/math] 当且仅当 [math]\displaystyle{ Q }[/math] ([math]\displaystyle{ P }[/math] if and only if [math]\displaystyle{ Q }[/math] ,常缩写为 [math]\displaystyle{ P }[/math] iff [math]\displaystyle{ Q }[/math][1]) 或 [math]\displaystyle{ P }[/math] 等价于 [math]\displaystyle{ Q }[/math] 。 其中逻辑联结词 [math]\displaystyle{ \leftrightarrow }[/math] 称为双条件词等价词[math]\displaystyle{ P }[/math] 称为双条件命题的前提前件(antecedent), [math]\displaystyle{ Q }[/math] 称为双条件命题的结论后件(consequent)。

等价的其他常见记号有 [math]\displaystyle{ P \equiv Q }[/math][math]\displaystyle{ P\Leftrightarrow Q }[/math] [2]

主联结词为等价词的公式称为双条件式(biconditional formula); 主联结词为等价词的命题称为双条件命题(biconditional proposition)。

一般情况下,不使用“等价式”和“等价命题”的说法,因为“等价命题”多指两个或多个等值(equivalent)的命题。 一般极少会在中文语境中单独表达“使用了等价逻辑联结词的命题”这个概念。

sym_diff_compl.svg

真值表

[math]\displaystyle{ \leftrightarrow }[/math] 的真值表
[math]\displaystyle{ p }[/math] [math]\displaystyle{ q }[/math] [math]\displaystyle{ p \leftrightarrow q }[/math]
T T T
T F F
F T F
F F T

性质

  • 等价表示
    • 表达为否定合取析取的组合:对任意命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math][math]\displaystyle{ P\leftrightarrow Q = (P \land Q) \lor (\lnot P \land \lnot Q) = (P \lor \lnot Q) \land (\lnot P \lor Q) }[/math]
    • 互斥析取的否定:对任意命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math][math]\displaystyle{ P\leftrightarrow Q = \lnot(P\nleftrightarrow Q) }[/math]
    • 相当于两方向蕴涵的合取:对任意命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math][math]\displaystyle{ P\leftrightarrow Q = (P\rightarrow Q) \land (Q\rightarrow P) }[/math]
  • 运算性质
    • 结合律:对命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math][math]\displaystyle{ R }[/math] ,有 [math]\displaystyle{ (P \leftrightarrow Q) \leftrightarrow R = P \leftrightarrow (Q \leftrightarrow R) }[/math]
    • 交换律:对命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math],有 [math]\displaystyle{ P \leftrightarrow Q = Q \leftrightarrow P }[/math]
    • 特殊值
      • [math]\displaystyle{ P \leftrightarrow \mathrm{F} = \lnot P }[/math]
      • [math]\displaystyle{ P \leftrightarrow \mathrm{T} = P }[/math]
    • 每个元素都是二阶元、是自身的逆元:对任意命题 [math]\displaystyle{ P }[/math][math]\displaystyle{ P\leftrightarrow P=\mathrm{T} }[/math]

不同逻辑系统中的等价

以上为经典逻辑中的等价:等价是真值函数的,完全由真值表定义。

  • 直觉主义逻辑中,等价是两侧的蕴涵,而蕴涵与可证明性相关,也就是要求 [math]\displaystyle{ P\leftrightarrow Q }[/math] 为真当且仅当存在 [math]\displaystyle{ P }[/math][math]\displaystyle{ Q }[/math] 之间双向的构造性证明,而不仅仅是符合真值表。
  • 多值逻辑、模糊逻辑中,真值的取值可能性更多,等价可能有更复杂的定义方式,但通常保持“两个命题真值相同”的核心概念。

自然语言中,使用明确动词短语“等价于”、“等同于”,或使用动词“有且仅有”、连词“当且仅当”等表达等价的逻辑关系。 自然语言中一般用这些词语表示概念的等同,或形式之间可互相推理出,而不仅仅是联结词中要求的真值相同。


命题逻辑/零阶逻辑
基本概念 命题 命题、命题变元、命题常量
真值 [math]\displaystyle{ \mathrm{T} }[/math]/[math]\displaystyle{ 1 }[/math]/[math]\displaystyle{ \top }[/math][math]\displaystyle{ \mathrm{F} }[/math]/[math]\displaystyle{ 0 }[/math]/[math]\displaystyle{ \bot }[/math]
命题结构 命题结构 原子命题、复合命题
逻辑联结词 否定(非) [math]\displaystyle{ \lnot }[/math]合取(且/与) [math]\displaystyle{ \land }[/math]析取(或) [math]\displaystyle{ \lor }[/math]
蕴涵(推出) [math]\displaystyle{ \rightarrow }[/math]等价(当且仅当) [math]\displaystyle{ \leftrightarrow }[/math]
命题公式 形式定义 命题语言 [math]\displaystyle{ \mathcal{L}_0 }[/math]命题公式
逻辑语义 指派Tarski 真理定义解释真值表满足
语义分类 重言式/永真式、偶然式/仅可满足式/可真可假式、矛盾式/永假式/不可满足式
语义关系 重言等价/等值/等价 [math]\displaystyle{ = }[/math]/[math]\displaystyle{ \Leftrightarrow }[/math]重言蕴涵 [math]\displaystyle{ \Rightarrow }[/math]
范式 析取范式、合取范式主析取范式、主合取范式
逻辑联结词
零元
真值表 [math]\displaystyle{ \bot }[/math] [math]\displaystyle{ \top }[/math]
T F
名称 [math]\displaystyle{ \top }[/math] [math]\displaystyle{ \bot }[/math]
二进制编号 0 1
编号 0 1
一元
真值表 [math]\displaystyle{ p }[/math] [math]\displaystyle{ \bot }[/math] [math]\displaystyle{ \lnot p }[/math] [math]\displaystyle{ p }[/math] [math]\displaystyle{ \top }[/math]
T F T
F F T F T
名称 [math]\displaystyle{ \bot }[/math] 否定(非) [math]\displaystyle{ \lnot }[/math] (恒等映射 [math]\displaystyle{ \mathrm{id} }[/math] [math]\displaystyle{ \top }[/math]
缩写 - NOT - -
二进制编号 00 01 10 11
编号 0 1 2 3
二元
真值表 [math]\displaystyle{ p }[/math] [math]\displaystyle{ q }[/math] [math]\displaystyle{ \bot }[/math] [math]\displaystyle{ p \bar{\vee} q }[/math]
[math]\displaystyle{ p \downarrow q }[/math]
[math]\displaystyle{ p \nleftarrow q }[/math] [math]\displaystyle{ \lnot p }[/math] [math]\displaystyle{ p \nrightarrow q }[/math] [math]\displaystyle{ \lnot q }[/math] [math]\displaystyle{ p \oplus q }[/math]
[math]\displaystyle{ p \nleftrightarrow q }[/math]
[math]\displaystyle{ p \barwedge q }[/math]
[math]\displaystyle{ p \uparrow q }[/math]
[math]\displaystyle{ p \land q }[/math] [math]\displaystyle{ p \leftrightarrow q }[/math] [math]\displaystyle{ q }[/math] [math]\displaystyle{ p \rightarrow q }[/math] [math]\displaystyle{ p }[/math] [math]\displaystyle{ p \leftarrow q }[/math] [math]\displaystyle{ p \lor q }[/math] [math]\displaystyle{ \top }[/math]
T T F T
F F T F T
F T F T F T F T F T
F F T F T F T F T F T F T F T F T
名称
[math]\displaystyle{ \bot }[/math]
或非
[math]\displaystyle{ \downarrow }[/math]/[math]\displaystyle{ \bar{\vee} }[/math]
- 否定

[math]\displaystyle{ \lnot }[/math]
- 否定

[math]\displaystyle{ \lnot }[/math]
互斥析取
异或
[math]\displaystyle{ \oplus }[/math]/[math]\displaystyle{ \nleftrightarrow }[/math]/[math]\displaystyle{ \veebar }[/math]
与非
[math]\displaystyle{ \uparrow }[/math]/[math]\displaystyle{ \barwedge }[/math]
合取
且/与
[math]\displaystyle{ \land }[/math]
等价
当且仅当
[math]\displaystyle{ \leftrightarrow }[/math]
投影映射
[math]\displaystyle{ \mathrm{proj}_2 }[/math]
蕴涵
推出
[math]\displaystyle{ \rightarrow }[/math]
投影映射
[math]\displaystyle{ \mathrm{proj}_1 }[/math]
- 析取

[math]\displaystyle{ \lor }[/math]

[math]\displaystyle{ \top }[/math]
缩写 - NOR - NOT NIMPLY NOT XOR NAND AND XNOR
EQV
- IMPLY - - OR -
二进制编号 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
编号 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

琐事

名称

在数字电路中,特别是门电路中,有另一个常见的名称,异或非(XNOR),是按照与非或非的方式命名的,先进行异或再进行非。

另外硬件领域也经常被叫做“同或”,指和“异或”相反的,两个输入相同。 但是这个叫法有两个问题:

  • 与“或”和“异或”不同,等价本身和“或”没有任何关系;
  • 确认不到可靠词源,只是确实习惯上很多人都在这么叫。

推测可能是误将“异或”(字面意思应为“相对不太常用的另一种‘或’”)望文生义成“异”并认为“或”没有语义,就给“同”生造了一个词。同时“同”比“等价”更简单、更容易传达含义,就被错误保留了下来。

  1. 缩写 iff 一般仍读作 if and only if [ˈɪf(ə)n̩(d)ˈəʊ̯n.liˌɪf] ,偶尔有读 [ɪfː] 的。 [1] [2]
  2. [math]\displaystyle{ P \equiv Q }[/math][math]\displaystyle{ P\Leftrightarrow Q }[/math] 都和重言等价符号有冲突,不建议用。