Unit 1: Logic Flashcards

1
Q

Define

Proposition

A

A proposition is:

a declarative sentence
(a sentence that declares a fact),

that is either true or false, but not both.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define

Negation

A

The negation of p, denoted by ¬p, is the statement:

it is not the case that p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define

Conjunction

A

The conjunction of p and q, denoted by ** p q**, is the proposition:

p and q

The conjuction p q is true when both p and q are true, and false otherwise.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define

Disjunction

A

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 true otherwise.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define

Implication

A

The implication p → q, is the proposition:

if p then q

p → q is false when p is true and q is false, and true otherwise.

The implication, p is callsed the hypothesis.
And q is called the conclusion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define

Converse

A

The proposition q → p is called the converse of p → q

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define

Contrapositive

A

The contrapositive of p → q is:

¬q → ¬p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define

Biconditional statement

A

The biconditional statement 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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Precedence of logical operators

A
  1. ¬
  2. and
  3. and
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define

(propositional) formula

A

A proposition or a compound proposition.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Define

Truth assignment

A

A truth assignment to a propositional formula is an assignment of truth values to each of the propositions that occur in the formula.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define

Tautology

A

A formula that is true under every truth assignment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define

Logical equivalence

A

Formulats that have the same truth values under all possible truth assignments are called logically equivalent.

Defined:

Formulas p and q are logically equivalent, if p ↔ q is a tautology.

The notation p ≡ q denotes that p and q are logically equivalent.

The symbol ⇐⇒ is sometimes used instead of to denote logical equivalence.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Idempotent laws

A

(p ∧ p) ≡ p

(p ∨ p) ≡ p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Commutative laws

A

(p ∧ q) ≡ (q ∧ p)

(p ∨ q) ≡ (q ∨ p)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Associative laws
(logic)

A

(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)

(p ∨ q) ∨ r ≡ p ∨ (q ∨ r)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Absorption laws
(logic)

A

p ∧ (p ∨ q) ≡ p

p ∨ (p ∧ q) ≡ p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Distributive laws

A

p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)

p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Double negation

A

¬¬p ≡ p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

De Morgan’s laws

A

¬(p ∧ q) ≡ (¬p ∨ ¬q)

¬(p ∨ q) ≡ (¬p ∧ ¬q)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Tertium non datur

A

(p ∧ ¬p) ≡ F

(p ∨ ¬p) ≡ T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Identity laws

A

(p ∧ T) ≡ p

(p ∨ F) ≡ p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Domination laws

A

(p ∨ T) ≡ T

(p ∧ F) ≡ F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Subject & Predicate

A

x is greater than 3” has 2 parts:

  1. The first part, x, is the subject of the statement.
  2. The second part, the predicate, is greater than 3 refers to a property that the subject of the statement may or may not have.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Define

Universal Quantification

A

The universal quantification of P(x) is the statement:

P(x) for all values of x in the domain of x

  • The notation ∀x P(x) denotes the universal quantification of P(x).
  • The symbol is called the universal quantifier.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Define

Existential Quantification

A

The existential quantification of P(x) is the statement:

There exists an element x in the domain such that P(x)

  • The notation ∃x P(x) denotes the existential quantification of P(x).
  • The symbol is called the existential quantifier.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Define

Set

A

A set is an unordered collection of objects, called elements or members of the set.

A set is said to contain its elements.

x ∈ A denotes that x is an element of the set A.
x ∈/ A denotes that x is not an element of the set A.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

3 Fundamental Set Properties

A
  • All elements in a set are distinct. (i.e. a value is either an element of a set, or it is not. It cannot occur multiple times in the set.)
  • The elements of a set do not come with a fixed ordering.
  • The same set can be described in different ways {1, 2, 3} = {1, 2, 2, 3} = {3, 1, 2} = {i | i integer, 0 < i ≤ 3}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

6 Standard sets of numbers

A

N := {0,1,2,3,···} set of natural numbers

Z := {0,1,−1,2,−2,3,−3,···} set of integers

Z>0 := {1, 2, 3, · · · } set of positive natural numbers

Q := {ab | a,b ∈ Z,b ̸= 0} set of rational numbers

R := the set of real numbers

R>0 := the set of positive real numbers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Definition

Set equality

A

Two sets A and B are equal (A=B), if they contain the same elements, i.e.

  • every x ∈ A satisfies x ∈ B and
  • every x ∈ B satisfies x ∈ A.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Definition

Empty set

A

The empty set is the (uniquely determined) set that contains no element(s).

We denote it by ∅, or by {}.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Definition

Singleton set

A

A set with exactly one element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Definition

Finite set

A

A set is called finite, if it contains only finitely many elements, i.e. if there is a number n ∈ N, such that the set contains exactly n elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Define

Cardinality

A

The cardinality of a set M is:

|M|: {
The number if elements in M, if M is finite,
∞, otherwise

35
Q

Define

Subset

A

A is a subset of B
(short: A⊆B),
if every element of A is also an element of B.

36
Q

Define

Proper Subset

A

A is a proper subset of B (short: A ⊊ B), if:
A ⊆ B and A ≠ B.

37
Q

Superset

A

A is a superset of B (short: A ⊇ B), if B ⊆ A

38
Q

Proper Superset

A

A is a proper superset of B
(short: A ⊋ B), if

A ⊇ B and A ≠ B.

39
Q

Define

Power set

A

The power set of a set S is the set of all subsets of S:

P(S) := { X |X ⊆ S}

E.g. P({a, b}) = { ∅, {a}, {b}, {a,b} }

40
Q

Set operations

Intersection

A

A ∩ B := { x : x ∈ A and x ∈ B }

41
Q

Set operations

Union

A

A ∪ B := { x : x ∈ A or x ∈ B }

42
Q

Set operations

Difference

A

A − B := { x ∈ A : x ∉ B }

43
Q

Set operations

Symmetric difference

A

A ⊕ B := (A−B) ∪ (B−A)

44
Q

Complement of a set

A

We would like the complement of a set A, short A^, to be the set of all elements, that do not belong to A.

A^ := { x : x ∉ A},

45
Q

Sets

Idempotent laws

A

A ∩ A = A and A ∪ A = A

46
Q

Sets

Commutative laws

A

A ∩ B = B ∩ A and A ∪ B = B ∪ A

47
Q

Sets

Associative laws

A

A ∩ (B ∩ C) = (A ∩ B) ∩ C
and
A ∪ (B ∪ C) = (A ∪ B) ∪ C

48
Q

Sets

Absorption laws

A

A ∩ (A ∪ B) = A
and
A ∪ (A ∩ B) = A

49
Q

Sets

Distributive laws

A

A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
and
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

50
Q

Sets

Double Complement

A

(A^)^ = A

51
Q

De Morgan’s laws
(sets)

A

(A ∩ B)^ = A^ ∪ B^
and
(A ∪ B)^ =A^ ∩ B^

52
Q

Inverse laws

A

A ∩ A^ = and A ∪ A^ = U

53
Q

Identity laws

A

A ∩ U = A and A ∪ ∅ = A

54
Q

Cartesian product of two sets

A

A x B is the set of ordered pairs (a, b), where a belongs to A and b belongs to B.

A×B := { (a,b) | a ∈ A and b ∈ B }

55
Q

Symmetric relation

A

A relation R on set A is called symmetric, if (a, b) ∈ R implies (b, a) ∈ R for all a, b ∈ A

56
Q

Antisymmetric relation

A

A relation R on a set A such that for all a, b ∈ A, if (a, b) ∈ R and (b, a) ∈ R, then a=b is called antisymmetric.

57
Q

Properties of relations

transitive

A

A relation R on a set A is called transitive if whenever (a, b) ∈ R and (b,c) ∈ R, then (a,c) ∈ R, for all a,b,c ∈ A.

58
Q

Properties of relations

total

A

A relation R on a set A is called total if all a,b ∈ A satisfy: (a,b) ∈ R or (b, a) ∈ R.

59
Q

Definition

Function

A

Let A and B be nonempty sets.

A function f from A to B is an assignment of exactly one element of B to each element of A.

f : A → B

60
Q

Domain & Codomain

A

Let f : A → B be a function.

The set A is called the domain of the function f.
B is called the codomain of the function f.

61
Q

Image & Preimage

A

If f(a) = b, we say that:

b is the image of a,

and a is the preimage of b.

62
Q

Definition

Injective function

A

A function f : A → B is said to be injective (or one-to-one), if and only if f(a) = f(b) implies that a = b for all a and b in the domain A of f.

63
Q

Definition

Surjective function

A

A function f : A → B is said to be surjective (or onto), if and only if for every element b ∈ B there is an element a ∈ A with f(a) = b.

64
Q

Definition

Bijective function

A

A function f is said to be bijective (or a one-to-one correspondence), if it is both injective and surjective.

We also say that the function is a bijection.

65
Q

Definition

Inverse function

A

Let A, B be sets and f ⊆ A × B be a function.

If the relation
{(b, a) | (a, b) ∈ f } ⊆ B × A is a function from B to A, then it is called the inverse function of f.

In this case, f is called invertible.

66
Q

Definition

theorem

A

A theorem is a statement that can be shown to be true.

A theorem consists of assumptions (premises) and a conclusion.

Assumptions and a
conclusion are statements such that the following is true:
If all assumptions are satisfied, then the conclusion must be true.

67
Q

Definition

proof

A

The proof of a theorem has to establish that the statement of the theorem is true.

The proof can use:
* the assumptions of the theorem
* definitions, known facts and known theorems
* statements, that are proved within the proof or have already been proved elsewhere
* logical rules of inference.

68
Q

Definition

lemma

A

A less important theorem that is helpful in the proof of other results is often called a lemma.

69
Q

Definition

corollary

A

A corollary is a theorem that follows immediately from a theorem or proposition that has been proved.

70
Q

Definition

conjecture

A

A conjecture is a statement that is being proposed to be a true statement, usually on the basis of some partial evidence, but a proof is still missing.

71
Q

Proof by contraposition

A

In a proof by contraposition, a statement of the form p → q is proved by showing ¬q → ¬p.

This is correct, because the statements are logically equivalent.

72
Q

Propose-and-reject algorithm

Gale-Shapley 1962

A

Initialize each person to be free;

while some man is free and has not proposed to every woman do
* choose such a man m;
* w ← 1st woman on m’s list to whom m has not yet proposed;
* if w is free then
* assign m to w;
* else if w prefers m to her fiance m′ then
* assign m to w, and m′ to be free;
* else
* w rejects m;

73
Q

Equivalence relation

A

A binary relation that is:
- Reflexive
- Transitive
- Symmetric

74
Q

Equivalence class

A

Let E be an equivalence relation over a set V.

For every v ∈ V we let:

[v]E := {v' ∈ V | (v, v') ∈ E }

denote the equivalence class of v with respect to E.

A set W ⊆ V is an equivalence class (of E) if there exists an element v ∈ V with W = [v]E.

The element v is then called a representative of its equivalence class W.

75
Q

Preorder

A

Let E be a binary relation over a set V.

E is a preorder, if e is:
- Reflexive, and
- Transitive

76
Q

Partial order

A

Let E be a binary relation over a set V.

E is a partial order, if E is:
- reflexive,
- transitive, and
- antisymmetric

77
Q

Linear order
or
Total order

A

Let E be a binary relation over a set V.

E is a linear order or total order, if E is:
- reflexive,
- transitive,
- antisymmetric, and
- total.

78
Q

Example of a linear order

A

≤ is a linear order on N (and Z, Q and R).

≥ is a linear order on N (and Z, Q and R).

79
Q

Example of a partial order

A

For every set M, the relations and are partial orders on the power set P(M).

80
Q

Real-valued / integer-valued function

A

A function is called real-valued if its codomain is the set of real numbers.

It is called integer-valued if its codomain is the set of integers.

81
Q

Identity function

A

The identity function on A is the function A→A, given by ιA(x) := x for all x∈A

ι is a greek letter, pronounced ‘iota’

82
Q

Direct proof

A

In a direct proof, the statement is proven ‘directly’, i.e. without any detours.

This is often by a chain of implications, leading us from the assumptions of the theorem to its conclusion;

or by a chain of equalities,

or a chain of equivalences.

83
Q

Proof by contradiction

A

Suppose we want to show a statement of the form p is true.

Suppose we find a contradiction q such that ~p→q.

Because q is false, but ~p→q is true, we can conclude that ~p is false, which means p is true.

84
Q

Proof by mathematical induction

A

**By N we denote the set of all natural numbers.

Let P(n) be a statement about a natural number n.

The aim is to prove that statement P(n) is true for every n ∈ N.

  1. In the first step, we prove that the statement P(n) is true for n=0. We call this step basis of the induction.
  2. In a second step, we prove for every natural number n∈N: If statement P(n) is true, then statement P(n+1) is true as well. This step is called the inductive step.