Formal Logic: Mathematical Structures For Computer Science
Formal Logic: Mathematical Structures For Computer Science
Formal Logic: Mathematical Structures For Computer Science
Mathematical Structures
for Computer Science
Chapter 1
However, if the first two statements are true, logic assures the
truth of the third statement.
A B AB A A B A V B
T T T T F T T
T F F T F F F
F T T F T T T
F F T F T F T
A B AB BA (A B) Λ (B A)
T T T T T
T F F T F
F T T F F
F F T T T
A B AΛ B A B AVB
T T T T T T
T F F T F T
F T F F T T A A
F F F F F F T F
F T
A B AB A B AB
T T T T T T
T F F T F F
F T T F T F
F F T F F T
Definition of a contradiction:
A wff that is intrinsically false, i.e. no matter what the truth
value of the statements that comprise the wff.
e.g. It will rain today and it will not rain today ( A Λ A )
(A Λ B) Λ A
Commutative AV B B VA AΛ B B ΛA
Associative (A V B) V C A V (B V C) (A Λ B) Λ C A Λ (B Λ C)
Distributive A V (B Λ C) (A V B) Λ (A V C) A Λ (B V C) (A Λ B) V (A Λ C)
Identity AV 0 A AΛ 1 A
Complement A V A 1 A Λ A 0
j = 1 // initial value
Repeat
read a value for k
1/2
if ((j < 5) AND (2*j < 10) OR ((3*j) > 4)) then
write the value of j
otherwise
write the value of 4*j
end if statement
increase j by 1
Until j > 6