跳转到内容

Advertising:

等价(逻辑):修订间差异

来自GSXAB的知识库
Gsxab留言 | 贡献
无编辑摘要
 
Gsxab留言 | 贡献
无编辑摘要
第1行: 第1行:
[[分类:命题逻辑]]
[[分类:命题逻辑]]{{DEFAULTSORT:deng3jia4}}
{{#seo:
|keywords=等价, 双条件, 等价词, 当且仅当
|description=本文介绍等价的定义、性质与表示方法,包括等价作为二元逻辑联结词的概念,其真值表定义,及其在经典逻辑中的运算性质。
|modified_time={{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}
|published_time=2023-08-06
}}
{{InfoBox
{{InfoBox
|name=等价
|name=等价
第5行: 第11行:
|aliases=双条件,实质双条件,material biconditional,异或非,logical XNOR,同或
|aliases=双条件,实质双条件,material biconditional,异或非,logical XNOR,同或
}}
}}
'''等价'''('''biconditional''')是对两个[[命题]],两者同时为[[]]、同时为[[]],或者说互相[[蕴含]],所对应的命题。
'''等价'''('''biconditional''')是二元[[逻辑联结词]],表示“两个[[命题]]具有相同[[真值]]”的逻辑关系。也可以说两个命题互相[[蕴含]]


<blockquote>
<blockquote>
尽管“equivalence”和“等价”用词更加对应。
尽管“equivalence”和“等价”用词看似更加对应。
在数理逻辑领域,英语 equivalence 一般对应的是中文术语的[[等值(逻辑)|等值]](命题的关系之一), biconditional 对应中文术语的等价(逻辑联结词之一)。
在数理逻辑领域,“equivalence”一般对应[[等值(逻辑)|等值]](命题间的关系),而“biconditional”对应等价(逻辑联结词)。
</blockquote>
</blockquote>


第40行: 第46行:
* 当 <math>P</math> 为真同时 <math>Q</math> 为假时, <math>R</math> 为假;
* 当 <math>P</math> 为真同时 <math>Q</math> 为假时, <math>R</math> 为假;
* 当 <math>P</math> 为假同时 <math>Q</math> 为真时, <math>R</math> 为假。
* 当 <math>P</math> 为假同时 <math>Q</math> 为真时, <math>R</math> 为假。
称这样的命题 <math>R</math> 为命题 <math>P</math> 、 <math>Q</math> 构成的'''双条件命题'''('''bidirectional proposition'''),记为 <math>P \leftrightarrow Q</math> ,读作'''<math>P</math> 当且仅当 <math>Q</math>''' ('''<math>P</math> if and only if <math>Q</math>''' ,常缩写为 '''<math>P</math> iff <math>Q</math>''') 或 '''<math>P</math> 等价于 <math>Q</math>'''。其中[[逻辑联结词]] <math>\leftrightarrow</math> 称为'''双条件词'''或'''等价词''', <math>P</math> 称为双条件命题的'''前提'''或'''前件'''('''antecedent'''), <math>Q</math> 称为双条件命题的'''结论'''或'''后件'''('''consequent''')。
称这样的命题 <math>R</math> 为命题 <math>P</math> 、 <math>Q</math> 构成的'''双条件命题'''('''biconditional proposition'''),记为 <math>P \leftrightarrow Q</math> ,读作'''<math>P</math> 当且仅当 <math>Q</math>''' ('''<math>P</math> if and only if <math>Q</math>''' ,常缩写为 '''<math>P</math> iff <math>Q</math>'''<ref>缩写 iff 一般仍读作 if and only if {{IPA|[ˈɪf(ə)n̩(d)ˈəʊ̯n.liˌɪf]}} ,偶尔有读 {{IPA|[ɪfː]}} 的。 [https://www.merriam-webster.com/dictionary/iff] 。</ref>) 或 '''<math>P</math> 等价于 <math>Q</math>'''
其中逻辑联结词 <math>\leftrightarrow</math> 称为'''双条件词'''或'''等价词''', <math>P</math> 称为双条件命题的'''前提'''或'''前件'''('''antecedent'''), <math>Q</math> 称为双条件命题的'''结论'''或'''后件'''('''consequent''')。
 
主联结词为等价词的公式称为'''双条件式'''('''biconditional formula''');
主联结词为等价词的命题称为'''双条件命题'''('''biconditional proposition''')。


<blockquote>
<blockquote>
一般情况下,“等价命题”多指等值的命题。
一般情况下,不使用“等价式”和“等价命题”的说法,因为“等价命题”多指两个或多个等值(equivalent)的命题。
使用等价联结词的命题,有英语 bidirectional proposition,一般译为“双条件命题”,但很少见。
一般极少会在中文语境中单独表达“使用了等价逻辑联结词的命题”这个概念。
一般极少会在中文语境中单独表达“使用了等价逻辑联结词的命题”这个概念。
</blockquote>
</blockquote>
主联结词为等价词的公式称为'''等价式'''('''disjunctive formula''')。


=== 真值表 ===
=== 真值表 ===


{| class='wikitable'
{| class="wikitable" style="text-align:center;border-width:2px;margin: 0 auto"
|+ <math>\leftrightarrow</math> 的真值表
|-
|-
! <math>p</math>
! scope="col" style="width:33%;border-bottom-width:2px" | <math>p</math>
! <math>q</math>
! scope="col" style="width:33%;border-bottom-width:2px" | <math>q</math>
! <math>p \leftrightarrow q</math>
! scope="col" style="width:34%;border-bottom-width:2px" | <math>p \leftrightarrow q</math>
|-
|-
| style='background-color: rgba(0,255,0,0.1)' | T
| {{True}}
| style='background-color: rgba(0,255,0,0.1)' | T
| {{True}}
| style='background-color: rgba(0,255,0,0.1)' | T
| {{True}}
|-
|-
| style='background-color: rgba(0,255,0,0.1)' | T
| {{True}}
| style='background-color: rgba(255,0,0,0.1)' | F
| {{False}}
| style='background-color: rgba(0,255,0,0.1)' | F
| {{False}}
|-
|-
| style='background-color: rgba(255,0,0,0.1)' | F
| {{False}}
| style='background-color: rgba(0,255,0,0.1)' | T
| {{True}}
| style='background-color: rgba(0,255,0,0.1)' | F
| {{False}}
|-
|-
| style='background-color: rgba(255,0,0,0.1)' | F
| {{False}}
| style='background-color: rgba(0,255,0,0.1)' | F
| {{False}}
| style='background-color: rgba(0,255,0,0.1)' | T
| {{True}}
|}
|}


== 性质 ==
== 性质 ==


* 对命题 <math>P</math> 和 <math>Q</math>,有 <math>P \leftrightarrow Q = (P \rightarrow Q) \land (Q \rightarrow P) = (P \land Q) \lor (\lnot P \lor \lnot Q)</math>。
* 等价表示
* 交换律:对命题 <math>P</math> 和 <math>Q</math>,有 <math>P \leftrightarrow Q = Q \leftrightarrow P</math>。
** 表达为[[否定]]、[[合取]]、[[析取]]的组合:对任意命题 <math>P</math> 和 <math>Q</math> <math>P\leftrightarrow Q = (P \land Q) \lor (\lnot P \land \lnot Q) = (P \lor \lnot Q) \land (\lnot P \lor Q)</math> 。
* 结合律:对命题 <math>P</math> 、 <math>Q</math> <math>R</math>,有 <math>(P \leftrightarrow Q) \leftrightarrow R = P \leftrightarrow (Q \leftrightarrow R)</math>。
** 是[[互斥析取]]的否定:对任意命题 <math>P</math> 和 <math>Q</math> , <math>P\leftrightarrow Q = \lnot(P\nleftrightarrow Q)</math> 。
** 相当于两方向[[蕴含]]的析取:对任意命题 <math>P</math> 和 <math>Q</math> <math>P\leftrightarrow Q = (P\rightarrow Q) \land (Q\rightarrow P)</math> 。
* 运算性质
** [[结合律]]:对命题 <math>P</math> 、 <math>Q</math> <math>R</math> ,有 <math>(P \leftrightarrow Q) \leftrightarrow R = P \leftrightarrow (Q \leftrightarrow R)</math> 。
** [[交换律]]:对命题 <math>P</math> 和 <math>Q</math>,有 <math>P \leftrightarrow Q = Q \leftrightarrow P</math>。
** 特殊值
*** <math>P \leftrightarrow \mathrm{F} = \lnot P</math> 。
*** <math>P \leftrightarrow \mathrm{T} = P</math> 。
** 每个元素都是二阶元、是自身的逆元:对任意命题 <math>P</math> , <math>P\leftrightarrow P=\mathrm{T}</math> 。
 
== 不同逻辑系统中的等价 ==
 
以上为经典逻辑中的等价:等价是真值函数的,完全由真值表定义。
* 直觉主义逻辑中,等价是两侧的蕴含,而蕴含与可证明性相关,也就是要求 <math>P\leftrightarrow Q</math> 为真当且仅当存在 <math>P</math> 和 <math>Q</math> 之间双向的构造性证明,而不仅仅是符合真值表。
* 多值逻辑、模糊逻辑中,真值的取值可能性更多,等价可能有更复杂的定义方式,但通常保持“两个命题真值相同”的核心概念。
 
<blockquote>
自然语言中,使用明确动词短语“等价于”、“等同于”,或使用动词“有且仅有”、连词“当且仅当”等表达等价的逻辑关系。
自然语言中一般用这些词语表示概念的等同,或形式之间可互相推理出,而不仅仅是联结词中要求的真值相同。
</blockquote>




第89行: 第116行:
=== 名称 ===
=== 名称 ===


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


另外在这个领域也经常被叫做“同或”,指和“异或”相反的,两个输入相同。
另外硬件领域也经常被叫做“同或”,指和“异或”相反的,两个输入相同。
但是这个叫法有两个问题:
但是这个叫法有两个问题:
* 与“或”和“异或”不同,等价本身和“或”没有任何关系;
* 与“或”和“异或”不同,等价本身和“或”没有任何关系;
* 第二是确认不到可靠词源,只是确实习惯上很多人都在这么叫。
* 确认不到可靠词源,只是确实习惯上很多人都在这么叫。
推测可能是以为“异或”是“异”的意思就给“同”生造了一个词。
推测可能是误将“异或”(字面意思应为“相对不太常用的另一种‘或’”)望文生义成“异”并认为“或”没有语义,就给“同”生造了一个词。同时“同”比“等价”更简单、更容易传达含义,就被错误保留了下来。

2025年11月4日 (二) 07:15的版本

等价
术语名称 等价
英语名称 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)。

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

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

真值表

[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]

Advertising: