How did Noah know that there was such a thing a *clean animals* versus *unclean animals* if God had not already revealed these things to those who preceded Noah? And what was the purpose of clean animals other than to offer sacrifices to God?
Of every clean beast thou shalt take to thee by sevens, the male and his female: and of beasts that are not clean by two, the male and his female. (Gen 7:2)
And Noah builded an altar unto the LORD; and took of every clean beast, and of every clean fowl, and offered burnt offerings on the altar. (Gen 8:20)
Well, had you read the narrative carefully, you would have realized that you are seriously mistaken.
If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall be his desire, and thou shalt rule over him. (Gen 4:7)
What does "sin lieth at the door" mean?
JAMIESON, FAUSSET, BROWN COMMENTARY
sin lieth at the door—sin, that is, a sin offering—a common meaning of the word in Scripture (as in Ho 4:8; 2Co 5:21; Heb 9:28). The purport of the divine rebuke to Cain was this, "Why art thou angry, as if unjustly treated? If thou doest well (that is, wert innocent and sinless) a thank offering would have been accepted as a token of thy dependence as a creature. But as thou doest not well (that is, art a sinner), a sin offering is necessary, by bringing which thou wouldest have met with acceptance and retained the honors of thy birthright." This language implies that previous instructions had been given as to the mode of worship; Abel offered through faith (Heb 11:4).
JOHN GILL'S COMMENTARY
...if thou doest thine offering well, or rightly offereth, as the Septuagint; or offers not only what is materially good and proper to be offered, but in a right way, in obedience to the divine will, from love to God, and with true devotion to him, in the faith of the promised seed, and with a view to his sacrifice for atonement and acceptance; then thine offering would be well pleasing and acceptable. Some render the latter part of the clause, which is but one word in the original text, "there will be a lifting up" (k); either of the countenance of the offerer, and so, if Cain had done well, his countenance would not have fallen, but have been lifted up, and cheerful as before; or of sin, which is the pardon of it, and is often expressed by taking and lifting it up, and bearing it away, and so of easing a man of it as of a burden; and in this sense all the Targums take it; which paraphrase it,"it or thy sin shall be forgiven thee:"