Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Definition 2.1. (Informal.) A proof of a statement S is a se- We introduce a new, derived logical operator: implication,
quence of simple, easily verifiable, consecutive steps. The denoted as A → B and defined by2 A → B :⇐⇒ ¬A ∨ B.
proof starts from a set of axioms (things postulated to be true) Two-sided implication, denoted A ↔ B, is defined as follows:
and known (previously proved) facts. Each step corresponds A ↔ B :⇐⇒ (A → B) ∧ (B → A).
to the application of a derivation rule to a few already proven There are also priority rules for logical operators which allow
statements, resulting in a newly proved statement, until the us to simplify the notation, in the same sense as in algebra one
final step proves S. can write ab + c (rather than (a · b) + c). Namely, ∧ and ∨ bind
stronger than → and ↔. Also, ¬ binds stronger than ∧ and ∨.
2.2 Propositions and Logical Formulas Definition 2.7. The symbol > denotes the function that is the
constant 1 (true), and ⊥ denotes the function that is constant
Definition 2.2. A proposition [Aussage] is a (mathematical) 0 (false).
statement that is either true or false.
Definition 2.8. Two formulas F and G (in propositional logic)
Definition 2.3. A true proposition is often called a theorem, a are called equivalent, denoted as F ⇐⇒ G (or also as F ≡ G),
lemma, or a corollary.1 if they correspond to the same function (table).
Definition 2.9. A formula F (in propositional logic) is called
Definition 2.4. The logical values (constants) “true” and a tautology [Tautologie] if it is true for all truth assignments
“false” are usually denoted as 1 and 0, respectively. of the involved propositional symbols.
1 In mathematical texts one sometimes calls a true statement a proposition 2 The symbol :⇐⇒ simply means that the left side (here A → B) is defined
(instead of a theorem). In practice this will not be confusing. to mean the right side (here ¬A ∨ B).
1 2
Definition 2.10. A formula F (in propositional logic) is called 2.4 Some Proof Patterns and Techniques
satisfiable [erfüllbar] if it is true for at least one truth assign-
ment of the involved propositional symbols, and it is called Theorem 2.3. If F and F → G are tautologies, then G is also a
unsatisfiable otherwise. tautology.
Definition 2.14. A direct proof of an implication F → G
Lemma 2.1. F is a tautology iff ¬F is unsatisfiable. works by assuming F and then deriving G (from F ), where
the derivation can possibly involve several proof steps.
Definition 2.11. One writes F =⇒ G (or F ⇒ G) to say that Definition 2.15. An indirect proof of an implication F → G
F implies G, i.e., that F → G is a tautology. works by assuming ¬G and deriving ¬F , i.e., by proving
¬G → ¬F .
Theorem 2.2. Implication is transitive: If F =⇒ G and G =⇒ H,
then F =⇒ H. Theorem 2.4. If ¬F → G and ¬G are tautologies, then F is
also a tautology.
2.3 Quantifiers and Predicate Logic Definition 2.16. An existence proof is the proof of a statement
of the form ∃x P (x).
Let us consider a set U as the universe in which we want to
reason. Definition 2.17. An inexistence proof is a proof of a statement
of the form ¬∃x P (x).
Definition 2.12. A k-ary predicate [Prädikat] P on U is a func- Definition 2.18. A proof by counterexample is a proof of a
tion U k → {0, 1}. statement of the form ¬∀x P (x) for some fixed predicate P ,
using ¬∀x P (x) ⇐⇒ ∃x ¬P (x). An a for which ¬P (a) is
Definition 2.13. For a universe U and predicate P (x) we de- true is called a counterexample.
fine the following logical statements:3
A proof by induction consists of two steps:
∀x P (x) is the statement that P (x) is true for all x ∈ U . Proof by induction:
1. Basis step. Prove P (0).
∃x P (x) is the statement that P (x) is true for some x ∈
2. Induction step. Prove ∀n (P (n) → P (n + 1)).
U , i.e., there exists an x ∈ U for which P (x) is true.
Definition 3.9. The Cartesian product A×B of two sets A and Definition 3.14. A relation ρ on a set A is called reflexive if
B is the set of all ordered pairs with the first component from a ρ a for every a ∈ A, i.e., if id ⊆ ρ.
A and the second component from B: A × B = {(a, b)| a ∈
A ∧ b ∈ B}. Definition 3.15. A relation ρ on a set A is called irreflexive if
a6 ρ a for all a ∈ A.
More generally, the Cartesian product of k sets A1 , . . . , Ak is
the set of all lists of length k with the ith component from Ai : Definition 3.16. A relation ρ on a set A is called symmetric if
ρ = ρb, i.e., if a ρ b ⇐⇒ b ρ a.
× k
i=1 Ai = {(a1 , . . . , ak )| ai ∈ Ai for 1 ≤ i ≤ k}
Definition 3.17. A relation ρ on a set A is called antisymmet-
3.2 Relations ric if ρ ∩ ρb ⊆ id, i.e., a ρ b ∧ b ρ a =⇒ a = b.
Definition 3.10. A (binary) relation ρ from a set A to a set B Definition 3.18. A relation ρ on a set A is called transitive if
is a subset of A × B. If A = B, then ρ is called a relation on A. a ρ b ∧ b ρ c =⇒ a ρ c.
Instead of (a, b) ∈ ρ one usually writes a ρ b, Lemma 3.6. A relation ρ is transitive iff ρ2 ⊆ ρ.
Definition 3.11. For any set A, the identity relation on A, de- Definition 3.19. The transitive
S∞ closure of a relation ρ on a set
noted id, is the relation id = {(a, a)| a ∈ A}. A, denoted ρ∗ , is ρ∗ = n=1 ρn .
Definition 3.33. Let (A; ) be a poset. If a and b (i.e., the set Definition 3.39. The subset f (A) of B is called the image (or
{a, b} ⊆ A) have a greatest lower bound, then it is called the range) of f and is also denoted Im(f ).
meet of a and b, often denoted a ∧ b. If a and b have a least up-
per bound, then it is called the join of a and b, often denoted Definition 3.40. For a subset T of B, the inverse image (or
a ∨ b. preimage) [Urbild] of T , denoted f −1 (T ), is the set of values
in A that map into T : f −1 (T ) := {a ∈ A| f (a) ∈ T }.
Definition 3.34. A poset (A; ) in which every pair of ele-
ments has a meet and a join is called a lattice [Verband]. Definition 3.41. A function f : A → B is called
4.4 Countable and Uncountable Sets Corollary 4.14. The direct product A × B of two countable sets A
and B is countable, i.e., A N ∧ B N =⇒ A × B N.
Definition 4.2.
(i) Two sets A and B have the same cardinality, denoted Corollary 4.15. The rational numbers Q are countable.
A ∼ B, if there exists a bijection A → B.
Theorem 4.16. Let A and A1 , A2 , . . . be countable sets.
(ii) The cardinality of B is at least the cardinality of A, de-
(i) For any n ∈ N, the set An of n-tuples over A is countable.
noted A B, if A ∼ C for some subset C ⊆ B.
(iii) B dominates A, denoted A ≺ B, if A B and A 6∼ B. (ii) The union A1 ∪ A2 ∪ · · · of a countable list of countable sets
is countable.
(iv) A set A is called countable [abzählbar] if A N, and
uncountable [überabzählbar] otherwise. (iii) The set A∗ of finite sequences over A is countable.
Definition 4.3. Let {0, 1}∞ denote the set of semi-infinite bi-
Lemma 4.10. nary sequences.
(i) The relation ∼ is an equivalence relation.1 Theorem 4.17. The set {0, 1}∞ is uncountable.
(ii) The relation is transitive: A B ∧ B C =⇒ A C.
Lemma 4.19. If A is uncountable and A B, then B is uncount-
(iii) A ⊆ B =⇒ A B. able, i.e., A 6 N ∧ A B =⇒ B 6 N. In particular, if a subset
(iv) A subset of a countable set is also countable: A ⊆ B ∧ B of a set B is uncountable, then so is B.
N =⇒ A N.
Lemma 4.20. If A is uncountable and B is countable, then A − B
(v) A B ∧ B A =⇒ A ∼ B. is uncountable.
(vi) For two sets A and B, exactly one of A ≺ B, A ∼ B, and
B ≺ A holds. Theorem 4.21. The set R of real numbers is uncountable.
Theorem 4.11. A set A is countable iff it is finite or if A ∼ N. Lemma 4.22. The interval [0, 1) of the real numbers is uncount-
able.
Theorem 4.12. The set {0, 1}∗ := {, 0, 1, 00, 01, 10, 11, 000, . . .}
of finite binary sequences is countable.2
Theorem 4.13. The set N × N (= N2 ) of ordered pairs of natural
numbers is countable.
1 Here ∼ and should be understood as relations on a set of sets.
2 Here denotes the empty string.
15 16
5. Graph Theory Definition 5.5. A graph G = (V, E) is a subgraph [Teilgraph]
of a graph H = (V 0 , E 0 ), sometimes denoted G v H, if V ⊆ V 0
5.2 Basic Concepts and E ⊆ E 0 .
Definition 5.6. The union of two graphs G = (V, E) and H =
Definition 5.1. A (simple) graph G = (V,
E) consists of a finite
(V 0 , E 0 ) is the graph G ∪ H := (V ∪ V 0 , E ∪ E 0 ).
set V of vertices [Knoten] and a set E ⊆ {u, v} ⊆ V | u 6= v
of edges [Kanten]. The complement G of a graph G = (V, E) is the graph G =
(V, E) where E consist of all possible edges that are not in E.
An edge {u, v} ∈ E is said to connect the vertices u and v. Definition 5.7. A graph G = (V, E) is called bipartite if V can
Vertices connected by an edge are also called adjacent [be- be split into two disjoint sets V1 and V2 of vertices, V = V1 ∪V2 ,
nachbart] (or neighbors). such that no edge connects two vertices in the same subset Vi
Definition 5.2. The neighborhood of a vertex v is the set (i = 1, 2).
Γ(v) := {u ∈ V | {u, v} ∈ E} of vertices adjacent to v. The
degree deg(v) of a vertex v is the number of edges (or ver- Definition 5.8. The adjacency matrix AG = [aij ] of an undi-
tices) connected to v, i.e., deg(v) := |Γ(v)|. A graph is called rected graph G = (V, E) with
V = {v1 , . . . , vn } is the binary
k-regular if deg(v) = k for all v ∈ V . 1 if {vi , vj } ∈ E
n × n matrix where ai,j =
0 otherwise.
An important extension of the graph concept is obtained For a directed graph, the condition {vi , vj } ∈ E must be re-
when the edges are directed, i.e., they are ordered pairs (u, v) placed by (vi , vj ) ∈ E.
(rather than sets {u, v}) where u and v are often called the
source and the destination, respectively, of the edge. Definition 5.9. Two graphs G = (V, E) and H = (V 0 , E 0 ) are
isomorphic, denoted G ∼ = H, if there exists a bijection π : V →
Definition 5.3. A directed graph G = (V, E) consists of a finite V 0 such that renaming the vertices of G according to π results
set V of vertices and a set E ⊆ V × V of (directed) edges. in H, i.e., if {u, v} ∈ E ⇐⇒ {π(u), π(v)} ∈ E 0 .
Definition 5.4. The in-degree deg− (v) of a vertex v is the num-
For directed graphs the definition is similar, except that {u, v}
ber of edges entering v, and the out-degree deg+ (v) of v is the
and {π(u), π(v)} must be replaced by (u, v) and (π(u), π(v)),
number of edges leaving v.
respectively.
P
Lemma 5.1. In a directed graph, v∈V deg− (v) = Definition 5.10. A graph G = (V, E) is contained in a graph
P + P
v∈V deg (v) = |E|. In an undirected graph, v∈V deg(v) = H = (V 0 , E 0 ), denoted G H, if there exists a subgraph K of
2|E|. H that is isomorphic to G: G H :⇔ ∃K (G ∼ = K ∧ K v H).
17 18
The complete graph on n vertices, denoted Kn , is a simple 5.3 Paths and Cycles
graph with n vertices in which any pair of vertices is con-
nected. The complement of Kn is the empty graph (with no Definition 5.16. A walk [Weg] (from u to v) of length n in
edges). a graph or directed graph G is a sequence (u, v1 , . . . , vn−1 , v)
of vertices such that consecutive vertices are connected. If all
Definition 5.11. An (m, n)-mesh [Gittergraph] is a graph vertices are distinct, then a walk is called a path, and if all
Mm,n on mn vertices with V = {(i, j) | 1 ≤ i ≤ m, 1 ≤ j ≤ the edges (but not necessarily the vertices) in the walk are dis-
n} and where (i, j) and (i0 , j 0 ) are connected iff i = i0 and tinct, it is called a tour [Tour]. When the starting and endpoint
|j − j 0 | = 1 or j = j 0 and |i − i0 | = 1. are identical (i.e., u = v), then a path of length ≥ 3 is called a
cycle and a tour is called a circuit [Schleife].
Definition 5.12. A path [Pfad] Pn consists of n + 1 ver-
tices connected like a chain, i.e., V = {v0 , . . . , vn } and Definition 5.17. An undirected graph G is connected [zusam-
E = {{v0 , v1 }, {v1 , v2 }, {v2 , v3 }, . . . , {vn−1 , vn }}. A directed menhängend] if any two vertices are connected by a path.
The maximal connected subgraphs of a graph G are called the
path P~n is like Pn , but it is directed, i.e., E = {(v0 , v1 ),
components of G.
(v1 , v2 ), (v2 , v3 ), . . . , (vn−1 , vn )}.
Definition 5.26. A rooted tree is a tree with a distinguished We can define three operations on a graph:
vertex, the root. There is a unique path from the root to every
(1) deletion of edges,
vertex v; its length is the distance of v from the root. The
height or depth of the tree is the maximal distance of a leaf (2) deletion of singleton vertices, and
from the root. The vertices on the path from the root to v are (3) merging neighboring vertices, i.e., deleting the edge be-
called ancestors of v. The ancestor which is a neighbor of v is tween them, replacing the two vertices by a single ver-
called the parent, and v is called a child of the parent. A rooted tex and maintaining all edges from the two (merged)
tree is a d-ary tree if every vertex has at most d children. vertices.
Lemma 5.13. If a sequence of these three operations is performed
5.5 Planar Graphs on a graph G and the resulting graph H is non-planar, then also G
Definition 5.27. A graph is planar if it can be drawn in the is non-planar.
plane with no edges crossing. 1 A bridge in a graph is an edge which, when removed, makes the graph
Theorem 6.20. Let m Lemma 7.1. If hS; ∗i has both a left and a right neutral element,
Q1r, m2 , . . . , mr be pairwise relatively prime then they are equal. In particular hS; ∗i can have at most one neu-
integers and let M = i=1 mi . For every list a1 , . . . , ar with 0 ≤
ai < mi for 1 ≤ i ≤ r, the system of congruence equations tral element.
for x has a unique solution x satisfying 0 ≤ x < M . Definition 7.6. A monoid is an algebra hM ; ∗, ei where ∗ is
associative and e is the neutral element.
Pr
This unique solution is x = RM ( i=1 ai Mi Ni ) with Mi = 1 This definition, though very general, does not capture all algebraic sys-
M/mi and Ni ≡mi Mi−1 . tems one might be interested in. A more general type of algebraic system,
called heterogeneous algebraic systems, can have several carrier sets.
27 28
Definition 7.7. A left [right] inverse element of an element 7.3 Homomorphisms and Isomorphisms
a in an algebra hS; ∗, ei with neutral element e is an element
b ∈ S such that b ∗ a = e [a ∗ b = e]. If b ∗ a = a ∗ b = e, then b Definition 7.10. For two compatible2 algebras hS; Ωi and
is simply called an inverse of a. hS 0 ; Ω0 i, a function ψ : S → S 0 is called a homomorphism
from hS; Ωi to hS 0 ; Ω0 i if for every ω ∈ Ω (of arity n) and
Lemma 7.2. In a monoid hM ; ∗, ei, if a ∈ M has a left and a right corresponding ω 0 ∈ Ω0 (also of arity n), ψ (ω(a1 , . . . , an )) =
inverse, then they are equal. In particular, a has at most one inverse. ω 0 (ψ(a1 ), . . . , ψ(an )) for every a1 , . . . , an ∈ S.
Definition 7.8. A group is an algebra hG; ∗i satisfying the fol- A mapping ψ from a group hG; ∗,b, ei to a group hG0 ; ?,b, e0 i is,
lowing axioms: by definition, a homomorphism if
1. ψ(e) = e0 ,
G1 ∗ is associative.
2. ψ(b d for all a, and
a) = ψ(a)
G2 There exists a (neutral) element e such that a∗e = e∗a =
a for all a ∈ G. 3. ψ(a ∗ b) = ψ(a) ? ψ(b) for all a and b.
G3 Every a ∈ G has an inverse element b
a, i.e., a ∗ b a∗a =
a=b Definition 7.11. A bijective homomorphism ψ from hS; Ωi to
e. hS 0 ; Ω0 i is called an isomorphism, and hS; Ωi and hS 0 ; Ω0 i are
called isomorphic, denoted hS; Ωi ∼ = hS 0 ; Ω0 i, if such an iso-
Definition 7.9. A group hG; ∗i (or monoid or semigroup) is morphism exists.
called commutative or abelian if a ∗ b = b ∗ a for all a, b ∈ G.
Lemma 7.3. For a group hG; ∗,b, ei, we have for all a, b, c ∈ G: 7.4 The Structure of Groups
c
(i) (b
a) = a. Definition 7.12. The direct product of n groups
hG1 ; ∗1 i , . . . , hGn ; ∗n i is the algebra
(ii) ad
∗ b = bb ∗ b
a. hG1 × · · · × Gn ; ?i, where the operation ? is component-wise:
(a1 , . . . , an ) ? (b1 , . . . , bn ) = (a1 ∗1 b1 , . . . , an ∗n bn ).
(iii) Left cancellation law: a ∗ b = a ∗ c ⇒ b = c.
Lemma 7.4. hG1 × · · · × Gn ; ?i is a group, where the neutral ele-
(iv) Right cancellation law: b ∗ a = c ∗ a ⇒ b = c.
ment and the inversion operation are component-wise in the respec-
(v) The equation a ∗ x = b has a unique solution x for any a and tive groups.
b. So does the equation x ∗ a = b. 2 Two algebras are compatible if there is a one-to-one correspondence be-
tween their operations, where corresponding operations have the same arity.
29 30
Definition 7.13. A subset H of a group hG; ∗,b, ei is called a Corollary 7.9. For a finite group G, the order of every elements
subgroup of G, denoted H ≤ G, if hH; ∗,b, ei is a group, i.e., if divides the group order, i.e., ord(a) divides |G| for every a ∈ G.
H is closed with respect to all operations:
Corollary 7.10. Let G be a finite group. Then a|G| = e for every
(1) a ∗ b ∈ H for all a, b ∈ H,
a ∈ G.
(2) e ∈ H, and
(3) b
a ∈ H for all a ∈ H. Corollary 7.11. Every group of prime order is cyclic, and in such
a group every element except the neutral element is a generator.
Definition 7.14. Let G be a group and let a be an element
of G. The order [Ordnung] of a, denoted ord(a), is the least
Definition 7.19. Z∗m := {a ∈ Zm | gcd(a, m) = 1}.
m ≥ 1 such that am = e, if such an m exists, and ord(a) = ∞
otherwise. Definition 7.20. The Euler function ϕ : Z+ → Z+ is defined
Definition 7.15. For a finite group G, |G| is called the order of as the cardinality of Z∗m : ϕ(m) = |Z∗m |.
G. Qr Qr
Lemma 7.12. if m = i=1 pei i , then ϕ(m) = i=1 (pi − 1)pei i −1 .
Lemma 7.5. In a finite group G, every element has a finite order.
Theorem 7.13. hZ∗m ; ,−1 , 1i is a group.
If G is a group and a ∈ G has finite order, then for any m ∈ Z
we have am = aRord(a) (m) . Corollary 7.14 (Fermat, Euler). For all m ≥ 2 and all a with
gcd(a, m) = 1, aϕ(m) ≡m 1. In particular, for every prime p and
Definition 7.16. The smallest subgroup of a group G contain-
every a not divisible by p, ap−1 ≡p 1.
ing the element a ∈ G is called the group generated by a, de-
noted hai, is defined as hai := {an | n ∈ Z}. Theorem 7.15. The group Z∗m is cyclic iff m = 2, m = 4, m = pe ,
Definition 7.17. A group G = hgi generated by an element or m = 2pe , where p is an odd prime and e ≥ 1.
g ∈ G is called cyclic, and g is called a generator of G.
Theorem 7.6. A cyclic group of order n is isomorphic to hZn , ⊕i Theorem 7.17. Let G be some finite group (multiplicatively writ-
(and hence abelian). ten), and let e ∈ Z be a given exponent relatively prime to |G| (i.e.
gcd(e, |G|) = 1). The (unique) e-th root of y ∈ G, namely x ∈ G
Theorem 7.8 (Lagrange). Let G be a finite group and let H be a satisfying xe = y, can be computed according to x = y d , where d is
subgroup of G. Then the order of H divides the order of G, i.e., |H| the multiplicative inverse of e modulo |G|, i.e., d ≡|G| e−1 .
divides |G|.
31 32
7.5 Rings and Fields (iii) If a | b and a | c, then a | (b + c).
Definition 7.21. A ring hR; +, −, 0, ·, 1i is an algebraic system Definition 7.24. An element a 6= 0 of a commutative ring R is
for which called a zerodivisor [Nullteiler] if ab = 0 for some b 6= 0 in R.
(i) hR; +, −, 0i is an abelian group.
Definition 7.25. An element u of a ring R is called a unit [Ein-
(ii) hR; ·, 1i is a monoid. heit] if u is invertible, i.e., uv = vu = 1 for some v ∈ R (we
(iii) a(b+c) = ab+ac and (b+c)a = ba+ca for all a, b, c ∈ R write v = u−1 ). The set of units of R is denoted by R∗ .
(left and right distributive laws).
A ring is called commutative if multiplication is commutative Lemma 7.20. For a ring R, R∗ is a multiplicative group (the group
(ab = ba). of units of R).
Lemma 7.18. For any ring hR; +, −, 0, ·, 1i, Definition 7.26. An integral domain [Integritätsbereich] is a
nontrivial commutative ring without zerodivisors: ab = 0 ⇒
(i) 0a = a0 = 0 for all a ∈ R.
a = 0 ∨ b = 0.
(ii) (−a)b = −ab.
(iii) (−a)(−b) = ab. Lemma 7.21. In an integral domain, if a | b, then c with b = ac is
unique (and is denoted by c = ab or c = b/a).3
(iv) If R is non-trivial (i.e., if it has more than one element), then
1 6= 0. Definition 7.27. A polynomial a(x) over a ring R in the in-
determinate x is a formal expression of the form a(x) =
Definition 7.22. The characteristic of a ring is the order of 1 Pd
ad xd + ad−1 xd−1 + · · · + a1 x + a0 = i=0 ai x . for some
i
in the additive group, but we define it to be 0 if the order of 1
is infinite. non-negative integer d. The degree deg(a(x)) of a(x) is the
greatest i for which ai 6= 0. The special polynomial 0 (i.e., all
the ai are 0) is defined to have degree “minus infinity”. Let
Definition 7.23. Let R be a commutative ring. For a, b ∈ R
R[x] denote the set of polynomials (in x) over R.
with a 6= 0 we say that a divides b, denoted a | b, if there exists
c ∈ R such that b = ac. In this case, a is called a divisor [Teiler] Theorem 7.22. R[x] is a ring.
or factor of b and b is called a multiple [Vielfaches] of a.
Lemma 7.23. If D is an integral domain, then so is D[x]. The
Lemma 7.19. In any commutative ring, units of D[x] are the constant polynomials which are units of D,
i.e., D[x]∗ = D∗ .
(i) If a | b and b | c, then a | c, i.e., the relation | is transitive.
(ii) If a | b, then a | bc for all c. 3 Note that the terms b
a
(or b/a) are defined only if a | b.
33 34
Definition 7.28. A field [Körper] is a nontrivial commutative Lemma 7.31. For a field F , α ∈ F is a root of a(x) iff x−α divides
ring F in which every nonzero element is a unit, i.e., F ∗ = a(x).
F − {0}.
Corollary 7.32. A polynomial a(x) of degree 2 or 3 over a field F
Theorem 7.24. Zp is a field iff p is prime. is irreducible iff it has no root.4
Definition 7.36. If α is a root of a(x), then its multiplicity is
Theorem 7.25. A field is an integral domain.
the highest power of x − α dividing a(x).
Theorem 7.26. A finite integral domain is a field.
Theorem 7.33. For an integral domain D, a nonzero polynomial
a(x) ∈ D[x] of degree d has at most d roots, counting multiplicities.
7.6 Polynomials over a Field
Definition 7.29. A polynomial a(x) ∈ F [x] is called monic Lemma 7.34. A polynomial a(x) ∈ F [x] of degree d is uniquely
[monisch, normiert] if the leading coefficient is 1. determined by any d + 1 values of a(x), i.e., by a(α1 ), . . . , a(αd+1 )
for any distinct α1 , . . . , αd+1 ∈ F .
Definition 7.30. A polynomial a(x) ∈ F [x] with degree at
Pd+1
least 1 is called irreducible if it is divisible only by constant This polynomial is then given by a(x) = i=1 βi ui (x), with
polynomials and by constant multiples of a(x). βi = a(αi ) and ui (x) = (α(x−α 1 )···(x−αi−1 )(x−αi+1 )···(x−αd+1 )
.
i −α1 )···(αi −αi−1 )(αi −αi+1 )···(αi −αd+1 )
3) (F ∧G)∧H ≡ F ∧(G∧H) and (F ∨G)∨H ≡ F ∨(G∨H) Definition 8.24. The set of clauses associated to a for-
(associativity); mula F = (L11 ∨ · · · ∨ L1m1 ) ∧ · · · ∧ (Ln1 ∨ · · · ∨
4) F ∧ (F ∨ G) ≡ F and F ∨ (F ∧ G) ≡ F (absorption); L
nmn ) in CNF, denoted as K(F ), is the set K(F ) :=
{L11 , . . . , L1m1 } , . . . , {Ln1 , . . . , Lnmn } . The set of clauses
5) F ∧ (G ∨ H) ≡ (F ∧ G) ∨ (F ∧ H) (distributive law); associated with a set M = {F1 , . . . , Fk } of formulas is the
Sk
6) F ∨ (G ∧ H) ≡ (F ∨ G) ∧ (F ∨ H) (distributive law); union of their clause sets: K(M ) := i=1 K(Fi ).
7) ¬¬F ≡ F (double negation);
Definition 8.25. A clause K is a resolvent of clauses K1 and
8) ¬(F ∧ G) ≡ ¬F ∨ ¬G and ¬(F ∨ G) ≡ ¬F ∧ ¬G
K2 if there is a literal L such that L ∈ K1 , ¬L ∈ K2 , and3
(de Morgan’s rules);
9) F ∨ > ≡ > and F ∧ > ≡ F (tautology rules);
K = (K1 − {L}) ∪ (K2 − {¬L}). (8.1)
10) F ∨ ⊥ ≡ F and F ∧ ⊥ ≡ ⊥ (unsatisfiability rules).
11) F ∨ ¬F ≡ > and F ∧ ¬F ≡ ⊥.
Given a set K of clauses, a resolution step takes two clauses
Definition 8.20. A literal is an atomic formula or the negation K1 ∈ K and K2 ∈ K, computes a resolvent K, and adds K to
of an atomic formula. K. To be consistent with Section 8.2.2, one can write the reso-
lution rule as {K1 , K2 } `res K, where equation (8.1) must
Definition 8.21. A formula F is in conjunctive normal form be satisfied.The resolution calculus, denoted Res, consists of a
(CNF) if it is a conjunction of disjunctions of literals, i.e., if it single rule: Res = {res}.
is of the form F = (L11 ∨ · · · ∨ L1m1 ) ∧ · · · ∧ (Ln1 ∨ · · · ∨ Lnmn )
for some literals Lij .
Lemma 8.4. The resolution calculus is sound, i.e., if K `Res K
Definition 8.22. A formula F is in disjunctive normal form then K |= K.
(DNF) if it is a disjunction of conjunctions of literals, i.e., if it
is of the form F = (L11 ∧ · · · ∧ L1m1 ) ∨ · · · ∨ (Ln1 ∧ · · · ∧ Lnmn ) Theorem 8.5. A set M of formulas is unsatisfiable iff
for some literals Lij . K(M ) `Res ∅.
• A variable is of the form xi with i ∈ N.4 Definition 8.29. A structure is a tuple A = (U, φ, ψ, ξ) where
(k)
• A function symbol is of the form fi with i, k ∈ N, • U is a non-empty set, the so-called universe,
where k denotes the number of arguments of the func-
tion. Function symbols for k = 0 are called constants. • φ is a function assigning to each function symbol (in a
certain subset of all function symbols) a function, where
(k)
• A predicate symbol is of the form Pi with i, k ∈ N, for a k-ary function symbol f , φ(f ) is a function U k →
where k denotes the number of arguments of the predi- U.
cate. • ψ is a function assigning to each predicate symbol (in
• A term is defined inductively: A variable is a term, and a certain subset of all predicate symbols) a function,
(k)
if t1 , . . . , tk are terms, then fi (t1 , . . . , tk ) is a term. For where for a k-ary function symbol P , ψ(P ) is a func-
k = 0 one writes no parentheses. tion U k → {0, 1}, and where
Definition 8.27. Every occurrence of a variable in a formula is – If t is a variable, then A(t) = ξ(t).
either bound or free. If a variable x occurs in a (sub-)formula – If t is of the form f (t1 , . . . , tk ) for terms t1 , . . . , tk
of the form ∀x G or ∃x G, then it is bound, otherwise it is free.5 and a k-ary function symbol f , then A(t) =
A formula is closed if it contains no free variables. φ(f )(A(t1 ), . . . , A(tk )).
– A((F ∨ G)) = 1 if and only if A(F ) = 1 or A(G) = 1; Lemma 8.7. If one replaces a subformula G of a formula F by an
– A(¬F ) = 1 if and only if A(F ) = 0. equivalent (to G) formula H, then the resulting formula is equiva-
– If F is of the form F = P (t1 , . . . , tk ) for terms lent to F .
t1 , . . . , tk and a k-ary predicate symbol P , then Lemma 8.8. For a formula G in which x occurs only free and in
A(F ) = ψ(P )(A(t1 ), . . . , A(tk )). which y does not occur, ∀x G ≡ ∀y G[x/y] and ∃x G ≡
– If F is of the form ∀x G or ∃x G, then let A[x→u] be the ∃y G[x/y].
same structure as A except that ξ(x) is overwritten by
u (i.e., ξ(x) = u): By appropriately renaming quantified variables one can
transform any formula into an equivalent formula in which
1 if A[x→u] (G) = 1 for all u ∈ U
A(∀x G) = no variable appears both as a bound and a free variable and
0 else
such that all variables appearing after the quantifiers are dis-
1 if A[x→u] (G) = 1 for some u ∈ U tinct. Such a formula is said to be in rectified [bereinigt] form.
A(∃x G) =
0 else.
Definition 8.31. A formula of the form
Q1 x1 Q2 x2 · · · Qn xn G, where the Qi are arbitrary quantifiers
Lemma 8.6. Any equivalence that holds in propositional logic also (∀ or ∃) and G is a formula free of quantifiers, is said to be in
holds in predicate logic. Moreover, for any formulas F , G, and H, prenex form [Pränexform].
where H does not contain the variable x, we have
1) ¬(∀x F ) ≡ ∃x ¬F ; Theorem 8.9. ¬∃x∀y P (y, x) ↔ ¬P (y, y) .
2) ¬(∃x F ) ≡ ∀x ¬F ; Corollary 8.10. There exists no set that contains all sets S that do
3) (∀x F ) ∧ (∀x G) ≡ ∀x (F ∧ G); not contain themselves, i.e., {S| S 6∈ S} is not a set.
4) (∃x F ) ∨ (∃x G) ≡ ∃x (F ∨ G);
Corollary 8.11. The set {0, 1}∞ is not countable.
5) ∀x ∀y F ≡ ∀y ∀x F ;
6) ∃x ∃y F ≡ ∃y ∃x F ; Corollary 8.12. There are functions N → {0, 1} that are not com-
puted by any program.
7) (∀x F ) ∧ H ≡ ∀x (F ∧ H);
8) (∀x F ) ∨ H ≡ ∀x (F ∨ H);
9) (∃x F ) ∧ H ≡ ∃x (F ∧ H);
10) (∃x F ) ∨ H ≡ ∃x (F ∨ H).
47 48