(Ibid.) "You shall not commit adultery": (Leviticus 20:10) "The adulterer and the adulteress shall be put to death" tells us of the punishment. Whence the exhortation? "You shall not commit adultery."
Why the Torah States Both the Punishment and the Prohibition for Adultery
Mekhilta Tractate Bachodesh 8:11