Is it brought down anywhere, something to the effect that if one realizes he was incorrect in a matter (can be a Torah-related matter, or a secular matter), he must retract his statement?

Preferably, I am looking for a source in *Tanach*, *Mishna*, or *Gemara*.