> My opponent is an idiot and believes X to be true, therefore X is false. (ad hominem)
and
> X is false. My opponent believes X to be true, therefore they are an idiot. (Not ad hominem.)
> My opponent is an idiot and believes X to be true, therefore X is false. (ad hominem)
and
> X is false. My opponent believes X to be true, therefore they are an idiot. (Not ad hominem.)