QUESTION: The Chachamim instituted that the thirteenth of Adar be observed as a day of commemorative celebration, called "Yom Taryanus," or Trajan Day. This is one of the Yamim Tovim recorded in Megilas Ta'anis on which fasting is prohibited. This Yom Tov commemorates the events that occurred when Taryanus, the wicked Roman emperor, sought to execute Lulianus and Papus, two Jews who willingly gave up their lives Al Kidush Hash-m and who became known as the "Harugei Lud." They told Taryanus that Hash-m put them into his hands in order to punish him if he killed them. He killed them and, indeed, immediately afterwards a delegation arrived from Rome and killed Taryanus in a gruesome fashion. A Yom Tov was instituted to commemorate the awesome vengeance that Hash-m demonstrated for His loved ones.
The simple understanding is that this day celebrates Hash-m's act of retribution against the killer, through which He showed the world that He avenges the blood of His beloved. However, something tragic also happened on this day -- the righteous Lulianus and Papus were put to death. Why is it fitting to institute a day of celebration on the day on which two Tzadikim were murdered? Had they come away alive, there would have been reason to celebrate, but their deaths on that day should eliminate any cause for celebration.
(a) RASHI explains that initially the Romans decreed annihilation for all of the Jewish people. Through the martyrdom of Lulianus and Papus, the rest of the Jewish people were saved. It is that salvation which is celebrated on Yom Taryanus.
(b) The DIKDUKEI SOFRIM records a different Girsa of the Gemara based on the text of a manuscript which omits the words "nevertheless he killed them." According to that Girsa, Taryanus did not succeed in killing Lulianus and Papus before his sudden death.
This is also the way the incident is recorded in Megilas Ta'anis (ch. 12) and in Toras Kohanim (Parshas Emor, ch. 9). Since the evil ruler was killed before he carried out his plan to kill the Jews and they were miraculously spared, the Chachamim enacted a day of celebration on that date.
This approach explains why the Yerushalmi says that the Chachamim cancelled the celebration of Yom Taryanus when Lulianus and Papus were killed (and not Shemayah and Achiyah, as the Gemara here says a few lines earlier). The Yerushalmi means that although the Yom Tov was instituted when they were saved from the hands of Taryanus, it was annulled when the same two Tzadikim were killed by another governing body some years later.
This might also be the intention of the ARUCH (recorded in the margin of the Gemara here) who writes that Shemayah and Achiyah were the Harugei Lud. Why does the Aruch say that Shemayah and Achiyah were the Harugei Lud when the Beraisa says that Lulianus and Papus were the brothers killed in "Ludkia" (Lydia, or Lud, as Rashi explains; see also Midrash Koheles Rabah 9:8)? It must be that Shemayah and Achiyah were the Hebrew names of Lulianus and Papus. (See YEFEH EINAYIM.)
The YEFEH EINAYIM also cites the exact circumstances under which Lulianus and Papus were eventually killed. He refers to the Yerushalmi (Shevi'is 4:2) which states that Lulianus and Papus were killed when they refused to drink from a cup which the emperor gave to them, upon which was inscribed the name of an Avodah Zarah. This event occurred later, after the miraculous incident with Taryanus. Apparently, when they were killed by the new emperor, the Chachamim annulled the Yom Tov which had been instituted to commemorate their salvation from the old one.
(According to this approach, Megilas Ta'anis -- which records the day of Yom Taryanus as a Yom Tov -- must have been written during the lives of Lulianus and Papus, shortly after the destruction of the Beis ha'Mikdash. See Shabbos 13b.)