The gemara discusses the concept of l'av ha'nitak l'aseh - a negative prohibition that has a positive commandment to fix it and remove it, thereby replacing the malkus. The gemara says that there are 2 approaches to understanding the mechanics of לאו הניתק לעשה, one is קיימו ולא קיימו and the other is בטלו ולא בטלו. On 16a the gemara explores the la'avin that fit within the framework of בטלו ולא בטלו and can only come up with two (shiluach ha'kan and pe'ah). As the gemara discusses the issue, it becomes apparent that to fulfill בטלו ולא בטלו, one would not only have to lose the opportunity of fulfilling the a'seh, but it would have to be uprooted very actively by him. Rashi 15a explains based on this gemara that according to the opinion of בטלו ולא בטלו, we conceptualize a לאו הניתק לעשה as a prohibition which has two parts, the violation of the l'av and the uprooting of the a'seh. The la'av is not transgressed by the violation of the l'av until the opportunity to fulfill the aseh is destroyed. We consider the uprooting of the a'seh as part of the violation and therefore insist that it is done by him.
However, in the world of קיימו ולא קיימו, the gemara never develops the concept. But, rashi explains that according to this approach we view the l'av to be transgressed immediately upon violation, just that he has an opportunity to fix it. Rashi holds that the opportunity is a one time deal as soon as he walks into beis din (Tosafos suggests that it may be as short as a few seconds from the time of violation). Therefore, one would not have to uproot any possibility of fulfilling the l'av in order to receive malkus.
The opinion of the Rambam in this is very difficult and is already dealt with by the Kesef Mishna and Lechem Mishna. There are primarily 3 different Rambam's:
1. Sanhedrin 16:4 - Rambam uses term "kiyeim" implying he holds קיימו ולא קיימו, but then says that safeik warning is valid, which the gemara says fits with the opinion of בטלו ולא בטלו. The kesef mishna tries to suggest that the Rambam borrows the term "kiyeim" but really means bitul - very difficult to accept. Ultimately he says that the Rambam paskens קיימו ולא קיימו.
2. Sanhedrin 18:2 - Rambam also uses terms that implies he holds קיימו ולא קיימו, but doesn't seem to describe it according to our framework. The Rambam should have written that if he violates the la'v and doesn't fulfill the aseh, he gets malkus. Instead the Rambam writes a very confusing sentence - "He doesn't receive malkus unless he doesn't fulfill the a'seh". The Rambam seems to be describing as default that there is no malkus (unless he doesn't fulfill the aseh), which conforms better to the approach of בטלו ולא בטלו, but uses the term ki'yeim.
3. Na'arah Besula 1:7 - The Rambam writes that if he divorces his wife (that he raped), he doesn't get malkus because he can still fulfill the aseh. But, if she dies or marries someone else then he gets malkus. This Rambam seems to be the most difficult because it doesn't fit into either framework. According to the בטלו ולא בטלו approach, he should have to uproot the aseh himself, and according to the קיימו ולא קיימו framework he should get malkus even without the opportunity being lost by her dying or remarrying someone else.
This last Rambam really serves as the key for his approach (as the lechem mishna explains in hilchos sanhedrin 18). The Rambam understands that both קיימו ולא קיימו and בטלו ולא בטלו require the opportunity of the aseh to be lost in order to get malkus. The difference between them is whether he must uproot it himself (bit'lo), or if it is sufficient for the opportunity to be lost even when not his fault (lo kiymo). The Rambam paskens like the approach of קיימו ולא קיימו but interprets it differently than rashi and tosafos. Rambam understands that the la'av is tied to the opportunity of the a'seh being lost, and only then does he receive malkus. With this all the other Rambam's work out כמין חומר. The Rambam holds that even according to קיימו ולא קיימו, the la'av is not fully violated until the opportunity of the aseh is lost, therefore it still is considered a hasra'as safeik (sanhedrin 16). The Rambam doesn't write that you get malkus unless the aseh is fulfilled, because the default is that you don't get malkus unless the opportunity of the aseh is lost (sanhedrin 18). With this it is very clear why the Rambam holds that the woman he divorced must die or remarry for him to violate the l'av and receive malkus.