Rivalry boosts your attack by 1.25x against an opponent of same gender. It does not lower the attack if the gender is opposite. It just doesn't do anything
Complete damage formula says:
Rivalry - UA = 1.25 if the user is of the same gender as the targeted Pokémon, UA = 0.75 if the user is of the opposite gender of the targeted Pokémon
Are you sure?