離散數學 - 推理規則



為了從我們已知真值的語句中推匯出新的語句,使用**推理規則**。

推理規則的用途是什麼?

數學邏輯常用於邏輯證明。證明是有效的論證,用於確定數學語句的真值。

一個論證是一系列語句。最後一個語句是結論,所有其前面的語句稱為前提(或假設)。符號“$\therefore$”(讀作因此)放在結論之前。一個有效的論證是指結論遵循前提真值的論證。

推理規則為從我們已有的語句構建有效論證提供了模板或指南。

推理規則表

推理規則 名稱 推理規則 名稱

$$\begin{matrix} P \\ \hline \therefore P \lor Q \end{matrix}$$

加法

$$\begin{matrix} P \lor Q \\ \lnot P \\ \hline \therefore Q \end{matrix}$$

析取三段論

$$\begin{matrix} P \\ Q \\ \hline \therefore P \land Q \end{matrix}$$

合取

$$\begin{matrix} P \rightarrow Q \\ Q \rightarrow R \\ \hline \therefore P \rightarrow R \end{matrix}$$

假言三段論

$$\begin{matrix} P \land Q\\ \hline \therefore P \end{matrix}$$

簡化

$$\begin{matrix} ( P \rightarrow Q ) \land (R \rightarrow S) \\ P \lor R \\ \hline \therefore Q \lor S \end{matrix}$$

構造性二難推理

$$\begin{matrix} P \rightarrow Q \\ P \\ \hline \therefore Q \end{matrix}$$

肯定前件

$$\begin{matrix} (P \rightarrow Q) \land (R \rightarrow S) \\ \lnot Q \lor \lnot S \\ \hline \therefore \lnot P \lor \lnot R \end{matrix}$$

破壞性二難推理

$$\begin{matrix} P \rightarrow Q \\ \lnot Q \\ \hline \therefore \lnot P \end{matrix}$$

否定後件

加法

如果 P 是一個前提,我們可以使用加法規則推匯出 $ P \lor Q $。

$$\begin{matrix} P \\ \hline \therefore P \lor Q \end{matrix}$$

例子

令 P 為命題,“他學習非常努力”為真

因此 - “要麼他學習非常努力,要麼他是一個非常差的學生。” 這裡 Q 是命題“他是一個非常差的學生”。

合取

如果 P 和 Q 是兩個前提,我們可以使用合取規則推匯出 $ P \land Q $。

$$\begin{matrix} P \\ Q \\ \hline \therefore P \land Q \end{matrix}$$

例子

令 P - “他學習非常努力”

令 Q - “他是班上最好的男孩”

因此 - “他學習非常努力,並且他是班上最好的男孩”

簡化

如果 $P \land Q$ 是一個前提,我們可以使用簡化規則推匯出 P。

$$\begin{matrix} P \land Q\\ \hline \therefore P \end{matrix}$$

例子

"他學習非常努力,並且他是班上最好的男孩",$P \land Q$

因此 - “他學習非常努力”

肯定前件

如果 P 和 $P \rightarrow Q$ 是兩個前提,我們可以使用肯定前件推匯出 Q。

$$\begin{matrix} P \rightarrow Q \\ P \\ \hline \therefore Q \end{matrix}$$

例子

"如果你有密碼,那麼你可以登入 Facebook",$P \rightarrow Q$

"你有密碼",P

因此 - “你可以登入 Facebook”

否定後件

如果 $P \rightarrow Q$ 和 $\lnot Q$ 是兩個前提,我們可以使用否定後件推匯出 $\lnot P$。

$$\begin{matrix} P \rightarrow Q \\ \lnot Q \\ \hline \therefore \lnot P \end{matrix}$$

例子

"如果你有密碼,那麼你可以登入 Facebook",$P \rightarrow Q$

"你無法登入 Facebook",$\lnot Q$

因此 - “你沒有密碼”

析取三段論

如果 $\lnot P$ 和 $P \lor Q$ 是兩個前提,我們可以使用析取三段論推匯出 Q。

$$\begin{matrix} \lnot P \\ P \lor Q \\ \hline \therefore Q \end{matrix}$$

例子

"冰淇淋不是香草味的",$\lnot P$

"冰淇淋要麼是香草味的,要麼是巧克力味的",$P \lor Q$

因此 - “冰淇淋是巧克力味的”

假言三段論

如果 $P \rightarrow Q$ 和 $Q \rightarrow R$ 是兩個前提,我們可以使用假言三段論推匯出 $P \rightarrow R$

$$\begin{matrix} P \rightarrow Q \\ Q \rightarrow R \\ \hline \therefore P \rightarrow R \end{matrix}$$

例子

"如果下雨,我就不去上學",$P \rightarrow Q$

"如果我不去上學,我就不用做作業",$Q \rightarrow R$

因此 - “如果下雨,我就不用做作業”

構造性二難推理

如果 $( P \rightarrow Q ) \land (R \rightarrow S)$ 和 $P \lor R$ 是兩個前提,我們可以使用構造性二難推理推匯出 $Q \lor S$。

$$\begin{matrix} ( P \rightarrow Q ) \land (R \rightarrow S) \\ P \lor R \\ \hline \therefore Q \lor S \end{matrix}$$

例子

“如果下雨,我會請假”,$( P \rightarrow Q )$

“如果外面很熱,我會去沖涼”,$(R \rightarrow S)$

“要麼下雨,要麼外面很熱”,$P \lor R$

因此 - “我會請假,或者我會去沖涼”

破壞性二難推理

如果 $(P \rightarrow Q) \land (R \rightarrow S)$ 和 $ \lnot Q \lor \lnot S $ 是兩個前提,我們可以使用破壞性二難推理推匯出 $\lnot P \lor \lnot R$。

$$\begin{matrix} (P \rightarrow Q) \land (R \rightarrow S) \\ \lnot Q \lor \lnot S \\ \hline \therefore \lnot P \lor \lnot R \end{matrix}$$

例子

“如果下雨,我會請假”,$(P \rightarrow Q )$

“如果外面很熱,我會去沖涼”,$(R \rightarrow S)$

“要麼我不會請假,要麼我不會去沖涼”,$\lnot Q \lor \lnot S$

因此 - “要麼不下雨,要麼外面不熱”

廣告

© . All rights reserved.