Raja Janak saw himself as a beggar in a dream. When he woke up, for sometime he couldn't decide if he was a king who dreamt of being a beggar OR a beggar who is dreaming of being a king. That's when his enquiry into the Truth began and he attained realization. The realization was: "Neither this, nor that was True". Neither he was a beggar and nor was he a king.
I was reading Upadesa Sahasari by Sankaracharya. Most of it is above me. However, one of his argument that could penetrate through the thick layers of my mind runs as follows:
Your body and modifications of the mind are objects of your knowledge and not you yourself. You are the knower, a silent witness. The act of knowing creates a distance between the knower and the object of knowledge. If we talk about the knower knowing the knower himself, we make the knower an object of knowledge and separate him from the knower himself. This can go on ad infinitum till we conclude that anything the knower can know is not the knower. Hence we are not body or mental modifications as we can know them.
Was Raja Janak the king who dreamt of being a beggar or a beggar who was dreaming of being a king? Or he was the silent knower of these modifications of the mind?