Examples of Logic Exercises

Write the following claims about the array `A[1 … n]`.

The first, second, and last element (exist and) are different from each other.
or

It is a palindrome (the same from right to left as from left to right).
or

Its smallest element (exists and) is unique.
or

Fix the following solution to the previous problem with as small changes as you can.
or

Write as simple a predicate as you can that says the same as `AA h; 1 <= h <= n: EE k; h <= k <= n: A[k] > A[h]`.
or

Farewell to arrays, now we study mathematical induction. We try to prove that if `x in RR ^^ x ≥ -1 ^^ n in ZZ ^^ n ≥ 1`, then `(1+x)^n >= 1 + n x`.

Write the base case.
`>=` or

The induction assumption is `(1+x)^n >= 1 + n x`. What do we have to prove?
`>=` or