אֵלֶּה תּוֹלְדֹת נֹחַ נֹחַ אִישׁ צַדִּיק
These are the generations of Noah; Noah was a just man (Genesis 6:9)
Rashi comments: Some of our Sages understood this verse to be praising Noah, inferring from the word "בדורותיו" (his generation) that if Noah had lived in a generation in which there were other righteous people, Noah would have been even more righteous than he was in his own generation. But others understood the verse to be denigrating Noah, inferring from "בְּדֹרֹתָיו" that he was considered a righteous person in his own generation, but if he had lived in the generation of Avraham, he would have been insignificant by comparison.
The question arises, why does Rashi, in describing the first view, say "if Noah had lived in a generation in which there were other righteous people," and, in describing the second view, "if he had lived in the generation of Avraham" instead of repeating "if he had lived in a generation in which there were other righteous people"?
And our master explained as follows. It says in the Midrash that Noah was judged unfavorably because he did not try to influence his contemporaries to repent of their wicked conduct. The reason that he did not try to do so was that his own faith was lacking, because his faith was merely a tradition which he had inherited from his ancestors who had been the righteous ones in every previous generation. However, lacking that received tradition, he would have been unable to recognize G-d with just his own knowledge and understanding. Noah, therefore, was not brave enough to challenge others in matters of faith, fearing that his own faith might be compromised and that he might become, just like his contemporaries, a man of deceit and corruption.
Our first father, Avraham, was not like this. When he was just three years old, he recognized his Creator. He was the one who could see the Lord in a vision; he knew with absolute certainty that a just G-d judges the land, and he had no fear that he might be ensnared by the forsaken opinions of his contemporaries. He therefore went out boldly to do battle for G-d, winning many converts to G-d in Haran, proclaiming, wherever he went, the name of the Lord, the everlasting G-d.
Both of the opinions about Noah mentioned by Rashi referred to this aspect of Noah's character. The opinion that understands the Scripture to be praising Noah, because he remained righteous in a thoroughly wicked generation, believes that the Scripture wishes to tell us how much more righteous Noah would have been had he lived in a generation in which there were other righteous people who believed in G-d. With their support, he would have dared, on G-d's behlaf, to wage with a mighty hand a battle against the wicked. He would not have been afraid of being ensnared by their wickedness, because he could have relied on the support of all the other righteous and holy ones of the generation. The second opinion that understands the Scripture to be denigrating Noah agrees that Noah would have been an even greater person had he lived in a generation in which there were other righteous people. But the second opinion is drawing a contrast between Noah and Avraham. For Avraham also lived in a generation in which everyone was backsliding and there was no one else who acted righteously. But, unlike Noah, Avraham went out singlehandedly to do battle against the wicked, and risked his own soul in order to cause others to repent and to teach them how to conduct themselves.
את האלהים התהלך נח
Noah walked with G-d (Genesis 6:9)
Rashi comments: And concerning Avraham the Scripture says "Whom I walked before" (אשר התהלכתי לפניו). Noah required support to bolster him, but Avraham strengthened himself and walked righteously by himself.
It appears to our master that this is referring to the Midrash that says that during the generations from Adam to Avraham when mankind was sinning willfully, G-d was continually withdrawing and distancing the Shehinah from the world. Because of His anger at the oppressors who filled the earth with violence, He removed Himself to the farthest corner, the Seventh Heaven, and because of the evil that was upon the land He rose to dwell in the highest abode. But from Avraham to Moshe, G-d was bringing the Shehinah closer to mankind and coming nearer to dwell on earth until He finally descended upon Mount Sinai.
According to this Midrash, the Scripture, in writing "את האלהים התהלך נח" (Noah walked with G-d), was teaching us that just as the Shehinah was rising ever higher and departing from the earth, Noah, too, was distancing himself from his contemporaries and dwelling alone, because he was afraid to mingle with them lest he be influenced by their conduct. But concerning Avraham the Scripture says: "אשר התהלכתי לפניו" (Whom I walked before) because Avraham took pride in saying that he walked in front of G-d to bring Him closer to a rebellious mankind. Because Avraham admonished them and led them to the wellsprings of belief, the Shehinah eventually followed Avraham and returned to dwell on earth.
כי אותך ראיתי צדיק לפני בדור הזה
For I have seen that you are righteous before me in this generation (Genesis 7:1)
In the Midrash Yalkut it says that we praise a man partially in his presence, but praise him fully outside of his presence. This apparently means that above where the Scripture is speaking about Noah (Genesis 6:8), it says "a completely righteous person" (צדיק תמים) but here where G-d is speaking directly to Noah, the Scripture says only "a righteous person" (צדיק).
But our master explained to us in the name of his father the gaon that the meaning of the Midrash can be understood in relation to the fact that a human being is the composite of a G-dly component from above and a parental component from below. Compared to the component from above, a person can never be called "complete," because in comparison to his Heavenly likeness, he will always be found lacking. But if a person is compared to his material component, he may be called "complete in his actions" (תמים במעשיו). This is what the Midrash means by the maxim "we praise a man partially in His presence" (i.e., with comparison to G-d) because in relation to Heaven ("צדיק לפני") a man is only a fraction of what he should have become. But when the Midrash says "we praise him fully outside of His presence" (i.e., in comparison to his material component) it is referring to the verse "These are the generations of Noah, Noah was a perfectly righteous man in his generations," which speaks of Noah's birth and ancestry. In comparison to his material origins, as opposed to his heavenly component, Noah was indeed completely righteous in his actions.