學海無涯,思境無維;數乃六藝,理之始也。
或有一得足矣 愚千慮

Logic

3.1 Propositions and Logical Operators

Proposition(主張): A proposition is a sentence to which one and only one of the terms true or false can be meaningfully applied.

Example:

“Four is even,”, “4 ∈ {1, 3, 5}” and “43 > 21” are propositions

3.1.2 Logical Operations

Suppose

p,q are propositions.

Logical Conjunction

p and qpq

p q
pq
0 0 0
0 1 0
1 0 0
1 1 1

Logical Disjunction

p or qpq

p q
pq
0 0 0
0 1 1
1 0 1
1 1 1

Logical Negation

not p¬p

p
¬p
0 1
1 0

Conditional Statement

If

p, then
q
, denoted "
pq
".

p q
pq
0 0 1
0 1 1
1 0 0 (this is ruled out)
1 1 1

When we write "

pq", it means "if p is true, then q must be true.", so the case that p = 1 and q = 0 is ruled out.

Converse

The converse of

pq is
qq
.
But this would be a different thing.

Contrapositive

The contrapositive of the proposition

pq is "
¬q¬p
".

Biconditional Proposition

if and only if = iff

pq : if
p
then
q
, also if
q
then
p
,
p
is equivalent to
q
.

p q
pq
0 0 1
0 1 0
1 0 0
1 1 1

Propositions Generated by a Set

Let S be any set of propositions. A proposition generated by S is any valid combination of propositions in S with conjunction, disjunction, and negation. Or, to be more precise,
(a) If p ∈ S, then p is a proposition generated by S, and
(b) If x and y are propositions generated by S, then so are (x), ¬x, x ∨ y , and x∧y.

Equivalence and Implication

{¬(pq)¬p¬q

Tautology: An expression involving logical variables that is true in all cases is a tautology. The number 1 is used to symbolize a tautology.
ex:

{p¬ppqpqpq
Contradiction: An expression involving logical variables that is false for all cases is called a contradiction. The number 0 is used to symbolize a contradiction.
ex:
p¬p

Equivalence: Let S be a set of propositions and let r and s be propositions generated by S. r and s are equivalent if and only if r ↔ s is a tautology. The equivalence of r and s is denoted r

s.
ex:
{(pq)(¬pq)qpq¬q¬ppqqpp¬p1p¬p0

Implication

Implication: Let S be a set of propositions and let r and s be propositions generated by S. We say that r implies s if r → s is a tautology. We write r ⇒ s to indicate this implication.
ex: Disjuctive Addition

ppq

A Universal Operation

The Sheffer Stroke:

pq

p q
pq
pq
pq
0 0 1 0 0
0 1 1 0 1
1 0 1 0 1
1 1 0 1 1

and : 有 0 則 0 (皆 1 方 1)
or : 有 1 則 1 (皆 0 方 0)
sheffer : 有 0 則 1 (皆 1 方 0)

pq¬(pq)
pq¬p¬q

¬ppp

pq¬pq

The Laws of Logic

duality principle

Basic Logical Laws - Equivalences

Name of Law
pqqp
pqqp
Communitive Law
(pq)rp(qr)
(pq)rp(qr)
Associative Law
p(qr)(pq)(pr)
p(qr)(pq)(pr)
Distributive Law
p0p
p1p
Identity Law
p¬p1
p¬p0
Negation Law
ppp
ppp
Idempotent Law
p11
p00
Null Law
p(pq)p
p(pq)p
Absorption Law
¬(pq)¬p¬q
¬(pq)¬p¬q
DeMorgan's Law
¬(¬p)p
Involution Law

Basic Logical Laws - Common Implications and Equivalences

Detachment
(pq)pq
Contrapositive
pq¬q¬p
Indirect Reasoning
(pq)¬q¬p
(
pq¬q¬p
)
Disjunctive Addition
ppq
Conjunctive Simplification
pqp
;
pqq
Disjunctive Simplification
(pq)¬pq
;
(pq)¬qp
Chain Rule
(pq)(qr)pr
Conditional Equivalence
pq¬pq
(當 p 成立時,q 必需成立,否則
¬pq
就不成立。)
Biconditional Equivalence
pq(pq)(qp)(pq)(¬p¬q)

Mathematical Systems and Proof

  • A set or universe, U.
  • Definitions
  • Axioms
  • Theorems: A true proposition derived from the axioms of a mathematical system is called a theorem.
    p1 ∧ p2 ∧ · · · ∧ pn ⇒ Conclusion

Proof: A proof of a theorem is a finite sequence of logically valid steps that demonstrate that the premises of a theorem imply its conclusion.

tags: math logic