notes4
notes4
1 -
Logic
>
-
Basics
·
Statement/Proposition -
Truth value -
Predicate -
P
can depend on >1 variable
* 3 types of statements
Universal -
for all , every ,
conditional - if ..
then
..,
Existenitial -
there exists..,
-
Sets
UES :
u is an element of the set s
S =
2 , 3
1, 2
,
43 T = 22 , 3, 4
,
53
·
S + T = 33 ,
5
,
7 93
,
·
S + + =
3(1 ,
2) ,
11 , 3) , 11 , 4)
,
(1 , 5) ,
12 2),
,
(2 3),
,
12 43 (2
, ,
5)
, .
(4 5) 3
,
,
. .
.
* EntS (P(n) 3 :
set of all elements in in S such that P(n) is true
set
- * such that
>
-
Operations
pand a
(p-q)&
English :
Conjunction
·
but a
p ,
TF F
-
and operation
T F despite the pact that p q
E ,
F
FF although p , q
Disjunction (pvq)
p
·
-
inclusive or (v) TF T
TF T
FT T
FTT
-
exclusive or (0) FF F
F
FF
(up)
~
Negation
·
-not operation F T
>
-
Truth tables
statement/propositional form-made
up
of statement variables (p , a , r ,
s ,
t ,
u
,
v)
·
Truth tables
-
TT TF
T T FT
T TF F
T FT T
TFT F
I
F F
FF :
F + T
FTT
: i
:
·
Logical equivalence
~
(p1q) = up v -q
~
(pvq) = up 1 ~g
=>
Conditional and Biconditional
(p +
q) (peal) -
p
:
hypothesis
& : conclusion
pea
= if p ,
then g
equivalent
logically
pa
per
* For a conditional pea
, to the conditional
tapositive
wa-up
: peq
T F
converse :
q +
P
·
FT T F
F T T inverse
F ·
: up - uq
Order of
operations
>
-
1
~
V -
,
use parenthesis as needed
>
-
Laws of Propositional Logic
1) commutative :
pro = q1p pug = aup
2) Associative :
(p19)1r = pr(q1r)
3) Distributive :
pr(qur) = (p1g)v/pur) plan) =
(Ava)n(pur)
4) Identity :
pat =
p PVE = P
5) Negation :
prup = prup
= E
2) Idempotent : p1p =
p prp =
P
9) (pva) up1 ~q
Demorgan's ~(p1q)
=
~preq
~
:
Arguments
·
Argument :
sequence of statements
Argument form :
Sequence of statement forms
Syllogism -
be J
I
Eg
.
If p then Q
premises
Syllogism
If Q then R
Therefore if P then R
. P-RJ conclusion
- Premises
PQ R #R - Pe RJ conclusion
TT T T
T T
F J F #
TT
T
T F T F T
F
F T
T F F
T T
F TT T
T T T
F T F
T T T
FFT
T T T
FFF
↑
4) critical Rows for critical row if the premises and
every
-
that valid
* Rules of inference : Forms of
arguments a re
-
↓
>
- Rules of inference
1) Modus
* Converse error : P Q
Ponens peq
-
Q
P
.. P
: g
*
·
Inverse e r ro r :
pr Q
~ P
~ q
.. ~P
3) Generalisation : a) p b) q
: Pvq : pra
4) specialisation :
a) pag b) p1q
.. P .: qu
5) Conjunction :
P
qu
.: prq
6) Elimination :
a) pug b) prq
~
p ~ q
: -
q .. P
P -a
7) Transitivity : 9) Contradiction : up -c
q
+
r
:
·
P
i - r
.
p
prop
8) Proof by division in cases : 10) Resolution :
pug
p - r
~
pvr
a = r
: vV
·
: r
>
-
Quantifiers
·
Universal : f (for all , for every) - Fu ,
P(n)
· -
plu) =
Q() is element the truth set of P is truth set of Q
every
·
in in
P(n) > Q(n) means P(n) and Q(n) have identical with values
>
-
Negating Quantifiers
~
(FRED ,
Pln)) =
Ju ED ,
~P(n)
~ (In E D, Plub) = Fu ED ,
~P(n)
>
- 1 6
.
Predicates and Quantifiers
Predicate -
P
can depend on >1 variable
>
-
1 13-.
Rules of inference w/ quantifiers
no other
-
of the domain
Particular element -
of the domain
are i n the
Proofs
● Direct proof
● Disproof by counterexample
●
·
Proof by contradiction - tip: gure out what you want to contradict rst
● Proof by contraposition
● Proof by cases
● Give title
● Suppose…
● We wish to show
● Basis step - prove the property is true for the rst element of the set
● Inductive step - if the property is true for P(k), then it is true for P(k+1)
● When you use P(k) in the inductive step, write (by inductive hypothesis)
fi
* Induction
4) =
-
3)
4) =
n((y 3)
-
1-3)
LMs : 1 RMS : = 1 + LMS = RHS
,
so PCI) is doe
,
u)=is a
P(k + 1) meare 1ts + 11 + 16 +... + (5(4 + D -
(RMS)
2Ms :
1 + 6 + 11 + 16 + ...
+ (5y + 1) = 1 + 6 + 11 + 16 + ...
+ (5k -
4) +
(5k + 1) (by sub)
(by
k(-b) step
=
+ 154 +
1) inductive
·
Since LHS =
RHS ,
P(K + 1) is true ·
2
Therefore ,
for all
integers n ,
n31 ,
6 11 + 16 (5 4)
n
=
1 + + + +
-
...
* Proof by
contradiction
Q .
number
,
then a + br is irrational .
That is
, suppose a
and b are rational , b =0 w is an irrational
,
contradiction . -
since a is rational , a :
E where n
,
m El and moo
since b is rational ,
b =
1 where p , g El
and 0
g
If a + br is rational ,
then a + br
= S
,
t X, + 0
.
So a + br
=
prev
~=
smont - state
This shows v is rational (by def) , which is a contradiction .
counter example
Let n = .
5
Then : : =
But , 2 is even .
Thus , this statement is False .
Q2 .
Prove that the sum of any two old integers is even
son +
y =
(2k + 1) + (2n + 1)
=
2k + 2n + 2
=
2(k + n + 1)
Therefore man =
21 for some
integer 1 .
So min is even
(by def of even) as we wished to show .
Proof by contrapositive:
Proof: Suppose n is an even integer. We wish to show that if n is even, then n^2 is even.
Then, n^2 = 2m. By de nition of even integers, this shows that n^2 is even.
Therefore, since we have proven the contrapositive of the initial statement to be true, the
initial statement itself must be true. That is, if n^2 is odd, then n is odd.
fi
Set theory