First-Order Logic
Quantifiers
Predicates are propositions with variables
e.g.
When there is a variable, we need to specify the domain
Domain of a variable is the set of all values that may be substituted in place of the variable
Universal and Existential Quantifier
The truth of quantified statement depends on the domain
- Universal quantifier:
means for all in - Existential quantifier:
means there exists some in
Translating Mathematical Theorem
If an integer
is greater than 2, then the equation has no solution in positive integers
- Find domain:
- Find condition:
- Convert to
format: - Simplify:
Every positive even number at least 6 is a sum of two primes
Suppose given predicates
- Find domain:
- Find condition:
- Convert to
format: - Simplify:
Negation
e.g. Not everyone likes football = There exists someone who doesn’t like football.
Assume the domain is
e.g. Not exists a plant that can fly = every plant cannot fly
Multiple Quantifiers
Order of Quantifiers
| 维度 | 命题 A (普遍量化优先) | 命题 B (存在量化优先) |
|---|---|---|
| 自然语言 | “防病毒软件杀所有计算机病毒” (Each virus has a killer) | “存在一个杀软能干掉所有病毒” (One killer kills everything) |
| 逻辑公式 | ||
| 约束范围 | 弱约束。 ( 只要对当前 | 强约束。 ( 选定后的 |
Hence, order of quantifiers is important.
Arguments of Quantified Statements
Predicate Calculus Validity
- Propositional logic: A technology is no matter what the truth value of
and are. - 对
的所有真假组合都为真
- 对
- First-order logic: A tautology is no matter what the domain of
or are - 对任意论域 domain + 任意谓词含义 predicate 都为真
A quantified argument is valid if the conclusion is true whenever the assumptions are true
Arguments with Quantified Statements
- Universal instantiation
如果所有
- Universal modus ponens
如果所有
- Universal modus tollens
如果所有
Universal Generalization
When
If