In this example, we prove that the minimum value of [3, [2, [1, []]]] is 1. We start with just the innermost element, which is 1. We know that the minimum of [1, []] is 1.
Next, we know that 2 is greater than the minimum of [1, []] since the minimum of [1, []] is 1 and 2 > 1. Then we conclude that the minimum of [2, [1, []]] is 1.
Using the same reasoning as above, we conclude that the minimum of [3, [2, [1, []]]] is 1.
Quiz (1 point)
- minimum value of stack [ x, [ ] ] = x
- 2 > 1
- 3 > 1
if minimum value of stack [ 1, [ ] ] = 1, then 2 > minimum value of stack [ 1, [ ] ] = 2 > 1
if the following are true:
- a
- b = a
then b
if a > minimum value of stack xs, then minimum value of stack [ a, xs ] = minimum value of stack xs
if the following are true:
- a = b
- b = c
then a = c
if minimum value of stack [ 2, [ 1, [ ] ] ] = 1, then 3 > minimum value of stack [ 2, [ 1, [ ] ] ] = 3 > 1
if the following are true:
- a
- b = a
then b
if a > minimum value of stack xs, then minimum value of stack [ a, xs ] = minimum value of stack xs
if the following are true:
- a = b
- b = c
then a = c
Please write your proof in the table below. Each row should contain one claim. The last claim is the statement that you are trying to prove.