La grotta di Trofonio (Trofonio's Cave) is an opera, described as an opera comica, in two acts (five scenes) composed by Antonio Salieri to an Italian libretto by Giovanni Battista Casti.
[1] The similarity of the story of the opera may have influenced Lorenzo da Ponte when he wrote the libretto of Mozart's Così fan tutte.
[2] Stefano Mandini Dori and Ofelia (sisters) are in love with Plistene and Artemidoro (friends).
The two pairs have contrasting personalities: Dori and Plistene are extroverted and enthusiastic, Ofelia and Artemidoro are introverted and reserved.
The magician Trofonio invites them to his magic cave where their characters are reversed, first the men and then the women.