Verses 31 and 32 repeat each other because the rest of verse 31 is a historical aside. Alma wants to speak of Yahweh’s commandments, but first clarifies how they were given—hence his recap of the Garden of Eden story.
The first part of the aside—partaking of the fruit—is an interesting view of the theological problem of Adam’s violating the commandment not to eat. Alma concedes that it was a commandment, calling it part of “the first commandments.” However, he limits the scope of those commandments, saying they pertained “to things which were temporal.”
For Alma, eating the fruit was a temporal commandment with a temporal result. Alma has used “temporal” to mean “physical,” rather than related to “time.” That is, Alma has attached “temporal” to physical death (the “temporal death”) and thus means that this “temporal” commandment pertained to the body’s life. These commandments pertained to and maintained Adam’s original physical state. Therefore, it was applicable only to that state. It was not a commandment relating to the higher choice of eating the fruit of the tree of knowledge of good and evil, an act which gave Adam and Eve one of the attributes of “the gods.” Eating the fruit also caused physical death, for which the Messiah atoned.
The second aspect of the fall is humankind’s resulting susceptibility to sin. Alma does not say that Adam has sinned, but rather that he now might sin. After temporal death became an effective condition, the fall’s next effect was that Adam and Eve became “as Gods, knowing good from evil.” Of course, this is precisely what Genesis also says; but for Alma, it provides a clear indication of how spiritual death began. Knowing good from evil, human beings were now required to continually choose between them. Sometimes they would choose incorrectly. The second death was not externally imposed but came as a consequence of this new gift of knowledge.
“Becoming as Gods” was the process of “knowing good from evil.” Clearly, Alma suggests, this process was not an option for Adam and Eve prior to eating the fruit. Only now do they know the difference between good and evil. Was it a sin to eat the fruit? For Alma, the answer is a resounding no. If they did not know the difference between good and evil, they could not choose evil (sin). They chose, but without a moral measuring stick that would define what they did as either righteous or sinful.
What this knowledge did was to place Adam and Eve “in a state to act… whether to do evil or to do good.” Alma equates sin with willfully choosing evil—which could not happen before the fall because Adam and Eve were not under the law of opposition. (See commentary accompanying 2 Nephi 2:11–12.) Only after the fall do Adam and Eve have the capacity to act on this knowledge about good and evil. They do so, however, “according to their wills and pleasures.” In other words, Adam and Eve may now exercise their agency to act upon their knowledge of the difference between good and evil. The act of eating did not impose sin, but rather imposed a condition which allowed Adam and Eve to choose sin, just as it allowed them to choose righteousness. Prior to the condition that created the possibility of sin, there could be no sin; hence, there was no sin in eating the fruit.
According to my understanding, if Alma were to listen to modern debates about the sin in the garden and whether Adam sinned in eating the fruit, Alma would say that the question is irrelevant. Since Adam and Eve ate the fruit before they knew good from evil (before they were accountable for making choices according to their agency), the question is moot. By Alma’s definition, sin could occur only after partaking of the fruit. What the fruit did was institute the temporal death, because not eating the fruit was a temporal commandment. Eating the fruit opened the possibility of spiritual life through agency, but it also opened the possibility of sin by willfully violating God’s commandments. Adam may have brought death upon us all, but we bring the second death upon ourselves through our own exercise of agency.