Quiz (1 point)
Prove that:
remaining elements after [ x, [ y, [ ] ] ] is popped at index [ 1, [ ] ] = [ x, [ ] ]
The following properties may be helpful:
- remaining elements after [ x, [ y, [ ] ] ] is popped at index [ 1, [ ] ] and visited stack is [ ] = [ x, [ ] ]
- remaining elements after xs is popped at index index = reverse of (remaining elements after xs is popped at index index and visited stack is [ ])
- reverse of [ x, [ ] ] = [ x, [ ] ]
if remaining elements after [ x, [ y, [ ] ] ] is popped at index [ 1, [ ] ] and visited stack is [ ] = [ x, [ ] ], then reverse of (remaining elements after [ x, [ y, [ ] ] ] is popped at index [ 1, [ ] ] and visited stack is [ ]) = reverse of [ x, [ ] ]
if the following are true:
- a = b
- b = c
then a = c
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.