The problems in this homework call for the use of the theorems in Chapter 8 of Gries and Schneider. In particular, Theorem (8.24) will be useful in several problems for the purpose of rewriting the range of a quantification.
Essentially, what (8.24) says is that if b≤c≤d, then we can split up the range [b..d) into two ranges: [b..c) and [c..d). In other words, if b≤c≤d, the expression b≤i<d is equivalent to b≤i<c ∨ c≤i<d.
In Problems 1 and 2, assume that ★ is an associative and symmetric binary operator having an identity element. In Problems 4 and 5, f is a function of type ℕ×ℕ→ℕ. In Problem 6, g is a function of type ℕ→ℕ.
1. Prove
(a)
(★i | 0≤i<9 : P) =
(★i | 0≤i<5 : P) ★ (★i | 5≤i<9 : P)
(b)
(★i | 0≤i<9 : P) =
(★i | 0≤i<5 : P) ★ P[i:=5] ★
(★i | 6≤i<9 : P)
2. Prove (★i | 0≤i<11 : P) ★ (★i | 0≤i<5 : Q) = (★i | 0≤i<5 : P★Q) ★ (★i | 5≤i<11 : P)
3. Prove (∨i | 0≤i<10 : P) = (∨i | 0≤i≤6 : P) ∨ (∨i | 4≤i<10 : P)
Hint: Make use of one of the properties of disjunction (i.e., ∨).
4. Prove (+i | 0≤i<n : (+j | 0≤j<m : f.i.j)) = (+k | 0≤k<m : (+i | 0≤i<n : f.i.k))
5. Prove (+i,j | 0≤i≤j<n : f.i.j) = (+i | 0≤i<n : (+j | i≤j<n : f.i.j))
Keep in mind that the expression a≤b≤c is an abbreviation for the conjunction a≤b ∧ b≤c and that, by transitivity of ≤, a≤c is a consequence of that conjunction, so that the original expression is (by Theorem (3.60)) equivalent to a≤b ∧ b≤c ∧ a≤c.
6. Prove (∧i,j | 0≤i≤j≤n : g.i ≥ g.j) = (∧i,j | 0≤i<j≤n : g.i ≥ g.j)
Hint: Recall that ≥ is reflexive, which is to say that x ≥ x is true for all x.
7. Use (8.17) (the second Range Split axiom) to prove this classic theorem regarding sets:
Using the ∈ ("is member of") predicate, we can express |S| (the cardinality of S) by the quantification
Also, we observe the following relationships between set union and disjunction and between set intersection and conjunction:
x ∈ S ∩ T ≡ x ∈ S ∧ x ∈ T