The discussion below will look to put a proper Bayesian prior on the envelope values A and B.

We will show that when we have a proper prior, there is no infinite switching scenario, regardless of whether the first envelope is opened or not.
Let the envelope values be A and B. We need some prior distribution on the smaller value and the larger value. Without lack of generality, let's say that the smaller value min(A,B) has a uniform distribution between [0, 10,000]. Consequently, the larger value max(A,B) has the uniform distribution between [0, 20,000]. Their probability density functions are

p

_{min}( x ) = 1/10000 for x in [0, 10000],

p

_{min}( x ) = 0 otherwise

p

_{max}( x ) = 1/20000 for x in [0, 20000],

p

_{max}( x ) = 0 otherwise

So, let's look at the case where we open the first envelope and it is $1000. Given that A = 1000, we need to compute

P( A is smaller number | A = 1000) = p

_{min}( 1000 )/[ p

_{min}( 1000 ) + p

_{max}( 1000 ) ] = 2/3

P( A is bigger number | A = 1000) = p

_{max}( 1000 )/[ p

_{min}( 1000 ) + p

_{max}( 1000 ) ] = 1/3

This coincidentally is the same conclusion that plasmid came to in post #7. The expected value of envelope B is now (2000)*2/3 + (1/3)*(500) = 1500. So we should switch.

However, we see that there is no point to switching a second time. If we compute the expected value of envelope B given that A = 1000, we still see that E( B | A = 1000) = 1500.

What is happening here is that we are gaining some information from having seen the value of A. If A happened to be equal to 15,000, for instance, then from our prior we can calculate the following probabilities

P( A is smaller number | A = 15000) = p_{min}( 15000 )/[ p_{min}( 15000 ) + p_{max}( 15000 ) ] = 0

P( A is bigger number | A = 15000) = p_{max}( 15000 )/[ p_{min}( 15000 ) + p_{max}( 15000 ) ] = 1

In this case, if A = 15000, then A is 100% guaranteed to be the larger envelope. We should not switch.

So, let's consider the case where we don't see the value A or B. In that case, we will need to compute the integral of expected value for switching by integrating the equations above for A between [0, 20000]. If A falls within [0, 10000) then switching would on average gain money. However, if A falls within [10000, 20000], then switching would lose money. If we integrate over the entire range, we get expected value of 0 for switching. So that removes the infinite switching scenario.

Now, let me discuss the infinite switching paradox, which hinges on an improper prior distribution for A and B. That is, it assumes that A and B are uniformly distributed over the entire real line, and that leads to all sort of unintuitive trouble. I propose such a scenario is not possible, since the rich uncle can not possibly have unbounded money amounts in the two envelopes.