Is repeating the obligatory prayer mandatory?
Chapter on the Times When Prayer is Prohibited
Al-Mughni
Book of Prayer
Primary text
Repeating the obligatory prayer is not mandatory. The established ruling is that it is a supererogatory act (Nafl), and Nafl acts are not obligatory. The evidence is the statement of the Prophet (peace be upon him), "Do not perform a prayer twice in one day," which implies that performing it twice means the second is not obligatory in the sense of an imposed duty.
Supporting text
A secondary opinion within our school suggests that repeating the prayer becomes obligatory when joining the Imam of the locality, based on the Prophet's instruction to join the congregation.