Create Time: 23rd Dec 2023
Title: "[[propositional-logic]]"
status: DONE
Author:
- AllenYGY
tags:
- Propositional-Logic
- DiscreteStructure
- Lec1
- NOTE
created: 2023-12-23T02:12
updated: 2024-04-08T19:37
propositional-logic
Declarative sentence
- A declarative sentence (陈述句) is a sentence that aims to declare a fact.
eg: Today is Saturday.
- 疑问句/祈使句...(不是)
Proposition
- A proposition is a declarative sentence that is either true or false.
Propositional Variables
- Use variables (English letters) to represent propositions.
Truth Value
- Assigned to propositional variables.
True: represented by T
False: represented by F
Propositional Operators
- Logical negation (indicated by ¬ , ! , or ⁻) 非
- Logical conjunction (indicated by ∧, &&, or ·) 与 合取
- Logical disjunction (indicated by ∨, ||, or +) 或 析取
- Logical exclusive disjunction (indicated by ⊕) 异或
Logical implication (indicated by →)
- p when q
![img_1](https://cdn.jsdelivr.net/gh/ALLENYGY/ImageSpace@main/uPic/img_1.png)
p is the sufficient condition for q; q is the necessary condition for p
- Contrapositive(质位变换命题, 逆否命题:
- Converse (逆命题):
- Inverse (否命题):$\neg p \rightarrow \neg q $
Logical bidirectional implication (indicated by ↔)
- p if and only if q
- if p then q
![img_2](https://cdn.jsdelivr.net/gh/ALLENYGY/ImageSpace@main/uPic/img_2.png)
Compound(复合)Propositions
- A compound proposition involves a number of propositional variables and logical operators.
![img_3](https://cdn.jsdelivr.net/gh/ALLENYGY/ImageSpace@main/uPic/img_3.png)
does not mean
Specification Consistency
- Equivalently, if a specification {} is consistent, then the compound proposition is true for at least one assignment
- If the specification is inconsistent, then is always false.
1