Hashem said:
וּמֵעֵ֗ץ
הַדַּ֙עַת֙ ט֣וֹב וָרָ֔ע
לֹ֥א תֹאכַ֖ל מִמֶּ֑נּוּ
כִּ֗י
בְּי֛וֹם
אֲכׇלְךָ֥ מִמֶּ֖נּוּ
מ֥וֹת תָּמֽוּת
Translation (according to the traditional nikud and cantillation):
And from the tree
of knowledge good and bad
you shall eat not from him
because/maybe/but
in a day
your eating is from him
die you will die
(Gen 2:17)
The woman said:
וּמִפְּרִ֣י הָעֵץ֮ אֲשֶׁ֣ר בְּתוֹךְ־הַגָּן֒
אָמַ֣ר אֱלֹהִ֗ים
לֹ֤א תֹֽאכְלוּ֙ מִמֶּ֔נּוּ
וְלֹ֥א תִגְּע֖וּ בּ֑וֹ
פֶּן־תְּמֻתֽוּן
Translation:
And from fruit of the tree which is inside the garden
Said Elohim
You shall eat not from him
And you shall touch not in him
lest you will die
(Gen. 3:3)
The serpent said:
לֹֽא־מ֖וֹת
תְּמֻתֽוּן
Translation:
No, die
You will die
(Gen. 3:4)
Here is my understanding:
Hashem commanded the man not to eat from the tree, and he attached a warning to the command. However, the warning is ambiguous as to whether it refers to a consequence that will inevitably result from eating the tree, i.e. a result already set into the order of nature, or whether it is simply Hashem saying I will make the choice to strike you down in punishment if you do this. The ambiguity arises because of the fluidity of the word כי.
An additional ambiguity arises in that Hashem does not say in the day you eat you will die, but in a day. If he was warning about a natural consequence, perhaps he meant you may not die at first, but it will draw you in and one day it will kill you. If he meant a penalty, perhaps he was not limiting himself to the man's measure of days -- which may be what Chazal are relying on when they say he was talking in God-days in which one day is a thousand years (see Ps. 90:4). It is also possible for the first interpretation to work according to this possibility too.
The woman restated God's words as "lest you die," implying she held the interpretation that the warning was about an inevitable natural consequence. The serpent answered with a direct quote from God, adding the word the woman had left out and replaced with "lest": "die you will die." This doubling of language is common in discussions of penalties (see e.g. Lev. 20). The snake is trying to impress upon the woman that God is not warning you about some law of nature, he is telling you he will punish you. In fact, the snake goes on, he is only being strict about this because he is afraid you will become smart like him.
The Torah never says the snake lied, and strictly speaking he didn't. The snake simply played on the woman's weakness. He corrected her, and used the credibility he gained to lead her into temptation.
Nor did Hashem lie or say anything untrue, as the ambiguities outlined above show.