Logic and Set Theory Mid.reviewer
Logic and Set Theory Mid.reviewer
PROPOSITION
- declarative sentence (declaring a fact) that is either true or false, but not both.
● CONJUNCTION ( and)
- p and q is true when both p and q are true, and is false otherwise
● DISJUNCTION ( or )
- p or q is False when both p and q are false, and is True otherwise
● CONDITIONAL ( if then )
- False when p is True and q is False, and True otherwise
EXOR ⊕
- True when exactly one of p and q is true, and is False otherwise
□ kapag tulad = false
□ kapag magkaiba = true
CONVERSE:
- “if q, then p”
- reverse the order of hypothesis and conclusion
q→p
i. hypothesis is the p.
conclusion is the q.
CONTRAPOSITIVE
- “if not q, then not p”
- both swaps the order of hypothesid and conclusion and negates
¬q →¬p
INVERSE
- “if not p, then not q”
- conditional statements retains offer of hypothesis and conclusion while negating both of
them
¬p →¬q
TABLES:
● CONVERSE
p q q→p
T T T
T F T
F T F
F F T
● CONTRAPOSITIVE
p q ¬p ¬q ¬q →¬p
T T F F T
T F F T F
F T T F T
F F T T T
● INVERSE
p q ¬p ¬q ¬p →¬q
T T F F T
T F F T T
F T T F F
F F T T T
EQUIVALENT
- two statements are logically equivalent if they have always produce the same truth
value
- when the compoubd proposition always have the same value.
PRECEDENCE OF LOGIC
Procedure:
● Logical Complements (not)
● Logical Conjunctions (and)
● Logical Disjunctions (or)
TRUE FALSE
1 0
TABLE FOR THE BIT OPERATORS ∧, ∨, and ⊕,
x y x ∨y x∧y x⊕y
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 1 1 0
BIT STRING
- sequence of zero and one
QUANTIFIERS
- express the quantity of elements that satisfy a given condition within a specific domain or
set
- tell us that a predicate is true for every element (there is one more element)
● UNIVERSAL QUANTIFJER
- ∀ means “for all”
- proposition holds true for every element within specified domain or set
- P(x) is true for all values of x in this domain.
EX.
P(1)= 1 + 1 > 1
= 2 > 1 TRUE
P(2) = 2 + 2 > 2
= 4 + > 2 TRUE
● EXISTENTIAL QUANTIFIER
- ∃ means “there exist”
- satisfied if the predicate is true for just one element
EX.
1. P (x) = x < 4
= 1 < 4 — TRUE
= 2 < 4 — TRUE
= 3 < 4 — TRUE
= 4 < 4 — TRUE
= 5 < 4 — FALSE
◇ Under universal quantifier this is not True
2. Q (x) = x + 1 > 2x
= 1 + 1 > 2 (1) = 1 + 1 > 2
= 2 > 2 — FALSE
= 2 + 1 > 2 (2) = 2 + 1 > 4
= 3 > 4 — FALSE
◇ Under universal quantifier this is NOT TRUE
LOGICAL EQUIVALENCE
∀x – all (x)
P(x)– given (yung nasa statement)
∧ – and
Q(x) – given (yung nasa statemen
≡ – equiavelent
∨ – or