Psalm 139:1-2 "O LORD, thou hast searched me, and known me. Thou knowest my downsitting and mine uprising, thou understandest my thought afar off. "
Genesis 22:12 "And he said, Lay not thine hand upon the lad, neither do thou any thing unto him: for now I know that thou fearest God, "
Deuteronomy 8:2 "And thou shalt remember all the way which the LORD thy God led thee these forty years in the wilderness, to humble thee, and to prove thee, to know what was in thine heart, whether thou wouldest keep his commandments, or no. "
From Psalm 139 it seems clear that God does know what is in the heart of a man, as He knows even the thoughts from afar off. But then, the other two verses appear to be saying that God does not know what is in the heart of man unless man by means of some action "reveals" the thoughts of his heart. Are these passages therefore contradictory, or is there another solution to solve this apparent contradiction?
The problem arises when we understand the passages about God testing or proving man in order to know what is in man's heart as indicating that God would be ignorant without first conducting such a test and the question is, is such an understanding the only plausible or possible one? Or is there a different way of understanding these passages so they would be in harmony with the declaration in Psalm 139 (and also in Acts 1:24: "And they prayed, and said, Thou, Lord, which knowest the hearts of all men, show whether of these two thou hast chosen")?
It is very plausible that God in these instances is using a certain action to simply reveal and affirm to man
what He Himself already knows ahead of time. We at times may perhaps use such an approach in teaching situations as
well, when we as teacher put ourselves in the position of the students and proceed sort of from their perspective:
"I'll now do such and such, and then I will see what happens
" Well, I know what is going to happen, but the
students do not know! After the experiment I could even conclude, "Well, now we know that such and such comes to pass
" when in reality I knew long ago what would happen. The students more vividly now know, but I knew already
Relating this back to the example in Gen 22:12 with Abraham, it is that now Abraham really knew that God knew his heart and that God's knowledge was true in light of the 'test' which he, Abraham, had just passed.
In these verses which appear to indicate that God does not quite know unless He takes some steps to investigate, we can see how the critics make the mistake of assuming ignorance on God's part just because He doesn't just "dictate" (as He should, according to their idea). But, this assumption is unwarranted and obviously wrong, for God even though He is omniscient, does not have to dictate but can also go about things in a manner which relate even better to man.
The apparent contradiction comes about because of certain assumptions when reading the texts, but they are easily solved when one comes to the text without such assumptions.