Do irs rules trump district court judge rulings? I'm the custodial parent and the judge ruled my ex wife could claim her every other year because she pays child support.

Do I have to follow the district court ruling? Or do tax laws carry more weight?