当前位置:网站首页>[mathematical logic] propositional logic (judgment of the correctness of propositional logic reasoning | formal structure is eternal truth - equivalent calculus | deduction from premise - logical reas
[mathematical logic] propositional logic (judgment of the correctness of propositional logic reasoning | formal structure is eternal truth - equivalent calculus | deduction from premise - logical reas
2022-07-03 03:40:00 【Programmer community】
List of articles
- One 、 Judgment of the correctness of propositional logic reasoning
- Two 、 The formal structure is forever true ( Equivalent calculus )
- 3、 ... and 、 Deduce the conclusion from the premise ( logical reasoning )
One 、 Judgment of the correctness of propositional logic reasoning
Propositional reasoning , according to Premise , Reasoning out Conclusion ;
Such as :
Premise : yes
p
→
(
q
→
r
)
p \to (q \to r)
p→(q→r) ,
p
p
p ,
q
q
q ;
Conclusion : yes
r
r
r
How to judge according to the above premise , The reasoning conclusion is correct ?
The law of reasoning :
A
,
B
A,B
A,B There are two propositions , If
A
→
B
A \to B
A→B It's Yongzhen style , that
A
⇒
B
A \Rightarrow B
A⇒B ;
The formal structure of reasoning
Premise :
A
1
,
A
2
,
⋯
,
A
k
A_1 , A_2 , \cdots , A_k
A1,A2,⋯,Ak
Conclusion :
B
B
B
The formal structure of reasoning is :
(
A
1
∧
A
2
∧
⋯
∧
A
k
)
→
B
(A_1 \land A_2 \land \cdots \land A_k) \to B
(A1∧A2∧⋯∧Ak)→B
Propositional logic The correctness of reasoning determine , There are two ways ;
Method 1 : Write inferential Formal structure , Check whether the formal structure of the reasoning is Yongzhen style ; If it is Yongzhen , Then the reasoning is correct ;
Method 2 : from Premise Deduce Conclusion , according to Equivalence calculus rules , Rules of reasoning , Make a deduction ;
Two 、 The formal structure is forever true ( Equivalent calculus )
Equivalent calculus reference blog : 【 Mathematical logic 】 Propositional logic ( Equivalent calculus | Idempotent law | Commutative law | Associative law | Distributive law | De Morgan law | absorptivity | Law of zero | The same thing | The law of excluded middle | Law of contradiction | Double negative rate | Implication equivalence … )
Premise :
p
→
(
q
→
r
)
p \to (q \to r)
p→(q→r) ,
p
p
p ,
q
q
q ;
Conclusion :
r
r
r
The formal structure of reasoning is :
(
p
→
(
q
→
r
)
)
∧
p
∧
q
→
r
(p \to (q \to r)) \land p \land q \to r
(p→(q→r))∧p∧q→r
Use Equivalent calculus Methods , Verify whether the above formal structure is Yongzhen style ;
Connective The priority for :“
¬
\lnot
¬” Greater than “
∧
,
∨
\land , \lor
∧,∨” Greater than “
→
,
\to, \leftrightarrow
→,” ; Start with the higher priority ;
(
p
→
(
q
→
r
)
)
∧
p
∧
q
→
r
(p \to (q \to r)) \land p \land q \to r
(p→(q→r))∧p∧q→r
Implication equivalence : Use Implication equivalence The rules , Put the above
(
p
→
(
q
→
r
)
)
(p \to (q \to r))
(p→(q→r)) Perform equivalent calculus :
⇔
(
¬
p
∨
(
¬
q
∨
r
)
)
∧
p
∧
q
→
r
\Leftrightarrow (\lnot p \lor (\lnot q \lor r)) \land p \land q \to r
⇔(¬p∨(¬q∨r))∧p∧q→r
Distribution rate : according to Distribution rate , Calculation
(
¬
p
∨
(
¬
q
∨
r
)
)
∧
p
(\lnot p \lor (\lnot q \lor r)) \land p
(¬p∨(¬q∨r))∧p part :
⇔
(
(
¬
p
∧
p
)
∨
(
(
¬
q
∨
r
)
∧
p
)
)
∧
q
→
r
\Leftrightarrow (( \lnot p \land p ) \lor ( (\lnot q \lor r) \land p ) ) \land q \to r
⇔((¬p∧p)∨((¬q∨r)∧p))∧q→r
Law of contradiction : among according to Law of contradiction You know ,
¬
p
∧
p
⇔
0
\lnot p \land p \Leftrightarrow 0
¬p∧p⇔0 :
⇔
(
0
∨
(
(
¬
q
∨
r
)
∧
p
)
)
∧
q
→
r
\Leftrightarrow ( 0 \lor ( (\lnot q \lor r) \land p ) ) \land q \to r
⇔(0∨((¬q∨r)∧p))∧q→r
The same thing : according to The same thing ,
0
∨
(
(
¬
q
∨
r
)
∧
p
)
0 \lor ( (\lnot q \lor r) \land p )
0∨((¬q∨r)∧p) And
(
¬
q
∨
r
)
∧
p
(\lnot q \lor r) \land p
(¬q∨r)∧p It is equivalent. :
⇔
(
(
¬
q
∨
r
)
∧
p
)
∧
q
→
r
\Leftrightarrow ( (\lnot q \lor r) \land p ) \land q \to r
⇔((¬q∨r)∧p)∧q→r
Associative law : according to Associative law , To recombine
(
(
¬
q
∨
r
)
∧
p
)
∧
q
( (\lnot q \lor r) \land p ) \land q
((¬q∨r)∧p)∧q by
(
(
¬
q
∨
r
)
∧
q
)
∧
p
( (\lnot q \lor r) \land q ) \land p
((¬q∨r)∧q)∧p :
⇔
(
(
¬
q
∨
r
)
∧
q
)
∧
p
→
r
\Leftrightarrow ( (\lnot q \lor r) \land q ) \land p \to r
⇔((¬q∨r)∧q)∧p→r
Distribution rate : according to Distribution rate , Calculation
(
¬
q
∨
r
)
∧
q
(\lnot q \lor r) \land q
(¬q∨r)∧q , The result is
(
¬
q
∧
q
)
∨
(
r
∧
q
)
(\lnot q \land q) \lor (r \land q)
(¬q∧q)∨(r∧q)
⇔
(
(
¬
q
∧
q
)
∨
(
r
∧
q
)
)
∧
p
→
r
\Leftrightarrow ( (\lnot q \land q) \lor (r \land q) ) \land p \to r
⇔((¬q∧q)∨(r∧q))∧p→r
Law of contradiction : according to Law of contradiction Calculation
¬
q
∧
q
\lnot q \land q
¬q∧q , As a result,
0
0
0 :
⇔
(
0
∨
(
r
∧
q
)
)
∧
p
→
r
\Leftrightarrow ( 0 \lor (r \land q) ) \land p \to r
⇔(0∨(r∧q))∧p→r
The same thing : According to the same ,
0
∨
(
r
∧
q
)
0 \lor (r \land q)
0∨(r∧q) Equivalent to
(
r
∧
q
)
(r \land q)
(r∧q) :
⇔
(
r
∧
q
)
∧
p
→
r
\Leftrightarrow (r \land q) \land p \to r
⇔(r∧q)∧p→r
Connective priority :
(
r
∧
q
)
∧
p
(r \land q) \land p
(r∧q)∧p in , The conjunctions have the same priority , Brackets can be deleted , Put three propositions in a bracket ;
⇔
(
r
∧
q
∧
p
)
→
r
\Leftrightarrow (r \land q \land p ) \to r
⇔(r∧q∧p)→r
Implication equivalence : according to Implication equivalence , elimination Implicative connectives
→
\to
→ :
⇔
¬
(
r
∧
q
∧
p
)
∨
r
\Leftrightarrow \lnot (r \land q \land p) \lor r
⇔¬(r∧q∧p)∨r
De Morgan law : according to De Morgan law , Assign a negative sign in parentheses ;
⇔
(
¬
r
∨
¬
q
∨
¬
p
)
∨
r
\Leftrightarrow (\lnot r \lor \lnot q \lor \lnot p ) \lor r
⇔(¬r∨¬q∨¬p)∨r
Connective priority :
(
¬
r
∨
¬
q
∨
¬
p
)
∨
r
(\lnot r \lor \lnot q \lor \lnot p ) \lor r
(¬r∨¬q∨¬p)∨r in , The conjunctions have the same priority , Brackets can be deleted , Put three propositions in a bracket ;
⇔
¬
r
∨
¬
q
∨
¬
p
∨
r
\Leftrightarrow \lnot r \lor \lnot q \lor \lnot p \lor r
⇔¬r∨¬q∨¬p∨r
The law of excluded middle : According to the law of exclusion ,
¬
r
∨
r
\lnot r \lor r
¬r∨r And
1
1
1 Equivalent ;
⇔
1
∨
¬
q
∨
¬
p
\Leftrightarrow 1 \lor \lnot q \lor \lnot p
⇔1∨¬q∨¬p
Law of zero : According to the zero law ,
1
1
1 Extract any value , Are equivalent to
1
1
1 :
⇔
1
\Leftrightarrow 1
⇔1
3、 ... and 、 Deduce the conclusion from the premise ( logical reasoning )
Logical reasoning reference blog : 【 Mathematical logic 】 Propositional logic ( Propositional logic inference | The formal structure of reasoning | The law of reasoning | Additional law | The law of simplification | Hypothetical reasoning | Reject | Disjunctive syllogism | Hypothetical syllogism | Equivalent syllogism | constructive dilemma )
Premise :
p
→
(
q
→
r
)
p \to (q \to r)
p→(q→r) ,
p
p
p ,
q
q
q ;
Conclusion :
r
r
r
Connect the prerequisites with conjunctive connectives ,
(
p
→
(
q
→
r
)
)
∧
p
∧
q
(p \to (q \to r)) \land p \land q
(p→(q→r))∧p∧q , Perform equivalent calculus , To calculate the
r
r
r ;
(
p
→
(
q
→
r
)
)
∧
p
∧
q
(p \to (q \to r)) \land p \land q
(p→(q→r))∧p∧q
Equivalent calculus Associative law :
⇔
(
(
p
→
(
q
→
r
)
)
∧
p
)
∧
q
\Leftrightarrow ((p \to (q \to r)) \land p) \land q
⇔((p→(q→r))∧p)∧q
logical reasoning Hypothetical reasoning :
(
A
→
B
)
∧
A
⇒
B
( A \to B ) \land A \Rightarrow B
(A→B)∧A⇒B , So from
(
p
→
(
q
→
r
)
)
∧
p
(p \to (q \to r)) \land p
(p→(q→r))∧p It can be inferred that
q
→
r
q \to r
q→r ;
⇒
(
q
→
r
)
∨
q
\Rightarrow (q \to r) \lor q
⇒(q→r)∨q
logical reasoning Hypothetical reasoning :
(
A
→
B
)
∧
A
⇒
B
( A \to B ) \land A \Rightarrow B
(A→B)∧A⇒B , So from
(
q
→
r
)
∨
q
(q \to r) \lor q
(q→r)∨q It can be inferred that
r
r
r ;
⇒
r
\Rightarrow r
⇒r
logical reasoning Than Equivalent calculus fast , Equivalent calculus is more intuitive , Logical reasoning needs to choose the appropriate reasoning law ;
边栏推荐
- [leetcode question brushing day 34] 540 Unique element in array, 384 Disrupt array, 202 Happy number, 149 Maximum number of points on a line
- Separable bonds and convertible bonds
- Mysql Mac版下载安装教程
- 【全民编程】《软件编程-讲课视频》【零基础入门到实战应用】
- Compare float with 0
- 递归:快速排序,归并排序和堆排序
- 静态网页 和 动态网页的区别 & WEB1.0和WEB2.0的区别 & GET 和 POST 的区别
- The difference between static web pages and dynamic web pages & the difference between Web1.0 and Web2.0 & the difference between get and post
- C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions
- float与0比较
猜你喜欢
用Three.js做一个简单的3D场景
Hi3536C V100R001C02SPC040 交叉编译器安装
For instruction, uploading pictures and display effect optimization of simple wechat applet development
释放数据力量的Ceph-尚文网络xUP楠哥
Limit of one question per day
900w+ data, from 17s to 300ms, how to operate
Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence
Mongodb replication set [master-slave replication]
Bid farewell to artificial mental retardation: Mengzi open source project team received RMB 100 million financing to help NLP develop
如何迈向IPv6之IPv6过渡技术-尚文网络奎哥
随机推荐
[mathematical logic] predicate logic (individual word | individual domain | predicate | full name quantifier | existence quantifier | predicate formula | exercise)
@Accessors annotation function specifies that the prefix follows the hump naming
【DRM】DRM bridge驱动调用流程简单分析
redis在服务器linux下的启动的相关命令(安装和配置)
Elsevier latex submitted the article pdftex def Error: File `thumbnails/cas-email. jpeg‘ not found: using draf
Why does thread crash not cause JVM crash
Change and access of median value of listening object
Docker install and start MySQL service
释放数据力量的Ceph-尚文网络xUP楠哥
Ffmpeg one / more pictures synthetic video
leetcode:动态规划模板
softmax的近似之NCE详解
IPv6 transition technology-6to4 manual tunnel configuration experiment -- Kuige of Shangwen network
IPv6过渡技术-6to4手工隧道配置实验--尚文网络奎哥
动态规划:最长回文子串和子序列
Applet (continuous update)
Bigvision code
[AI practice] Application xgboost Xgbregressor builds air quality prediction model (I)
Limit of one question per day
node 开启服务器