date: 2023-12-23
title: propositional-logic
status: DONE
author:
- AllenYGY
tags:
- Propositional-Logic
- DiscreteStructure
- Lec1
- NOTE
created: 2023-12-23T02:12
updated: 2024-04-08T19:37
publish: True
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

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

Compound(复合)Propositions
- A compound proposition involves a number of propositional variables and logical operators.

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