Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
translate.doc
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
1.28 Mб
Скачать

2.3 Functions

Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write .

If f is a function from A to B, we say that A is the domain of f and B is the codomain of f. If f(a) = b, we say that b is the image of a and a is a pre-image of b. The range of f is the set of all images of elements of A. Also, if f is a function from A to B, we say that f maps A to B.

Example. Let f be the function that assigns the last two bits of a bit string of length 2 or greater to that string. Then, the domain of f is the set of all bit strings of length 2 or greater, and both the codomain and range are the set {00, 01, 10, 11}.

Let f1 and f2 be functions from A to R. Then and are also functions from A to R defined by

2.3.1 One-to one and onto functions

Some functions have distinct images at distinct members of their domain. These functions are said to be one-to-one.

A function f is said to be one-to-one, or injective, iff implies that x = y for all x and y in the domain of f. A function f is said to be an injection if it is one-to-one.

Remark. A function f is one-to-one iff whenever .

Example. Determine whether the function from the set of integers to the set of integers is one-to-one.

Solution: The function is not one-to-one because, for instance, , but .

2.3.2 Inverse functions and compositions of functions

Let f be a one-to-one correspondence from the set A to the set B. The inverse function of f is the function that assigns to an element b belonging to B the unique element a in A such that . The inverse function of f is denoted by . Hence, when .

If a function f is not a one-to-one correspondence, we cannot define an inverse function of f.

A one-to-one correspondence is called invertible since we can define an inverse of this function. A function is not invertible if it is not a one-to-one correspondence, since the inverse of such a function does not exist.

Example. Let f be the function from the set of integers to the set of integers such that . Is f invertible, and if it is, what is its inverse?

Solution: The function f has an inverse since it is a one-to-one correspondence, as we have shown. To reverse the correspondence, suppose that y is the image of x, so that . Then . This means that is the unique element of Z that is sent to y by f. Consequently, .

Example. Let f be the function from Z to Z with . Is f invertible?

Solution: Since , f is not one-to-one. If an inverse function were defined, it would have to assign two elements to 1. Hence, f is not invertible.

Let g be a function from the set A to the set B and let f be a function from the set B to the set C. The composition of the functions f and g, denoted by , is defined by .

Example. Let g be the function from the set {a, b, c} to itself such that g(a) = b, g(b) = c, and g(c) = a. Let f be the function from the set {a, b, c} to the set {1, 2, 3} such that f(a) = 3, f(b) = 2, and f(c) = 1. What is the composition of f and g, and what is the composition of g and f?

Solution: The composition is defined by ,

, and .

Note that is not defined, because the range of f is not a subset of the domain of g.

2.3.3 Methods of proof

Two important questions that arise in the study of mathematics are:

(1) When is a mathematical argument correct?

(2) What methods can be used to construct mathematical arguments?

This section helps answer these questions by describing various forms of correct and incorrect mathematical arguments.

A theorem is a statement that can be shown to be true. We demonstrate that a theorem is true with a sequence of statements that form an argument, called a proof. To construct proofs, methods are needed to derive new statements from old ones. The statements used in a proof can include axioms or postulates, which are the underlying assumptions about mathematical structures, the hypotheses of the theorem to be proved, and previously proved theorems. The rules of inference, which are the means used to draw conclusions from other assertions, tie together the steps of a proof.

A form of incorrect reasoning is called a fallacy. The terms lemma and corollary are used for certain types of theorems. A lemma is a simple theorem used in the proof of other theorems. Complicated proofs are usually easier to understand when they are proved using a series of lemmas, where each lemma is proved individually. A corollary is a proposition that can be established directly from a theorem that has been proved. A conjecture is a statement whose truth value is unknown. When a proof of a conjecture is found, the conjecture becomes a theorem. Many times conjectures are shown to be false, so they are not theorems.

2.3.4 Rules of inference

We will now introduce rules of inference for propositional logic. These rules provide the justification of the steps used to show that a conclusion follows logically from a set of hypotheses. The tautology is the basis of the rule of inference called modus ponens, or the law of detachment. This tautology is written in the following way:

Using this notation, the hypotheses are written in a column and the conclusion below a bar. Modus ponens states that if both an implication and its hypothesis are known to be true, then the conclusion of this implication is true.

Example. Suppose that the implication “if it is snows today, then we will go skiing” and its hypothesis, “it is snowing today”, are true. Then, by modus ponens, it follows that the conclusion of the implication, “we will go skiing”, is true.

Example. The implication “if n is divisible by 3, then n2 is divisible by 9” is true. Consequently, if n is divisible by 3, then by modus ponens, it follows that n2 is divisible by 9.

Rules of inference

Tautology

Name

Addition

Simplification

Conjunction

Modus ponens

Modus tollens

Hypothetical syllogism

Disjunctive syllogism

An argument is called valid if whenever all the hypotheses are true, the conclusion is also true. Consequently, showing that q logically follows from the hypotheses p1, p2, …, pn is the same as showing that then implication is true.

When there are many premises, several rules of inference are often needed to show that an argument is valid. This is illustrated by the following examples, where the steps of arguments are displayed step by step, with the reason for each step explicitly stated. These examples also show how argument in English can be analyzed using rules of inference.

Example. Show that the hypotheses “It is not sunny this afternoon and it is colder than yesterday”, “We will go swimming only if it is sunny”, “If we do not go swimming, then we will take a canoe trip”, and “If we take a canoe trip, then we will be home by sunset” lead to the conclusion “We will be home by sunset”.

Solution: Let p be the proposition “It is sunny this afternoon”, q the proposition “It is colder than yesterday”, r the proposition “We will go swimming”, s the proposition “We will take a canoe trip”, and t the proposition “We will be home by sunset”. Then the hypotheses become , , , and . The conclusion is simply t. We construct an argument to show that our hypotheses lead to the desired conclusion as follows:

Step Reason

1. Hypothesis

2. Simplification using Step 1

3. Hypothesis

4. Modus tollens using Steps 2 and 3

5. Hypothesis

6. Modus ponens using Steps 4 and 5

7. Hypothesis

8. Modus ponens using Steps 6 and 7

2.3.5 Rules of inference for quantified statements

We will now describe some important rules of inference for statements involving quantifiers (they are used extensively in mathematical arguments, often without being explicitly mentioned).

Universal instantiation is the rule of inference used to conclude that is true, where c is a particular member of the universe of discourse, given the premise . Universal instantiation is used when we conclude from the statement “All women are wise” that “Lisa is wise”, where Lisa is a member of the universe of discourse of all women.

Universal generalization is the rule of inference which states that is true, given the premise that is true for all elements c in the universe of discourse. Universal generalization is used when we show that is true by taking an arbitrary element c from the universe of discourse and showing that is true. The element c that we select must be an arbitrary, and not a specific, element of the universe of discourse. Universal generalization is used implicitly in many proofs in mathematics and is seldom mentioned explicitly.

Existential instantiation is the rule which allows us to conclude that there is an element c in the universe of discourse for which is true if we know that is true. We cannot select an arbitrary value of c here, but rather it must be a c for which is true. Usually we have no knowledge of what c is, only that it exists. Since it exists, we may give it a name c and continue our argument.

Existential generalization is the rule of inference which is used to conclude that is true when a particular element c with true is known. That it, if we know one element c in the universe of discourse for which is true, then we know that is true.

Rule of inference

Name

Universal instantiation

Universal generalization

Existential instantiation

Existential generalization

Example. Show that the premises “Everyone in this discrete mathematics class has taken a course in computer science” and “Maria is a student in this class” imply the conclusion “Maria has taken a course in computer science”.

Solution: Let D(x) denote “x is in this discrete mathematics class”, and let C(x) denote “x has taken a course in computer science”. Then the premises are and D(Maria). The conclusion is C(Maria).

The following steps can be used to establish the conclusion from the premises.

Step Reason

1. Premise

2. Universal instantiation using Step 1

3. Premise

4. Modus ponens using Steps 2 and 3

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]