Propositional Logic and Logic Connectives
- 首先是引入了三个逻辑连接词 ∧,∨,¬。
- 优先级:¬,∧,∨
- 然后还有原子命题:p,q,r。
- 利用逻辑连接词、原子命题还有适当的括号,就能构成复合命题。
Definition 1. Truth table of connectives.
这里需要一幅图:
Defination 2. Suppose Σ is the set of propositional variables. A mapping J:Σ→{T,F} called a truth assignment (真值指派).
例如 Σ={p,q,r}, J(p)=T,J(q)=F,J(r)=F。在没有真值指派的情况下,原子命题的真与假没有意义。
Definition 3. Suppose Σ is the set of propositional variables and J:Σ→{T,F} is a truth assignment. The truth value of compound proposition ϕ on J (written as [[ϕ]]J ), is defined recursively as follows:
- [[p]]J=J(p) for atomic propositions. 就是用真值指派本身定义。
- [[ϕ∧ψ]]J=[[∧]]([[ϕ]]J,[[ψ]]J)
- [[ϕ∨ψ]]J=[[∨]]([[ϕ]]J,[[ψ]]J)
- [[¬ϕ]]J=[[¬]]([[ϕ]]J)
where [[∧]],[[∨]] and [[¬]] represents truth tables of ∧,∨ and ¬.
- 以上定义了复合命题在真值指派上的真值。这里强调了复合命题就是符合了某些语法(原子命题和逻辑连接词的特定组合)的一串符号,不要把它看成真值。
- 想要知道复合命题在任意真值指派下的真值,使用真值表是可行的办法。
Logical Equivalence
Definition 4. ϕ is a logically equivalent (逻辑等价) to ψ, written as ϕ≡ψ, if ϕ’s truth value and ψ’s truth value are the same under any situation. In other words, ϕ≡ψ if [[ϕ]]J=[[ψ]]J for any truth assignment J.
- 注意,逻辑等价并不说明两个命题是同一个命题。两个命题只是从真值的角度区分不了,但是从语法形式的角度可以区分。
- 证明逻辑等价可以使用真值表说明,如果在所有真值指派下两个命题真值相等,那么逻辑等价。
Example 5. p≡¬¬p
Theorem 6
- ¬(¬ϕ)≡ϕ (Double Negation)
- ϕ∨ϕ≡ϕ, ϕ∧ϕ≡ϕ (Idempotent Laws, 幂等律)
- ϕ∨ψ≡ψ∨ϕ, ϕ∧ψ≡ψ∧ϕ (Commutative Laws, 交换律)
- (ϕ∨ψ)∨χ≡ϕ∨(ψ∨χ),
(ϕ∧ψ)∧χ≡ϕ∧(ψ∧χ) (Associative Laws, 结合律)
- ϕ∨(ψ∧χ)≡(ϕ∨ψ)∧(ϕ∨χ)
ϕ∧(ψ∨χ)≡(ϕ∧ψ)∨(ϕ∧χ) ( Distributive Laws,分配律)
- ¬(ϕ∧ψ)≡(¬ϕ)∨(¬ψ),
¬(ϕ∨ψ)≡(¬ϕ)∧(¬ψ) (De Morgan’s Laws)
Theorem 7 (Negation Laws)
有一些命题在任意的真值指派上都为真或者都为假,那么在逻辑等价的推理的时候会用 T,F 表示恒为真或者恒为假的命题。注意,这里并不是表示命题和真值逻辑等价。
- ϕ∨(¬ϕ)≡T
- ϕ∧(¬ϕ)≡F
Theorem 8 (Laws of logical constants).
- ϕ∧T≡ϕ
- ϕ∨F≡ϕ
- ϕ∨T≡T
- ϕ∧F≡F
Theorem 9 (Absorption Laws).
- ϕ∨(ϕ∧ψ)≡ϕ
- ϕ∧(ϕ∨ψ)≡ϕ
Theorem 10 (Transitivity(传递性))
If ϕ≡ψ and ψ≡χ,then ϕ≡χ.
Theorem 11 (Congruence Property(算子对于逻辑等价的保持)).
- If ϕ≡ψ then ¬ϕ≡¬ψ.
- If ϕ1≡ϕ2 and ψ1≡ψ2 then ϕ1∧ψ1≡ϕ2∧ψ2.
- If ϕ1≡ϕ2 and ψ1≡ψ2 then ϕ1∨ψ1≡ϕ2∨ψ2.
Theorem 12 (Reflexivity(自反性)). ϕ≡ϕ.
Consequence Relation
Definition 13. Suppose Φ is a set of propositions and ψ is one single proposition. We say that ψ is a consequence (语义后承) of Ψ, written as Ψ⊨ϕ, if Ψ’s being all true implies that ψ is also true. In other words, Ψ⊨ψ if for any truth assignment J, [[ϕ]]J=T for any ϕ∈Ψ implies [[ψ]]J=T.
We will write ⊨ψ,ϕ⊨ψ,ϕ1,ϕ2,…,ϕn and Φ,ϕ1,ϕ2,…ϕn⊨ψ to represent ∅⊨ψ,{ϕ}⊨ψ,{ϕ1,ϕ2,…,ϕn}⊨ψ and Φ∪{ϕ1,ϕ2,…,ϕn}⊨ψ.
Example 14. Φ={p,q},ψ=p∧q,Φ⊨ψ
Example 15. Φ={p∧q},ψ=p,Φ⊨ψ
Example 16. Φ={p∧q},ψ=q,Φ⊨ψ
Example 17. Φ={p∨q,¬p∨r},ψ=q∨r,Φ⊨ψ
Example 18. Φ={p,q},ψ=p∨q,Φ⊨ψ
Example 19. Φ={p},ψ=p∨q,Φ⊨ψ
Example 20. Φ={p},ψ=p∧q,Φ=ψ
Example 21. Φ={p}, ψ=q, Φ=ψ
Example 22. Φ={ }, ψ=p∨ ¬p, Φ⊨ψ
Example 23. Φ={},ψ=p∧¬p,Φ=ψ
Example 24. Φ={ }, ψ=p, Φ=ψ
Example 25. Φ={p,¬p},ψ=q,Φ⊨ψ
Example 26. Φ={p∧¬p},ψ=q,Φ⊨ψ
Example 27. Φ={p,¬p},ψ=q∧¬q,Φ⊨ψ
Theorem 28. ϕ,ψ⊨ϕ∧ψ ($\land $-Introduction)
ϕ∧ψ⊨ϕ(∧-Elimination-1)
ϕ∧ψ⊨ψ(∧-Elimination-2)
ϕ⊨ϕ∨ψ (∨-Introduction-1)
ψ⊨ϕ∨ψ (∨-Introduction-2)
Theorem 29 (∨-Elimination).If Φ,ϕ1⊨ψ and Φ,ϕ2⊨ψ,then Φ,ϕ1∨ϕ2⊨ψ
Proof.
Suppose (1)[[ϕ]]J=T for any ϕ∈Φ;(2)[[ϕ1∨ϕ2]]J=T.
Case analysis. at least one of the following holds: [[ϕ1]]J=T,[[ϕ2]]J=T
Qed.
Theorem 30 (Contrapositive(逆否律)).
- If Φ,¬ϕ1⊨ϕ2, then Φ,¬ϕ2⊨ϕ1
- If Φ,ϕ1⊨¬ϕ2, then Φ,ϕ2⊨¬ϕ1
- If Φ,ϕ1⊨ϕ2, then Φ, ¬ϕ2⊨¬ϕ1
- If Φ,¬ϕ1⊨¬ϕ2, then Φ,ϕ2⊨ϕ1
proof.
Only prove the first statement here.
Suppose (1) [[ϕ]]J=T for any ϕ∈Φ; (2) [[¬ϕ2]]J=T.
Now, in order to achieve [[ϕ1]]J=T, we prove it by contradiction.
Assume [[ϕ1]]J=F. Thus [[¬ϕ]]J=T. So [[ϕ2]]J=T (According to Φ,¬ϕ1⊨ϕ2 and (1)), which contradicts with (2).
Qed.