Строительный блокнот  Automata methods and madness 

1 2 3 4 [ 5 ] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175

1.3 Additional Forms of Proof

In this section, we take up several additional topics concerning how to construct proofs:

1. Proofs about sets.

2. Proofs by contradiction.

3. Proofs by counterexample.

2. [ж], the ceiling of real number x, is the least integer equal to or greater than X.

Theorem 1.7: Let л; be a real number. Then [x\ = [x] if and only if x is an integer,

PROOF: (Only-if part) In this part, we assume [x\ - fx] and try to prove x is an integer. Using the definitions of the floor and ceiling, we notice that [xj < x, and fx] > X. However, we are given that [x\ - fx]. Thus, we may substitute the floor for the ceiling in the first inequality to conclude fx] < x. Since both fx] < X and fx] > x hold, we may conclude by properties of arithmetic inequalities that fx] = a;. Since fx] is always an integer, x must also be an integer in this case.

(If part) Now, we assume x is an integer and try to prove [xj = fx]. This part is easy. By the definitions of floor and ceiling, when x is an integer, both [xJ and fx] are equal to x, and therefore equal to each other, □

1.2.4 Theorems That Appear Not to Be If-Then Statements

Sometimes, we encounter a theorem that appears not to have a hypothesis. An example is the well-known fact from trigonometry:

Theorem 1.8: sm + cos в = 1. □

Actually, this statement does have a hypothesis, and the hypothesis consists of all the statements you need to know to interpret the statement. In particular, the hidden hypothesis is that в is an angle, and therefore the functions sine and cosine have their usual meaning for angles. From the definitions of these terms, and the Pythagorean Theorem (in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides), you could prove the theorem. In essence, the if-then form of the theorem is really: if в is an angle, then sin в + cos в = 1.



14 CHAPTER L AUTOMATA: THE METHODS AND THE MADNESS 1.3.1 Proving Equivalences About Sets

In automata theory, we are frequently asked to prove a theorem which says that the sets constructed in two different ways are tlie same sets. Often, these sets are sets of character strings, and the sets are called languages, but in this section the nature of the sets is miimportant. If E and F are two expressions representing sets, the statement E = F means that the two sets represented are the same. More precisely, every element in the set represented by E is in the set represented by F, and every element in the set represented by F is in the set represented by E.

Example 1.9: The commutative law of union says that we can take the union of two sets R and S in either order. That is, RV S - S U R. hi this case, E is the expression R\J S and F is the expression S U R. The commutative law of union says that E - F. □

We can write a set-equality E = F as an if-and-only-if statement: an element j; is in £ if and only if x is in F. As a consequence, we see the outline of a proof of any statement that asserts the equality of two sets E = F\\t follows tlie form of any if-and-only-if proof:

1. Proof that if X is in E, then x is in F,

2. ProC that if x is in F, then x is in E.

ks an example of this proof process, let us prove the distributive law of union over intersection:

Theorem 1.10: R\J {S Г\Т) = {RU S) f] {R\J T).

PROOF: The two set-expressions involved are £ = Л U (5 П Г) and

F(RUS)n{RL)T)

We shall prove the two parts of the theorem in turn. In the if part we assume element x is in E and show it is in F. This part, summarized in Fig. 1,5, uses the definitions of union and intersection, with which we assume you are familiar.

Then, wo nmst prove the only-if part of the theorem. Here, we assume x is in F and show it is in E. The steps are summarized in Fig. 1.6. Since we have now proved both parts of the if-and-only-if statement, the distributive law of union over int(!rsection is proved. □

1.3.2 The Contrapositive

Every if-then statement has an equivalent form that in some circumstances is easier to prove. The contrapositive of the statement if Я then C is if not С then not H. A statement and its contrapositive are either both true or both false, so we can prove either to prove the other.

To see why if Я then C and if not С then not Я are logically equivalent, first observe that there are four cases to consider:



Statement

Justification

x is in Л и (5 П Г)

Given

X is in Л or X is in 5 П Г

(1) and definition of union

X is in й or X is in

(2) and definition of intersection

both S and T

X is in Й и S

(3) and definition of union

X is in Я и Г

(3) and definition of union

X is in (Д и 5) П (Я и Г)

(4), (5), and definition

of intersection

Figure 1.5: Steps in the if part of Theorem 1,10

Statement

Justification

X is in (Я и 5) П (Я и Т)

Given

X is in Я и 5

(1) and definition of intersection

ж is in Л и Т

(1) and definition of intersection

X is in Я or X is in

(2), (3), and reasoning

both S and T

about unions

X is in Я or X is in 5 n !Г

(4) and definition of intersection

X is in Я и (5 n Г)

(5) and definition of union

Figure 1.6: Steps in the only-lf part of Theorem 1,10

1, H and С both true.

2, H true and С false.

3. С true and H false,

4. Я and С both false.

There is only one way to make an if-then statement false; the hypothesis must be true and the conclusion false, as in case (2). For the other three cases, including case (4) where the conclusion is false, the if-then statement itself is true.

Now, consider for which cases the contrapositive if not С then not H is false. In order for this statement to be false, its hypothesis (which is not C ) must be true, and its conclusion (which is not Я ) must be false. But not C7 is true exactly when С is false, and not Я is false exactly when H is true. These two conditions are again case (2), which shows that in eacli of the four cases, the original statement and its contrapositive are either both true or both false; i.e., they are logically equivalent.



1 2 3 4 [ 5 ] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175