as p q - 4J Blog Server

Basic Concepts of Symbolic Logic
The word “logic” derives from the Greek word logos meaning “word”.
For a mathematician, logic deals with the conversion of word statements
to symbolic form, and the use of that symbolic form to make deductions
and create proofs.
Mathematical logic deals with basic statements called propositions.
A proposition can be true, T, or false, F, but might be indeterminate.
Questions, exclamations and orders are not propositions.
In the study of mathematical logic, we concentrate on propositions
which have a well-defined truth value, that is, they are true or false.
Which of the following are propositions? For each proposition
identified, discuss whether it is true, false or indeterminate.
a. Justice has blue eyes. Proposition.
b. Today it is snowing in Eugene..
Proposition ??
c. All dogs have tails.
Indeterminate
d. 1 is a Prime number
Proposition. False
e. Is this the last week of the trimester ?
a. For all x R, x2  0
Not a proposition.
Proposition. True
To avoid writing all the words in a proposition all the time, we label
propositions with letters. Usually we use p, q, r, s etc.
In our class, the maximum number of propositions used at once is
three, usually p, q, and r.
e.g. p : The wind is blowing.
q : I will lose my hat.
In this example, there might be a connection between these propositions.
Compound Statements
All relations between two or more propositions are called compound
statements or compound propositions.
Symbols used to connect propositions are called connectives.
We will look at the symbols and meaning of Implication, Equivalence,
Negation, Conjunction, Disjunction and Exclusive disjunction.
Implication
E.g.
p : The wind is blowing.
q : I will lose my hat.
“If the wind is blowing then I will lose my hat”. This is called implication.
The symbol for this is an arrow in the direction of implication.
We write it as p  q (or sometimes as q  p )
p : This is a zebra.
q : This is striped.
“If this is a zebra then it is striped”.
This could be phrased as “All zebras are striped”
Equivalence
If an implication works in both directions, it is called an equivalence.
E.g. r : Fiona is a good footballer
We could write r  s
s : Fiona scores lots of goals
This is the same as writing r  s and r  s
It is also the same as saying that r is true if and only if s is true.
Negation
If we deny a proposition, we are saying it is not true.
The negation of p is usually written as  p
E.g.  q : I will not lose my hat
 r : Fiona is not a good footballer.
Conjunction, Disjunction and Exclusive disjunction
These are fancy names for the ideas of “and”, “or” and “or but not both”.
Each has its own symbol:
• Conjunction ( = and ) with the symbol

• Disjunction ( = or, possibly both ) with the symbol

• Exclusive disjunction ( = or but not both ) with the symbol
The use is straightforward:
p : Mischa has a dog

q : Yuri has a cat
p  q Mischa has a dog and Yuri has a cat.
p  q Either Mischa has a dog or Yuri has a cat (and both could be true).
p  q Either Mischa has a dog or Yuri has a cat but not both are true.
Given w : I am wearing shorts.
s : I am going to swim.
r : I am going to run.
Write in words these compound propositions:
a. w  s
I am wearing shorts and I am going to swim.
b. w  r  s If I am wearing shorts then I am going to swim or run (or both).
c. s  r
I am going to swim or run, but not both.
d.  s  r I am not going to swim if and only if I am going to run
e. w   (s  r) I am wearing shorts and I am not going to run or to swim.
(or I am wearing shorts and I am going to neither swim
nor run.)
Some compound
propositions have the same
meaning (are equivalent).
For example:
p  q  q  p is the same as p  q
 (p  q) is the same as  p   q
 (p  q) is the same as  p   q
To understand why these propositions are equivalent, an example helps.
Take p : The sun is shining.
q : It is raining.
Then  p   q becomes “the sun is not shining and it is not raining”
while (p  q) becomes “the sun is shining or it is raining (or both)”
and hence  (p  q) is “neither is the sun shining nor is it raining”,
which is clearly the same as “the sun is not shining and it is not raining”.
Warning: The use of brackets is important when a compound proposition could be ambiguous
without their use. For example if I write  p  q, this is different from  (p  q).
It is like the difference between – x + y and – (x + y) in algebra. If in doubt, use brackets!
r
p
q
r  p  q
r  p  q
(q  r)   p
r  p  q
(q  r)   p
If (I visited Sarah’s Snackbar or I visited Pete’s Eats)then I did not visit Alan’s Diner
If I visited either Sarah’s Snackbar or Pete’s Eats (or both), then I did not visit Alan’s
Diner.
r  p  q
If I visited either Sarah’s Snackbar or Pete’s Eats, then I did not visit Alan’s Diner.
The connectives used in
symbolic logic are closely
related to ideas which you
have met when working with
sets.
The connectives used in symbolic logic are closely related
to ideas which you have met when working with sets.
If we have: p : Today is a cold day.
q : Today is a wet day
then p  q means that today is cold and wet.
Suppose that A is the set of days which are cold, and B is the set of days
which are wet.
Then A  B stands for the set of days which are cold and wet.
So if ‘today’ is a member of the set A  B , i.e. t  A  B , it is cold
and wet today.
U
A
t
B
So t  A  B gives the same information as p  q being true.
Go to slide 13
For a Disjunction example
…... OR
If we have: p : Today is a cold day. q : Today is a wet
day then p  q means that today is cold or wet.
Suppose that A is the set of days which are cold, and B is the set of days
which are wet.
A  B stands for the set of days which are either cold or wet (or both).
So if ‘today’ is a member of the set A  B , i.e. t  A  B , it is cold or
wet today.
U
B
A
t
B
A
So t  A  B gives the same information as p  q being true.
Go to slide 14
For a Implication example
If.... Then....
If we have: p : Today is a cold day. q : Today is a wet day
then p  q means that if it is cold today, then it is wet
today..
Suppose that A is the set of days which are cold, and B is the set of days
which are wet.
A  B stands for all cold days are a subset of wet days, so all cold days are
wet. So if ‘today’ is a member of the set A, it must also be a member of
the set B.
U
A t
B
So t  A and A  B gives the same information as p  q being true.