德·摩根定律
这是逻辑代数中的德·摩根定律(De Morgan's Laws)之一,下面从真值表和逻辑推理两个角度讲解该等价关系:
1. 真值表法
列出\(p\)、\(q\)所有可能的取值组合(\(True\)或\(False\)),然后分别计算\(\neg (p\land q)\) 和\((\neg p)\lor (\neg q)\) 的值。
\(p\) | \(q\) | \(p\land q\) | \(\neg (p\land q)\) | \(\neg p\) | \(\neg q\) | \((\neg p)\lor (\neg q)\) |
---|---|---|---|---|---|---|
\(False\) | \(False\) | \(False\) | \(True\) | \(True\) | \(True\) | \(True\) |
\(False\) | \(True\) | \(False\) | \(True\) | \(True\) | \(False\) | \(True\) |
\(True\) | \(False\) | \(False\) | \(True\) | \(False\) | \(True\) | \(True\) |
\(True\) | \(True\) | \(True\) | \(False\) | \(False\) | \(False\) | \(False\) |
从真值表中可以看出,对于\(p\)和\(q\)所有可能的取值,\(\neg (p\land q)\) 和\((\neg p)\lor (\neg q)\) 的值都相等,所以二者逻辑等价。
2. 逻辑推理法
- 理解含义:
- \(\neg (p\land q)\) 表示“\(p\)且\(q\)”这个命题不成立。也就是说,\(p\)和\(q\)不能同时为真。
- \((\neg p)\lor (\neg q)\) 表示“非\(p\)”或者“非\(q\)”,即\(p\)为假或者\(q\)为假。
- 推理过程:
- 当\(\neg (p\land q)\) 为真时,意味着\(p\)和\(q\)不同时为真,那么必然是\(p\)为假或者\(q\)为假,也就是\((\neg p)\lor (\neg q)\) 为真。
- 当\((\neg p)\lor (\neg q)\) 为真时,即\(p\)为假或者\(q\)为假,那么\(p\)和\(q\)不可能同时为真,所以\(\neg (p\land q)\) 为真。
综上,\(\neg (p\land q)\equiv (\neg p)\lor (\neg q)\) 成立。