Mozart and Da Ponte use the theme of "fiancée swapping", which dates back to the 13th century; notable earlier versions are found in Boccaccio's Decameron and Shakespeare's play Cymbeline. Elements from Shakespeare's The Taming of the Shrew are also present.