Proof: Sort Two

Let's prove the following theorem:

result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ]

Proof:

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

Proof Table
# Claim Reason
1 result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ] = result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ] = result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ]
2 minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ 0, [ ] ] minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ 0, [ ] ]
3 [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = [ [ 0, [ ] ], [ ] ] if minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ 0, [ ] ], then [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = [ [ 0, [ ] ], [ ] ]
4 index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ 1, [ ] ] index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ 1, [ ] ]
5 remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]) = remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index [ 1, [ ] ] if index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ 1, [ ] ], then remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]) = remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index [ 1, [ ] ]
6 remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index [ 1, [ ] ] = [ [ 1, [ ] ], [ ] ] remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index [ 1, [ ] ] = [ [ 1, [ ] ], [ ] ]
7 remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]) = [ [ 1, [ ] ], [ ] ] if remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]) = remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index [ 1, [ ] ] and remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index [ 1, [ ] ] = [ [ 1, [ ] ], [ ] ], then remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]) = [ [ 1, [ ] ], [ ] ]
8 result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] if remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]) = [ [ 1, [ ] ], [ ] ], then result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ]
9 result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] if [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = [ [ 0, [ ] ], [ ] ], then result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ]
10 result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] if result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] and result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ], then result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ]
11 result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] = result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] = result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ]
12 index of the mininum value in stack [ [ 1, [ ] ], [ ] ] = [ 0, [ ] ] index of the mininum value in stack [ [ 1, [ ] ], [ ] ] = [ 0, [ ] ]
13 remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ]) = remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index [ 0, [ ] ] if index of the mininum value in stack [ [ 1, [ ] ], [ ] ] = [ 0, [ ] ], then remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ]) = remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index [ 0, [ ] ]
14 remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index [ 0, [ ] ] = [ ] remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index [ 0, [ ] ] = [ ]
15 remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ]) = [ ] if remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ]) = remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index [ 0, [ ] ] and remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index [ 0, [ ] ] = [ ], then remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ]) = [ ]
16 result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] if remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ]) = [ ], then result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ]
17 minimum value of stack [ [ 1, [ ] ], [ ] ] = [ 1, [ ] ] minimum value of stack [ [ 1, [ ] ], [ ] ] = [ 1, [ ] ]
18 [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if minimum value of stack [ [ 1, [ ] ], [ ] ] = [ 1, [ ] ], then [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
19 result of sorting [ ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then result of sorting [ ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
20 result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] and result of sorting [ ] with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
21 result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
22 result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] and result of sorting [ ] with sorted stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
23 result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] = result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] and result of sorting (remaining elements after [ [ 1, [ ] ], [ ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
24 result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] and result of sorting [ [ 1, [ ] ], [ ] ] with sorted stack [ [ 0, [ ] ], [ ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
25 result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ] = result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] and result of sorting (remaining elements after [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] is popped at index (index of the mininum value in stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ])) with sorted stack [ minimum value of stack [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], [ ] ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
26 result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ])
27 reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) = reverse of [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] if result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ] = [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ], then reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) = reverse of [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ]
28 reverse of [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ] reverse of [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ]
29 reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ] if reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) = reverse of [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] and reverse of [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ], then reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ]
30 result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ] if result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) and reverse of (result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] with sorted stack [ ]) = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ], then result of sorting [ [ 1, [ ] ], [ [ 0, [ ] ], [ ] ] ] = [ [ 0, [ ] ], [ [ 1, [ ] ], [ ] ] ]

Comments

Please log in to add comments