0% found this document useful (0 votes)
94 views17 pages

Oct 13 PL

This document provides an overview of propositional logic and related concepts such as knowledge bases, entailment, semantics, and reasoning. It introduces propositional logic symbols and connectives. It explains how to translate statements from English to propositional logic. It defines semantics formally using interpretations and truth value assignments. It introduces truth tables and models to determine logical entailment and satisfiability. The document serves as a course material on propositional logic.

Uploaded by

Reem Suliman
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views17 pages

Oct 13 PL

This document provides an overview of propositional logic and related concepts such as knowledge bases, entailment, semantics, and reasoning. It introduces propositional logic symbols and connectives. It explains how to translate statements from English to propositional logic. It defines semantics formally using interpretations and truth value assignments. It introduces truth tables and models to determine logical entailment and satisfiability. The document serves as a course material on propositional logic.

Uploaded by

Reem Suliman
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Logic: Propositional Logic

Truth Tables

Raffaella Bernardi
[email protected]
P.zza Domenicani 3, Room 2.28

Faculty of Computer Science, Free University of


Bolzano-Bozen

http://www.inf.unibz.it/~bernardi/Courses/Logic06

Contents First Last Prev Next J


Contents
1 Knowledge bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Logic in general . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Entailment – Logical Implication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4 Propositional Logics: Basic Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
5 Propositional Logics: Reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6 Syntax of Propositional Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7 From English to Propositional Logic . . . . . . . . . . . . . . . . . . . . . . . . . 9
8 Semantics: Intuition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
9 Semantics: Formally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
10 Truth Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
11 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
12 Reasoning: Entailment and Satisfiability . . . . . . . . . . . . . . . . . . . . . 15
12.1 Exercise II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
13 Home work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Contents First Last Prev Next J


1. Knowledge bases
Inference engine ←− domain-independent algorithms
Knowledge base ←− domain-specific content

• Knowledge base = set of sentences in a formal language = logical theory


• Declarative approach to building an intelligent agent:
Tell it what it needs to know
• Then it can Ask itself what to do—answers should follow from the KB
• Agents can be viewed at the knowledge level
i.e., what they know, regardless of how implemented
• Or at the implementation level
i.e., data structures in KB and algorithms that manipulate them

Contents First Last Prev Next J


2. Logic in general
• Logics provide formal languages for representing and reasoning with informa-
tion
• Syntax defines the sentences in the language
• Semantics define the “meaning” of sentences; i.e., define truth of a sentence in
a world
• E.g., given a language for arithmetic, we can interpret the following formal
expressions in the ’world’ of natural numbers
x + 2 ≥ y is a sentence; x2 + y > is not a sentence
x + 2 ≥ y is true iff the number x + 2 is no less than the number y
x + 2 ≥ y is true in a world if x = 7, y = 1
x + 2 ≥ y is false in a world if x = 0, y = 6
x + 2 ≥ x + 1 is true in every world independently of the integers assigned
to x and y

Contents First Last Prev Next J


3. Entailment – Logical Implication
KB |= α

• Knowledge base KB entails sentence α


if and only if
α is true in all worlds where KB is true
• E.g., the KB containing “Manchester United won” and “Manchester City won”
entails
“Either Manchester United won or Manchester City won”

Contents First Last Prev Next J


4. Propositional Logics: Basic Ideas
Statements:
The elementary building blocks of propositional logic are atomic statements that
cannot be decomposed any further: propositions. E.g.,

• “The block is red”


• “The proof of the pudding is in the eating”
• “It is raining”

and logical connectives “and”, “or”, “not”, by which we can build


propositional formulas.

Contents First Last Prev Next J


5. Propositional Logics: Reasoning
We are interested in the questions:

• when is a statement logically entailed by a set of statements,


in symbols: Θ |= φ
• can we define deduction in such a way that deduction and entailment coincide?

Contents First Last Prev Next J


6. Syntax of Propositional Logic
Countable alphabet Σ of atomic propositions: a, b, c, . . ..
φ, ψ −→ a atomic propositions
| ⊥ false
| > true
| ¬φ negation
Propositional formulas:
| φ ∧ ψ conjunction
| φ ∨ ψ disjunction
| φ → ψ implication
| φ ↔ ψ equivalence

Contents First Last Prev Next J


7. From English to Propositional Logic
Eg. If you don’t sleep then you will be tired.
Keys: p = you sleep, q= you will be tired. Formula: ¬p → q.
Exercise I:

1. If it rains while the sun shines, a rainbow will appear


2. Charles comes if Elsa does and the other way around
3. Johan comes just when Peter stays at home
4. We are going, unless it is raining
5. Charles and Elsa are brother and sister or nephew and niece
6. If I have lost if I cannot make a move, then I have lost.

Use: http://www.earlham.edu/~peters/courses/log/transtip.htm

Contents First Last Prev Next J


8. Semantics: Intuition
• Atomic propositions can be true T or false F.
• The truth value of formulas is determined by the truth values of the atoms
(truth value assignment or interpretation).

Example: (a ∨ b) ∧ c

• If a and b are false and c is true, then the formula is not true.
• Then logical entailment could be defined as follows:
φ is entailed by Θ, if φ is true in all “the worlds”, in which Θ is true.

Contents First Last Prev Next J


9. Semantics: Formally
A truth value assignment (or interpretation) of the atoms in Σ is a function
I:
I : Σ → {T, F}.

Instead of I(a) we also write aI .


A formula φ is satisfied by an interpretation I (I |= φ) or is true under I:

I |= > I |= φ → ψ iff if I |= φ, then I |= ψ


I 6|= ⊥ I |= φ ↔ ψ iff I |= φ, if and only if I |= ψ
I
I |= a iff a =T
I |= ¬φ iff I 6|= φ
I |= φ ∧ ψ iff I |= φ and I |= ψ
I |= φ ∨ ψ iff I |= φ or I |= ψ

Contents First Last Prev Next J


10. Truth Tables
φ ψ φ∧ψ
φ ¬φ T T T
T F T F F
F T F T F
(1) F F F
(1)

φ ψ φ∨ψ φ ψ φ→ψ
T T T T T T
T F T T F F
F T T F T T
F F F F F T
(1) (1)

Contents First Last Prev Next J


11. Model
Intuitively an interpretation is a situation: it contains the kind of things we want
to speak about. It gives us two pieces of information:

• It tells us which collection of atomic propositions we are talking about (domain,


D),
• and for each formula it gives us an appropriate semantic value, this is done by
means of a function called interpretation function (I).

Thus an interpretation is a pair: (D, I).


An interpretation function (or truth value assignment) of the atoms in D is
a function I:
I : D → {T, F}.

The truth value of a complex formula depends on the truth values of its parts. We
have seen that for each connective this is prescribed in a truth table.

An interpretation m is a model of a sentence α if α is true in m.

Contents First Last Prev Next J


M (α) is the set of all models of α.

i.e. the set of all the interpretations where α is true.

Contents First Last Prev Next J


12. Reasoning: Entailment and Satisfiability
The main concepts to focus attention on are: (1) Entailment and (2) Satisfiability.

(1) Entailment:

KB |= α iff M (KB) ⊆ M (α)

in words, Knowledge Base (KB) entails sentence α if and only if


α is true in all models of the KB (i.e. for all interpretations where KB is true).
(2) Satisfiability:
A set of statements is satisfiable if the statements can all be true simultaneously
(i.e. there is one model of all statements). Otherwise it is unsatisfiable (i.e. there
is no model of all statements).
A set of statements is a tautology if the statements are always all true simul-
taneously (i.e. for every interpretation).

Contents First Last Prev Next J


12.1. Exercise II
Check whether the following argument is satisfiable:

If the temperature and air pressure remained constant, there was no rain.
The temperature did remain constant. Therefore, if there was rain then
the air pressure did not remain constant.

(i) Give the keys of your formalization using PL; (ii) represent the argument formally,
and (iii) Apply the truth table method to prove or disprove the satisifiability of the
argument.

Contents First Last Prev Next J


13. Home work
• Study Chapter 1 of Kelly
• Bring at the Lab (October 20th) the solutions for the exercises.
• Today key concepts
– Syntax of PL: atomic vs. complex formulas [exercises]
– Semantics of PL: truth tables [exercises]
– Formalization of an argument [exercises]
– Interpretation function [again next time]
– Domain [again next time]
– Model [again next time]
– Entailment [again next time]
– Satisfiability [again next time]

Contents First Last Prev Next J

You might also like