逻辑运算符

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








在形式逻辑中,逻辑运算符逻辑联结词把语句连接成更复杂的复杂语句。例如,假设有两个逻辑命题,分别是“正在下雨”和“我在屋里”,我们可以将它们组成复杂命题“正在下雨,并且我在屋里”或“没有正在下雨”或“如果正在下雨,那么我在屋里”。一个将两个语句组成的新的语句或命题叫做复合语句复合命题



基本運算符


基本的操作符有:“非”(¬)、“与”(∧)、“或”(∨)、“条件”(→)以及“双条件”(↔)。“非”是一个一元操作符,它只操作一项(¬ P)。剩下的是二元操作符,操作两项来组成复杂语句(P ∧ Q, P ∨ Q, P → Q, P ↔ Q)。


注意,符号“与”(∧)和交集(∩),“或”(∨)和并集(∪)的相似性。这不是巧合:交集的定义使用“与”,并集的定义是用“或”。


这些连接符的真值表:





































PQ¬P

PQ

PQ

PQ

PQ
TTFTTTT
TFFFTFF
FTTFTTF
FFTFFTT

为了减少需要的括号的数量,有以下的优先规则:¬高于∧,∧高于∨,∨高于→。例如,P ∨ Q ∧ ¬ R → S是 (P ∨ (Q ∧ (¬ R)) → S的简便写法。



二元邏輯聯結詞表


下面是在輸入P和Q上的16個二元布林函數。




























永假
符號
等價公式
真值表
文氏圖

⊥displaystyle bot bot

P ∧displaystyle wedge wedge ¬P












 

Q
0
1

P
0  
 0 
 0 
1  
 0 
 0 

Venn0000.svg

















永真
符號
等價公式
真值表
文氏圖

⊤displaystyle top top

P ∨displaystyle vee vee ¬P












 

Q
0
1

P
0  
 1 
 1 
1  
 1 
 1 

Venn1111.svg

















合取
符號
等價公式
真值表
文氏圖

P ∧displaystyle wedge wedge Q
P & Q
P · Q
P AND Q

P ↛displaystyle not rightarrow not rightarrow ¬Q
¬P ↚displaystyle not leftarrow not leftarrow Q
¬P ↓displaystyle downarrow downarrow ¬Q












 

Q
0
1

P
0  
 0 
 0 
1  
 0 
 1 

Venn0001.svg

















與非
符號
等價公式
真值表
文氏圖

PQ
P | Q
P NAND Q

P → ¬Q
¬PQ
¬P ∨ ¬Q












 

Q
0
1

P
0  
 1 
 1 
1  
 1 
 0 

Venn1110.svg

















非蘊涵
符號
等價公式
真值表
文氏圖

P ↛displaystyle not rightarrow not rightarrow Q
P ⊅displaystyle not supset not supset Q

P & ¬Q
¬PQ
¬P ↚displaystyle not leftarrow not leftarrow ¬Q












 

Q
0
1

P
0  
 0 
 0 
1  
 1 
 0 

Venn0100.svg

















蘊涵
符號
等價公式
真值表
文氏圖

PQ
P ⊃displaystyle supset supset Q

P ↑ ¬Q
¬PQ
¬P ← ¬Q












 

Q
0
1

P
0  
 1 
 1 
1  
 0 
 1 

Venn1011.svg

















命題P
符號
等價公式
真值表
文氏圖

P













 

Q
0
1

P
0  
 0 
 0 
1  
 1 
 1 

Venn0101.svg

















非P
符號
等價公式
真值表
文氏圖
¬P
~P













 

Q
0
1

P
0  
 1 
 1 
1  
 0 
 0 

Venn1010.svg

















反非蘊涵
符號
等價公式
真值表
文氏圖

P ↚displaystyle not leftarrow not leftarrow Q
P ⊄displaystyle not subset not subset Q

P ↓ ¬Q
¬P & Q
¬P ↛displaystyle not rightarrow not rightarrow ¬Q












 

Q
0
1

P
0  
 0 
 1 
1  
 0 
 0 

Venn0010.svg

















反蘊涵
符號
等價公式
真值表
文氏圖

P ←displaystyle leftarrow leftarrow Q
P ⊂displaystyle subset subset Q

P ∨ ¬Q
¬PQ
¬P → ¬Q












 

Q
0
1

P
0  
 1 
 0 
1  
 1 
 1 

Venn1101.svg

















命題Q
符號
等價公式
真值表
文氏圖

Q













 

Q
0
1

P
0  
 0 
 1 
1  
 0 
 1 

Venn0011.svg

















非Q
符號
等價公式
真值表
文氏圖
¬Q
~Q













 

Q
0
1

P
0  
 1 
 0 
1  
 1 
 0 

Venn1100.svg

















異或
符號
等價公式
真值表
文氏圖

P ↮displaystyle not leftrightarrow not leftrightarrow Q
P ≢displaystyle not equiv not equiv Q
P ⊕displaystyle oplus oplus Q
P XOR Q

P ↔ ¬Q
¬PQ
¬P ↮displaystyle not leftrightarrow not leftrightarrow ¬Q












 

Q
0
1

P
0  
 0 
 1 
1  
 1 
 0 

Venn0110.svg

















雙條件
符號
等價公式
真值表
文氏圖

PQ
PQ
P XNOR Q
P IFF Q

P ↮displaystyle not leftrightarrow not leftrightarrow ¬Q
¬P ↮displaystyle not leftrightarrow not leftrightarrow Q
¬P ↔ ¬Q












 

Q
0
1

P
0  
 1 
 0 
1  
 0 
 1 

Venn1001.svg

















析取
符號
等價公式
真值表
文氏圖

PQ
P  Q
P OR Q

P ←displaystyle leftarrow leftarrow ¬Q
¬PQ
¬P ↑ ¬Q












 

Q
0
1

P
0  
 0 
 1 
1  
 1 
 1 

Venn0111.svg

















或非
符號
等價公式
真值表
文氏圖

PQ
P NOR Q

P ↚displaystyle not leftarrow not leftarrow ¬Q
¬P ↛displaystyle not rightarrow not rightarrow Q
¬P ∧ ¬Q












 

Q
0
1

P
0  
 1 
 0 
1  
 0 
 0 

Venn1000.svg








圖示







真值表


哈斯圖


input Ainput Boutput f(A,B)X and ¬XA and Ben|Converse nonimplication|¬A and BBA and ¬BAA xor BA or B¬A and ¬BA xnor B¬A¬A or B¬Ben|Converse implication|A or ¬B¬A or ¬BX or ¬XLogical connectives table.svg




X or ¬X¬A or ¬Ben|Converse implication|A or ¬B¬A or BA or B¬B¬AA xor BA xnor BAB¬A and ¬BA and ¬Ben|Converse nonimplication|¬A and BA and BX and ¬XLogical connectives Hasse diagram.svg


Popular posts from this blog

California gubernatorial recall election

Telugu cinema

List of Pawn Stars episodes