Foundations Of Logic Flashcards
p ∧ q
CONJUNCTION “AND” The conjunction p ∧ q is true when both p and q are true and is false otherwise. (Swift: &&)
p ∨ q
DISJUNCTION “OR” The disjunction of p and q, denoted by p ∨ q, is the proposition “p or q.” The disjunction p ∨ q is false when both p and q are false and is true otherwise. (Swift: ||)
p⊕q
EXCLUSIVE OR “XOR” The exclusive or of p and q, denoted by p ⊕ q, is the proposition that is true when exactly one of p and q is true and is false otherwise.
p → q
CONDITIONAL STATEMENT or IMPLICATION The conditional statement p → q is the proposition “if p, then q.” The conditional statement p → q is false when p is true and q is false, and true otherwise. In the conditional statement p → q, p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence).
q → p
CONVERSE The proposition q → p is called the converse of p → q. One of the most common logical errors is to assume that the converse or the inverse of a conditional statement is equivalent to this conditional statement.
¬q → ¬p
CONTRAPOSITIVE The contrapositive of p → q is the proposition ¬q → ¬p. Only the contrapositive always has the same truth value as p → q.
¬p → ¬q
INVERSE The proposition ¬p → ¬q is called the inverse of p → q. One of the most common logical errors is to assume that the converse or the inverse of a conditional statement is equivalent to this conditional statement.
p ↔ q
BI-CONDITIONAL or BI-IMPLICATION p ↔ q is the proposition “p if and only if q.” The biconditional statement p ↔ q is true when p and q have the same truth values, and is false otherwise. Biconditional statements are also called bi-implications. “p is necessary and sufficient for q” “if p then q, and conversely” “p iff q.” The last way of expressing the biconditional statement p ↔ q uses the abbreviation “iff” for “if and only if.” Note that p ↔ q has exactly the same truth value as (p → q) ∧ (q → p).
What is the order of precedence of the following logical operators? → ∨ ↔ ¬ ∧
¬ 1 ∧ 2 ∨ 3 → 4 ↔ 5
Fuzzy Logic
Fuzzy logic is used in artificial intelligence. In fuzzy logic, a proposition has a truth value that is a number between 0 and 1, inclusive. A proposition with a truth value of 0 is false and one with a truth value of 1 is true. Truth values that are between 0 and 1 indicate varying degrees of truth. For instance, the truth value 0.8 can be assigned to the statement “Fred is happy,” because Fred is happy most of the time, and the truth value 0.4 can be assigned to the statement “John is happy,” because John is happy slightly less than half the time.
Identity Laws
p∧T≡p
p∨F≡p
Domination Laws
p∨T≡T
p∧F≡F
Idempotent Laws
p∨p≡p
p∧p≡p
Double Negation Law
¬(¬p) ≡ p
Commutative Laws
p∨q≡q∨p
p∧q≡q∧p