US President Donald Trump speaks to members of the US military following a meeting at the Pentagon in Washington, DC, July 20, 2017. / AFP PHOTO / SAUL LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)SAUL LOEB

Early Wednesday morning, Donald Trump announced via Twitter that he was banning transgender people from serving in the U.S. military, reinstating a previous rule that former President Barack Obama had lifted roughly a year prior. He claimed his decision was due to the “tremendous medical costs,” (seemingly of providing gender-affirming surgeries to transgender personnel) as well as the “disruptions” such personnel “would entail.”

While the announcement itself was plenty criticized, more details are now being reported that show how hypocritical and contradictory Trump’s reasons for the ban — and his shifts in ideology — are. Here’s what you need to know.

1. The military spends 10 times more money on erectile dysfunction medication than it would on gender affirmation-related costs for transgender personnel. A 2016 study from RAND Corporation, a nonprofit global policy think tank, estimated that gender-affirmation treatment for transgender military personnel would increase annual health care costs by between $2.4 million and $8.4 million, representing a 0.04 to 0.13% increase in the military’s yearly healthcare costs. In contrast, Military Timesreported that, according to data from the Defense Health Agency, the U.S. Department of Defense spends $84 million each year on erectile dysfunction medications like Viagra, which is roughly 10 times the amount it would spend on gender affirmation-related treatment, according to the RAND Corporation estimate. Viagra alone accounts for almost half of the erectile dysfunction medication expenditures, which means the military spends five times more on it than they potentially would on gender affirmation-related healthcare costs.

2. Research debunks Trump’s claim that transgender people would cause “disruptions” to personnel. That same RAND Corporation study reported that, based on earlier integration efforts, there’s “minimal likely impact on force readiness” from having transgender personnel in the ranks.

3. During the 1990s, Trump argued in The Advocate that gay people could serve in the military because they were successful in other professions. “If a gay person can be a doctor or a lawyer or a teacher or take another position of responsibility, why can’t they serve this country in the military?” he asked. He said that the military’s “Don‘t Ask, Don’t Tell” policy, where gay and lesbian military personnel could serve as long as they didn’t speak about their sexual orientation, had “failed.” Under this same Trump logic, why would this be any different for trans people who also hold “positions of responsibility”?

4. Trump tweeted in June 2016 about how he would “fight for” the LGBT community if he were to win the election that November. “Thank you to the LGBT community! I will fight for you while Hillary brings in more people that will threaten your freedoms and beliefs,” he wrote at the time. A reminder: the “T” in LGBT stands for “transgender.”

5. The ban was reportedly the result of an internal conflict among Republicans in the House of Representatives.Politicoreported on Wednesday that GOP insiders were worried that a spending bill containing funding for Trump’s border wall and other projects wouldn’t be supported by certain Republicans unless the Pentagon banned taxpayer money from going toward gender-affirming surgeries for transgender military personnel. Trump allegedly used the ban as a way to win votes for the bill.