Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:16:39

˹It is˺ so He will make clear to them ˹the truth of˺ that wherein they differ and so those who have disbelieved may know that they were liars.  

That He may make clear to them (li-yubayyina is semantically connected to an implied yab‘athuhum, ‘He will resurrect them’) what they differ, with believers, in, of matters of religion, by punishing them and rewarding the believers, and that the disbelievers may know that they were liars, when they denied the Resurrection.
القرآن:١٦:٣٩

لِيُبَيِّنَ لَهُمُ الَّذِي يَخْتَلِفُونَ فِيهِ وَلِيَعْلَمَ الَّذِينَ كَفَرُوا أَنَّهُمْ كَانُوا كَاذِبِينَ  

{ليبين} متعلق ببعثهم المقدر {لهم الذي يختلفون} مع المؤمنين {فيه} من أمر الدين بتعذيبهم وإثابة المؤمنين {وليعلم الذين كفروا أنهم كانوا كاذبين} في إنكار البعث.