Mathematical Logic and Proofs
1 Mathematical Logic
Mathematical logic is a precise mathematical language used in much of
mathematics. Its purpose is to eliminate ambiguities that arise in com-
munication in natural languages. Its applicability is limited in scope but
where it can be applied, it brings in greater precision.
1. Propositional Logic
2. Predicate Logic
2 Propositional Logic
A proposition is a statement that is either true or false. It
cannot be neither nor both.
While the truth or falsity of certain propositions can be debated outside
the framework of logic, the field of logic only enables conclusions once the
valuations of propositions is known.
Truth tables: A tabular way to list standard (and non-standard) boolean
functions.
Syntax: It is the structure by which formulae are constrructed.
Semantics: It is the interpretation of a formula under different truth
values of its propositions. In simple terms, the truth table.
Two formulae in propositional logic are said to be semantically equiv-
alent if they both evaluate to the same truth values under each possible
assignment.
Standard connectives/ operators in boolean logic: And (∧), Or
(∨), Not (¬), implication (⇒), equivalence (⇔), exclusive-or (⊕).
axioms. inference rules, theorems, proofs. Building proofs, con-
tradictions and tautologies. Fallicious proofs.
1
Converse, contrapositive and inverse.
Applications of propositional logic:
1. Queries
2. Puzzles
3. System design
4. Hardware and algorithm design/implementation
Standard equivalences, non-standard formulae and the number of for-
mulae over a fixed number of propositions. Standard forms like conjunctive
normal form (cnf) and disjunctive normal form (dnf). De Morgan’s Laws.
3 Predicate Logic
Here we have the standard existential (∃) and universal (∀) quantifiers and
several variants. There is an analogue to De Morgan’s Laws here also.
Nested quantifiers and applications in the context of strategy games.
4 Proof techniques
1. Direct proofs.
2. Proof by contraposition.
3. Proof by contradiction
4. Exhaustive proofs for finite settings
5. Proof by cases using finite quotienting
6. Without loss of generality: eliminating equivalent cases or cases con-
sidered trivial or already handled
7. Proof by construction
8. Non-constructive existence proof
9. Uniqueness proofs
10. The concept of counter-examples.
2
5 syntax
Syntax in the context of mathematical logic is rules used to describe all
legal ways to construct a formula in the logic.
The number of formulae is unlimited, but the rules are a limited finite
set. Thus they are powerful rules that can be applied to generate all possible
formulae. The set of rules for a given logic is not unique. Some are not
minimal and can be reduced. Greater variety of operators make it easier
to use, but smaller number of operators make circuit building and proving
thorems about the logic, much easier.
A set of rules is deemed adequate to construct all formulae in the logic, if
every distinct semantic formula can be represented syntactically in at least
one way using the set of rules.
Inductive rules construction:
1. The constant boolean values T and F (often represented by the nu-
merals 1 and 0 respectively).
2. The atomic propositions p1 , p2 , . . .
3. Formulae constructed using one of the following operations
(a) If ϕ1 is a formula, then so is ¬ϕ1
(b) If ϕ1 and ϕ2 are formulae, then so is ϕ1 ∨ ϕ2
(c) If ϕ1 and ϕ2 are formulae, then so is ϕ1 ∧ ϕ2
(d) If ϕ1 and ϕ2 are formulae, then so is ϕ1 ⇒ ϕ2
(e) If ϕ1 and ϕ2 are formulae, then so is ϕ1 ⇔ ϕ2
One could use more (like NAND, NOR, XOR etc.) or fewer operations to
write all posible formulae in propositional logic. A minimal set of operators
could be (∨,¬) or others.
This process of building up formulae using a few basic cases together
with rules to form the non-basic cases gives rise to a technique of proof of
results that is very similar to the well-known mathematical induction: it
is called structural induction- or induction based on the structure of a
formula. There are other settings where structural induction is present, in
discrete mathematics.
Semantics is basically given by truth tables.
An assignment for a propositional logic formula is giving specific truth
values (either true or false) for each atomic proposition occurring in the
formula.
3
Table 1: NOT
¬ p1 ¬p1
Ass1 T F
Ass2 F T
Table 2: OR
∨ p1 p2 p1 ∨ p2
Ass1 T T T
Ass2 T F T
Ass3 F T T
Ass4 F F F
A formula is said to be satisfiable if it has at least one assignment under
which it evaluates to true.
A formula is said to be a tautology or a validity if it evaliuates to true
under every assignment.
A formula is said to be a contradiction if it evaluates to false under
every possible assignment.
The number of assignments for a boolean formula with k propositional
variables is 2k . The number of semantically distinct propositional logic
k
formula involving k variables is 22 .
Converting any truth table to a formula involving only ∧, ∨ and ¬:
1. Only consider asignment rows which evaluate to T (or 1)
2. For each such row create an ∨ of all the propositional variables that
are set to true, as they are and all those variables set to false in the
negation form.
3. Take the ∧ of the expressions obtained in step 2.
Table 3: AND
∧ p1 p2 p1 ∧ p2
Ass1 T T T
Ass2 T F F
Ass3 F T F
Ass4 F F F
4
Table 4: IMPLIES
⇒ p1 p2 p1 ⇒ p2
Ass1 T T T
Ass2 T F F
Ass3 F T T
Ass4 F F T
Table 5: EQUIVALENT
⇔ p1 p2 p1 ⇔ p2
Ass1 T T T
Ass2 T F F
Ass3 F T F
Ass4 F F T
A formula obtained in this way is said to be in conjunctive normal
form or cnf. Similarly it is possible to obtain an identical formula in
disjunctive normal form or dnf by focussing only on rows which evaluate
to 0 and modifying the steps in the above procedure, accordingly.
A list of well known logical equivalence statements (by name):
• Identity laws
• Domination laws
• Idempotent laws
• Double negation laws
• Commutative laws
• Associative laws
• Distributive laws
• De Morgan’s laws
• Negation laws
• Laws for implication
• Laws for equivalence