Ecclesiastes 9:5-10 (ESV):
5 For the living know that they will die, but the dead know nothing, and they have no more reward, for the memory of them is forgotten. 6 Their love and their hate and their envy have already perished, and forever they have no more share in all that is done under the sun.
7 Go, eat your bread with joy, and drink your wine with a merry heart, for God has already approved what you do.
8 Let your garments be always white. Let not oil be lacking on your head.
9 Enjoy life with the wife whom you love, all the days of your vain life that he has given you under the sun, because that is your portion in life and in your toil at which you toil under the sun. 10 Whatever your hand finds to do, do it with your might, for there is no work or thought or knowledge or wisdom in Sheol, to which you are going.
1 Samuel 28 (ESV):
3 Now Samuel had died, and all Israel had mourned for him and buried him in Ramah, his own city. And Saul had put the mediums and the necromancers out of the land.
11 Then the woman said, “Whom shall I bring up for you?” He said, “Bring up Samuel for me.” 12 When the woman saw Samuel, she cried out with a loud voice. And the woman said to Saul, “Why have you deceived me? You are Saul.”
14 He said to her, “What is his appearance?” And she said, “An old man is coming up, and he is wrapped in a robe.” And Saul knew that it was Samuel, and he bowed with his face to the ground and paid homage.
15 Then Samuel said to Saul, “Why have you disturbed me by bringing me up?” Saul answered, “I am in great distress, for the Philistines are warring against me, and God has turned away from me and answers me no more, either by prophets or by dreams. Therefore I have summoned you to tell me what I shall do.” 16 And Samuel said, “Why then do you ask me, since the Lord has turned from you and become your enemy?
20 Then Saul fell at once full length on the ground, filled with fear because of the words of Samuel. And there was no strength in him, for he had eaten nothing all day and all night.
The Logical Contradiction
P1: The dead cannot think, work, know things and have wisdom (from Ecclesiastes 9:5-10)
P2: Samuel was dead (from 1 Samuel 28:3)
C1: Samuel couldn't think, work, know things and have wisdom (from P1, P2)
P3: Samuel spoke (from 1 Samuel 28:15,16,20)
P4: Samuel was a being (a reasonable assumption, right?)
P5: If a being speaks, then that being can think and know things (from common sense)
C2: Samuel could think and know things (from P3, P4, P5)
Contradiction/Paradox: Samuel could think and know things (from C2) AND couldn't think and know things (from C1) at the same time.
In colloquial terms
If the dead cannot think and know things (from Ecclesiastes 9), then how come Samuel was dead and still could think and know things (as evidenced by his ability to speak, from 1 Samuel 28)?
Credits to the related question Is there a contradiction between Ecclesiastes 9:5 & Luke 16:19-31? for the inspiration.
The format of the question (with explicit premises and deduction steps) was adapted from my previous question A living soul cannot exist without a body (Gen 2:7; 1 Cor 15:44-45) but killing the body doesn't kill the soul (Matt 10:28). Is this a contradiction?