Académique Documents
Professionnel Documents
Culture Documents
MAT1830
Lecture 4: Logic
Lecture 4. Logic
p
T
T
F
F
4.1
Connectives ^, _ and :
q
T
F
T
F
p
T
F
The connectives ^, _
the propositional variab
take the two values T an
_ and : are also called t
4.2
Implication
1+1=3
1+1
3 divides 7
37
Yes
No
Yes
No
4.1
The connectives ^, _
the propositional variab
take the two values T an
_ and : are also called t
Connectives ^, _ and :
4.2
q
T
F
T
F
Implication
p^q
T
F
F
F
it is enough to see w
MCG is ooded. Thus
true when p is false.
This means that p !
p
T
T
F
F
q
T
F
T
F
p
T
T
F
F
q
T
F
T
F
p^q
T
F
F
F
it is enough to see
MCG is ooded. Thus
true when p is false.
This means that p !
p
T
T
F
F
Lecture 4. Logic
Similarly, p_q is true when p is true or q is true,
= 2, or
me number.
r name? or
ce is false.
q
T
F
T
F
p_q
T
T
T
F
:p
F
T
q
T
F
T
F
T
T
F
F
orand not,which
logic.
ntence which has a defor false=F), such as
2, or
e number.
^, _ and :
nnectivesbecause they
o sentences p and q into
nnectives are dened so
most common interpre, or and not.
ample, we only have to
when p is true and q is
d by the following truth
T
T
T
F
name? or
ce is false.
T
F
T
F
p
T
F
:p
F
T
4.2
Implication
Notation
and
or (inclusive)
not
Order of precedence
has precedence over the other connectives.
For example, p q means p (q).
For other connectives well always use brackets to make the meaning
clear.
p
T
T
T
T
F
F
F
F
q
T
T
F
F
T
T
F
F
r
T
F
T
F
T
F
T
F
qr
T
T
T
F
T
T
T
F
p (q r )
T
T
T
F
F
F
F
F
pq
T
T
F
F
F
F
F
F
pr
T
F
T
F
F
F
F
F
(p q) (p r )
T
T
T
F
F
F
F
F
^, _ and :
4.2
nnectivesbecause they
wo sentences p and q into
nnectives are dened so
most common interpred, or and not.
ample, we only have to
when p is true and q is
d by the following truth
Implication
p^q
T
F
F
F
q
T
F
T
F
p!q
T
F
T
T
Notation
and
or (inclusive)
not
implies
p
T
T
F
F
p!q
p_q
F
T
T
F
if p then q
4.4
q if p
p only if q
q provided p
q when p (or q
whenever p)
p is su cient for q
q is necessary for p
p hence q
q because p
since p; q
4.3
q
T
F
T
F
Remarks
, (x 2 A) ^ (x 2 B
, (x 2 A) _ (x 2 B
Other connectives
Question 4.2
p: I carry an umbrella.
q: It is raining.
qp
pq
qp
pq
p q
q p
pq
3. The exclusive o
XOR in some programm
4. If we write 0 for F
comes the function
cricket is o
4.3
Other connectives
p
1
1
0
0
q
T
F
T
F
p!q
T
F
T
T
q!p
T
T
F
T
p$q
T
F
F
T
cket
p!q
hen
if p then q
CG
q if p
4.4
q
T
F
T
F
p_q
F
T
T
F
Remarks
q
1
0
1
0
and
or (inclusive)
not
implies
if and only if
exclusive or
Question 4.3
exclusive
inclusive
exclusive
hen
if p then q
CG
q if p
y if
p only if q
the
the
the
4.4
q provided p
q when p (or q
whenever p)
p is su cient for q
q is necessary for p
p hence q
Remarks
, (x 2 A) ^ (x 2 B);
, (x 2 A) _ (x 2 B):
the
q because p
the
since p; q
the
q because p
the
since p; q
tives
p
1
1
0
0
q!p
T
T
F
T
q
1
0
1
0
p_q
0
1
1
0
p$q
T
F
F
T