In this example, we prove that the element at index 2 of list [10, [12, [14,[]]]] is 14.

At each step, we pop an element from the front of the list and at the same time, decrease the index by 1. When the index reaches 0, we have found our element.

For instance, the following:

the element at index 2 of stack [ 10, [ 12, [ 14, [ ] ] ] ]

is equal to:

the element at index 1 of stack [ 12, [ 14, [ ] ] ]

which is equal to:

the element at index 0 of stack [ 14, [ ] ]

which is finally equal to 14

Quiz (1 point)

Prove that:
the element at index 2 of stack [ 10, [ 12, [ 14, [ ] ] ] ] = 14

The following properties may be helpful:

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.

Step Claim Reason (optional) Error Message (if any)
1
2
3
4
5
6
7
8
9
10

Become a subscriber to save your progress, see the correct answer, and more!