Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the...

97
Math 1090 Part one: Boolean Logic Saeed Ghasemi York University 18th June 2018 Saeed Ghasemi (York University) Math 1090 18th June 2018 1 / 97

Transcript of Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the...

Page 1: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Math 1090Part one: Boolean Logic

Saeed Ghasemi

York University

18th June 2018

Saeed Ghasemi (York University) Math 1090 18th June 2018 1 / 97

Page 2: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Alphabets of Boolean Logic

1 Symbols for variables. We denote them by p, q, r , . . . or p′, q′′, p0, r12and so on.

2 Symbols for constants. There are two of them, “>” (read “top” or“true”) and ⊥ (read “bottom” or “false”).

3 Brackets: “(” and “)”.

4 Boolean connectives: ¬, ∧, ∨, → and ≡

We will denote the alphabet of propositional (Boolean) logic by V. Sometextbooks use less connectives e.g., only ¬ and ∧, the other threeconnectives can be defined using these two. However out alphabet Vwould contain all five connectives.

Saeed Ghasemi (York University) Math 1090 18th June 2018 2 / 97

Page 3: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Definition

Given an alphabet A (i.e. a set of symbols) a string (or expression orword) over A is a finite ordered sequence of symbols in A.

We use letters A,B,C ,A′,B0 . . . to denote strings.Examples

If A = {a, b, c , 0, 1} then aaab01, ba1, 01b11 are strings. Note thatab 6= ba since the order matters.

These are strings over V

pq → ¬p′⊥ ((p()∨ ≡ r ∧ rq)(p>

The concatenation of two strings A and B is the new string AB. Theempty string which we will denote by λ is the unique string such thatλA = Aλ = A for any string A. Note that the notion of equality “=” isnot part of our alphabet V. It comes from “metatheory” or“metamathematics”.

Saeed Ghasemi (York University) Math 1090 18th June 2018 3 / 97

Page 4: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Well-formed formulas

Definition

A string over A is a well-formed formula (wff in short) if it is obtained byapplying the following three steps finitely many times

1 Every variable and constant symbol is a wff (these are called “atomicformulas”).

2 If A is a wff then (¬A) is also a wff.

3 If A and B are wff, then so are (A∧B), (A∨B), (A→ B) and A ≡ B.

Examples of wff :• ⊥• (p ≡ q)• (((¬p) ∨ q)→ ⊥)Note. In this chapter when we say “formula” we mean well-formedformula over the Boolean alphabet.

Saeed Ghasemi (York University) Math 1090 18th June 2018 4 / 97

Page 5: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Let WFF denote the set of all well-formed formulas. Equivalently we candefine WFF as follows

Definition

WFF is the smallest subset of the set of all strings over V such that

1 WFF contains all the variables and > and ⊥ (the constant symbols),

2 if A ∈WFF then (¬A) ∈WFF ,

3 if A,B ∈WFF then (A ∧ B), (A ∨ B), (A→ B) and (A ≡ B) alsobelong to WFF .

• From now on when we say formula we mean a well-formed formula.• In order to verify whether a string is a formula (a wff), we can either“parse the string top-down” or “parse the string bottom-up”.

Saeed Ghasemi (York University) Math 1090 18th June 2018 5 / 97

Page 6: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Example

Suppose we want to show that A = ((p ∨ (¬q))→ ⊥) is a wff.

Method 1 (parsing top-down). Suppose B = (p ∨ (¬q)) is a wff (for amoment), then A = (B → ⊥) is a formula, since ⊥ is also formula. So it isenough to show that B is a formula. p is a formula, so if (¬q) is a formulathen so is B = (p ∨ (¬q)). But (¬q) is also a formula since q is a formula.

Method 2 (parsing bottom-up). q is a formula and hence (¬q) is aformula. Now both p and (¬q) are formulas, therefore (p ∨ (¬q)) is aformula. Since (p ∨ (¬q)) and ⊥ are formulas, so is A.

Saeed Ghasemi (York University) Math 1090 18th June 2018 6 / 97

Page 7: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Priorities: dropping the redundant brackets

We make the following conventions to be able to avoid writing so manybrackets.

Outermost brackets are redundant.

The priorities of connectives, decreasing from left to right, are: ¬, ∧,∨, → and ≡.

If a formula looks like · · · ∧ A ∧ . . . for a subformula A, the right ∧has the priority over the left ∧, meaning the formula is · · · ∧ (A ∧ . . . .The same is true for ∨, → and ≡.

Examples:• ¬p stands for (¬p)• p ∨ q ∨ r stands for (p] ∨ (q ∨ r))• p → q → ⊥ stands for (p → (q → ⊥))• p ∧ ¬q ∨ r stands for ((p ∧ (¬q)) ∨ r)

Saeed Ghasemi (York University) Math 1090 18th June 2018 7 / 97

Page 8: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Induction on the complexity of the formulas

Definition

The complexity of each formula is the number of its connectives.

For example the complexities of ¬p ≡ q → > and(p ∨ (¬q))→ (p → (¬q)) are 3 and 5, respectively.

Fact

A formula has complexity zero if and only if it is an atomic formula.

Suppose P(A) is an statement about the formula A and suppose we wantto prove by induction on the formula complexity that P(A) holds for everyformula A. Then

Saeed Ghasemi (York University) Math 1090 18th June 2018 8 / 97

Page 9: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Induction on the complexity of the formulas

(Basis): Show that P(A) holds for every atomic formula A (variablesand constants).

(Induction Hypothesis): For a given n, assume P(A) holds for everyformula A of complexity less that n.

Show that P(A) holds for every formula A with complexity n.

If you can follow these steps then the Induction Principle implies thatP(A) holds for every formula (compare this with the usual induction onnatural numbers).

Saeed Ghasemi (York University) Math 1090 18th June 2018 9 / 97

Page 10: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Induction on the complexity of the formulas

In practice, in order to use induction on the formulas complexity show thatP(A) is true for every A, essentially you need to show that P(A) is truefor constants and variables (basis). Assume P(A) and P(B) hold forformulas A and B (I. H.) and prove that P(¬A), P(A ∧ B), P(A ∨ B),P(A→ B) and P(A ≡ B) also hold, by using I.H.

Theorem

Every formula has the same number of right and left brackets.

Proof.

Prove by induction on the formula complexity. See your notes from theclass or the textbook, Theorem 1.2.3.

Saeed Ghasemi (York University) Math 1090 18th June 2018 10 / 97

Page 11: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Definition (Immediate Predecessor)

Constants and Variables do not have any immediate predecessors.

For a formula A the immediate predecessor of ¬A is just A.

For formulas A and B the immediate predecessors of A ∧ B, A ∨ B,A→ B and A ≡ B are A and B.

Example: The immediate predecessors of (p ∨ q) ≡ (¬p ∨ r) are p ∨ qand ¬p ∨ r .

Theorem (Unique Readability)

For any formula the set of its immediate predecessors is uniquely defined.

Proof.

See Theorem 1.2.5 of the textbook.

The unique readability implies that there is a unique way of constructingeach formula from its variables, constants and connectives (and brackets,if you wish).Saeed Ghasemi (York University) Math 1090 18th June 2018 11 / 97

Page 12: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Inductive definition on formulas

We can define a concept or a function on the set of all formulas (WFF)inductively (recursively) following these steps:

First define the concept for atomic formulas (variables and constants).

Define the concept for ¬A assuming that it is defined for A (byrecalling the definition of the concept for A).

Define the concept for A ∧ B, A ∨ B, A→ B and A ≡ B assumingthat it is defined for formulas A and B.

Saeed Ghasemi (York University) Math 1090 18th June 2018 12 / 97

Page 13: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Semantics of Boolean formulas

The set of all possible truth values for propositional (Boolean) logic is“true”, denoted by t and “false”, denoted by f. The semantics of thislogic means assigning a“truth values” to formulas so that

The truth value of > is always t and the truth value of ⊥ is always f .

The truth value each variable is either t or f.

The truth value of formulas is decided (calculated) by its truth table.

Before dealing with truth table we would like to formalize the aboveconditions and the definition of truth table.

Definition

A state is a function that takes atomic formulas (variables and constants)as inputs and assigns either t or f (outputs) to each of them with thecondition that it always assigns t to > and f to ⊥.

Saeed Ghasemi (York University) Math 1090 18th June 2018 13 / 97

Page 14: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

We usually denotes states with v , v ′, v0, v1, . . . (v for “value”!).States are defined only on atomic formulas. We want to extend thedefinition of states to the set of all formulas (to WFF). We do thisrecursively (meaning, using inductive definition on formulas).Assume v is a state and A is formula such that v(A) is defined. Definev(¬A) as follows

v(¬A) = t iff v(A) = f

v(¬A) = f iff v(A) = t

The truth table of “negation” (¬)

A ¬A

t ff t

Saeed Ghasemi (York University) Math 1090 18th June 2018 14 / 97

Page 15: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Now assume v(A) and v(B) are defined for formulas A and B. Lets definethe value of v(A ∧ B). Since each v(A) v(B) both can be either true orfalse, there are four possibilities.Possibility (1): v(A) = t and v(B) = t. In this case define v(A∧B) = t.Possibility (2): v(A) = t and v(B) = f. In this case definev(A ∧ B) = f.Possibility (3): v(A) = f and v(B) = t. In this case definev(A ∧ B) = f.Possibility (4): v(A) = f and v(B) = f. In this case definev(A ∧ B) = f.The truth table of “and” (∧)

A B A ∧ B

t t tt f ff t ff f f

Saeed Ghasemi (York University) Math 1090 18th June 2018 15 / 97

Page 16: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

We would skip writing the definition of v for the four possibilities for therest of the connectives. Instead we abbreviate the definitions in the truthtables, as we did above.The truth table of “or” (∨)

A B A ∨ B

t t tt f tf t tf f f

The truth table of “conditional symbol” (implication symbol) (→)

A B A→ B

t t tt f ff t tf f t

Saeed Ghasemi (York University) Math 1090 18th June 2018 16 / 97

Page 17: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

The truth table of “biconditional symbol ” (equivalence symbol) (≡)

A B A ≡ B

t t tt f ff t ff f t

Therefore by recursion any state v can be defined for all formulas. Thetruth table of a formula illustrates the truth value of the formula in ALLpossible states.

Saeed Ghasemi (York University) Math 1090 18th June 2018 17 / 97

Page 18: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Truth Table: An Example ; Tautology

The truth table of the formula p ∧ q → p ∨ q is drawn below.

p q p ∧ q p ∨ q p ∧ q → p ∨ q

t t t t tt f f t tf t f t tf f f f t

Definition

A formula A is called tautology if the value of A in all possible states is t.We use the notation |=taut A to denote that A is a tautology.

Example. p ∧ q → p ∨ q is a tautology.

Saeed Ghasemi (York University) Math 1090 18th June 2018 18 / 97

Page 19: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

More Tautologies

The following formulas are tautologies.

>p ∨ ¬p

p → p

p ∧ q → q

p → q → p

p → p ∨ q

(p → q) ∧ (q → r)→ (p → r)

(p ∧ (p → q))→ q

Saeed Ghasemi (York University) Math 1090 18th June 2018 19 / 97

Page 20: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

We use Greek letters Γ,∆,Σ, . . . to denote the sets of formulas.

Definition

A formula A is called satisfiable iff there is at least one state v such thatv(A) = t. A “set” of formulas Γ is satisfiable iff there is a state v suchthat v(A) = t for every formula A ∈ Γ. Then we say v satisfies Γ.

Definition

We say a set of formulas Γ tautologically implies A (write Γ |=taut A) if forevery state v which satisfies Γ we have v(A) = t.

If Γ |=taut A then Γ is called the hypotheses and A is the conclusion.

Definition

A formula is unstatisfiable or contradiction if its value is f in all possiblestates. A set of formulas Γ is called “unsatisfiable” iff for every state vthere is at least on formula A in Γ such that v(A) = f.

Saeed Ghasemi (York University) Math 1090 18th June 2018 20 / 97

Page 21: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Fact

A formula A is a contradiction if and only if ¬A is a tautology.

Note

By convention, we usually write A |=taut B instead of {A} |=taut B. Moregenerally we write A1,A2 . . . ,An |=taut B instead of{A1,A2, . . . ,An} |=taut B.

So A1,A2 . . . ,An |=taut B means that if for some state v we havev(A1) = t, v(A2) = t, . . . , v(An) = t then we must have v(B) = t.

Fact

A formula A is a tautology (|=taut A) if and only if ∅ |=taut A if and only if> |=taut A.

Saeed Ghasemi (York University) Math 1090 18th June 2018 21 / 97

Page 22: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

The formal way to show that A1,A2 . . . ,An |=taut B is via the truth table.However, this can be often shortened, since we only need to check the rowsof the truth table (states) which assign value t to all of A1,A2 . . . ,An.

Examples

1. p ∧ q |=taut p ∨ q

Proof.

The only state v (row of the truth table) which assigns t to p ∧ q is whenv(p) = t and v(q) = t. For this state we have v(p ∨ q) = t. Thereforep ∧ q |=taut p ∨ q.

2. A ≡ B |=taut A→ B

3. A→ B,A→ C |=taut A→ C

Saeed Ghasemi (York University) Math 1090 18th June 2018 22 / 97

Page 23: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Examples

4. A ∨ B,¬A ∨ C |=taut B ∨ C

Proof.

We need to show that if a state v is such that v(A ∨ B) = t andv(¬A ∨ C ) = t then v(B ∨ C ) = t. Suppose v is such a state.T here aretwo cases.bf Case 1. v(A) = t. Then v(¬A) = f. Since v(¬A ∨ C ) = t we havev(C ) = t. Therefore v(B ∨ C ) = t.bf Case 2. v(A) = f. Then v(¬A) = t. Since v(A ∨ B) = t we havev(B) = t. Therefore v(B ∨ C ) = t.

5. ⊥ |=taut A

Proof.

Vacuously true.

Saeed Ghasemi (York University) Math 1090 18th June 2018 23 / 97

Page 24: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Definition

A formula A is tautologically equivalent to B iff A |=taut B and B |=taut A.

• A and B are tautologically equivalent iff v(A) = v(B) for every state v .

Fact

The following are equivalent.

1 A is tautologically equivalent to B

2 |=taut A ≡ B

Saeed Ghasemi (York University) Math 1090 18th June 2018 24 / 97

Page 25: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Substitution of Formulas

Given formulas A and B and a variable p, the symbol A[p := B],intuitively means that we replace all the occurrences of p in A by theformula B. Formally we can define inductively (recursively) the“substitution” as a function which takes formulas A,B and a variable p asan input and returns a formula A[p := B] as output, as follows.

A[p := B] =

B if A = p

A if A = q where q 6= p

A if A = > or A = ⊥(¬C [p := B]) if A = (¬C )

(C [p := B]) ◦ (D[p := B]) if A = (C ◦ D)

where ◦ is one of ∧,∨,→,≡.

Saeed Ghasemi (York University) Math 1090 18th June 2018 25 / 97

Page 26: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Proposition

For any formulas A and B and variable p, A[p := B] is a formula.

Proof.

Prove by induction on the complexity of A.basis. If A is an atomic formula, then A[p := B] is either A or B. Ineither case it is a formula.Suppose A = (¬C ): By I.H. C [p := B] is a formula, hence (¬C [p := B])is a formula.Suppose A(C ◦ D): By I.H. C [p := B] and D[p := B] are formulas, henceso is (C [p := B]) ◦ (D[p := B]).

Proposition

If p does not occur in A, then A[p := B] = A, for every formula B.

Proof.

Prove by induction on the complexity of A.

Saeed Ghasemi (York University) Math 1090 18th June 2018 26 / 97

Page 27: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Proofs and Theorems: syntax of the propositional logic

Let A be a formula. If we would like to know whether A is a tautology. Wecould write the truth table of A. If A obtains the value “true” in each rowthen A is a tautology, otherwise it is not. Similarly, we can use truth tableto check whether A1,A2, . . .A2 |=taut A is true. Writing a truth table isalgorithmic. In other words we can write an algorithm and leave it to acomputer to decide if a formula is a tautology (a tautological implication)or not. However, the size of the truth table grows exponentially withrespect to the number of the variable in a formula. There is no effectivealgorithm for this. That is why we rely on human ingenuity and experienceto find shortcuts in the process of certifying tautologies and tautologicalimplications. This process which replaces the truth table is called“theorem proving”. Theorem proving is syntactic rather than semantic.

Saeed Ghasemi (York University) Math 1090 18th June 2018 27 / 97

Page 28: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Rules of Inference

We will see that every tautology can be deduced from a small and selectedset of tautologies using rules of inference.A rule of inference is a logical form consisting of a function which takes a(finite) set of formulas called “premises” or “hypotheses” as input,analyzes them in a purely syntactical way, and returns a formula called“conclusion” as an output.We often write the rules of inference as “fractions”

A1,A2, . . .An

Q

where A1,A2, . . .An are the “premises” and Q is the “conclusion”.Intuitively, it means that from A1,A2, . . .An we can deduce Q.

Saeed Ghasemi (York University) Math 1090 18th June 2018 28 / 97

Page 29: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Primary Rules of Inference

The following are two primary rules of inference.1. Leibniz rule

A ≡ B

C [p := A] ≡ C [p := B]

2. Equanimity rule

A,A ≡ B

B

The rules apply for any formulas A,B,C and variable p. They are notabout specific formulas or specific variables.

An “instance” of the rules is when we replace each A,B,C withspecific formulas and p with an specific variable.

There are also “secondary rules” or “derived rules”. These rules canbe derived from the primary rules and the axioms.

Saeed Ghasemi (York University) Math 1090 18th June 2018 29 / 97

Page 30: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Logical Axioms of Boolean Logic

Suppose A,B and C are formulas.Associativity of ≡ ((A ≡ B) ≡ C ) ≡ (A ≡ (B ≡ C ))Symmetry of ≡ (A ≡ B) ≡ (B ≡ A)> vs. ⊥ (> ≡ ⊥) ≡ ⊥Introduction of ¬ (¬A ≡ A) ≡ ⊥Associativity of ∨ (A ∨ B) ∨ C ≡ A ∨ (B ∨ C )Symmetry of ∨ A ∨ B ≡ B ∨ AIdempotency of ∨ A ∨ A ≡ ADistributivity of ∨ over ≡ A ∨ (B ≡ C ) ≡ (A ∨ B ≡ A ∨ C )Excluded Middle A ∨ ¬AGolden Rule (A ∧ B ≡ A) ≡ (B ≡ A ∨ B)Implication (A→ B) ≡ ((A ∨ B) ≡ B)

Saeed Ghasemi (York University) Math 1090 18th June 2018 30 / 97

Page 31: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Axioms are selected tautologies.

Axioms are not for any particular A,B and C . They hold for any A,Band C , so in fact there are infinitely many axioms (see definition ofSchema in your textbook, page 39).

We denote the set of all logical axioms with Λ

Definition (Theorem Calculation or Proof)

Let Γ be a given set of formulas. A “theorem-calculation ” or “proof”from Γ is a finite ordered sequence of formulas such that: In any stage wemay write down

1 Any member of Λ or Γ

2 As long as all the formulas of the numerator of an “instance” ofLeibniz rule or equanimity are already written down, we may write thedenominator for the same instance.

Saeed Ghasemi (York University) Math 1090 18th June 2018 31 / 97

Page 32: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

A proof from Γ is sometimes called a “Γ-proof”.

A Γ-proof is purely syntactical. It has nothing to do with semantics,like t or f.

Any formula in Γ-proof is called “assumption” or “hypothesis” or“nonlogical axiom”.

Any Γ-proof has to finish in finitely many steps. Therefore it only usesfinitely many formulas in Γ and axioms.

Definition

Any formula A that appears in in a Γ-proof is called a Γ-theorem. If A is aΓ-theorem we write Γ ` A.

If A is a Γ-theorem and Γ = ∅, we write ` A and we call A a“theorem” or a “logical theorem”.

The notion of “theorem ” can be defined inductively.

Saeed Ghasemi (York University) Math 1090 18th June 2018 32 / 97

Page 33: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Definition (Inductive definition of theorems)

A formula E is a Γ-theorem iff one of the following holds.

Th1. E belongs to Γ ∪ Λ

Th2. If (an instance of) A ≡ B is a Γ-theorem, then E is equal toC [p := A] ≡ C [p := B], for any formula C and variable p.

Th3. If both A and A ≡ E are Γ-formulas.

We will learn how to write down proofs “Hilbert style” and “equationalstyle”.Hilbert style proofs. In this style we write formulas (theorems) vertically,from top to bottom, numbering each formula and provide annotations toexplain each step.• Note. Never forget numbering and annotations.

Saeed Ghasemi (York University) Math 1090 18th June 2018 33 / 97

Page 34: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Examples of Hilbert style Proofs

Example (1). Show that A,A ≡ B ` B.

Example (2). Show that A ≡ B ` C [p := A] ≡ C [p := B].

Example (3). (Transitivity) A ≡ B,B ≡ C ` A ≡ C

Example (4). (reflexivity) ` A ≡ A

Saeed Ghasemi (York University) Math 1090 18th June 2018 34 / 97

Page 35: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorems and Metatheorems

Saeed Ghasemi (York University) Math 1090 18th June 2018 35 / 97

Page 36: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Some Metatheorems

Recall that “` A” means that A is a “theorem” and “Γ ` A” means that Ais a “Γ-theorem”. Also recall that A is a Γ-theorem means that there isΓ-proof such that A appears there (we say there is a Γ-proof for A).The following are “metatheorems”.

Theorem

If Γ ` A and Γ ⊆ ∆, then we have ∆ ` A.

Proof.

Any Γ-proof for A is a ∆-proof for A. So if A is a Γ-theorem it is also a∆-theorem.

Saeed Ghasemi (York University) Math 1090 18th June 2018 36 / 97

Page 37: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Some Metatheorems

Corollary

If ` A then Γ ` A for any set of formulas Γ.

Meaning that if A is a theorem then A is a Γ-theorem for every set offormulas Γ.

Theorem (Transitivity of `)

Suppose that Γ ` B1, Γ ` B2, . . . , Γ ` Bn and moreoverB1,B2, . . . ,Bn ` A, then Γ ` A

Proof.

(Sketch.) Suppose Ci ,1,Ci ,2, . . . ,Bi is a Γ-proof for Bi fori ∈ {1, 2, . . . , n} and A1,A2, . . .A is a {B1,B2, . . . ,Bn}-proof for A. Thenit is easy to check that

C1,1,C1,2, . . . ,B1,C2,1,C2,2, . . . ,B2, . . .Cn,1,Cn,2, . . . ,Bn,A1,A2, . . . ,A

is a Γ-proof for A,Saeed Ghasemi (York University) Math 1090 18th June 2018 37 / 97

Page 38: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Some Metatheorems

Here is a very important corollary.

Corollary

If Γ ∪ {A} ` B and Γ ` A, then Γ ` B.

Proof.

Any Γ-proof for A only uses finitely many symbols from Γ. Say we have aΓ-proof of A which only uses C1,C2, . . . ,Cn from Γ. That means

C1,C2, . . . ,Cn,A ` B.

We have Γ ` C1, Γ ` C2, . . . , Γ ` Cn. Moreover by the assumption we haveΓ ` A. By the transitivity of ` we have Γ ` B.

Saeed Ghasemi (York University) Math 1090 18th June 2018 38 / 97

Page 39: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

[Note].

This corollary tells you that in a Γ-proof, apart from axioms and formulasin Γ and consequences of rules of inference, we are allowed to write downany (previously proven) Γ-theorems.

Corollary

If Γ ∪ {A} ` B and ` A, then Γ ` B.

Saeed Ghasemi (York University) Math 1090 18th June 2018 39 / 97

Page 40: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

More Theorems

Theorem (The Other Equanimity)

B,A ≡ B ` A

Proof.

B (Hypothesis)(1)

A ≡ B (Hypothesis)(2)

(A ≡ B) ≡ (B ≡ A) (Axiom)(3)

B ≡ A ((2), (3) + Eqn)(4)

A ((1), (4) + Eqn)(5)

From now on we call Both of them “Equanimity” and write Eqn for short.

Saeed Ghasemi (York University) Math 1090 18th June 2018 40 / 97

Page 41: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

More Theorems

Recall

(Transitivity) A ≡ B,B ≡ C ` A ≡ C

Note. Transitivity is a “derived” or “secondary” rule of inference. It maybe applied like primary rules of inference; as long as in a Γ-proof (instancesof) the numerators of the fraction

A ≡ B,B ≡ C

A ≡ C

are written down, we may write the denominator.

Saeed Ghasemi (York University) Math 1090 18th June 2018 41 / 97

Page 42: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Recall

(Reflexivity) ` A ≡ A

Corollary

` ⊥ ≡ ⊥

Corollary

` >

Proof.

> ≡ ⊥ ≡ ⊥ (Axiom)(1)

⊥ ≡ ⊥ (AbsoluteTheorem)(2)

> ((1), (2) + Eqn)(3)

Saeed Ghasemi (York University) Math 1090 18th June 2018 42 / 97

Page 43: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (Eqn + Leib Merged)

C [p := A],A ≡ B ` C [p := B]

Proof.

C [p := A] (Hyp.)(1)

A ≡ B (Hyp.)(2)

C [p := A] ≡ C [p := B] ((2) + Leib)(3)

C [p := B] ((1), (3) + Eqn)(4)

Saeed Ghasemi (York University) Math 1090 18th June 2018 43 / 97

Page 44: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` A ≡ A ≡ B ≡ B

Proof.

(A ≡ B ≡ B) ≡ A (Axiom of Symmetry of ≡)(1)

((A ≡ B ≡ B) ≡ A) ≡ (A ≡ (A ≡ B ≡ B)) (the same Axiom)(2)

A ≡ (A ≡ B ≡ B) ((1) + Eqn)(3)

Saeed Ghasemi (York University) Math 1090 18th June 2018 44 / 97

Page 45: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary

` > ≡ > ≡ B ≡ B and ` A ≡ A ≡ ⊥ ≡ ⊥

Corollary (Redundant True)

` > ≡ A ≡ A and ` A ≡ A ≡ >

Proof.

> ≡ ⊥ ≡ ⊥ (Axiom)(1)

> ≡ > ≡ A ≡ A (Abs. Theorem)(2)

> ≡ A ≡ A ((1, 2) + Transitivity rule)(3)

Saeed Ghasemi (York University) Math 1090 18th June 2018 45 / 97

Page 46: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

proof continued.

For the second one:

> ≡ A ≡ A (Abs. Theorem)(1)

(> ≡ A ≡ A) ≡ (A ≡ A ≡ >) (Axiom of Symmetry)(2)

A ≡ A ≡ > ((1, 2) + Eqn)(3)

Saeed Ghasemi (York University) Math 1090 18th June 2018 46 / 97

Page 47: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

More Metatheorems

Following metatheorem is a consequence of Redundant True.

Theorem

For any Γ and formula A we have Γ ` A iff Γ ` A ≡ >.

Proof.

For the forward direction assume Γ ` A. Since ` A ≡ A ≡ > (RedundantTrue) we also have Γ ` A ≡ A ≡ > (hypothesis strengthening). FromΓ ` A, Γ ` A ≡ A ≡ > and {A,A ≡ A ≡ >} ` A ≡ > (Eqn), by thetransitivity of ` we get Γ ` A ≡ >.For the other direction assume ` A ≡ >. We also have Γ ` A ≡ A ≡ >and {A,A ≡ A ≡ >} ` A (Eqn). Therefore by the transitivity of ` wehave Γ ` A.

Saeed Ghasemi (York University) Math 1090 18th June 2018 47 / 97

Page 48: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

More Metatheorems

Theorem

For any set of formulas Γ and formulas A and B, if Γ ` A and Γ ` B thenΓ ` A ≡ B.

Proof.

By the previous theorem we have Γ ` A ≡ > and Γ ` B ≡ >. We alsohave {A ≡ >,B ≡ >} ` A ≡ > (Transitivity rule). By transitivity of ` wehave Γ ` A ≡ >.

Saeed Ghasemi (York University) Math 1090 18th June 2018 48 / 97

Page 49: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Equational-Style Proofs

We do not change the concept of proof or theorem. Equational-styleproofs is just a different style of writing a proof. In other words whatever(Γ-) theorem can be proved using Hilbert-style proofs, can be proved usingEquational-style proofs, and vice versa.An Equational-style (Γ-) proof is a finite sequence of (Γ-) theorems of theform

A1 ≡ A2,A2 ≡ A3, . . . ,An−1 ≡ An,An ≡ An+1

Theorem

A1 ≡ A2,A2 ≡ A3, . . . ,An−1 ≡ An,An ≡ An+1 ` A1 ≡ An+1

Proof.

By induction on n and transitivity.

Saeed Ghasemi (York University) Math 1090 18th June 2018 49 / 97

Page 50: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Equational-Style Proof Layout

Instead of writing

A1 ≡ A2,A2 ≡ A3, . . . ,An−1 ≡ An

we write the Equational-style proofs like this:

A1

⇐⇒ < annotation >

A2

⇐⇒ < annotation >

.

.

.

An−1

⇐⇒ < annotation >

AnSaeed Ghasemi (York University) Math 1090 18th June 2018 50 / 97

Page 51: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Note. The symbol (from metatheory) ⇐⇒ means ≡. Therefore at eachstep you can only write Ai+1 below Ai iff Ai+1 ≡ Ai .

Example. Show that ` A ≡ ⊥ ≡ ¬A

Proof.

Start with an axiom of introduction of ¬.

¬A ≡ (A ≡ ⊥)

⇐⇒ 〈axiom of symmetry of ≡〉(A ≡ ⊥) ≡ ¬A

Saeed Ghasemi (York University) Math 1090 18th June 2018 51 / 97

Page 52: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` ¬(A ≡ B) ≡ ¬A ≡ B

Proof.

¬(A ≡ B)

⇐⇒ 〈axiom (introduction of ¬)〉(A ≡ B) ≡ ⊥

⇐⇒ 〈Leib; (B ≡ ⊥) ≡ (⊥ ≡ B); “C − part ′′ is A ≡ p; p fresh〉A ≡ ⊥ ≡ B

⇐⇒ 〈Leib; (A ≡ ⊥) ≡ ¬A; “C − part ′′ is p ≡ B; p fresh〉¬A ≡ B

Saeed Ghasemi (York University) Math 1090 18th June 2018 52 / 97

Page 53: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary

` ¬(A ≡ B) ≡ A ≡ ¬B

Proof.

¬(A ≡ B)

⇐⇒ 〈axiom (introduction of ¬)〉(A ≡ B) ≡ ⊥

⇐⇒ 〈Leib; (B ≡ ⊥) ≡ ¬B; “C − part ′′ is A ≡ p; p fresh〉A ≡ ¬B

Saeed Ghasemi (York University) Math 1090 18th June 2018 53 / 97

Page 54: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

• Usually it is easier in equational-style proofs to start with the morecomplicated side of ≡.

Theorem (Double Negation)

` ¬¬A ≡ A

Proof.

¬¬A

⇐⇒ 〈axiom of introduction of ¬〉¬A ≡ ⊥

⇐⇒ 〈Leib; axiom : ¬A ≡ A ≡ ⊥; “C − part ′′ is p ≡ ⊥; p fresh〉A ≡ ⊥ ≡ ⊥

⇐⇒ 〈Leib; axiom : > ≡ ⊥ ≡ ⊥; “C − part ′′ is A ≡ p; p fresh〉A ≡ >

⇐⇒ 〈Redundant True〉A

Saeed Ghasemi (York University) Math 1090 18th June 2018 54 / 97

Page 55: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` > ≡ ¬⊥

Proof.

>⇐⇒ 〈axiom〉

⊥ ≡ ⊥⇐⇒ 〈axiom of introduction of ¬〉

¬⊥

Corollary

` ⊥ ≡ ¬>

Saeed Ghasemi (York University) Math 1090 18th June 2018 55 / 97

Page 56: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` A ∨ >

Proof.

A ∨ >⇐⇒ 〈Leib; axiom : > ≡ ⊥ ≡ ⊥; “C − part ′′ is A ∨ p; p fresh〉

A ∨ (⊥ ≡ ⊥)

⇐⇒ 〈axiom〉A ∨ ⊥ ≡ A ∨ ⊥

The last formula is an absolute theorem. Remember?!

Saeed Ghasemi (York University) Math 1090 18th June 2018 56 / 97

Page 57: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` (A ≡ B) ∨ C ≡ A ∨ C ≡ B ∨ C

Theorem

` (A ≡ B) ∨ (C ≡ D) ≡ A ∨ C ≡ B ∨ C ≡ A ∨ D ≡ B ∨ D

Proof.

(A ≡ B) ∨ (C ≡ D)

⇐⇒ 〈axiom〉(A ≡ B) ∨ C ≡ (A ≡ B) ∨ D

⇐⇒ 〈Leib; (A ≡ B) ∨ C ≡ (A ∨ C ) ≡ B ∨ C ; “Cpart ′′ p ≡ (A ≡ B) ∨ D〉A ∨ C ≡ B ∨ C ≡ (A ≡ B) ∨ D

⇐⇒ 〈Leib; (A ≡ B) ∨ D ≡ (A ∨ D) ≡ B ∨ D; “Cpart ′′ A ∨ C ≡ B ∨ C ≡ p〉A ∨ C ≡ B ∨ C ≡ A ∨ D ≡ B ∨ D

Saeed Ghasemi (York University) Math 1090 18th June 2018 57 / 97

Page 58: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` A ∨ ⊥ ≡ A

Proof.

A ∨ ⊥ ≡ A

⇐⇒ 〈Leib; A ≡ A ∨ A; “C − part ′′ A ∨ ⊥ ≡ p〉A ∨ ⊥ ≡ A ∨ A

⇐⇒ 〈axiom〉A ∨ (⊥ ≡ A)

⇐⇒ 〈Leib; ⊥ ≡ A ≡ ¬A; “C − part ′′ A ∨ p〉A ∨ ¬A

The last formula is a theorem, so we are done!

Saeed Ghasemi (York University) Math 1090 18th June 2018 58 / 97

Page 59: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` A→ B ≡ ¬A ∨ B

Proof.

A→ B

⇐⇒ 〈axiom〉A ∨ B ≡ B

⇐⇒ 〈Leib; B ∨ ⊥ ≡ B; “C − part ′′ A ∨ B ≡ p〉A ∨ B ≡ ⊥ ∨ B

⇐⇒ 〈axiom〉(A ≡ ⊥) ∨ B

⇐⇒ 〈Leib; axiom : A ≡ ⊥ ≡ ¬A; “C − part ′′ p ∨ B〉¬A ∨ B

Saeed Ghasemi (York University) Math 1090 18th June 2018 59 / 97

Page 60: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary

` ¬A ∨ B ≡ A ∨ B ≡ B

Corollary

` A→ (B ≡ C ) ≡ (A→ B ≡ A→ C )

Definition

Define A 6≡ B to be ¬(A ≡ B).

Saeed Ghasemi (York University) Math 1090 18th June 2018 60 / 97

Page 61: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` ((A 6≡ B) 6≡ C ) ≡ (A 6≡ (B 6≡ C ))

Proof.

¬(¬(A ≡ B) ≡ C )

⇐⇒ 〈axiom〉¬(A ≡ B) ≡ C ≡ ⊥

⇐⇒ 〈Leib; ¬(A ≡ B) ≡ (A ≡ B) ≡ ⊥; “C − part ′′ p ≡ C ≡ ⊥〉A ≡ B ≡ ⊥ ≡ C ≡ ⊥

⇐⇒ 〈theorem〉A ≡ B ≡ C ≡ ⊥ ≡ ⊥

⇐⇒ 〈Leib; axiom : B ≡ C ≡ ⊥; “C − part ′′ A ≡ p ≡ ⊥〉A ≡ ¬(B ≡ C ) ≡ ⊥

⇐⇒ 〈axiom〉 ¬(A ≡ ¬(B ≡ C ))

Saeed Ghasemi (York University) Math 1090 18th June 2018 61 / 97

Page 62: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (de Morgan 1)

` A ∧ B ≡ ¬(¬A ∨ ¬B)

Proof.

¬(¬A ∨ ¬B)

⇐⇒ 〈axiom〉¬A ∨ ¬B ≡ ⊥

⇐⇒ 〈Leib; thm : (¬A ∨ ¬B) ≡ (A ∨ ¬B ≡ ¬B); “C − part ′′ p ≡ ⊥〉A ∨ ¬B ≡ ¬B ≡ ⊥

⇐⇒ 〈Leib; axiom : (¬B ≡ ⊥) ≡ B; “C − part ′′ A ∨ ¬B ≡ p〉A ∨ ¬B ≡ B

⇐⇒ 〈Leib; thm : A ∨ ¬B ≡ A ∨ B ≡ B; “C − part ′′ p ≡ B〉A ∨ B ≡ A ≡ B

⇐⇒ 〈axiom : Golden Rule〉 A ∧ B

Saeed Ghasemi (York University) Math 1090 18th June 2018 62 / 97

Page 63: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary (de Morgan 2)

` A ∨ B ≡ ¬(¬A ∧ ¬B)

Theorem

` A ∧ A ≡ A

Proof.

A ∧ A ≡ A

⇐⇒ 〈Golden Rule axiom〉A ∨ A ≡ A

Saeed Ghasemi (York University) Math 1090 18th June 2018 63 / 97

Page 64: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (Symmetry of ∧)

` A ∧ B ≡ B ∧ A

Theorem (Associativity of ∧)

` A ∧ (B ∧ C ) ≡ (A ∧ B) ∧ C

Theorem

` A ∧ > ≡ A

Proof.

A ∧ > ≡ A

⇐⇒ 〈Golden Rule axiom〉A ∨ > ≡ >

⇐⇒ 〈Redundant True〉A ∨ >

Saeed Ghasemi (York University) Math 1090 18th June 2018 64 / 97

Page 65: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` A ∧ ⊥ ≡ ⊥

Proof.

A ∧ ⊥ ≡ ⊥⇐⇒ 〈Golden Rule axiom〉

A ∨ ⊥ ≡ A

Saeed Ghasemi (York University) Math 1090 18th June 2018 65 / 97

Page 66: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (Distributivity of ∨ over ∧)

` A ∨ (B ∧ C ) ≡ (A ∨ B) ∧ (A ∨ C )

Proof.

We will show that both sides are equivalent to a same formula.The left side:

(A ∨ B) ∧ (A ∨ C )

⇐⇒ 〈Golden Rule axiom〉A ∨ B ∨ A ∨ C ≡ A ∨ B ≡ A ∨ C

⇐⇒ 〈Leib; axiom; “C − part ′′ A ∨ p ∨ C ≡ A ∨ B ≡ A ∨ C 〉A ∨ A ∨ B ∨ C ≡ A ∨ B ≡ A ∨ C

⇐⇒ 〈Leib; A ∨ A ≡ A; “C − part ′′ p ∨ B ∨ C ≡ A ∨ B ≡ A ∨ C 〉A ∨ B ∨ C ≡ A ∨ B ≡ A ∨ C

Saeed Ghasemi (York University) Math 1090 18th June 2018 66 / 97

Page 67: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

proof continued.

The right side:

A ∨ (B ∧ C )

⇐⇒ 〈Leib; Golden Rule; “C − part ′′ A ∨ p〉A ∨ (B ∨ C ≡ B ≡ C )

⇐⇒ 〈Distributivity of ∨ over ≡〉A ∨ B ∨ C ≡ A ∨ (B ≡ C )

⇐⇒ 〈Leib; Distributivity of ∨ over ≡; “C − part ′′ A ∨ B ∨ C ≡ p〉A ∨ B ∨ C ≡ A ∨ B ≡ A ∨ C

Hence both sides are equivalent to the same formula. Therefore bytransitivity they must be equivalent.

Saeed Ghasemi (York University) Math 1090 18th June 2018 67 / 97

Page 68: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

A ∨ B → C ≡ (A→ C ) ∧ (B → C )

Proof.

The right side:

A ∨ B → C

⇐⇒ 〈theorem〉¬(A ∨ B) ∨ C

⇐⇒ 〈Leib; de Morgan ; “C − part ′′ : ¬p ∨ C 〉¬¬(¬A ∧ ¬B) ∨ C

⇐⇒ 〈Leib; Double Negation ; “C − part ′′ : p ∨ C 〉(¬A ∧ ¬B) ∨ C

⇐⇒ 〈Axiom〉(¬A ∨ C ) ∧ (¬B ∨ C )

⇐⇒ 〈Lieb twice〉 (A→ C ) ∨ (B → C )Saeed Ghasemi (York University) Math 1090 18th June 2018 68 / 97

Page 69: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

A→ B ∧ C ≡ (A→ B) ∧ (A→ C )

Proof.

The right side:

A→ B ∧ C

⇐⇒ 〈theorem〉¬A ∨ B ∧ C

⇐⇒ 〈theorem〉(¬A ∨ B) ∧ (¬A ∨ C )

⇐⇒ 〈Lieb twice〉(A→ B) ∧ (A→ C )

Saeed Ghasemi (York University) Math 1090 18th June 2018 69 / 97

Page 70: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

` A ≡ B ≡ (A→ B) ∧ (B → A)

Proof.

See Theorem 2.4.26 of your textbook.

Saeed Ghasemi (York University) Math 1090 18th June 2018 70 / 97

Page 71: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Using assumptions in the Equational style proofs

Recall that we has theorem saying that Γ ` A iff Γ ` A ≡ >. In particular,if A ∈ Γ then we have Γ ` A ≡ >. This means that if A is a formulaincluded in the set of assumptions Γ, then in any Γ-proof (Hilbert orEquational style), A ≡ > is a Γ-theorem. Therefore using Leibniz we canreplace any occurrence of A with >.Examples. (1). A,B ` A ∧ B

A ∧ B

⇐⇒ 〈Lieb; Assumption B; “C − part ′′ : A ∧ p〉A ∧ >

⇐⇒ 〈Theorem A ≡ A ∧ >〉A

Saeed Ghasemi (York University) Math 1090 18th June 2018 71 / 97

Page 72: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

(2). A ∨ A ` A

A

⇐⇒ 〈Axiom〉A ∨ A

(3). A ` A ∨ B

A ∨ B

⇐⇒ 〈Lieb; Assumption A; “C − part ′′ : p ∨ B〉> ∨ B

Saeed Ghasemi (York University) Math 1090 18th June 2018 72 / 97

Page 73: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

(4). A ∧ B ` A

A

⇐⇒ 〈Theorem〉A ∧ >

⇐⇒ 〈Lieb; Assumption A ∧ B; “C − part ′′ : A ∧ p〉A ∧ A ∧ B

⇐⇒ 〈Lieb; Theorem A ∧ A ≡ A; “C − part ′′ : p ∧ B〉A ∧ B

Saeed Ghasemi (York University) Math 1090 18th June 2018 73 / 97

Page 74: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

An important metatheorem

Theorem (Splitting/Merging Hypotheses)

Suppose A,B,C are formulas and Γ is a set of formulas. ThenΓ ∪ {A,B} ` C if and only if Γ ∪ {A ∧ B} ` C .

Proof.

First assume Γ ∪ {A,B} ` C and prove Γ ∪ {A ∧ B} ` C (Hilbert-style).

(1) Γ (a finite subset of Γ used to prove Γ ∪ {A,B} ` C )

(2) A ∧ B (Hyp.)

(3) A ((2) + Theorem A ∧ B ` A)

(4) B ((2) + Theorem A ∧ B ` B)

(5) C ((1), (3), (4) + Hyp. Γ ∪ {A,B} ` C )

Saeed Ghasemi (York University) Math 1090 18th June 2018 74 / 97

Page 75: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Proof.

Now assume Γ ∪ {A ∧ B} ` C and prove Γ ∪ {A,B} ` C .

(1) Γ (a finite subset of Γ used to prove Γ ∪ {A ∧ B} ` C )

(2) A (Hyp.)

(3) B (Hyp.)

(4) A ∧ B ((2), (3) + Theorem A,B ` A ∧ B)

(5) C ((1), (4) + Hyp. Γ ∪ {A ∧ B} ` C )

Note. By induction on natural numbers we can extend the above result otany number of formulas, meaning

Γ ∪ {A1,A2, . . . ,An} ` C iff Γ ∪ {A1 ∧ A2 ∧ · · · ∧ An} ` C

Saeed Ghasemi (York University) Math 1090 18th June 2018 75 / 97

Page 76: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (Modus Ponens)

A,A→ B ` B

Proof.

A→ B

⇐⇒ 〈Theorem〉¬A ∨ B

⇐⇒ 〈Lieb; Assumption A; “C − part ′′ : ¬p ∨ B〉¬> ∨ B

⇐⇒ 〈Lieb; Theorem ¬> ≡ ⊥; “C − part ′′ : p ∨ B〉⊥ ∨ B

⇐⇒ 〈Theorem〉B

Saeed Ghasemi (York University) Math 1090 18th June 2018 76 / 97

Page 77: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (Cut Rule)

A ∨ B,¬A ∨ C ` B ∨ C

Proof.

First note that we have ` ¬A ∨ C ≡ A→ C and ` A→ C ≡ A ∨ C ≡ C(axiom). Therefore by the transitivity of ` we have` ¬A ∨ C ≡ A ∨ C ≡ C . Since ¬A ∨ C is one of assumptions, we can useA ∨ C ≡ C as a (relative) theorem in our proof.

B ∨ C

⇐⇒ 〈Lieb; theorem A ∨ C ≡ C ; “C − part ′′ : B ∨ p〉B ∨ (A ∨ C )

⇐⇒ 〈Theorem〉(A ∨ B) ∨ C

⇐⇒ 〈Lieb; Assumption A ∨ B; “C − part ′′ : p ∨ C 〉> ∨ C

Saeed Ghasemi (York University) Math 1090 18th June 2018 77 / 97

Page 78: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary

A ∨ B,¬A ∨ B ` B

Corollary

A ∨ B,¬A ` B

Proof.

We have ¬A ` ¬A ∨ B. Since ¬A is among our assumptions, we canassume ¬A ∨ B (as a relative theorem).

(1) A ∨ B (Hyp.)

(2) ¬A (Hyp.)

(3) ¬A ∨ B ((2) + Theorem)

(4) B ((1), (3) + Corollary above)

Saeed Ghasemi (York University) Math 1090 18th June 2018 78 / 97

Page 79: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary

A,¬A ` ⊥

Proof.

We have ` A ∨⊥ ≡ A, ` B ∨⊥ ≡ B and A ∨⊥,¬A ∨⊥ ` ⊥ (Corollary!).Therefore A,¬A ` ⊥.

Saeed Ghasemi (York University) Math 1090 18th June 2018 79 / 97

Page 80: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem (Transitivity of →)

A→ B,B → C ` A→ C

Proof.

(1) A→ B (Hyp.)

(2) B → C (Hyp.)

(3) A→ B ≡ ¬A ∨ B (Theorem)

(4) B → V ≡ ¬B ∨ C (Theorem)

(5) ¬A ∨ B ((1), (3) + Eqn)

(6) ¬B ∨ C ((2), (4) + Eqn)

(7) ¬A ∨ C ((5), (6) + Theorem)

Saeed Ghasemi (York University) Math 1090 18th June 2018 80 / 97

Page 81: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

A→ C ,B → D ` A ∨ B → C ∨ D

Proof.

We have ` A→ C ≡ A ∨ C ≡ C and ` B → D ≡ B ∨ D ≡ D. Thereforeour assumptions imply that A ∨ C ≡ C and B ∨ D ≡ D are theorems.

A ∨ B → C ∨ D

⇐⇒ 〈Axiom〉A ∨ B ∨ C ∨ D ≡ C ∨ D

⇐⇒ 〈Axiom〉A ∨ C ∨ B ∨ D ≡ C ∨ D

⇐⇒ 〈Lieb; A ∨ C ≡ C ; “C − part ′′ : p ∨ B ∨ D ≡ C ∨ D〉C ∨ B ∨ D ≡ C ∨ D

⇐⇒ 〈Lieb; B ∨ D ≡ D; “C − part ′′ : C ∨ p ≡ C ∨ D〉C ∨ D ≡ C ∨ D

Saeed Ghasemi (York University) Math 1090 18th June 2018 81 / 97

Page 82: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Corollary (Proof by Cases)

A→ C ,B → C ` A ∨ B → C

This corollary says that in order to prove A ∨ B → C , it is sufficient toprove A→ C and B → C .

Corollary

A→ C ,¬A→ C ` C

Saeed Ghasemi (York University) Math 1090 18th June 2018 82 / 97

Page 83: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

The Deduction Theorem

Theorem (The Deduction Theorem)

Γ ∪ {A} ` B if and only if Γ ` A→ B

It is easy to see that if Γ ` A→ B then Γ ∪ {A} ` B. Because thenΓ ∪ {A} ` A→ B and Γ ∪ {A} ` A, therefore by Modus Ponens we haveΓ ∪ {A} ` B. So the importance of the “deduction theorem” is to showthat if Γ ∪ {A} ` B then Γ ` A→ B. To prove the deduction theorem weneed the following lemma

Lemma

A→ (B ≡ C ) ` A→ (D[p := B] ≡ D[p := C ])

Proof.

Prove by induction on the complexity of the formula D. See Lemma 2.6.2of the textbook.

Saeed Ghasemi (York University) Math 1090 18th June 2018 83 / 97

Page 84: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Lets keep the proof of the deduction theorem on hold for a while. We willcome back to it.Note. It is customary to write Γ + A instead of Γ ∪ {A}.

Corollary (Proof by Contradiction)

Γ ` A iff Γ + ¬A ` ⊥.

Proof.

First assume Γ ` A and prove Γ + ¬A ` ⊥. Note that Γ ` A means thereis a Γ-proof for A. Suppose C1,C2, . . . ,Cn are formulas in Γ that are usedto proof A.

(1) C1,C2, . . . ,Cn (a finite subset of Γ used to prove Γ ` A)

(2) ¬A (Hyp.)

(3) A (from(1), sinceΓ ` A)

(4) ⊥ ((2), (3) + Theorem)

Saeed Ghasemi (York University) Math 1090 18th June 2018 84 / 97

Page 85: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

proof continued.

Now assume Γ + ¬A ` ⊥ and prove Γ ` A. By Deduction Theorem wehave Γ ` ¬A→ ⊥

¬A→ ⊥⇐⇒ 〈Theorem〉

¬¬A ∨ ⊥⇐⇒ 〈Theorem〉

¬¬A

⇐⇒ 〈Double Negation〉A

Saeed Ghasemi (York University) Math 1090 18th June 2018 85 / 97

Page 86: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Theorem

The following are equivalent:

1 Γ ` ⊥.

2 Γ ` A, for all A.

3 Γ ` B ∧ ¬B, for some B.

Proof.

(1)⇒ (2). Fix a formula A. We have a theorem stating that ⊥ ` ⊥ ∨ A.So Γ ∪ {⊥} ` ⊥ ∨ A. We also have Γ ` ⊥, from our assumption, thereforeby transitivity we have Γ ` ⊥ ∨ A. We have another theorem stating` ⊥ ∨ A ≡ A. Therefore by Eqn. we conclude Γ ` A.

Saeed Ghasemi (York University) Math 1090 18th June 2018 86 / 97

Page 87: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

proof continues.

(2)⇒ (3). Since Γ ` A is valid for any formula A, it must be also valid forformula B ∧ ¬B for any B. Hence Γ ` B ∧ ¬B.(3)⇒ (1). Suppose B is a formula such that Γ ` B ∧ ¬B. We have atheorem stating that B,¬B ` ⊥. By “splitting/Merging” Theorem wehave B ∧ ¬B ` ⊥. By the transitivity we have Γ ` ⊥.

Saeed Ghasemi (York University) Math 1090 18th June 2018 87 / 97

Page 88: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

The Interplay Between Syntax and Semantics

The goal of this section is to show that the axioms and rules of inferencein the previous section were so well chosen that we can prove nothing buttautologies and tautological implications (our propositional logic is sound).Meaning that we can not prove any contradictions. Moreover we will showthat from axioms and rules of inference we cam prove “all” tautologiesand tautological implications (our our propositional logic is complete).Meaning that if a formula is a tautology or it is a tautological consequenceof some hypotheses, then we are always able to prove it (under the samehypotheses).

Saeed Ghasemi (York University) Math 1090 18th June 2018 88 / 97

Page 89: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Soundness

Lets start with a lemma.

Lemma

The two primary rules of inference preserve truth. Meaning

(1) A,A ≡ B |=taut B

(2) A ≡ B |=taut C [p := A] ≡ C [p := B]

Proof.

(1). Suppose v is a state such that v(A) = t and v(A ≡ B) = t. Thelatter implies that v(A) = v(B). Therefore we have v(B) = t. This iswhat we wanted to complete the proof.

Saeed Ghasemi (York University) Math 1090 18th June 2018 89 / 97

Page 90: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Proof.

[proof continues.] (2). For the second one, suppose v is a state such thatv(A ≡ B) = t. This means v(A) = v(B). We have to show thatv(C [p := A] ≡ C [p := B]) = t for any formula C .Suppose q1, q2, . . . , qn are all the variables that occur in C . Then for somefunction from {t, f }n into t, f we have v(C ) = f (v(q1), v(q2), . . . , v(qn)).If p is not one of q1, , q2, . . . , qn, then C [p := A] = C = C [p := B], bydefinition. So v(C [p := A]) = v(C [p := B]) which meansv(C [p := A] ≡ C [p := B]) = t.If p occurs in C then it should be one of q1, q2, . . . , qn. Without loss ofgenerality assume p is q1. We have

v(C [p := A]) = f (v(A), v(q2), . . . , v(qn))

andv(C [p := B]) = f (v(B), v(q2), . . . , v(qn))

Saeed Ghasemi (York University) Math 1090 18th June 2018 90 / 97

Page 91: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

proof continues.

Since the assumption was that v(A) = v(B) we havev(C [p := A]) = v(C [p := B]) which meansv(C [p := A] ≡ C [p := B]) = t.

Theorem (Soundness of the Propositional Logic)

Γ ` A implies that Γ |=taut A, for any set of formulas Γ and any formula A.

Soundness Theorem as well as Deduction Theorem can be proved using aninduction method called “Induction on the length of proof”. By “proof”we mean a “formal proof”, so think about for a Hilbert-style proof, forexample.

Saeed Ghasemi (York University) Math 1090 18th June 2018 91 / 97

Page 92: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Induction on the length of proof

Assume Γ is a set of formulas and P is a property of formulas. Suppose wewant to show that every Γ-theorem has property P. then

1 (Basis) Show every Γ-theorem which has a Γ-proof of length one hasproperty P. That means show that every formulas A in Γ and everyaxiom has property P.

2 Suppose A and A ≡ B have property P (I. H.) and show that B hasproperty P. This step takes care of the Γ-theorems with one extralength derived from “Equanimity Rule”.

3 Suppose A ≡ B has property P (I. H.) and prove that for any formulaC and variable p, the formula C [p := A] ≡ C [p := B] has property P.This step takes care of the Γ-theorems with one extra length derivedfrom “Leibniz Rule”.

Note. We don’t have to worry about the theorems and secondary rules ofinference since they are derived from Equanimity Rule and Leibniz Rule.

Saeed Ghasemi (York University) Math 1090 18th June 2018 92 / 97

Page 93: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Proof of Soundness of the Propositional Logic

Proof.

We prove by induction on the length of the Γ-theorem A. Note that we areusing the fact that there is a Γ-proof for A (Γ ` A).(Basis) Length n = 1: This means A is either an axiom or it belongs toΓ. If A is an axiom then A is a tautology (go ahead and check any axiomthat you want to see they are indeed tautologies!). If A ∈ Γ then it isobvious that Γ |=taut A, since any state that gives “t” to all formulas in Γwould give value “t” to A (well A is is among the formulas in Γ!).(Step two) Equanimity: Suppose Γ |=taut A and Γ |=taut A ≡ B. Wemust show Γ |=taut B. So suppose a state v is such that v(X ) = t forevery formula X ∈ Γ. We have to show v(B) = t. From Γ |=taut A wehave v(A) = t and from Γ |=taut A ≡ B we conclude that v(B) = v(A).Therefore v(B) = t. Done!

Saeed Ghasemi (York University) Math 1090 18th June 2018 93 / 97

Page 94: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Proof of Soundness of the Propositional Logic

proof continues.

(Step three) Leibniz Rue: Suppose Γ |=taut A ≡ B. We have to showthat Γ |=taut C [p := A] ≡ C [p := B]. So suppose a state v is such thatv(X ) = t for every formula X ∈ Γ. We have to showv(C [p := A] ≡ C [p := B]) = t. That means we have to show thatv(C [p := A]) = v(C [p := B]). Since Γ |=taut A ≡ B we havev(A ≡ B) = t. By a lemma that we proved we have

A ≡ B |=taut C [p := A] ≡ C [p := B]

therefore v(C [p := A] ≡ C [p := B]) = t.

Saeed Ghasemi (York University) Math 1090 18th June 2018 94 / 97

Page 95: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Completeness of the Proportional Logic]

Theorem (Post’s Theorem / Completeness of the Proportional Logic)

Γ |=taut A implies that Γ ` A.

Corollary

If Γ ` A1, Γ ` A2, . . . , Γ ` An and A1,A2, . . . ,An |=taut B, then Γ ` B.

Saeed Ghasemi (York University) Math 1090 18th June 2018 95 / 97

Page 96: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Lets prove the deduction theorem using Soundness and Post’s theorem.Recall

Theorem (The Deduction Theorem)

Γ ∪ {A} ` B if and only if Γ ` A→ B

Proof.

We only need to show that if Γ ∪ {A} ` B then Γ ` A→ B, since as weobserved before the other direction is a direct consequence of ModusPonens. Suppose Γ ∪ {A} ` B. By soundness we have Γ ∪ {A} |=taut B.Then we can easily check that Γ |=taut A→ B (use the definition of|=taut). Now Post’s theorem implies that Γ ` A→ B.

Saeed Ghasemi (York University) Math 1090 18th June 2018 96 / 97

Page 97: Math 1090 Part one: Boolean Logicsaeedgh/Math1090//BL.pdf · 2018-10-10 · We will denote the alphabet of propositional (Boolean) logic by V. Some textbooks use less connectives

Compactness of Propositional Logic

We say a set of formulas Γ is finitely satisfiable if every finite subset of Γ issatisfiable.

Theorem (Compactness of Propositional Logic)

Γ is finitely satisfiable if and only if Γ is satisfiable.

Proof.

It is clear that if Γ is satisfiable then Γ is finitely satisfiable (check thedefinition!). For the other direction assume Γ is finitely satisfiable. Proveby contradiction. Suppose Γ is not satisfiable. Then there is no statewhich assigns “t” to all the formulas in Γ. This means that Γ |=taut Bholds for any formula B. In particular, Γ |=taut ⊥. Post’s theorem impliesthat Γ ` ⊥. Therefore there are finitely many formulas C1,C2, . . . ,Cn in Γsuch that C1,C2, . . . ,Cn ` ⊥. By the soundness theorem we haveC1,C2, . . . ,Cn |=taut ⊥. This implies that {C1,C2, . . . ,Cn} is unsatisfiable(again check the definitions!). A contradiction.

Saeed Ghasemi (York University) Math 1090 18th June 2018 97 / 97