Sunteți pe pagina 1din 9

Logical propositions

The basic building blocks of any logic are logical


formulæ (also called “propositions” or
“sentences”).
Examples:
Propositional logic (revision)
Propositional logic: p ∧ (p → q) → q, p ∧ ¬p,
& semantic entailment (p ∧ ¬q) ∨ (q ∧ ¬p).
Predicate logic: ∀x.∃y : f (x, g(y)) = c.
Modal logic: 2(p → q) → (2p → 2q).

– p. 1/34 – p. 3/34

The language of
Reading propositional logic
The background reading for propositional logic is Definition. The language of propositional logic
Chapter 1 of Huth/Ryan. (This will cover has an alphabet consisting of
approximately the first three lectures.)
propositional atoms: p, q, r, . . .
connectives: ∧, ∨, →, ¬, , ⊥
auxiliary symbols: ( , )

– p. 2/34 – p. 4/34
The language of Meta-variables and
propositional logic object-variables
The connectives carry the traditional names: The greek letters A, B, . . . are
meta-variables: they are not formulæ—they
∧ and conjunction part of our mathematician’s English.
∨ or disjunction By contrast, the propositional atoms p, q, . . .
→ if ... then ... implication are object-variables: they are formulæ.
¬ not negation
 true
⊥ false

– p. 5/34 – p. 7/34

Meta-language and
Syntax of formulæ object-language
Definition. The formulæ of propositional logic, Consider the following sentence:
for a given set {p, q, r, . . .} of propositional The Java program P runs faster than the
atoms, is given as follows: Java program Q, because P has a better
every propositional atom a formula, and so handling of the variable counter.
are  and ⊥;
Java is the object-language, i.e. the language
if A and B are formulæ, then so are (A ∧ B) about which we speak. counter is an
and (A ∨ B) and (A → B); object-variable, because it belongs to Java.
if A is a formula, then so is (¬A); IT-English is the meta-language, i.e. the
language in which we speak. P and Q are
(We shall often omit brackets if the meaning is meta-variables.
– p. 6/34 – p. 8/34
Meta-language and
object-language Semantics
Back to logics: For example, in computability theory, the
Mathematician’s (or logician’s) English (or meaning of a program (or Turing machine or
German or. . . ) is our meta-language. abacus machine...) is a function from the
A, B, . . . are meta-variables. natural numbers to the natural numbers.
Formulæ and similar things form the English sentences also have a meaning (but it
object-language. p, q, . . . are object-variables. is extremely hard to capture mathematically).

– p. 9/34 – p. 11/34

Semantics of logical
Semantics formulæ
So far, we have discussed the syntax, i.e. the In logics, meaning is often described by a
rules defining the language (of formulæ). But satisfaction relation
what is the meaning of a formula?
M |= A
Semantics is the study of meanings.
that describes when a situation M satisfies a
formula A.
It varies between logics what formulæ and
situations are.

– p. 10/34 – p. 12/34
The satisfaction
Situations relation
Definition. A situation M in propositional logic Definition. A situation M is said to satisfy a
(also called “valuation”) assigns to each formula A if M |= A.
propositional atom p a value [[p]]M ∈ {0, 1}.
Definition. A situation M is said to satisfy a set
Γ of formulæ if M satisfies every formula in Γ. In
this case, we write
M |= Γ.

– p. 13/34 – p. 15/34

The satisfaction
relation Models
Definition. The satisfaction relation |= is Definition.
defined as follows: A situation M that satisfies a formula A is
M |= A ∧ B iff M |= A and M |= B called a model of A.
M |= A ∨ B iff M |= A or M |= B A situation M that satisfies a set of formulæ Γ
is called a model of Γ.
M |= A → B iff whenever M |= A then M |= B
M |= ¬A iff M
|= A
M |=  always
M |= ⊥ never
M |= p iff [[p]]M = 1 – p. 14/34 – p. 16/34
Examples Validity
Let M be a situation such that Definition. A propositional formula A is called
M |= p M
|= q M |= r. valid (or a tautology) if it holds in every
situation, i.e.
Which of the following entailments hold?
M |= A for all situations M.
1. M |= p ∧ ¬q
2. M |= q ∨ ¬r
3. M |= p → q Example. Which of the formulæ below are valid?
4. M |= q → q 1. (p → q) → ((q → r) → (p → r))
2. p ∨ q ∨ ¬r
– p. 17/34 – p. 19/34

Truth-table semantics Exercise


The satisfaction relation we have just seen can Show that the formulæ below are tautologies
also be presented by using truth-tables: (where 2 ∈ {∧, ∨}) and A ↔ B is defined as
(A → B) ∧ (B → A):
A B A∧B A B A∨B A B A→B
((A2B)2C) ↔ (A2(B2C)) (associativity)
0 0 0 0 0 0 0 0 1 A ¬A (A2B) ↔ (B2A) (commutativity)
0 1 0 0 1 1 0 1 1 0 1 (A ∧ ) ↔ A (A ∨ ⊥) ↔ A (neutrality)
(A ∧ (B ∨ C)) → ((A ∧ B) ∨ C) (linear distributivity)
1 0 0 1 0 1 1 0 0 1 0
(¬A ∧ A) → ⊥ (contradiction)
1 1 1 1 1 1 1 1 1  → (A ∨ ¬A) (excluded middle)
A ↔ A2A (idempotency)
Exercise: formalize this. A→
⊥→A (ex falso quodlibet).

– p. 18/34
Remark: this is an axiomatization of Boolean lattices. – p. 20/34
Exercise Semantic entailment
Show that the formulæ below are tautologies: Definition. Let Γ = {A1 , . . . , An } be a set of
formulæ, and B a formula. We say that Γ
(A ∧ B) ↔ ¬(¬A ∨ ¬B) (DeMorgan)
semantically entails B and write
(A ∨ B) ↔ ¬(¬A ∧ ¬B) (DeMorgan)
 ↔ ¬⊥ (DeMorgan) Γ |= B
⊥ ↔ ¬ (DeMorgan) if every model of {A1 , . . . , An } is also a model of
(A → B) ↔ (¬A ∨ B) B.
(¬A → ⊥) → A (reductio ad absurdum)
(¬B → ¬A) → (A → B) (contrapositive) Remark: sometimes, “entailment” is called “consequence”.

((A → B) → A) → A (Pierce’s law). Warning: Γ |= B differs from M |= B; these conflicting uses of the symbol |= are

traditional.
– p. 21/34 – p. 23/34

Satisfiability Example
Definition. A set of formulæ Γ is called Which of the following entailments hold?
satisfiable if it has a model, i.e. {p, q, r} |= q
M |= Γ for some situation M. {} |= p ∨ ¬p
{p → q} |= p
Example: Which of the sets below are {p ∧ ¬p} |= q
satisfiable?
{p, ¬q}
{p, ¬p}

– p. 22/34 – p. 24/34
Exercise: natural
deduction Multiple conclusions
Prove the following facts about semantic Definition. Let Γ = {A1 , . . . , An } and
entailment. (These are the rules of natural Δ = {B1 , . . . , Bm } be sets of formulæ. We say
deduction, which we shall study soon. The that Γ semantically entails Δ and write
comma stands for union of sets of formulæ.)
Γ |= Δ
Γ |= A Γ |= B Γ |= A ∧ B Γ |= A ∧ B
∧i ∧e ∧e
Γ |= A ∧ B Γ |= A Γ |= B if every model of A1 , . . . , An satisfies at least one
Γ, A |= B Γ |= A → B Γ |= A Bi in Δ.
→i →e Note that this is the same as saying that
Γ |= A → B Γ |= B
Γ |= ⊥ Γ, ¬A |= ⊥ A1 ∧ . . . ∧ An |= B1 ∨ . . . ∨ Bm .
⊥e RAA
Γ |= A Γ |= A
– p. 25/34 – p. 27/34

Example: modus
ponens Examples
We prove Which of the following entailments hold?
Γ |= A → B Γ |= A {p ∨ q} |= {p, q}
→e
Γ |= B {} |= {p, q → p}
This is the famous modus ponens already {p, ¬p} |= {}
known to the ancient Greeks. {} |= {p, ¬p}
Proof: Suppose that M |= Γ. Because of the two
assumptions, we have M |= A → B and M |= A.
By definition, the statement M |= A → B means
that M |= B whenever M |= A. So M |= B.
– p. 26/34 – p. 28/34
Example: right
weakening Example: the cut rule
Claim: whenever Γ |= Δ and Δ ⊆ Δ , it holds that The famous cut rule, which we shall study in
Γ |= Δ . Short notation: depth later, states that whenever
Γ |= Δ Γ2 |= Δ1 , A, Δ3 and Γ1 , A, Γ3 |= Δ2 ,
if Δ ⊆ Δ .
Γ |= Δ
then
Is the claim true? Γ1 , Γ2 , Γ3 |= Δ1 , Δ2 , Δ3 .
Short notation:
Γ2 |= Δ1 , A, Δ3 Γ1 , A, Γ3 |= Δ2
.
Γ1 , Γ2 , Γ3 |= Δ1 , Δ2 , Δ3

– p. 29/34 – p. 31/34

Exercise: sequent Validity of the cut


calculus rule
Prove the following. (These are rules of the Suppose that Γ2 |= Δ1 , A, Δ3 and Γ1 , A, Γ3 |= Δ2 .
sequent calculus, which we shall study later in To see that Γ1 , Γ2 , Γ3 |= Δ1 , Δ2 , Δ3 , assume that
this course.) M |= Γ1 , Γ2 , Γ3 . Because Γ  Γ2 , the situation M
Ax
Γ2 |= Δ1 , A, Δ3 Γ1 , A, Γ3 |= Δ2 satisfies at least one formula in Δ1 , A, Δ3 .
Cut
A |= A Γ1 , Γ2 , Γ3 |= Δ1 , Δ2 , Δ3
Case 1: M |= A. In this case, we have
Γ, A, B |= Δ
L∧

Γ |= A, Δ Γ |= B, Δ 
R∧
M |= Γ1 , A, Γ3 , and therefore M |= Δ2 . By
Γ, A ∧ B |= Δ Γ, Γ , |= A ∧ B, Δ, Δ right weakening M |= Δ1 , Δ2 , Δ3 .
Γ, A |= Δ Γ , B |= Δ Γ |= A, B, Δ
L∨ R∨ Case 2: M |= Δ1 , Δ3 . In this case, the claim
Γ, Γ , A ∨ B |= Δ, Δ Γ |= A ∨ B, Δ
follows directly from right weakening.
Γ |= A, Δ Γ , B |= Δ Γ, A |= Δ, B
L→ R→
Γ, Γ , A → B |= Δ, Δ Γ |= A → B, Δ
– p. 30/34 – p. 32/34
Entailment, validity,
and satisfiability
The semantic entailment relation |= is convenient
for expressing validity and unsatisfiability. Before
we explain this, we introduce two abbreviations:
we write
|= Δ
instead of {} |= Δ, and
Γ |=
instead of Γ |= {}.

– p. 33/34

Entailment, validity,
and satisfiability
Observation: we have
|= A if and only if A is valid, and
Γ |= if and only if Γ is unsatisfiable.

– p. 34/34

S-ar putea să vă placă și