Proof: Maximum Index Example
Let's prove the following theorem:
index of the maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = 0
In this example, we prove that the maximum index of
[3,[2,[1,[]]]]
is 0.
First, we prove that the maximum value of
[3,[2,[1,[]]]]
is 3. Then we find the index of 3 in the same list. 3 is in index 0.
Proof:
# | Claim | Reason |
---|---|---|
1 | index of the maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = index of value (maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ]) in [ 3, [ 2, [ 1, [ ] ] ] ] | index of the maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = index of value (maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ]) in [ 3, [ 2, [ 1, [ ] ] ] ] |
2 | maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = 3 | maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = 3 |
3 | index of value (maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ]) in [ 3, [ 2, [ 1, [ ] ] ] ] = index of value 3 in [ 3, [ 2, [ 1, [ ] ] ] ] | if maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = 3, then index of value (maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ]) in [ 3, [ 2, [ 1, [ ] ] ] ] = index of value 3 in [ 3, [ 2, [ 1, [ ] ] ] ] |
4 | index of value 3 in [ 3, [ 2, [ 1, [ ] ] ] ] = 0 | index of value 3 in [ 3, [ 2, [ 1, [ ] ] ] ] = 0 |
5 | index of the maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = 0 | if index of the maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = index of value (maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ]) in [ 3, [ 2, [ 1, [ ] ] ] ] and index of value (maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ]) in [ 3, [ 2, [ 1, [ ] ] ] ] = index of value 3 in [ 3, [ 2, [ 1, [ ] ] ] ] and index of value 3 in [ 3, [ 2, [ 1, [ ] ] ] ] = 0, then index of the maximum value in stack [ 3, [ 2, [ 1, [ ] ] ] ] = 0 |
Comments
Please log in to add comments