What is the definition of a lie? Here is one take on it from the Oxford American dictionary:
lie 2 |lʌɪ|
noun
an intentionally false statement
Lets think about that. The key words are intentional and false. That means you are lying if you deliberately tell a false statement, full knowing it is untrue. The converse of this is that it is NOT considered lying of you tell a false statement about something you believe at the time to be true. An example would clarify this:
It is 17:00. You do not want to eat that chocolate lying on the table. Your friend asks you whether you are going to eat that chocolate. You tell your friend, no, I am not going to eat that chocolate. But at 18:00 your hunger gets the best of you and you do take a bite. Did you lie? No. At the time you told your friend that you would not eat it, you were honest as that reflected your intentions. However, if you knew you would falter and eat the chocolate, then it would be considered lying as you deliberately made a false statement.
Another definition taken from the Cambridge dictionary:
lie verb (SPEAK FALSELY) /laɪ/
[I] (lying, lied, lied) to say or write something which is not true in order to deceive someone
Once again, the intent is about deceit. If that was not your intention, to be deceitful or deliberate, then in my mind it is not lying.