In week 4, we continued with symbols and quantifiers as well as starting with proof. As previously mentioned, what we are learning in this course is same as what we learned in Calculus! course during the first and the second week.
To show that the order of quantifiers cannot be switched, there was an example with the definition of limit.
The definition says that 'for all epsilon, there exist some deltas', means if I choose any epsilon, I can always find delta. But can we choose delta first(switch the order of quantifiers)? No, it will not work. If I pick a specific delta first, then my enemy can choose any delta that is out of range of delta. Than, the definition is not working anymore. Therefore, we know that the order of quantifiers matters regarding to the truth of implications.
This is, although, not always true. There are some cases that implication is not affected by the order of quantifiers. When quantifiers are elements of an ordered pair, it does not change anything. For example, below are same:
When I prove something, first, I have to convince myself why this is true. In other words, I have to understand why this is true and need to have an idea about proving steps. Next step is writing down the steps of proving. When I prove something, I have to justify my thought to convince other people who will read my proof. If I find any defects in the process, I may go back to the beginning.
Now I recall the type of proofs that I learned in Calculus! course. There are four types of proofs.
- Direct proof
- Proof by contrapositive
- Proof by contradiction
- Proof by induction
In Calculus! course, proof by induction was focused. Mathematical induction is used to prove a property holds for any natural integer. If we want to prove P(n) is true, then we assume the P(1) is true and show that if P(n) is true then P(n+1) is also true.
In CS, we start with direct proof. Most of the time, direct proof can be a very hard way to prove, When, prove directly, show each link to reach to the precedents. When we prove something like,
we use following structure:
Assume x is in X.
Assume P(x).
Then, R1(x)
C2.0 for all x in X, P(x) then R1(x)
Then, R2(x)
C2.1 for all x in X, P(x) then R2(x)
...
C2.n for all x in X, P(x) then Rn(x)
Then P(x) then Q(x)
Then for all x in X, if P(x) then Q(x)
Indentation indicates scope of assumption. This reminds me of writing definition in Python. When we write definition in Python, indentation is very important. For example, when we use if statement in the function body, if indentations is not adequate, the function is not working properly.
This way of proving is slightly different from math, so it was little uncomfortable for me to use(For example, indentation).
For this week, I remember one thing very well: chains with

or

. It is because of the tutorial problem. In one of the tutorial problems, there was a question asking to write a given statement symbolically. The statement is 'A and B are both guarantees that C is true.' Actually, my answer was wrong. My answer was,
, which is not quite right. After I read this part, I could understand why my answer in not right.
Let's write the statement in symbols again. It would be
Now, following implications are equivalent to the above:
(By the rules for manipulating predicates)
Therefore,
At the time of tutorial, I didn't know what I did wrong, but after the lecture, I tried applying those rules by myself and I could understand and solve the problem.