Is it lying if you said something, discovered that it was wrong, then took it back? Is it still a sin?
By definition, lying involves intentional deceit. The Catechism of the Catholic Church defines a lie as follows: “A lie consists in speaking a falsehood with the intention of deceiving” (CCC 2482) and “To lie is to speak or act against the truth in order to lead someone into error” (CCC 2483).
Since you thought you were speaking the truth and then, after discovering your error, you corrected yourself, you are not guilty of lying. There is no sin in this.