Two Kinds of Certainty

A thought can feel completely certain and still turn out wrong. The feeling of knowing and the fact of knowing are not the same event, even though they arrive together often enough that most people never bother separating them. Two very different traditions built entire systems around prying them apart.
In classical India, the Nyāya school identified four distinct ways a thought could count as properly known rather than merely believed: direct perception, inference, comparison, and testimony from a reliable source. Each pramāṇa, as these knowledge sources were called, had its own conditions for reliability, and a thought that failed those conditions was labeled pramāṇa-ābhāsa, a pseudo-source, knowledge-shaped but not knowledge. Later Nyāya thinkers went further, arguing that the strongest thoughts were the ones where multiple pramāṇas converged on the same conclusion independently, a state called pramāṇa-samplava. A single source felt convincing. Several sources agreeing, arrived at by different routes, was something else.
In the Islamic philosophical tradition, centuries later and with no direct line back to Nyāya, al-Fārābī built a comparably strict system around a different target word: yaqīn, certainty. For al-Fārābī, ordinary knowledge, ʿilm, was not the finish line. His Book of Demonstration set out specific conditions a thought had to meet before it earned the stronger label of yaqīn: necessary, not merely probable; about something that could not possibly be otherwise, not about things that change. A belief could be true and still fail to be yaqīn, if it lacked the structure of a proper demonstration behind it.
Neither system was interested in sincerity. A thinker could feel entirely sure and still, by Nyāya's or al-Fārābī's standards, be holding a pseudo-source or a merely probable belief dressed up as certainty. Both traditions, independently, built the same underlying move: certainty was not a feeling to be reported, but a structure to be checked, with specific conditions that either held or did not.
Most thoughts never get checked that carefully. The feeling of being sure arrives, and the checking stops there, because checking takes more effort than feeling does. What Nyāya and al-Fārābī both suggest, from opposite ends of the old world, is that the gap between those two things, the feeling and the structure underneath it, is exactly where a mistaken thought usually hides.