Proof: Reverse Two

Let's prove the following theorem:

reverse of [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] = [ [ y, [ ] ], [ [ x, [ ] ], [ ] ] ]

Proof:

View as a tree | View dependent proofs | Try proving it

Proof Table
# Claim Reason
1 reverse of remaining stack [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] and already reversed stack [ ] = [ [ y, [ ] ], [ [ x, [ ] ], [ ] ] ] reverse of remaining stack [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] and already reversed stack [ ] = [ [ y, [ ] ], [ [ x, [ ] ], [ ] ] ]
2 reverse of [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] = reverse of remaining stack [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] and already reversed stack [ ] reverse of [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] = reverse of remaining stack [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] and already reversed stack [ ]
3 reverse of [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] = [ [ y, [ ] ], [ [ x, [ ] ], [ ] ] ] if reverse of [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] = reverse of remaining stack [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] and already reversed stack [ ] and reverse of remaining stack [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] and already reversed stack [ ] = [ [ y, [ ] ], [ [ x, [ ] ], [ ] ] ], then reverse of [ [ x, [ ] ], [ [ y, [ ] ], [ ] ] ] = [ [ y, [ ] ], [ [ x, [ ] ], [ ] ] ]
Previous Lesson Next Lesson

Comments

Please log in to add comments