Proof: Maximum Index One Element Example
Let's prove the following theorem:
index of the maximum value in stack [ x, [ ] ] = 0
Proof:
# | Claim | Reason |
---|---|---|
1 | index of the maximum value in stack [ x, [ ] ] = index of value (maximum value in stack [ x, [ ] ]) in [ x, [ ] ] | index of the maximum value in stack [ x, [ ] ] = index of value (maximum value in stack [ x, [ ] ]) in [ x, [ ] ] |
2 | maximum value in stack [ x, [ ] ] = x | maximum value in stack [ x, [ ] ] = x |
3 | index of value (maximum value in stack [ x, [ ] ]) in [ x, [ ] ] = index of value x in [ x, [ ] ] | if maximum value in stack [ x, [ ] ] = x, then index of value (maximum value in stack [ x, [ ] ]) in [ x, [ ] ] = index of value x in [ x, [ ] ] |
4 | index of value x in [ x, [ ] ] = 0 | index of value x in [ x, [ ] ] = 0 |
5 | index of the maximum value in stack [ x, [ ] ] = 0 | if index of the maximum value in stack [ x, [ ] ] = index of value (maximum value in stack [ x, [ ] ]) in [ x, [ ] ] and index of value (maximum value in stack [ x, [ ] ]) in [ x, [ ] ] = index of value x in [ x, [ ] ] and index of value x in [ x, [ ] ] = 0, then index of the maximum value in stack [ x, [ ] ] = 0 |
Comments
Please log in to add comments