The foundations: logic and proof Flashcards
Atomic proposition
Propositions that cannot be expressed in terms of simpler propositions
compound propositions
compound propositions are formed
from existing propositions using logical operators.
Conditional, contrapositive, inverse, converse.
Conditional and Contrapositive are equivalent.
converse and inverse are equivalent ( as the inverse is converse’s contrapositive)
Some forms of saying if p then q?
14
- “if p, then q” 3. “p implies q”
- “if p, q” 4. “p only if q”
- “p is sufficient for q”
- “a sufficient condition for q is p”
- “q IF p”
- “q WHENEVER p”
- “q WHEN p”
- “q is NECESSARY for p”
- “a necessary condition for p is q”
- “q FOLLOWS from p”
- “q UNLESS ¬p”
- “q PROVIDED that p”
Some ways of saying p if and only if q ( bi implication)?
4
“p is necessary and sufficient for q”
“if p then q, and conversely”
“p iff q.” “p exactly when q.”
Precedence.
It is generally the case that unary operators that involve only one object precede binary operators.
z whenever o is
if o then z; o –> z
a is sufficient for v
a–>v ; if a then v
f is necessary for g
if g then f; g –> f
Application of propositional logic.
- System specifications
- Boolean search
- logic puzzle
- logic circuits
System specifications
System specifications
should be consistent, that is, they should not contain conflicting requirements that could be used to derive a contradiction.
When specifications are not consistent,
there would be no way to develop a system that satisfies all specifications
Boolean Searches:
In Boolean searches, the connective AND is used to match records that contain both of
two search terms, the connective OR is used to match one or both of two search terms, and the
connective NOT (sometimes written as AND NOT ) is used to exclude a particular search term.
Careful planning of how logical connectives are used is often required when Boolean searches
are used to locate information of potential interest.
logically equivalent
The compound propositions p and q are called logically equivalent if p ↔ q is a tautology.
The notation p ≡ q denotes that p and q are logically equivalent.
≡ : not a logical connective.
p ≡ q: not a compound proposition but a statement meaning ‘p ↔ q is a tautology’.
conditional disjunction equivalence.
p → q ≡ ¬p ∨ q
Logical Equivalences
Involving Conditional
Statements. 2 variables. (5)
p → q ≡ ¬p ∨ q p → q ≡ ¬q → ¬p p ∨ q ≡ ¬p → q p ∧ q ≡ ¬(p → ¬q) ¬(p → q) ≡ p ∧ ¬q
Logical Equivalences
Involving Conditional
Statements. 3 variables. (4)
(p → q) ∧ (p → r) ≡ p → (q ∧ r)
(p → r) ∧ (q → r) ≡ (p ∨ q) → r
(p → q) ∨ (p → r) ≡ p → (q ∨ r)
(p → r) ∨ (q → r) ≡ (p ∧ q) → r
Logical
Equivalences Involving
Biconditional Statements (4)
p ↔ q ≡ (p → q) ∧ (q → p)
p ↔ q ≡ ¬p ↔ ¬q
p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)
¬(p↔ q) ≡ p ↔ ¬q
De Morgan’s law extended:
Furthermore, note that De Morgan’s laws extend to
¬(p1 ∨ p2 ∨ ⋯ ∨ pn) ≡ (¬p1 ∧ ¬p2 ∧ ⋯ ∧ ¬pn)
and
¬(p1 ∧ p2 ∧ ⋯ ∧ pn) ≡ (¬p1 ∨ ¬p2 ∨ ⋯ ∨ ¬pn)
When using De
Morgan’s laws,
remember to
change
the logical connective
after you negate.
Satisfiability :
A compound proposition is satisfiable if there is an assignment of truth values to its variables
that makes it true (i.e, when it is a tautology or a contingency).
unsatisfiable:
when the compound proposition is false for all assignments of truth values to
its variables.
Note that a compound proposition is
unsatisfiable if and only if its negation is true for all assignments of truth values to the variables,
i.e, if and only if its negation is a tautology.
The solution to a satisfiable problem:
When we find a particular assignment of truth values that makes a compound proposition
true, we have shown that it is satisfiable; such an assignment is called a solution to this particular
satisfiability problem.
Predicate
predicate,
ex: “is greater than 3”
—refers to a property that
the subject of the statement can have
P(x), what do you understand from this?
The statement P(x) is also
said to be the value of the propositional function P at x. Once a value has been assigned to the
variable x, the statement P(x) becomes a proposition and has a truth value.
“x = y + 3.” denoted by Q(x, y), where x and y are variables, and Q is the predicate. When values are assigned to the variables x and y, the statement Q(x, y) has a truth value.