Sorry for not including copiable code in the original message; it didn't seem to me to bear on the question of comparing two functions, and it didn't render quite as I expected. Should work, though.
(* Original, intended definition *)
MDistribution[f_, a_] = ProbabilityDistribution[a*Cos[f*2*\[Pi]*x] + 1, {x, 0, 1}];
(* The above behaves oddly at the endpoints, this was the suggested fix: *)
pdf2 = Piecewise[{{0, 1 < x < \[Infinity]}, {a*Cos[f*2*\[Pi]*x] + 1, 0 <= x <= 1}, {0, -\[Infinity] < x < 0}}]
MDistribution[f_, a_] = ProbabilityDistribution[pdf2, {x, -\[Infinity], \[Infinity]}];
FullSimplify[ForAll[n, PDF[MDistribution[f, 0]][n] == PDF[UniformDistribution[{0, 1}]][n]]]
FullSimplify[ForAll[n, CDF[MDistribution[f, 0]][n] == CDF[UniformDistribution[{0, 1}]][n]]]
Thank you for looking!