You are on page 1of 4

1. Proving Techniques

 (a) Direct proof (b) Exhaustion proof (c) Construction proof (d) Existential proof (e) Contradiction proof (f) Contrapositive proof (g) Induction proof (h) Pigeonhole principle (i) Combinatorial proof (j) Inclusion Exclusion principle

2. Natural Deduction

 (a) Conjunction introduction: F 1 , F 2 F 1 ∧ F 2 (b) Conjunction elimination: F 1 ∧ F 2 F 1 (c) Conjunction elimination: F 1 ∧ F 2 F 2 (d) Disjunction introduction: F 1 F 1 ∨ F 2 (e) Disjunction introduction: F 2 F 1 ∨ F 2 (f) Disjunction F 3 F 3 elimination: F 1 ∨F 2 , F 1 ⇒ F 3 , F 2 ⇒ (g) Negation introduction: F 2 ⇒ (F 1 ∧ ¬F 1 ) ¬F 2 (h) Double negation elimination: ¬¬F 1 F 1 (i) Implication introduction: (F 1 F 2 ) F 1 ⇒ F 2 (j) Double negation introduction: F 1 ¬¬F 1 (k) Implication elimination (Modus Ponens): F 1 , F 1 ⇒ F 2 F 2 (l) Modus Tollens: F 1 ⇒ F 2 , ¬F 2 ¬F 1 (m) Universal quantiﬁer elimination: ∀XF F [t/X] (n) Universal quantiﬁer introduction: F [Y /X] ∀XF (o) Existential quantiﬁer introduction: F [t/X] ∃XF (p) Existential quantiﬁer ∃XF 1 , (F 1 [Y /X] F 2 ) F 2 elimination:

3. Model Semantics

 (a) Model: An interpretation I is a model of a for- mula F iﬀ I(F ) is true. (b) Tautology: A formula F is a tautology iﬀ all interpretation are models. (c) Contradiction: A formula F is a contradiction iﬀ no interpretation is model. (d) Contingency: A formula F is a contingency iﬀ it is neither a tautology nor a contradiction. (e) Logical Consequence: F 1 |= F 2 iﬀ all models of F 1 are models of F 2
 (f) Logically Equicalent: F 1 ≡ F 2 iﬀ they have the same models. (g) I(∃XF ) = I( c∈U H F [c/X]) (h) I(∀XF ) = I( c∈U H F [c/X])

4. Boolean Algebra

 (a) Identity of ×: x × 1 = x (b) Identity of +: x + 0 = x (c) Complementation of ×: x × x¯ = 0 (d) Complementation of +: x + x¯ = 1 (e) Associativity of ×: x × (y × z) = (x × y) × z = x × y × z (f) Associativity of +: x + (y + z) = (x + y) + z = x + y + z (g) Commutativity of ×: x × y = y × x (h) Commutativity of +: x + y = y + x (i) Distributivity of × over +: x × (y + z) = (x × y) + (x × z) (j) Distributivity of + over ×: x + (y × z) = (x + y) × (x + z) (k) Idempotence of ×: x × x = x (l) Idempotence of +: x + x = x (m) Annihilator of ×: x × 0 = 0 (n) Annihilator of +: x + 1 = 1 (o) Absorption of ×: x × (x + y) = x (p) Absorption of +: x + (x × y) = x (q) Unicity of complement: If x×y = 0 and x+y = 1 then y = x¯

5. Set Theory

 (a) Axiom 1: Empty set. There exist a set with no elements ∃X(∀Y (¬(Y ∈ X))) (b) Axiom 2: Extensionality: Two sets are equal if and only if they have the same elements ∀X∀Y ((∀Z(Z ∈ X ⇔ Z ∈ Y )) ⇔ X = Y ) (c) Axiom 3: Pairing: There exists a set Z that contains X and Y . ∀X∀Y ∃Z∀T ((T = X ∨ T = Y ) ⇔ T ∈ Z) (d) Axiom 4: Unions: ∀S∃T ∀Y ((Y ∈ T ) ⇔ ∃Z((Z ∈ S) ∧ (Y ∈ Z))) (e) Axiom 5: Power Sets: ∀S∃T ∀X((X (X ⊂ S)) ∈ T ) ⇔ (f) Axiom 6: Regularity: ∀X(X = ∅ ⇒ (∃Y (Y ∈ X ∧ ∀Z(Z ∈ X ⇒ ¬(Z ∈ Y ))))) (g) Axiom 7: Inﬁnity: ∃X(∅ ∈ X ∧ (∀Y (Y ∈ X ⇒

Y ∪ {Y } ∈ X)))

(h) Axiom 8: Separation: XY Z(Z Y (Z

X P (Z)))

(i) Useful propositions and deﬁnitions:

i. Empty

set

is

the

subset

of

all

sets:

XZ((Y ¬(Y X)) (X Z))

ii. Deﬁnition of subset:

XY (X

(Z(Z X Z Y )))

Y

iii. Another test for equality: XY ((X Y

Y

T

is the intersection

ST Y ((Y T ) ⇔ ∀Z((Z S) (Y Z)))

sets if

S

iv. Intersection:

X) X = Y )

Let

be

a

set

of sets.

of the

sets in

6. Relations

(a)

(b)

(c)

The binary relation R is a subset of the Carte- sian product S × T

sRt < s, t >∈ R

| ∃t T (sRt)}, Im(R) =

{t T | ∃s S(sRt)}, coDom(R) = T

T(tR 1 s sRt)

Composition: If R ⊂ S × T, R T × U , then x Sz U(xR ◦ Rz (y T(xRy yR z))).

Composition is associative, and (R ◦ R) 1 =

R 1 R 1

Dom(R) = {s S

(d) Inverse:

(e)

(f)

If

R

S × T ,

then s

St

(g)

Symmetric: x, y A(xRy yRx)

Transitive: x, y, z A((xRy yRz) xRz)

Equivalence relation: R is reﬂexive, symmetric and transitive.

(k) If R is an equivalence relation on a set A, then

(h)

Reﬂexive: X A(xRx)

(i)

(j)

the equivalence class of x, E

x

R = {y A|xRy}.

A/R is the set of equivalence classes.

If R is an equivalence relation on a set A, then A/R is a partition of A.

(m) The transitive closure of R, R satisﬁes the properties that R is transitive and R ∈ R . Furthermore if S is another transitive relation, then R ∈ S ⇒ R ∈ S

(l)

(n)

(o)

(p)

(q)

Repeated composition: R n = 1in R

R =

Anti-symmetric: x Ay A((xRy yRx) x = y)

R is a partial order if it is anti-symmetric, reﬂex- ive and transitive. A relation that is a partial order is denoted as

i=1 R i

 (r) Two elements are comparable if a b∨b a. A total order is a partial order where all elements are comparable. (s) Maximal element: ∀y ∈ A(x y ⇒ x = y). Maximum element, : ∀x ∈ A(x ) (t) Minimal element: ∀y ∈ A(y x ⇒ x = y). Maximum element, ⊥: ∀x ∈ A(⊥ x) (u) A is well ordered iﬀ every non-empty subset of

A as a minimum element.

7. Functions (f S × T unless stated otherwise)

(a) Uniqueness: !x T p(x) ≡ ∃x T (p(x) ∧ ∀y

T (p(y) x = y))

(b) Deﬁnition of function:

f

:

S

S y T (x f

or x S !y T (x f y)

y (z

T (x f

z

T

y

⇔ ∀x

= z)))

(c) Notation: f (x) = y < x, y >f

(d) Dom(f ) = S

x is a pre-image of y if f (x) = y while the inverse image of y is the set of all its pre-images.

(f) The restriction of f to U is the set {< x, y >

(e)

U × T | f(x) = y}

(g) Injection: y T

x 1 S x 2 S ((f (x 1 ) =

y f(x 2 ) = y) x 1 = x 2 )

(h) Surjection: y T x S (f (x) = y), Im(f ) =

T

(i) Bijection = Injection + Surjection

(j)

f is bijective iﬀ f 1 is a function

T

and g : T U are both functions, then g f is a function.

(k) Notation: g(f (x)) = (g f )(x).

If f

: S

(l) Identity function, I A : x A(I A (x) = x)

(m)

If f : A A is injective, then f 1 f = I A

(n) A n-ary operation on a set A is a function f :

n

1

A A

(o) Proving injectivity: Suppose f (x 1 ) = f(x 2 ), then prove x 1 = x 2

(p) Proving surjectivity: Express x in terms of y and then check if it is within the domain.

8. Number systems

(a) Peano’s Axioms: The set of natural numbers is the smallest set such that:

 i. ∃0 (0 ∈ N) ii. There exist a function s on N. s(n) = n , the successor of n. iii. ∀n ∈ N (n = 0) iv. n ∈ N ∀m ∈ N (n = m ⇒ n = m)

(b)

(c)

v. K N n N ((0 K (n K n K)) K = N)

Ordering Lemma: Let m N c . Then n m

m n.

Addition is the smallest binary operation on N such that:

i. n N (n + 0 = n)

ii. n N m N(n + m = (n + m) )

(d)

Multiplication is the smallest binary operation on N such that:

i. n N (n × 0 = 0)

ii. n

Nm N(n × m = (n × m) + n)

(e) Integers

i. Let

that

n 1

N (< n 1 , n 2 >< m 1 , m 2 >n 2 + m 1 =

be a relation on

N

n 2

N

N × N

N

such

m 2

m 1

 m 2 + n 1 ). The set of integers is given by Z = (N × N)/ ≈ + b ii. a 1 + a =< b 1 , a 2 + b 2 > iii. a − b =< a 1 + b 2 , a 2 + b 1 >

iv. a × b =< a 1 ×b 2 +a 2 ×b 1 , a 1 ×b 1 +a 2 ×b 2 >

(f) Rationals

i. Let be a relation on N × N\{0} such that

n 1

N\{0} (< n 1 , n 2 >< m 1 , m 2 >n 2 ×

m 1 = m 2 ×n 1 ). The set of rationals is given by Z = (N × N\{0})/

a × b =< a 1 × b 1 , a 2 × b 2 >

N n 2

N\{0} ∀m 1

N m 2

ii.

iii. (a 1 × b 2 + b 1 × a 2 , a 2 × b 2 >

iv. (a 1 × b 2 b 1 × a 2 , a 2 × b 2 >

a + b =<

a b =<

v. a/b =< a 1 × b 2 , a 2 × b 1 >

9. Number Theory

 (a) Let n ∈ N and m ∈ N + . m|n ⇔ ∃q ∈ N (n = m × q) (b) Division algorithm: Let n ∈ N, m ∈ N + , ∃!q ∈ N ∃!r ∈ N (n = q × m + r ∧ r < m) (c) n and m are relatively prime (n ⊥ m) iﬀ ∀c ∈ N + (((c|n) ∧ (c|m)) ⇒ c = 1) (d) p is prime if p p ∨ n = 1))) > 1 ∧ (∀n ∈ N + (n|p ⇒ (n = (e) The gcd of n and m is deﬁned such that (gcd(n, m)|n) ∧ (gcd(n, m)|m) ∧ (∀q ∈ (f) N + (((q|n) ∧ (q|m)) ⇒ q ≤ gcd(n, m))) The lcm of and m is deﬁned such that n (n|lcm(n, m)) ∧ (m|lcm(n, m)) ∧ (∀q ∈ N + (((n|q) ∧ (m|q)) ⇒ lcm(n, m) ≤ q)) (g) Bezout’s Identity: Let n ∈ N + , m ∈ N + . ∃a ∈

Z b Z (n × a + m × b = gcd(m, n))

(h) Euclid’s Lemma:

Let n

N + ,

m

N + .

Let

p N + . (prime(p) (p|n × m)) (p|n p|m)

 (i) Factorisation: n = i∈I p i (j) Fundamental theorem of arithmetic: Every pos- itive natural number has a unique factorisation. (k) n ≡ m (mod c) ⇔ (m < n ∧ c|n − m) ∨ (n < m ∧ c|m − n) ∨ (n = m)
 (l) If n 1 ≡ m 1 (mod c) ∧ n 2 ≡ m 2 (mod c), then n 1 + n 2 ≡ m 1 + m 2 (mod c) (m) If n 1 ≡ m 1 (mod c) ∧ n 2 ≡ m 2 (mod c), then

n 1 × n 2 m 1 × m 2

(mod c)

(n) Fermat’s Little Theorem: If p is prime then a p

a (mod p)

10. Cardinality

 (a) A set is ﬁnite iﬀ it is the empty set or there is a bijection from the set to some Z n (b) Cardinality of a ﬁnite set is 0 if the set is empty set or n if there is a bijection from the set to some Z n . (c) ℵ 0 ≡ |Z + | (d) A set is countably inﬁnite iﬀ |S| = ℵ 0 . Other- wise it is uncountable. A set is countably inﬁnite iﬀ its elements can be arranged without dupli- cation and omission in an inﬁnite list. (e) Given n countably inﬁnite sets, the cartesian product of these sets are also countably inﬁnite (f) The union of countably many countable sets is countable (g) The set of real numbers is uncountable (h) |A| < |P(A)| (i) |R| = |P(Z)|

11. Counting

(a) Product Rule:

If A 1 , A 2 , ··· A n

then | n

i=1 A i | = n

i=1 |A i |.

are ﬁnite sets,

(b) Sum Rule:

If A 1 , A 2 , ··· A n are disjoint ﬁnite

sets, then | n

i=1 A i | = n

i=1 |A i |.

(c) Diﬀerence Rule:

if A is a ﬁnite set and B

is a

subset of A, then |A B| = |A| − |B|.

(d) Principle

of Inclusion and Exclusion:

| n

i=1 A i |

=

1in |A i | 1ijn |A i

A j | + 1ijkn |A i A j

A k |

···

+

(1) n+1 | n

i=1 A i |

(e)

(f)

The number of permutations of a set of n dis- tinct elements is n!

The number of ordered selection of r objects

from n objects is P (n, r) =

n!

(nr)!

(g) The number of unordered selection of r objects

from n objects is C(n, r) =

The number of permutations of n objects where there are n i indistinguishable objects of type i

(h)

n!

(r!(nr)!

(i)

(j)

for i = 1, 2, · · · k and i=1 n 1 = n, is

The number of r-combinations with repetition allowed that can be selected from n items is C(n + r 1, r)

Binomial theorem: (x + y) n = n

k

n!

n 1 !n 2 !···n k !

r=0 n

r

x nr y r

(k) Pascal’s identity: n+1

k

=

k

k1 + n

n

(l)

Generalised Pigeonhole Principle: If N objects are placed into k boxes, there is at least 1 box which contain at least N objects.

k

12. Graphs

(a)

A pseudograph G = (V (G), E(G), f G ) consists of

i. A non-empty vertex set of vertices

(b)

(c)

(d)

(e)

(f)

ii. An edge set of edges

iii. An

incidence

function

f G

{{u, v}|u, v V (G)}

:

E(G)

An edge e is called a loop if f G (e) some u V (G)

If f G (e 1 ) =

multiple or parallel edges

A simple graph has no loops or parallel edges, a multigraph has no loops

An edge e is incident with vertices u and v if f G (e) = {u, v}. The two vertices are adjacent. Two edges are called adjacent if they have are incident with a common vertex.

A directed multigraph G = (V (G), E(G), f G ) consists of

= {u} for

f G (e 2 ), then the two edges are called

i. A non-empty vertex set of vertices

ii. An edge set of directed edges

(g)

(h)

(i)

(j)

(k)

iii. An

incidence

function

f G

{(u, v)|u, v V (G)}

:

E(G)

A complete graph is a simple graph where every two distinct vertices are adjacent

ver-

tices, denoted by K m,n is a simple graph with

V

E(K m,n ) = {{u i , v j }|i = 1, · · · , m; j = 1, · · · n}

A graph H is a subgraph of G if V (H) V (G), E(H) E(G) and e E(H) (f H (e) = f G (e))

A

complete

(K m,n ) =

bipartite

{u 1 , u 2 , ···

graph

on

(m, n)

u m } ∪ {v 1 , ··· v n } and

The vertex degree d G (v) of vertex v is the num- ber of edges incident with v

Handshake Theorem: Let G be an undirected graph. Then vV (G) d G (v) = 2|E(G)|

(l)

A walk of length n in G is deﬁned as an al-

ternating sequence of vertices and edges of G

e i connects its endpoints

v i1 and v i . A trail is a walk of distinct edges while a path is a trail with distinct vertices.

v 0 e 1 v 1 e 2 ··· e n v n where

(m) A graph is connected if there is a walk between any two vertices in the graph.

 (n) An undirected graph H is called a connected component of G if H is a subgraph of G, H is connected and no connected subgraph of G has H as its proper subgraph. (o) An Euler trail is a trial traversing all edges in a graph. A closed walk is a walk that starts and ends at the same vertex. A tour is a closed walk that traverse all edges in a graph at least once. An Euler tour is a tour that traverse each edge exactly once. (p) A graph has an Euler tour if and only if it has no vertices of odd degree. A graph has an Euler trail but not an Euler tour if and only if it has exactly two vertices of odd degree. (q) A Hamiltonian path is a path containing all ver- tices in G. A cycle is a closed trail whose origin and internal vertices are distinct. A Hamilto- nian cycle is a cycle which contains all vertices of G. (r) Let G be an undirected graph and the vertices are ordered as V (G) = {v 1 , v 2 , ··· v n }. The ad- jacency matrix of G is the n × n matrix A(G) = [a ij ] such that a ij = |{e ∈ E(G)|f G (e) = {v i , v j }}|

13. Trees

 (a) A tree is an acyclic connected undirected graph. A forest is an acyclic undirected graph. (b) There is a unique path between any two distinct vertices in a graph iﬀ the graph is a tree (c) If G is a tree iﬀ |E(G)| = |V (G)| − 1 (d) A graph H is a subgraph of graph G if V (H) ⊆ v(G), E(H) ⊆ E(G) and ∀E(H) f H (e) = f G (e) (e) A spanning subgraph of a graph is a subgraph of a graph which contains all vertices in the graph. A spanning tree is a spanning subgraph which is a tree (f) A graph is connected if and only if there is a spanning tree (g) A weighted graph is a graph where all edges has an associated real valued weight (h) A minimum spanning tree of a connected weighted graph is the spanning tree that has the smallest possible sum of weights in its edges