Say I push the values 1,2,3,4 onto a stack. Then popping them, they will come back in the order 4,3,2,1. If I push the values 1,2,3,4 onto a queue then removing from a queue results in 1,2,3,4. However if I push them onto the queue in reverse order, 4,3,2,1, and then pop them from the queue they come out in the same order as a stack. So a queue with its inputs reversed looks a lot like a stack. Are there any formal methods for proving this?
How to prove that a stack is equivalent to a queue with reversed inputs
proof techniques