Ex 20 is God speaking the TEN - and He points the listener directly at Gen 2:1-3 for the origin of the Sabbath day - set aside and made holy, which fully obligates mankind by that fact alone according to Ex 20.
We agree that in Exodus 20 God is speaking the ten commandments.
We do not agree that he is quoting Genesis 2:1-3.
Exodus 20:11 For
in six days the Lord made the heavens and the earth, the sea, and all that
is in them, and rested the seventh day. Therefore the Lord blessed the Sabbath day and hallowed it.
The first clause relates the historic reality of God's resting on the seventh day.
The second clause notes that this is the rationale for blessing the Sabbath day, and hallowing it.
However, you are assuming Genesis was written at the time that God spoke from the mountain. And that is unlikely.
Genesis and Exodus form a single narrative, with the end of Genesis going right into the beginning of Exodus, as can be seen below:
Genesis 50:22 So Joseph dwelt in Egypt, he and his father’s household. And Joseph lived one hundred and ten years. 23 Joseph saw Ephraim’s children to the third
generation. The children of Machir, the son of Manasseh, were also brought up on Joseph’s knees.
24 And Joseph said to his brethren, “I am dying; but God will surely visit you, and bring you out of this land to the land of which He swore to Abraham, to Isaac, and to Jacob.” 25 Then Joseph took an oath from the children of Israel, saying, “God will surely [
e]visit you, and you shall carry up my bones from here.” 26 So Joseph died,
being one hundred and ten years old; and they embalmed him, and he was put in a coffin in Egypt.
Exodus 1:1 Now these
are the names of the children of Israel who came to Egypt; each man and his household came with Jacob: 2 Reuben, Simeon, Levi, and Judah; 3 Issachar, Zebulun, and Benjamin; 4 Dan, Naphtali, Gad, and Asher. 5 All those [
a]who were descendants of Jacob were seventy[
b] persons (for Joseph was in Egypt
already). 6 And Joseph died, all his brothers, and all that generation. 7 But the children of Israel were fruitful and increased abundantly, multiplied and [
c]grew exceedingly mighty; and the land was filled with them. 8 Now there arose a new king over Egypt, who did not know Joseph.
Given that Moses recorded what God said at the mountain in the history, the history was likely written after that incident.
And this matters considerably because Moses is writing the whole history from the perspective of the Israelites, looking back, and often, adding explanatory notes that are at times outside the part of the historical narrative where they appear.
So for instance, in recounting the fall Moses jumps ahead in the story and explained why Eve was given that name:
16 To the woman He said:
“I will greatly multiply your sorrow and your conception;
In pain you shall bring forth children;
Your desire
shall be [
e]for your husband,
And he shall rule over you.”
17 Then to Adam He said, “Because you have heeded the voice of your wife, and have eaten from the tree of which I commanded you, saying, ‘You shall not eat of it’:
“Cursed
is the ground for your sake;
In toil you shall eat
of it
All the days of your life.
18 Both thorns and thistles it shall [
f]bring forth for you,
And you shall eat the herb of the field.
19 In the sweat of your face you shall eat bread
Till you return to the ground,
For out of it you were taken;
For dust you
are,
And to dust you shall return.”
20 And Adam called his wife’s name Eve, because she was the mother of all living.
21 Also for Adam and his wife the Lord God made tunics of skin, and clothed them.
22 Then the Lord God said, “Behold, the man has become like one of Us, to know good and evil. And now, lest he put out his hand and take also of the tree of life, and eat, and live forever”— 23 therefore the Lord God sent him out of the garden of Eden to till the ground from which he was taken. 24 So He drove out the man; and He placed cherubim at the east of the garden of Eden, and a flaming sword which turned every way, to guard the way to the tree of life.
In the middle of the narrative of the fall it is stated that Adam named the woman Eve because she was the mother of all the living. But she did not become the mother of all the living until later, recorded in chapter four, so this is an explanatory note placed in the narrative, likely due to reference to pain in child birth in the curses.
In Genesis 14 in relating an historical narrative reference is made to as far as "Dan" which would would make sense to the tribes of Israel as the land inherited by the tribe of Dan, which is spelled out in Moses' time and realized after, but would not make sense at the time of the narrative itself.
In the account of resting in Genesis we see that God ceased His creative work, resting on the 7th day.
2 And on the seventh day God ended His work which He had done, and He rested on the seventh day from all His work which He had done.
Then we see God blessed the seventh day and sanctified it, with the rationale that it was because He had rested in it.
3 Then God blessed the seventh day and sanctified it, because in it He rested from all His work which God had created and made.
The blessing is subsequent to the resting, and the resting forms the rationale. But this is all from the perspective of Moses looking back. The first mention of a Sabbath command is in Exodus 16, and it is explained as a new concept, in relation to the manna.
Now you indicate that there is no command regarding taking the Lord's name in vain prior, and on this we agree. However, there is no confusion as to the concept, as there is with the Sabbath, as introduced in the incident with the manna.
God states the Sabbath as a sign given to Israel:
2 And the Lord spoke to Moses, saying, 13 “Speak also to the children of Israel, saying: ‘Surely My Sabbaths you shall keep,
for it is a sign between Me and you throughout your generations, that
you may know that I
am the Lord who sanctifies you. 14 You shall keep the Sabbath, therefore, for
it is holy to you. Everyone who profanes it shall surely be put to death; for whoever does
any work on it, that person shall be cut off from among his people. 15 Work shall be done for six days, but the seventh
is the Sabbath of rest, holy to the Lord. Whoever does
any work on the Sabbath day, he shall surely be put to death. 16 2 And the Lord spoke to Moses, saying, 13 “Speak also to the children of Israel, saying: ‘Surely My Sabbaths you shall keep, for it
is a sign between Me and you throughout your generations, that
you may know that I
am the Lord who sanctifies[
b] you. 14 You shall keep the Sabbath, therefore, for
it is holy to you. Everyone who [
c]profanes it shall surely be put to death; for whoever does
any work on it, that person shall be cut off from among his people. 15 Work shall be done for six days, but the seventh
is the Sabbath of rest, holy to the Lord. Whoever does
any work on the Sabbath day, he shall surely be put to death. 16 Therefore the children of Israel shall keep the Sabbath, to observe the Sabbath throughout their generations
as a perpetual covenant. 17 It
is a sign between Me and the children of Israel forever; for
in six days the Lord made the heavens and the earth, and on the seventh day He rested and was refreshed.’ ”2 And the Lord spoke to Moses, saying, 13 “Speak also to the children of Israel, saying: ‘Surely My Sabbaths you shall keep, for it
is a sign between Me and you throughout your generations, that
you may know that I
am the Lord who sanctifies[
b] you. 14 You shall keep the Sabbath, therefore, for
it is holy to you. Everyone who [
c]profanes it shall surely be put to death; for whoever does
any work on it, that person shall be cut off from among his people. 15 Work shall be done for six days, but the seventh
is the Sabbath of rest, holy to the Lord. Whoever does
any work on the Sabbath day, he shall surely be put to death.
16 Therefore the children of Israel shall keep the Sabbath, to observe the Sabbath throughout their generations as a perpetual covenant. 17 It is a sign between Me and the children of Israel forever; for in six days the Lord made the heavens and the earth, and on the seventh day He rested and was refreshed.’ ”
Here it is stated that the sabbath is a sign, and a covenant between God and Israel, and the rationale is stated to be God's rest at creation.
Moreover in Ezekiel God distinguishes between the commandments by which one lives if he does them and the Sabbath, which He again says was given as a sign to Israel:
Ezekiel 20:5 “Say to them, ‘Thus says the Lord God: “On the day
when I chose Israel and raised My hand in an oath to the descendants of the house of Jacob, and made Myself known to them in the land of Egypt, I raised My hand in an oath to them, saying, ‘I
am the Lord your God.’ 6 On that day I raised My hand in an oath to them, to bring them out of the land of Egypt into a land that I had searched out for them, ‘flowing with milk and honey,’ the glory of all lands. 7 Then I said to them, ‘Each of you, throw away the abominations which are before his eyes, and do not defile yourselves with the idols of Egypt. I
am the Lord your God.’ 8 But they rebelled against Me and would not [
a]obey Me. They did not all cast away the abominations which were before their eyes, nor did they forsake the idols of Egypt. Then I said, ‘I will pour out My fury on them and fulfill My anger against them in the midst of the land of Egypt.’ 9 But I acted for My name’s sake, that it should not be profaned before the Gentiles among whom they
were, in whose sight I had made Myself known to them, to bring them out of the land of Egypt.
10 “Therefore I made them go out of the land of Egypt and brought them into the wilderness.
11 And I gave them My statutes and showed them My judgments, ‘which, if a man does, he shall live by them.’ 12 Moreover I also gave them My Sabbaths, to be a sign between them and Me, that they might know that I am the Lord who sanctifies them. 13 Yet the house of Israel rebelled against Me in the wilderness; they did not walk in My statutes; they despised My judgments, ‘which,
if a man does, he shall live by them’; and they greatly defiled My Sabbaths.
The Sabbath was a sign of Israel, in addition to the commandments that if a man does them he shall live.