Translating English sentences into propositional logic with quantifiers [004R]
- February 5, 2026
Let's look at some examples of expressing natural language statements in formal propositional logic.
Example [004S]
- February 5, 2026
“Every natural number is less than or equal to its own square.” \forall n:\mathbb {N}. n \leq n^2 (This is a true proposition.)
Example [004T]
- February 5, 2026
“The square of any integer is nonnegative.” \forall x:\Z . x^2 \geq 0 (This is also true.)
Example [004U]
- February 5, 2026
“1369 is a perfect square.” \exists n:\mathbb {N}. n^2 = 1369 This also happens to be true. Note that this is much nicer than trying to write something like \mathrm {IsInteger}(\sqrt {n}). \sqrt {-} is complicated, and we don’t know how to define \mathrm {IsInteger}.
Example [004V]
- February 5, 2026
“n is even.” \mathrm {Even}(n) \equiv (\exists {k}: {\Z }.\; 2k = n).
Example [004W]
- February 5, 2026
“n is odd.” \mathrm {Odd}(n) = (\exists {k}: {\Z }.\; 2k + 1 = n). Or we could define it as \neg \mathrm {Even}(n). (It is actually slightly nontrivial to prove formally that \mathrm {Odd}(n) \equiv \neg \mathrm {Even}(n)—we won’t be able to prove it until we go over the Division Algorithm later in the semester!)
Example [004X]
- February 5, 2026
“If n is even, then n + 2 is even.” \forall {n}: {\Z }.\; \mathrm {Even}(n) \to \mathrm {Even}(n+2) Note that bare variables in mathematical statements like this tend to hide an implicit \forall !