Originally Posted by Bhagi Katbamna
There is a very interesting incident described in Indian philosophy. A king(his name was Janak) dreamt that he was a begger. He asked the philosophers of his country what the truth was but was unable to get a satisfactory answer. Then one ascetic(his name was Ashtavakra) told him that both were not real. Only that one unreality was shorter than the other. He was not the body but the immortal soul.
I have read a lot about the life of Janak and Ashtavakra. In fact, one of my fave books is the Ashtavakra Gita (which is available online, its a short set of verses).
At a later stage Janak did give up his kingdom and wander for many years. Then he was made king of another country. Finally, he came back and became king of his country again. My memory of the story is not clear but he did wander and become king again.
The most famous story is of Ashtavakra entering the King's court, all his spiritual advisors and gurus had failed to answer the kings question about attaining enlightenment. Ashtavakra enters and everyone laughs at him since he is deformed ("bent in eight places" is what his name means). He calls all these learned men "leather workers" (a derogatory term). When asked to explain he answers that they assess him by his exterior only.
The king is a mature soul and can see Ashtavakra's attainment. He becomes A's disciple and attains enlightenment after which he leaves his kingdom and wanders for many years.
The story has many variations. In some Ashta comes to Janak for enlightenment. But either way, the AG is a beautiful book written in simple Sanskrit and is dated to the early Vedic age based on the style of Sanskrit.
This issue of the reality of the world is discussed here (and of course in most of our ancient texts).
In the AG, Ashta gives Janak some teachings. It seems Janaka experiences Satori and talks like an enlightened person in Ch2. Ashta realizes that Janak is only having an experience and continues guiding him. At the end, Janaka is liberated.