Proof: Minimum Example

Let's prove the following theorem:

minimum value of stack [ 3, [ 2, [ 1, [ ] ] ] ] = 1

In this example, we prove that the minimum value of [3, [2, [1, []]]] is 1. We start with just the innermost element, which is 1. We know that the minimum of [1, []] is 1.

Next, we know that 2 is greater than the minimum of [1, []] since the minimum of [1, []] is 1 and 2 > 1. Then we conclude that the minimum of [2, [1, []]] is 1.

Using the same reasoning as above, we conclude that the minimum of [3, [2, [1, []]]] is 1.

Proof:

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

Proof Table
# Claim Reason
1 minimum value of stack [ 1, [ ] ] = 1 minimum value of stack [ 1, [ ] ] = 1
2 2 > 1 2 > 1
3 2 > minimum value of stack [ 1, [ ] ] = 2 > 1 if minimum value of stack [ 1, [ ] ] = 1, then 2 > minimum value of stack [ 1, [ ] ] = 2 > 1
4 2 > minimum value of stack [ 1, [ ] ] if 2 > 1 and 2 > minimum value of stack [ 1, [ ] ] = 2 > 1, then 2 > minimum value of stack [ 1, [ ] ]
5 minimum value of stack [ 2, [ 1, [ ] ] ] = minimum value of stack [ 1, [ ] ] if 2 > minimum value of stack [ 1, [ ] ], then minimum value of stack [ 2, [ 1, [ ] ] ] = minimum value of stack [ 1, [ ] ]
6 minimum value of stack [ 2, [ 1, [ ] ] ] = 1 if minimum value of stack [ 2, [ 1, [ ] ] ] = minimum value of stack [ 1, [ ] ] and minimum value of stack [ 1, [ ] ] = 1, then minimum value of stack [ 2, [ 1, [ ] ] ] = 1
7 3 > 1 3 > 1
8 3 > minimum value of stack [ 2, [ 1, [ ] ] ] = 3 > 1 if minimum value of stack [ 2, [ 1, [ ] ] ] = 1, then 3 > minimum value of stack [ 2, [ 1, [ ] ] ] = 3 > 1
9 3 > minimum value of stack [ 2, [ 1, [ ] ] ] if 3 > 1 and 3 > minimum value of stack [ 2, [ 1, [ ] ] ] = 3 > 1, then 3 > minimum value of stack [ 2, [ 1, [ ] ] ]
10 minimum value of stack [ 3, [ 2, [ 1, [ ] ] ] ] = minimum value of stack [ 2, [ 1, [ ] ] ] if 3 > minimum value of stack [ 2, [ 1, [ ] ] ], then minimum value of stack [ 3, [ 2, [ 1, [ ] ] ] ] = minimum value of stack [ 2, [ 1, [ ] ] ]
11 minimum value of stack [ 3, [ 2, [ 1, [ ] ] ] ] = 1 if minimum value of stack [ 3, [ 2, [ 1, [ ] ] ] ] = minimum value of stack [ 2, [ 1, [ ] ] ] and minimum value of stack [ 2, [ 1, [ ] ] ] = 1, then minimum value of stack [ 3, [ 2, [ 1, [ ] ] ] ] = 1

Comments

Please log in to add comments