EXTRA · Parshas Vayeishev · Passuk 39:20 · not a Torah Temimah citation on this passuk
So Yosef’s master had him put in prison, where the king’s prisoners were confined. But even while he was there in prison,
Classical source (EXTRA side-ring): Bereshis Rabbah 87:10.
Sefaria — Bereshis Rabbah 87:10
English: “And he put him into the prison” — R’ Abbahu said: I only have [Hashem’s presence] in prosperity; from where even in distress? The verse says: And Hashem was with Yosef.
Category D — Conceptual / theological inference.
Method — Rabbi Abbahu derives that Hashem remains with a person even in distress, not only in prosperity. Yosef’s imprisonment therefore becomes proof that Divine presence continues in suffering.
Textual trigger — “Va-yitenhu el beit ha-sohar” in Bereishis 39:20, read with “va-yehi Hashem et Yosef” earlier in the same chapter; the Midrash asks how Hashem’s presence is known even in distress.
Hashem’s being “with Yosef” is demonstrated as much in the dungeon as in Potiphar’s house.