As mentioned it took lots of training, and Elwes' behind-the-scenes provides more detail into the monumental effort that may be less visible, but incredibly important to support the leading actors.
Source material
Goldman wrote the "Greatest Swordfight in Modern Times" using sources to inform his vision (p.66):
Books like The Academy of the Sword (1630) by the Flemish master Gerard Thibault d'Anvers. Or Great Representation of the Art and Use of Fencing, written by the Italian maestro Ridolfo Capo Ferro and dating back to 1610. And even Treatise on the Science of Arms with Philosophical Dialogue
Athleticism
The pairing of Elwes and Patinkin created competitive atmosphere. As Reiner describes (p.70):
I'm sure there was a sense of competition between Cary and Mandy, and I think that was probably healthy. This is a duel to the death, supposedly, and so it is a competition. I think that was there, for sure.
When trainers Anderson and Diamond, set expectations about how much can be learned and the potential need of stunt doubles for the "key moment in the sequence" (p.82):
Mandy, who said, almost without hesitation, "Don't worry. We'll get it."
The room was quiet for a moment. Mandy looked at me. What was I going to do? Did I think a stunt double might be necessary to stage "the Greatest Swordfight in Modern Times"? Of course it occurred to me that it might not be a bad idea after Bob had suggested it. Was I going to admit that now, seconds after Mandy had promised no such assistance was necessary?
Inspiration
The first exhibition of Elwes and Patinkin swordfighting on set (after basic training and the first couple months of shooting), they finish to applause by the crew, Anderson, and Diamond. However, Reiner responds "That's it?" (p.199):
Not exactly the response we had anticipated, as I'm sure you would agree. Mandy and I had spent so many hours practicing and perfecting the duel, mapping each and every step of the choreography, every thrust and parry of the fight, that we were now able to perform it not only fluidly but flawlessly
As a group they brainstormed,
collect every single swashbuckling movie available on video, including the ones we had already watched, and watch them again to find what we needed. Movies like The Crimson Pirate, The Mark of Zorro, Captain Blood, The Black Pirate, Adventures of Don Juan, The Count of Monte Cristo, The Three Musketeers, The Scarlet Pimpernel, The Sea Hawk, The Prisoner of Zenda, Scaramouche, etc.
Patinkin is quoted (p.207)
Rob wanted the actors to be seen doing all the fencing. He wanted full-body shots, as opposed to most other fencing pictures, where it would be the point of view of the actors. Where you would see only the hand of the other fencer off camera. In most movies, this would be done by a stunt double. But Rob was adamant that we do all the fighting ourselves.
It's really staggering, their on screen achievement is a testament to their entire production. From changing the set to build the tower and steps by production designer Norman Garwood (Time Bandits, Brazil, The Missionary), down to perfect fitting wardrobe by costume designer from Lawrence of Arabia and Doctor Zhivago, Phyllis Dalton.