In this example, we prove that if we pop the following list
[3, [2, [1, []]]]
At index 2, the resulting list is
[3, [2, []]]
We use the "Begin Pop At Index Property" to set things up then rely on "Pop At Index Induction Example" to do most of the actual proof.
Quiz (1 point)
Prove that:
remaining elements after [ 3, [ 2, [ 1, [ ] ] ] ] is popped at index 2 = [ 3, [ 2, [ ] ] ]
The following properties may be helpful:
- remaining elements after xs is popped at index idx = remaining elements after xs is popped at index idx and visited stack is [ ]
- remaining elements after [ 3, [ 2, [ 1, [ ] ] ] ] is popped at index 2 and visited stack is [ ] = [ 3, [ 2, [ ] ] ]
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.