Beruflich Dokumente
Kultur Dokumente
A. V. Ravishankar Sarma
March 6, 2019
1 What does it mean for one sentence to follow logically from certain
others?
2 If a sentence does follow logically from certain others, what methods
of proof might be necessary to establish this fact?
3 Is there a gap between what we can prove in an axiomatic system (say
for the natural numbers) and what is true about the natural numbers?
4 What is the connection between logic and computability?
Reasons
1 English (and any natural language in general) is such a rich language
that it cannot be formally described.
2 meaning of an English sentence can be ambiguous, subject to different
interpretations depending on the context and implicit assumptions.
3 Natural languages tend to be verbose, and even fairly simple
mathematical statements become exceedingly long (and unclear)
when expressed in them.
If the object of our study is to carry out precise rigorous arguments about
assertions and proofs, a precise language whose syntax can be completely
described in a few simple rules and whose semantics can be defined
unambiguously is required.
Syntax
1 For instance, a language can be used as a deduction system (or proof
system); that is, to construct proofs or refutations. This use of a
logical language is called proof theory.
2 When using logic as a proof system, one is not concerned with the
meaning of the statements that are manipulated, but with the
arrangement of these statements, and specifically, whether proofs or
refutations can be constructed.
3 This use of logic is similar to game playing. Certain facts and rules
are given, and it is assumed that the players are perfect, in the sense
that they always obey the rules.
Definition (String)
A string or word in a formal language is any finite sequence of the symbols
in the language. We include in this the empty string containing no
symbols at all.
Example (String)
p ∨ pq) ⇒ pqr , (p ∧ q), p)
Definition (Wffs)
1 Every propositional variable P is a well formed formula.
2 If A is a wff, so is ¬A.
3 If A; B are formulas, so are ¬A, (A ∧ B), (A ∨ B), (A → B), and
(A ↔ B).
Note
Thus a string A is a wff exactly when there is a finite sequence
A1; . . . . . . . . . ; An (called a parsing sequence) such that An = A and for
each 1 ≤ i ≤ n, Ai is either (1) a propositional variable, (2) for some
j < i, Ai = Aj , or (3) for some j, k < i, Ai = (Aj ∗ Ak), where ∗ is one of
¬,∨, ∧,→,↔
Standard Rules:
Apply the conenctives, inserting parenthesis if needed in the following
preferential order:
1 ¬ Applies to shortest proposition to its right.
2 ∧ Applies to shortest proposition on each side of it.
3 ∨ Applies to shortest proposition on each side of it.
4 → Applies to shortest proposition on each side of it.
5 ↔ Applies to shortest proposition on each side of it.
If at any time you are with repeats of the some connective, group them
working from the left to right.(A ∨ B ∨ C ).
Convention
We can omit the use of parenthesis by assigning decreasing ranks to the
propositional connectives as follows: ↔, →, ∧, ∨,¬. The connective with
greater rank always reaches further.
First preference is given to ¬ and then ∨ etc.
Example (Wff’s)
1 p → q ∧ r ∨ s is written as p → (q ∧ (r ∨ s)).
2 p → ¬p ∨ ¬q ∧ p ↔ q is written as ??
3 p ∨ ¬(q ∧ r ) ↔ p???
1 The truth value of the compound that they form can be determined
solely by the truth values of their components.
2 This means that there will be a rule telling us exactly what the value
of the compound must be for each combination of values for the
components.
1 Not p [or the result of transforming p by putting not just after the
verb or an auxiliary verb]
2 p does not hold
3 It is not the case that p
4 p isn’t so.
1 P or Q or both.
2 P or Q [sometimes(s)]
3 P unless Q [s]
4 P and/or Q [in legal documents]
5 Either P or Q [s]
6 P except when Q [s]
Neither P nor Q: ¬(P ∨ Q)
1 p and q; p but q;
2 p despite the fact that q; p although q; p though q; p even though q.
3 p while q; p moreover q; not only p but also q
4 p, albeit q; p, whereas q; p for q.
5 p no sooner than q; p, still q; p besides q.
6 p on the other hand q.
(p ∨ q)
1 p or q
2 Either p or q
3 p or q or both.
4 p, or alternatively q.
1 p if q; p when q p so long as q.
2 p provided that q; p on the condition that q; p inn the circumstance
that q.
3 p in the event that q; p in case q; p assuming that q;
4 p on the supposition that q; p granting taht q;
5 p given that q.
(p ↔ q)
1 p if and only if q; p when and only when q
2 p if q otherwise not.
3 p just in case q
4 p whether or not q p
5 p even if q p.
3 You must pass this course or make up your credit hours in some other
way.(C, H). C ∨ H. Both inclusive and exclusive.
1 P and Q.
2 P but Q
3 P although Q. P nonetheless Q.
4 Both P and qQ; P nevertheless Q.
5 Not only P but Q
6 P despite Q
7 P yet Q
8 P while Q.
9 P moreover Q,P however Q.
10 Whereas
1 If P, then Q
2 When P, then Q.
3 In case P, Q.
4 Q provided that P
5 P is (a) sufficient (condition) for Q
6 Q is (a) necessary (condition) for P
1 P implies Q.
2 Q if P.
3 Q when P;
4 Q in case P;
5 P only if Q;
6 P only when Q;
7 P only in case Q;
if A then B
A → B.
1 if A then B
2 A only if B.
3 B if A
4 A implies B
5 It follows from A that B.
6 Whenever A, B
7 A is sufficient condition for B
8 B is necessary condition for A.
Examples:
1 Being a bachelor is sufficient for being a male. Being male is
necessary for being a bachelor
2 Q unless P: Q is necessary for not P; Not P is sufficient for Q.
(¬P → Q).
3 Q if P: Q is necessary for P; P is sufficient for Q. (P → Q)
4 Q provided that P: Q is necessary for P; P is sufficient for Q (P → Q).
5 P only if Q:Q is necessary for P; P is sufficient for Q.(P → Q)
6 When P then Q; Q is necessary for P; and P is sufficient for Q.
(P → Q)
7 All P’s are Q’s: Q is necessary for P; and P is sufficient for Q
(P → Q)
1 P if and only if Q
2 P if Q, and Q if P
3 P exactly if Q
4 P is (a) necessary and sufficient (condition) for Q: P iff Q
5 If P then Q, and conversely
Paraphrase the following statements into the sentential language using the
suggested letters for the simple statements.
1 Only those who do exercises will pass logic. (E, P):(P → E )
2 This litmus paper turns red if it is placed in acid. (R, A)(R → A).
3 This litmus paper has been placed in acid only if it turns red. (A,
R):A → R
4 You won’t pass the course unless you do the exercises. (P, E)
5 If you do the exercises you will pass the course provided that you are
diligent and intelligent. (E, P, D,I):(E ∧ D ∧ I) → P)
1 v (T ) = true and v (F ) = F
2 v (A ∧ B) = T if v (A) = v (B) = T ; v (A ∧ B) = F .
3 v (A ∨ B) = F if v (A) = v (B) = F ; v (A ∨ B) = T otherwise.
4 v (A → B) = F v (A) = T and v (B) = F ; v (A → B) = T otherwise.
5 v (A ↔ B) = T if v (A) = v (B); v (A ↔ B) = F otherwise
6 v (¬A) = T if v (A) = F ; v (¬A) = F if v (A) = T .
1 {p ∧ r , ¬q ∨ (p ∧ ¬p)} |= (p ∧ ¬q) → r .
2 {p, p → q} 6|= ¬q
Definition (Satisfiability)
The set Γ of formulas is satisfiable if there is some truth assignment v
which satisfies Γ, i.e. v (λ) = T for all λ ∈ Γ.
Example
1 I became sick and I went to see the doctor.
2 If Germany’s U-boats had been able to shut off the flow of supplies to
Great Britain, then Germany would have won the war.
Negation
p ¬p
T F
F T
Other Connectives
p q p∧q p q p∨q p q p→q p q p↔q
T T T T T T/F T T T T T T
T F F T F T T F F T F F
F F F F F T F T T F T F
F F F F F F F F T F F T
1 Across the top of the left-hand side of the table, list each primitive
proposition that occurs in p.
2 Beneath this, fill in each combination of T’s and F’s, beginning with
an ‘F’ beneath each primitive proposition and ending each column
with a ‘T’.
3 Write out the proposition p across the top of the right hand side of
the table. Leave some space between each symbol.
4 Starting with the smallest subformulas of p (i.e. those nearest the top
of p’s construction tree), fill in the column under the main connective
of those subformulas with ‘F’s and ‘T’s according to the truth table
for the connective in question.
5 Repeat the previous step until there is a column of ’s and ‘T’s under
each connective. Now highlight the column under ’p’s main
connective, as this is the information that we are looking for.
1 p ∧ q ∨ (¬p ∨ ¬q)
2 (p ∧ q) ∧ (¬p ∨ ¬q).
1 Tautologies have only ‘T’s in the main column of their truth table.
2 A statement is a contradiction if and only if it is false on every
assignment of truth values to its atomic components.
3 A statement is contingent if and only if it is true on some assignments
of truth values to its atomic components and false on others.
Using truth tables, determine which of the following are tautologies. For
any that are not, give a valuation which does not satisfy the sentence.
1 (p → ¬q) → ¬(p → q)
2 (p → ¬q) → ¬p
3 (p → q) → ¬(q → p)
4 ¬(q → p) → (p → q)
5 (p → (q → r )) → (p ∧ q → r )
6 (p ∧ q → r ) → (p → (q → r )).
Unless food prices continue to rise or building costs soar, the general living
index will not remain in an inflationary trend. WE read in the papers that
food prices continues to rise. So, we must conclude that general living
index will remain inflationary[F, B, I].
(F ∨ B) → I
F
Therefore, I.
Valid
It isn’t true that this litmus paper is put into an acid solution but at the
same time doesn’t turn red. Had the litmus paper turned red, the
experiment wouldn’t have been a failure, Either this litmus paper is put
into an acid solution, and doesn’t turn read, or the experiment is a failure.
The litmus paper, therefore, doesnt’t turn red and the experiment is a
failure.[S, R, F]
1 ¬(S ∧ R)
2 R → ¬F
3 (S ∧ ¬R) ∨ F
4 Therefore, ¬R ∧ F .
1 True in all
valuations.
1 Valid (Tautologous) 1 only T’s
2 True on atleast one
2 Contingent 2 Both T’s and F’s
valuation
3 Inconsistent 3 Only F’s
3 True on no
valuations.
A N A→N N→A
T F
T TFF
FTT TFF
F T FTT TFF
Example
E ∨ S, E → (B ∧ U), ¬S ∨ ¬U therefore B
E S B U E ∨ S E → (B ∧ U) ¬S ∨ ¬U therefore B
TTF
F T F F F T T F T F F F F TT TFF
Example
A ∨ B, ¬A therefore B
A B A ∨ B, ¬B therefore B
TT F
FTF,TF F
F(T/F)F,TF F
Example
A ∨ ¬B, ¬A, ¬B → (C → D), therefore C → D
Example
A → B, B → C therefore ¬A ∧ C .
Five friends (Abhisheik, Harini, Kaushal, Ravi and Vijay) have access to an
on-line chat room. We know the following are true:
1 Either K or H or both are chatting (K ∨ H) ∨ (K ∧ H).
2 Either R or V but not both are chatting (R ∨ V ) ∨ ¬(R ∨ V ).
3 If A is chatting, then R is chatting.(A → R)
4 V is chatting if and only if K is chatting.V ↔ K )
5 If H is chatting, then both A and K are chatting.(H → (A ∧ K )
Determine who is chatting.
1 Truth trees are one of the most efficient ways of checking the
semantic properties of propositional formulas.
2 In particular, it gives a very easy way of checking the validity of
sequents.
3 The basic idea of truth trees is that they give a graphic way of
displaying whether or not a set of formulas is inconsistent.
(p ∨ q) (p ∧ q) (p → q) (p ↔ q)
¬p ———— ———— ———— ————
∴¬p
V V V
p
p q q ¬p q p,q //¬p, ¬q
(p ⊃ q)
(r ∨ ¬q)
¬r
¬p
¬p q
r ¬q r ¬q
⊗ ⊗ ⊗
Definition (Path)
A path of a tree (in any stage of construction) is a complete column of
formulas from top to the bottom of the tree.
A route going from the initial set of formulas at the top down to one of
the atomic formulas at the bottom, while choosing only one side of each
branch as one goes, will be called here a path
Definition
A formula occurs on a path if it is on the path and is not merely a sub
formula of some other formula on that path (2) it is unchecked.
On some island, there are knights (who always tell the truth) and knaves
(who always lie).
Problem
You meet two islanders (call them A and B) and hear the first one say at
least one of us is a knave. Can you tell whether the islanders are knights
or knaves and which islander is which?
p q ¬p ∨ ¬q p → (¬p ∨ ¬q)
T T F F
T F T T
F T T F
F F T F
1 You meet two people, A and B. A says: I’m a knave but B isn’t.
What are A and B?
2 Suppose A says: If I am a knight, then so is B. Can it be determined
what A and B are?
3 Suppose you know that A and B are either both knights or both
knaves. What do you make of A’s statement If B is a knight, then I
am a knave”?
4 Suppose A says: We are both knights” and B says Either A is a
knight or I am a knight, but not both.” What can you conclude?
It is rumoured that there is gold buried on the Island. You ask one of the
the natives, A, whether there is gold on the island. He makes the following
response: There is a gold on this island equivales I am a knight. The
problem is as follows:
1 Can it be determined whether A is knight or Knave?
2 Can it be determined whether there is gold on the island?
Question
Is it the case that th statement that the left fork leads to the restaurant is
equivalent to your being knight?
There was a robbery in which a lot of goods were stolen. The robber (s)
left in a truck. It is known that :
1 Nobody else could have been involved other than A, B and C.
2 C never commits a crime without A’s participation.
3 B does not know how to drive.
Is A innocent or guilty?
There was a robbery in which a lot of goods were stolen. The robber (s)
left in a truck. It is known that :
1 Nobody else could have been involved other than A, B and C.
(A ∨ B ∨ C ).
2 C never commits a crime without A’ s participation.(C → A)
3 B does not know how to drive (B → [(B ∧ A) ∨ (B ∧ C )].
Is A innocent or guilty?
A is Guilty
1 If the pilot was conscious and knew the rate of descent of his
airplane, then if the altimeter was accurate, mechanical failure was
responsible for the crash. Inspection of wreckage shows that there
was no mechanical failure, and that the altimeter was accurate.
Therefore, if the pilot was conscious, he did not know the rate of of
descent of his airplane[C, K, A, M].
2 If the capital investment remains constant, then government spending
will increase or unemployment will result. If the government spending
will not increase, taxes can be reduced. If taxes can be reduced and
capital investment remains constant, then unemployment will not
result. Hence, the government spending will increase [C, G, U, T].
3 Either Logic is difficult or not many students like it. If mathematics is
easy, then logic is not difficult. Therefore, if many students like logic,
mathematics is not easy[D, L, M].
Five friends (Abhisheik, Harini, Kaushal, Ravi and Vijay) have access to an
on-line chat room. We know the following are true:
1 Either K or H or both are chatting (K ∨ H) ∨ (K ∧ H).
2 Either R or V but not both are chatting (R ∨ V ) ∨ ¬(R ∨ V ).
3 If A is chatting, then R is chatting.(A → R)
4 V is chatting if and only if K is chatting.V ↔ K )
5 If H is chatting, then both A and K are chatting.(H → (A ∧ K )
Determine who is chatting.
In this puzzle a prisoner is faced with a decision where he must open one
of two doors. Behind each door is either a lady or a tiger. There might be
two tigers, two ladies or one of each.
If the prisoner opens a door and finds a lady he will marry her and if he
opens a door and finds a tiger he will be eaten alive.
Of course, the prisoner would prefer to be married than eaten alive. Each
of the doors has a sign bearing a statement that may be either true or false
The second puzzle of the book runs as follows. Again there are two signs.
1 The sign on the first door says: At least one of these rooms contains
a lady.
2 The sign on the second door says: A tiger is in the other room.
This time either the statements are both true or both false