「山があると思えば山がある、山がないと思えば山はない」
Is it contrasted with the mountain that turns into being when you believe there is a mountain? Or is it contrasted with anything else that does exist? Is it really contrasted with anything at all?
「山があると思えば、山はある」
I have no idea why 「は」, instead of 「が」, is used in the second occurence of 「山があると思えば山(は/が)ある」 in excerpt 2.
In your examples, が can be replaced with は no problem. Just it will sound more generic and lose the realistic feeling が can create, but it will get a broad feel to it instead.
However, if you replace these は of each sentence with が, it will assume quite a different tone; it will sound very much like the mountain has actually disappeared or appeared!!
Do you see, in each sentence, は is the one that is indicating the subject of the whole sentence while が is marking the subject in the modifying clause?
Both は and が have the role of indicating the theme/topic/subject of the predicate, but in Japanese, as you might already know, they are not necessarily the action maker. The difference between them is that は is good for a general idea while が is good at introducing a happening.
There's several subject markers (係助詞{かかりじょし}) in Japanese, but for us native speakers, は is the most prominent of them. On the other hand, が is defined as the case marker (格助詞{かくじょし}). So to speak, は is bigger than が.
As user4092 says, が introduces the second theme because it's good at working in a subordinate clause. I can't generalize anything here, but I think we can, most of the time, add something with は such as 今回は, or 今日は or そこには etc. when we have a sentence which starts with XXが.